Import Geant4 10.7.0 source tree

This commit is contained in:
Gabriele Cosmo
2020-12-04 12:30:43 +01:00
parent 67ba86d073
commit dab42d2018
3770 changed files with 226369 additions and 286486 deletions
+16 -4
View File
@@ -38,6 +38,7 @@
#include "G4RNGHelper.hh"
#include "G4RunManager.hh"
#include "G4Threading.hh"
#include "G4Profiler.hh"
#include <list>
#include <map>
@@ -45,11 +46,18 @@ class G4MTRunManagerKernel;
class G4ScoringManager;
class G4UserWorkerInitialization;
class G4UserWorkerThreadInitialization;
class G4RunManagerFactory;
// TODO: Split random number storage from this class
class G4MTRunManager : public G4RunManager
{
friend class G4RunManagerFactory;
public:
// the profiler aliases are only used when compiled with GEANT4_USE_TIMEMORY
using ProfilerConfig = G4ProfilerConfig<G4ProfileType::Run>;
public:
G4MTRunManager();
virtual ~G4MTRunManager();
@@ -100,6 +108,8 @@ class G4MTRunManager : public G4RunManager
// Adds one seed to the list of seeds
virtual void PrepareCommandsStack();
virtual void StoreRNGStatus(const G4String& filenamePrefix);
virtual void rndmSaveThisRun();
virtual void rndmSaveThisEvent();
virtual void CreateAndStartWorkers();
// Creates worker threads and signal to start
public:
@@ -175,12 +185,14 @@ class G4MTRunManager : public G4RunManager
return masterRNGEngine;
}
private:
protected:
// Handling of master thread scoring worlds, access to it is needed by workers
static G4ScoringManager* masterScM;
static masterWorlds_t masterWorlds;
G4MTRUN_DLL static G4ScoringManager* masterScM;
G4MTRUN_DLL static masterWorlds_t masterWorlds;
// Singleton implementing master thread behavior
static G4MTRunManager* fMasterRM;
G4MTRUN_DLL static G4MTRunManager* fMasterRM;
private:
G4MTRunManagerKernel* MTkernel;
public: // with description
+6
View File
@@ -30,7 +30,10 @@
#define G4Run_h 1
#include "globals.hh"
#include "G4Profiler.hh"
#include <vector>
class G4Event;
class G4HCtable;
class G4DCtable;
@@ -44,6 +47,9 @@ class G4DCtable;
class G4Run
{
public:
using ProfilerConfig = G4ProfilerConfig<G4ProfileType::Run>;
public:
G4Run();
virtual ~G4Run();
+22
View File
@@ -131,12 +131,20 @@ class G4PrimaryTransformer;
#include "G4Event.hh"
#include "G4EventManager.hh"
#include "G4RunManagerKernel.hh"
#include "G4Profiler.hh"
#include "globals.hh"
#include <algorithm>
#include <list>
class G4RunManagerFactory;
class G4RunManager
{
friend class G4RunManagerFactory;
public:
// the profiler aliases are only used when compiled with GEANT4_USE_TIMEMORY
using ProfilerConfig = G4ProfilerConfig<G4ProfileType::Run>;
public: // with description
static G4RunManager* GetRunManager();
// Static method which returns the singleton pointer of G4RunManager or
@@ -265,6 +273,17 @@ class G4RunManager
// G4VPersistentManager
// class is defined.
virtual void ConfigureProfilers(const std::vector<std::string>& args = {});
// This method configures the global fallback query and label generators
void ConfigureProfilers(int argc, char** argv);
// calls the above virtual method
virtual void SetNumberOfThreads(G4int) {}
virtual G4int GetNumberOfThreads() const { return 1; }
// Dummy methods to dispatch generic inheritance calls from G4RunManager
// base class.
public: // with description
//////////////////////////////////////////////////////void UpdateRegion();
// Update region list.
@@ -690,6 +709,9 @@ class G4RunManager
{
geometryDirectlyUpdated = val;
}
private:
std::unique_ptr<ProfilerConfig> masterRunProfiler;
};
#endif
+1 -1
View File
@@ -219,7 +219,7 @@ class G4VUserPhysicsList
// Store PhysicsTable together with both material and cut value
// information in files under the specified directory.
// (return true if files are sucessfully created)
// (return true if files are successfully created)
G4bool StorePhysicsTable(const G4String& directory = ".");
// Return true if "Retrieve" flag is ON.
+8
View File
@@ -46,6 +46,9 @@ class G4WorkerRunManagerKernel;
class G4WorkerRunManager : public G4RunManager
{
public:
using ProfilerConfig = G4ProfilerConfig<G4ProfileType::Run>;
public:
static G4WorkerRunManager* GetWorkerRunManager();
static G4WorkerRunManagerKernel* GetWorkerRunManagerKernel();
@@ -76,6 +79,8 @@ class G4WorkerRunManager : public G4RunManager
protected:
virtual void ConstructScoringWorlds();
virtual void StoreRNGStatus(const G4String& filenamePrefix);
virtual void rndmSaveThisRun();
virtual void rndmSaveThisEvent();
virtual void MergePartialResults();
// This method will merge (reduce) the results of this run into the
// global run
@@ -115,6 +120,9 @@ class G4WorkerRunManager : public G4RunManager
G4SeedsQueue seedsQueue;
G4bool readStatusFromFile;
private:
std::unique_ptr<ProfilerConfig> workerRunProfiler;
public:
virtual void RestoreRndmEachEvent(G4bool flag) { readStatusFromFile = flag; }
};
+10
View File
@@ -47,4 +47,14 @@
# define G4RUN_DLL
#endif
#if defined(WIN32) && defined(G4LIB_BUILD_DLL)
# if defined G4RUN_ALLOC_EXPORT
# define G4MTRUN_DLL __declspec(dllexport)
# else
# define G4MTRUN_DLL __declspec(dllimport)
# endif
#else
# define G4MTRUN_DLL
#endif
#endif /* G4RUNDEFS_HH */