39#ifndef G4SubEvtRunManager_hh
40#define G4SubEvtRunManager_hh 1
70 G4int n_select = -1)
override;
203 G4bool trajectoriesToBeMerged =
false;
204 std::map<G4int,G4int> fSubEvtTypeMap;
205 std::map<G4WorkerSubEvtRunManager*,G4int> fWorkerMap;
207 G4bool CheckSubEvtTypes();
211 { trajectoriesToBeMerged = val; }
_Tp G4GetEnv(const std::string &env_id, _Tp _default=_Tp())
std::queue< G4long > G4SeedsQueue
PTL::VUserTaskQueue G4VUserTaskQueue
static G4MTRunManager * GetMasterRunManager()
void MergeRun(const G4Run *) override
void RunTermination() override
void NewActionRequest(WorkerActionRequest) override
void Initialize(uint64_t nthreads) override
void RegisterSubEvtWorker(G4WorkerSubEvtRunManager *, G4int)
WorkerActionRequest ThisWorkerWaitForNextAction() override
void ConstructScoringWorlds() override
void AbortEvent() override
void CleanUpUnnecessaryEvents(G4int keepNEvents) override
void WaitForReadyWorkers() override
void CleanUpPreviousEvents() override
void AbortRun(G4bool softAbort=false) override
G4SubEvtRunManager(G4bool useTBB=G4GetEnv< G4bool >("G4USE_TBB", false))
void ComputeNumberOfTasks() override
void ProcessOneEvent(G4int i_event) override
void UpdateScoringForSubEvent(const G4SubEvent *se, const G4Event *evt) override
void RunInitialization() override
void StackPreviousEvent(G4Event *anEvent) override
std::size_t GetNumberActiveThreads() const override
G4int SetUpNEvents(G4Event *, G4SeedsQueue *, G4bool=true) override
std::atomic< G4bool > runInProgress
void AddEventTask(G4int) override
~G4SubEvtRunManager() override
void TerminateOneEvent() override
void SetUserInitialization(G4VUserPhysicsList *userPL) override
void MergeTrajectories(const G4SubEvent *se, const G4Event *evt) override
void InitializeEventLoop(G4int n_event, const char *macroFile=nullptr, G4int n_select=-1) override
void SubEventFinished(const G4SubEvent *se, const G4Event *evt) override
void WaitForEndEventLoopWorkers() override
void SetUpSeedsForSubEvent(G4long &s1, G4long &s2, G4long &s3)
void MergeScores(const G4ScoringManager *localScoringManager) override
void TerminateWorkers() override
void Initialize() override
void CreateAndStartWorkers() override
void ThisWorkerProcessCommandsStackDone() override
void RequestWorkersProcessCommandsStack() override
static G4SubEvtRunManager * GetMasterRunManager()
void RegisterSubEventType(G4int ty, G4int maxEnt) override
friend class G4RunManagerFactory
void RefillSeeds() override
G4bool InitializeSeeds(G4int) override
void TrajectoriesToBeMerged(G4bool val=true) override
const G4SubEvent * GetSubEvent(G4int ty, G4bool ¬Ready, G4long &s1, G4long &s2, G4long &s3, G4bool reseedRequired=true) override
void SetUserAction(G4UserRunAction *userAction) override
G4bool SetUpAnEvent(G4Event *, G4long &, G4long &, G4long &, G4bool=true) override
G4VUserTaskQueue *& taskQueue
G4int numberOfEventsPerTask
G4ThreadPool *& threadPool
G4TaskRunManager(G4bool useTBB=G4GetEnv< G4bool >("G4USE_TBB", false))
virtual void Initialize(uint64_t n=std::thread::hardware_concurrency())