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