38#ifndef G4MTRunManager_hh
39#define G4MTRunManager_hh 1
92 G4bool reseedRequired =
true);
102 G4bool reseedRequired =
true);
139 return masterRNGEngine;
281 using G4ThreadsList = std::list<G4Thread*>;
284 G4int pinAffinity = 0;
286 G4ThreadsList threads;
289 std::vector<G4String> uiCmdsForWorkers;
std::queue< G4long > G4SeedsQueue
static G4int SeedOncePerCommunication()
virtual void SetUserAction(G4UserRunAction *userAction)
virtual void InitializeThreadPool()
virtual WorkerActionRequest ThisWorkerWaitForNextAction()
static void SetSeedOncePerCommunication(G4int val)
virtual void AbortEvent()
G4int numberOfEventToBeProcessed
virtual void ProcessOneEvent(G4int i_event)
virtual void TerminateOneEvent()
G4int GetPinAffinity() const
virtual void rndmSaveThisEvent()
virtual void SetUserInitialization(G4VUserPhysicsList *userPL)
virtual G4bool InitializeSeeds(G4int)
virtual void WaitForReadyWorkers()
G4MTBarrier beginOfEventLoopBarrier
void SetEventModulo(G4int i=1)
virtual void CreateAndStartWorkers()
virtual void SetNumberOfThreads(G4int n)
virtual ~G4MTRunManager()
virtual void ThisWorkerProcessCommandsStackDone()
virtual G4int SetUpNEvents(G4Event *, G4SeedsQueue *seedsQueue, G4bool reseedRequired=true)
virtual G4bool SetUpAnEvent(G4Event *, long &s1, long &s2, long &s3, G4bool reseedRequired=true)
const CLHEP::HepRandomEngine * getMasterRandomEngine() const
static void addWorld(G4int counter, G4VPhysicalVolume *w)
virtual void InitializeEventLoop(G4int n_event, const char *macroFile=0, G4int n_select=-1)
virtual void PrepareCommandsStack()
static G4ScoringManager * GetMasterScoringManager()
static G4MTRUN_DLL G4ScoringManager * masterScM
virtual void Initialize()
static G4MTRUN_DLL G4MTRunManager * fMasterRM
virtual void ThisWorkerReady()
static G4MTRunManagerKernel * GetMTMasterRunManagerKernel()
static G4int seedOncePerCommunication
virtual void RunTermination()
static G4MTRUN_DLL masterWorlds_t masterWorlds
virtual G4int GetNumberOfThreads() const
virtual size_t GetNumberActiveThreads() const
virtual void ConstructScoringWorlds()
G4int GetEventModulo() const
static G4MTRunManager * GetMasterRunManager()
virtual void StoreRNGStatus(const G4String &filenamePrefix)
virtual void WaitForEndEventLoopWorkers()
WorkerActionRequest nextActionRequest
std::map< G4int, G4VPhysicalVolume * > masterWorlds_t
virtual void AbortRun(G4bool softAbort=false)
virtual void RefillSeeds()
virtual void rndmSaveThisRun()
static G4ThreadId masterThreadId
G4MTBarrier processUIBarrier
static G4ThreadId GetMasterThreadId()
void MergeRun(const G4Run *localRun)
G4MTBarrier endOfEventLoopBarrier
G4MTBarrier nextActionRequestBarrier
virtual void TerminateWorkers()
static masterWorlds_t & GetMasterWorlds()
static G4ThreadId GetMasterTheadId()
virtual void RequestWorkersProcessCommandsStack()
static G4RunManagerKernel * GetMasterRunManagerKernel()
void MergeScores(const G4ScoringManager *localScoringManager)
virtual void NewActionRequest(WorkerActionRequest newRequest)
void SetPinAffinity(G4int n=1)
std::vector< G4String > GetCommandStack()
virtual void ThisWorkerEndEventLoop()