Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4RunManager.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// G4RunManager
27//
28// Class description:
29//
30// This is a class for run control in Geant4
31//
32// For the sequential mode of Geant4 application, user must provide his
33// own classes derived from the following three abstract classes and register
34// them to the RunManager:
35// G4VUserDetectorConstruction - Detector Geometry, Materials
36// G4VUserPhysicsList - Particle types and Processes
37// G4VUserPrimaryGeneratorAction - Event Generator selection
38//
39// In addition to the above mandatory classes, user can easily customise
40// the default functionality of a Geant4 simulation by deriving his own
41// classes from the following 5 user-action classes:
42// G4UserRunAction - Actions for each Run
43// G4UserEventAction - Actions for each Event
44// G4UserStackingAction - Tracks Stacking selection
45// G4UserTrackingAction - Actions for each Track
46// G4UserSteppingAction - Actions for each Step
47//
48// User may use G4VUserActionInitialization class to instantiate any of
49// the six user action-classes (1 mandatory + 6 optional).
50// In this case, user's concrete G4VUserActionInitialization should be
51// defined to the RunManager.
52//
53// If in multi-threaed mode, a user must provide his own classes derived
54// from the following two abstract classes and register them to the
55// G4MTRunManager or G4TaskingRunManager:
56// G4VUserDetectorConstruction - Detector Geometry, Materials
57// G4VUserPhysicsList - Particle types and Processes
58// In addition, user may optionally specify the following:
59// G4UserWorkerInitialization - Defining thread-local actions
60// G4UserRunAction - Actions for entire Run
61//
62// In multi-threaded mode, the use of G4VUserActionInitialization
63// is mandatory.
64// In G4VUserActionInitialization, the user has to specify
65// G4VUserPrimaryGeneratorAction class. In addition, the default
66// functionality of a Geant4 simulation can be customised by making
67// user's classes derived from the following 5 user-action classes:
68// G4VUserPrimaryGeneratorAction - Event Generator selection
69// G4UserRunAction - Actions for each tread-local Run
70// G4UserEventAction - Actions for each Event
71// G4UserStackingAction - Tracks Stacking selection
72// G4UserTrackingAction - Actions for each Track
73// G4UserSteppingAction - Actions for each Step
74//
75// G4RunManager MUST be constructed (either explicitly or through
76// G4RunManagerFactory) by the user in the main() for enabling sequential
77// mode operation of a Geant4 application.
78//
79// In multi-threaded mode, G4MTRunManager is the dedicated run manager
80// which the user MUST construct (either explicitly or through
81// G4RunManagerFactory) in the main().
82//
83// Note: G4WorkerRunManager is the run manager for an individual thread,
84// and is instantiated automatically; the user does not need to take care
85// of instantiating/deleting it.
86// Also, the behavior of the run control can be customised by deriving
87// a user class from G4RunManager. In this case, the user should directly
88// use the provided protected methods in this class for procedures he/she
89// does not want to change.
90//
91// G4RunManager (or a derived class of it) MUST act as a singleton.
92// The user MUST NOT construct more than one such object even if there
93// are two different concrete implementations, nor its state can be reset
94// to zero, once the object has been created.
95//
96// G4RunManager controls all of state changes. See G4ApplicationState.hh
97// in intercoms category for the meaning of each application state.
98
99// Original author: M.Asai, 1996
100// --------------------------------------------------------------------
101#ifndef G4RunManager_hh
102#define G4RunManager_hh 1
103
104#include <algorithm>
105#include <list>
106
107#include "rundefs.hh"
108#include "globals.hh"
109#include "G4Event.hh"
110#include "G4EventManager.hh"
111#include "G4RunManagerKernel.hh"
112#include "G4Profiler.hh"
113
114// userAction classes
120class G4UserRunAction;
126
128class G4LogicalVolume;
129class G4Region;
130class G4Timer;
131class G4RunMessenger;
132class G4DCtable;
133class G4Run;
136
138{
140
141 public:
142
144 // the profiler aliases are only used when compiled with the
145 // GEANT4_USE_TIMEMORY flag enabled.
146
147 static G4RunManager* GetRunManager();
148 // Static method which returns the singleton pointer of G4RunManager
149 // or its derived class.
150 // Note this returns the per-thread singleton in case of a
151 // multi-threaded build.
152
153 G4RunManager();
154 virtual ~G4RunManager();
155 // The constructor and the destructor. The user must construct
156 // this class object at the beginning of his/her main() and must
157 // delete it at the bottom of the main().
158
159 G4RunManager(const G4RunManager&) = delete;
161 // Forbidden copy constructor and assignment operator.
162
163 virtual void BeamOn(G4int n_event, const char* macroFile = nullptr,
164 G4int n_select = -1);
165 // This method starts an event loop of "n_event" events. The condition of
166 // Geant4 is examined before starting the event loop. This method must be
167 // invoked at 'Idle' state. The state will be changed to 'GeomClosed'
168 // during the event loop and will go back to 'Idle' when the loop is over
169 // or aborted.
170 // In case a string "macroFile" which represents the name of a macro file
171 // is provided, the macro file will be executed AT THE END of each event
172 // processing. In case "n_select" is greater than zero, at the end of the
173 // first "n_select" events, the macro file is executed.
174
175 virtual void Initialize();
176 // This method invokes all the necessary initialisation procedures for an
177 // event loop. This method must be invoked at the Geant4 'PreInit' state
178 // or 'Idle'. The state will be changed to 'Init' during initialization
179 // procedures and then changed to 'Idle'.
180 // This method invokes two protected methods, InitializeGeometry() and
181 // InitializePhysics().
182 // After some event loops, the user can invoke this method once again.
183 // It is required if the user changes geometry, physics process, and/or
184 // cut-off value. If the user forget the second invocation, the BeamOn()
185 // method will invoke this method (Note that this feature is not valid
186 // for the first initialization).
187
188 virtual void DefineWorldVolume(G4VPhysicalVolume* worldVol,
189 G4bool topologyIsChanged = true);
190 // This method must be invoked if the geometry setup has been changed
191 // between runs. The flag "topologyIsChanged" will specify if the geometry
192 // topology is different from the original one used in the previous run;
193 // if not, it must be set to false, so that the original optimisation and
194 // navigation history are preserved. This method is invoked also at
195 // initialisation.
196
197 virtual void AbortRun(G4bool softAbort = false);
198 // This method safely aborts the current event loop even if an event is
199 // in progress. This method is available for 'GeomClosed' and 'EventProc'
200 // Geant4 states. The application state will be changed to 'Idle', so that
201 // another event loop can be processed.
202 // If the "softAbort" flag is true, the event loop is aborted after
203 // processing the current event, while the current event is aborted if the
204 // flag is set to false.
205
206 virtual void AbortEvent();
207 // This method aborts the currently processing event, remaining events
208 // in the current event loop will be processed. This method is available
209 // only for 'EventProc' application state.
210
211 virtual void InitializeGeometry();
212 virtual void InitializePhysics();
213 // These methods are invoked from the Initialize() method for the
214 // initializations of geometry and physics processes. The user's concrete
215 // G4VUserDetectorConstruction class will be accessed from the method
216 // InitializeGeometry() and the G4VUserPhysicsList class will be accessed
217 // from the method InitializePhysics().
218
220 virtual void RunInitialization();
221 virtual void DoEventLoop(G4int n_event, const char* macroFile = nullptr,
222 G4int n_select = -1);
223 virtual void RunTermination();
224 // These four methods are invoked from the BeamOn() method and they're
225 // invoked in this order.
226 // ConfirmBeamOnCondition() method checks if all the necessary
227 // initialisations have been done already. If the condition is not
228 // satisfied, false is returned and the following three methods will be
229 // skipped.
230 // The RunInitialization() method initialises a run. e.g., a G4Run class
231 // object is constructed in this method.
232 // The DoEventLoop() method controls an event loop. Arguments are the same
233 // as for the BeamOn() method.
234 // Inside the event loop, the two following methods are invoked at the
235 // beginning and at the end of each event.
236 // The RunTermination() method terminates a run processing. e.g., a G4Run
237 // class object is deleted in this method. If the user adopts ODBMS and
238 // wants to store the G4Run object, he/she must override this method.
239
240 virtual void InitializeEventLoop(G4int n_event,
241 const char* macroFile = nullptr,
242 G4int n_select = -1);
243 virtual void ProcessOneEvent(G4int i_event);
244 virtual void TerminateOneEvent();
245 virtual void TerminateEventLoop();
246 // Granular virtual methods invoked from DoEventLoop().
247
248 virtual G4Event* GenerateEvent(G4int i_event);
249 virtual void AnalyzeEvent(G4Event* anEvent);
250 // These two methods are invoked from DoEventLoop() at the beginning and
251 // at the end of each event processing.
252 // GenerateEvent() constructs a G4Event class object and invoke the user's
253 // G4VUserPrimaryGeneratorAction concrete class. If the user is adopting
254 // an ODBMS system and event objects have been created and stored in the
255 // data-base, he/she must override this method.
256 // AnalyzeEvent() stores an event to a data-base if a concrete
257 // G4VPersistentManager class is defined.
258
259 virtual void ConfigureProfilers(const std::vector<std::string>& args = {});
260 // This method configures the global fallback query and label generators.
261 void ConfigureProfilers(G4int argc, char** argv);
262 // Calls the above virtual method.
263
264 virtual void SetNumberOfThreads(G4int) {}
265 virtual G4int GetNumberOfThreads() const { return 1; }
266 // Dummy methods to dispatch generic inheritance calls from G4RunManager
267 // base class.
268
269 void DumpRegion(const G4String& rname) const;
270 // Dump information of a region.
271 void DumpRegion(G4Region* region = nullptr) const;
272 // Dump information of a region.
273 // If the pointer is NULL, all regions are shown.
274
275 void GeometryHasBeenModified(G4bool prop = true);
276 // This method must be invoked (or equivalent UI command can be used)
277 // in case the user changes his/her detector geometry after Initialize()
278 // method has been invoked. Then, at the beginning of the next BeamOn(),
279 // all necessary geometry optimisations will be made.
280 // The parameter "prop" has to be true if this C++ method is directly
281 // invoked.
282
283 void ReinitializeGeometry(G4bool destroyFirst = false, G4bool prop = true);
284 // This method must be invoked (or equivalent UI command can be used)
285 // in case the user needs his/her detector construction has to be
286 // re-invoked. Geometry optimisations will be also done.
287 // If the first parameter "destroyFirst" is true, G4SolidStore,
288 // G4LogicalVolumeStore and G4PhysicalVolumeStore are cleaned up, and
289 // thus all solids, logical volumes and physical volumes previously
290 // defined are deleted.
291 // The second parameter "prop" has to be true if this C++ method is
292 // directly invoked.
293
295 // This method must be invoked (or equivalent UI command can be used)
296 // in case the user changes his/her physics process(es), e.g. (in)activate
297 // some processes. Once this method is invoked, regardless of cuts are
298 // changed or not, BuildPhysicsTable() of a PhysicsList is invoked for
299 // refreshing all physics tables.
300
302 {
303 G4cerr << "CutOffHasBeenModified becomes obsolete." << G4endl;
304 G4cerr << "It is safe to remove invoking this method." << G4endl;
305 }
306
308 // This method may be used if the orientation and/or size of a
309 // particular physical volume has been modified while the rest of the
310 // geometries in the world has not been changed. This avoids the
311 // full re-optimisation of the entire geometry tree which is forced
312 // if GeometryHasBeenModified() method is invoked.
313
315 // Same as above, but the mother logical volume is specified instead.
316
318 {
319 if(geometryToBeOptimized != vl)
320 {
324 }
325 }
327 {
329 }
330
332 {
334 }
335
337 // This is used only by workers thread to reset RNG engines from files
338 // that are event specific. Not implemented for sequential since run seed
339 // defines event seeds.
340
341 virtual void ConstructScoringWorlds();
342
343 virtual void rndmSaveThisRun();
344 virtual void rndmSaveThisEvent();
345 virtual void RestoreRandomNumberStatus(const G4String& fileN);
346 virtual void RestoreRndmEachEvent(G4bool) { /* No effect in SEQ */ }
347
349 virtual void SetUserInitialization(G4VUserPhysicsList* userInit);
353 virtual void SetUserAction(G4UserRunAction* userAction);
354 virtual void SetUserAction(G4VUserPrimaryGeneratorAction* userAction);
355 virtual void SetUserAction(G4UserEventAction* userAction);
356 virtual void SetUserAction(G4UserStackingAction* userAction);
357 virtual void SetUserAction(G4UserTrackingAction* userAction);
358 virtual void SetUserAction(G4UserSteppingAction* userAction);
359 // Set user-actions and user-initialization to the kernel.
360 // Store respective user initialization and action classes.
361 // In MT mode, actions are shared among all threads, and should be set
362 // in the master thread, while user-actions are thread-private and each `
363 // thread has private instances. Master thread does not have user-actions
364 // except for the (optional) run-action.
365 // User should instantiate the user-actions in the action-initialization
366 // and use that class' setters to set user-actions and *not* directly
367 // the methods provided here.
368 // Multiple Run, Event, Tracking and Stepping actions are allowed, the
369 // multiple instances will be appended to the current configuration.
370 // Multiple Stacking and PrimaryGeneration are not allowed.
371
373 {
374 return userDetector;
375 }
377 {
378 return physicsList;
379 }
381 {
383 }
385 {
387 }
389 {
391 }
393 {
395 }
396 inline const G4UserRunAction* GetUserRunAction() const
397 {
398 return userRunAction;
399 }
401 {
403 }
405 {
406 return userEventAction;
407 }
409 {
410 return userStackingAction;
411 }
413 {
414 return userTrackingAction;
415 }
417 {
418 return userSteppingAction;
419 }
420 // Methods returning respective user initialization and action classes.
421
423 // Set the number of additional (optional) waiting stacks.
424 // This method must be invoked at 'PreInit', 'Init' or 'Idle' states.
425 // Once the user sets the number of additional waiting stacks,
426 // he/she can use the corresponding ENUM in G4ClassificationOfNewTrack.
427 {
429 }
430
431 inline const G4String& GetVersionString() const
432 {
433 return kernel->GetVersionString();
434 }
435
437 {
439 }
440
442 // if vl = 1 : status before primary particle generation is stored
443 // if vl = 2 : status before event processing (after primary particle
444 // generation) is stored if vl = 3 : both are stored if vl = 0 : none is
445 // stored (default).
446 {
449 }
450
452 {
454 }
455
456 inline void SetRandomNumberStore(G4bool flag)
457 {
459 }
461 {
463 }
464 inline void SetRandomNumberStoreDir(const G4String& dir)
465 {
466 G4String dirStr = dir;
467 if(dirStr.back() != '/')
468 dirStr += "/";
469 #ifndef WIN32
470 G4String shellCmd = "mkdir -p ";
471 #else
472 std::replace(dirStr.begin(), dirStr.end(), '/', '\\');
473 G4String shellCmd = "if not exist " + dirStr + " mkdir ";
474 #endif
475 shellCmd += dirStr;
476 randomNumberStatusDir = dirStr;
477 G4int sysret = system(shellCmd);
478 if(sysret != 0)
479 {
480 G4String errmsg = "\"" + shellCmd
481 + "\" returns non-zero value. Directory creation failed.";
482 G4Exception("GrRunManager::SetRandomNumberStoreDir", "Run0071",
483 JustWarning, errmsg);
484 G4cerr << " return value = " << sysret << G4endl;
485 }
486 }
487 inline const G4String& GetRandomNumberStoreDir() const
488 {
490 }
492 {
494 }
496 {
499 {
500 G4Exception("GrRunManager::SetRandomNumberStoreDir", "Run0072",
502 "Random number status is not available for this event.");
503 }
505 }
507 {
508 rngStatusEventsFlag = flag;
509 }
511 {
512 return rngStatusEventsFlag;
513 }
514
515 inline void SetVerboseLevel(G4int vl)
516 {
517 verboseLevel = vl;
519 }
520 inline G4int GetVerboseLevel() const { return verboseLevel; }
521 inline G4int GetPrintProgress() { return printModulo; }
522 inline void SetPrintProgress(G4int i) { printModulo = i; }
523
525 // Sets the number of events to be kept after processing. That is,
526 // "val" previous events can be used with the most recent event for
527 // digitizing pileup. "val"+1 previous event is deleted.
528 // This method must be invoked before starting the event loop.
529 {
531 }
532
533 inline const G4Run* GetCurrentRun() const { return currentRun; }
534 inline G4Run* GetNonConstCurrentRun() const { return currentRun; }
535 // Returns the pointer to the current run. This method is available for
536 // 'GeomClosed' and 'EventProc' application states.
537 inline const G4Event* GetCurrentEvent() const { return currentEvent; }
538 // Returns the pointer to the current event. This method is available for
539 // 'EventProc' application state.
540 inline const G4Event* GetPreviousEvent(G4int i) const
541 // Returns the pointer to the "i" previous event. This method is available
542 // for 'EventProc' application state. In case the event loop has not yet
543 // reached the requested event, null will be returned. To use this method,
544 // SetNumberOfEventsToBeStored() method mentioned above must be invoked
545 // previously to the event loop.
546 {
547 if(i >= 1 && i <= n_perviousEventsToBeStored)
548 {
549 auto itr = previousEvents->cbegin();
550 for(G4int j = 1; j < i; ++j)
551 {
552 ++itr;
553 }
554 return *itr;
555 }
556 return nullptr;
557 }
558 inline void SetRunIDCounter(G4int i) { runIDCounter = i; }
559 // Set the run number counter. Initially, the counter is initialized
560 // to zero and incremented by one for every BeamOn().
561
564 {
566 }
568 {
570 }
571 inline G4int GetNumberOfSelectEvents() const { return n_select_msg; }
572 inline const G4String& GetSelectMacro() const { return selectMacro; }
573 inline void SetDCtable(G4DCtable* DCtbl) { DCtable = DCtbl; }
574
576 {
580 };
581
582 inline RMType GetRunManagerType() const { return runManagerType; }
583
584 protected:
585
586 G4RunManager(RMType rmType);
587 // This constructor is called in case of multi-threaded build.
588
590 void CleanUpUnnecessaryEvents(G4int keepNEvents);
591 void StackPreviousEvent(G4Event* anEvent);
592
593 virtual void StoreRNGStatus(const G4String& filenamePrefix);
594
595 void UpdateScoring();
596 virtual void DeleteUserInitializations();
597 // Called by destructor to delete user detector. Note: the user detector
598 // is shared among threads, thus this should be re-implemented in derived
599 // classes that implement the worker model.
600
601 protected:
602
605
617
623
627 G4Timer* timer = nullptr;
628 G4DCtable* DCtable = nullptr;
629
630 G4Run* currentRun = nullptr;
632 std::list<G4Event*>* previousEvents = nullptr;
635
642
644
646
653
655
657
659 // This Boolean flag has to be shared by all derived objects.
660
661 private:
662
663 static G4ThreadLocal G4RunManager* fRunManager;
664 // Per-thread static instance of the run manager singleton.
665
666 G4RunMessenger* runMessenger = nullptr;
667
668 std::unique_ptr<ProfilerConfig> masterRunProfiler;
669};
670
671#endif
@ JustWarning
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition: G4ios.hh:57
void SetNumberOfAdditionalWaitingStacks(G4int iAdd)
void StoreRandomNumberStatusToG4Event(G4int vl)
void SetGeometryToBeOptimized(G4bool vl)
void SetPrimaryTransformer(G4PrimaryTransformer *pt)
const G4String & GetVersionString() const
void SetVerboseLevel(G4int vl)
const G4UserTrackingAction * GetUserTrackingAction() const
G4bool isScoreNtupleWriter
G4bool geometryInitialized
void CleanUpPreviousEvents()
void CleanUpUnnecessaryEvents(G4int keepNEvents)
G4int storeRandomNumberStatusToG4Event
G4UserWorkerInitialization * userWorkerInitialization
virtual void SetNumberOfThreads(G4int)
virtual void AbortRun(G4bool softAbort=false)
const G4UserWorkerInitialization * GetUserWorkerInitialization() const
virtual void Initialize()
G4int nParallelWorlds
std::list< G4Event * > * previousEvents
const G4VUserDetectorConstruction * GetUserDetectorConstruction() const
G4Timer * timer
void SetRunIDCounter(G4int i)
G4RunManager(const G4RunManager &)=delete
virtual G4int GetNumberOfThreads() const
G4UserWorkerThreadInitialization * userWorkerThreadInitialization
G4bool geometryDirectlyUpdated
G4int n_select_msg
G4int numberOfEventProcessed
virtual void RestoreRandomNumberStatus(const G4String &fileN)
const G4VUserPrimaryGeneratorAction * GetUserPrimaryGeneratorAction() const
G4int GetNumberOfEventsToBeProcessed() const
const G4UserEventAction * GetUserEventAction() const
virtual void InitializeEventLoop(G4int n_event, const char *macroFile=nullptr, G4int n_select=-1)
G4UserEventAction * userEventAction
const G4VUserActionInitialization * GetUserActionInitialization() const
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
void SetRandomNumberStoreDir(const G4String &dir)
G4Run * GetNonConstCurrentRun() const
virtual void rndmSaveThisEvent()
G4VUserActionInitialization * GetNonConstUserActionInitialization() const
virtual void DeleteUserInitializations()
G4int runIDCounter
const G4Event * GetPreviousEvent(G4int i) const
G4RunManagerKernel * kernel
G4int verboseLevel
G4Run * currentRun
virtual G4bool ConfirmBeamOnCondition()
G4bool geometryToBeOptimized
virtual void RestoreRndmEachEvent(G4bool)
static G4RunManager * GetRunManager()
virtual void AbortEvent()
virtual void rndmSaveThisRun()
virtual void InitializePhysics()
G4DCtable * DCtable
G4String randomNumberStatusForThisRun
G4bool runAborted
G4String msgText
virtual void BeamOn(G4int n_event, const char *macroFile=nullptr, G4int n_select=-1)
static G4bool IfGeometryHasBeenDestroyed()
G4UserRunAction * userRunAction
const G4String & GetRandomNumberStatusForThisEvent() const
virtual void DefineWorldVolume(G4VPhysicalVolume *worldVol, G4bool topologyIsChanged=true)
const G4UserStackingAction * GetUserStackingAction() const
G4bool rngStatusEventsFlag
G4RunManager & operator=(const G4RunManager &)=delete
const G4String & GetVersionString() const
G4String selectMacro
virtual void InitializeGeometry()
RMType GetRunManagerType() const
virtual void RunTermination()
void SetNumberOfAdditionalWaitingStacks(G4int iAdd)
const G4UserSteppingAction * GetUserSteppingAction() const
void SetDCtable(G4DCtable *DCtbl)
void SetNumberOfEventsToBeStored(G4int val)
const G4String & GetSelectMacro() const
G4bool physicsInitialized
G4VUserActionInitialization * userActionInitialization
void PhysicsHasBeenModified()
G4VPhysicalVolume * currentWorld
const G4Event * GetCurrentEvent() const
void StackPreviousEvent(G4Event *anEvent)
static G4RUN_DLL G4bool fGeometryHasBeenDestroyed
void ReOptimize(G4LogicalVolume *)
const G4String & GetRandomNumberStatusForThisRun() const
void SetNumberOfEventsToBeProcessed(G4int val)
void SetVerboseLevel(G4int vl)
G4bool GetRandomNumberStore() const
const G4VUserPhysicsList * GetUserPhysicsList() const
G4VUserDetectorConstruction * userDetector
const G4String & GetRandomNumberStoreDir() const
G4VUserPrimaryGeneratorAction * userPrimaryGeneratorAction
const G4Run * GetCurrentRun() const
G4int numberOfEventToBeProcessed
virtual ~G4RunManager()
G4int GetNumberOfParallelWorld() const
G4String randomNumberStatusDir
virtual void TerminateEventLoop()
virtual void SetUserAction(G4UserRunAction *userAction)
void SetRandomNumberStorePerEvent(G4bool flag)
G4String randomNumberStatusForThisEvent
const G4UserRunAction * GetUserRunAction() const
const G4UserWorkerThreadInitialization * GetUserWorkerThreadInitialization() const
void GeometryHasBeenModified(G4bool prop=true)
void SetGeometryToBeOptimized(G4bool vl)
G4UserTrackingAction * userTrackingAction
RMType runManagerType
G4int n_perviousEventsToBeStored
virtual void SetUserInitialization(G4VUserDetectorConstruction *userInit)
void ReOptimizeMotherOf(G4VPhysicalVolume *)
void GeometryDirectlyUpdated(G4bool val=true)
void StoreRandomNumberStatusToG4Event(G4int vl)
virtual void ProcessOneEvent(G4int i_event)
void CutOffHasBeenModified()
virtual void ConfigureProfilers(const std::vector< std::string > &args={})
G4bool storeRandomNumberStatus
virtual G4Event * GenerateEvent(G4int i_event)
G4int GetFlagRandomNumberStatusToG4Event() const
void SetRandomNumberStore(G4bool flag)
G4bool initializedAtLeastOnce
G4EventManager * eventManager
virtual void StoreRNGStatus(const G4String &filenamePrefix)
virtual void DoEventLoop(G4int n_event, const char *macroFile=nullptr, G4int n_select=-1)
virtual void TerminateOneEvent()
virtual void RunInitialization()
void DumpRegion(const G4String &rname) const
G4int GetNumberOfSelectEvents() const
G4int GetPrintProgress()
G4VUserPhysicsList * physicsList
virtual void AnalyzeEvent(G4Event *anEvent)
G4bool GetRandomNumberStorePerEvent() const
G4bool GetGeometryToBeOptimized()
G4UserStackingAction * userStackingAction
G4int GetVerboseLevel() const
void UpdateScoring()
G4Event * currentEvent
virtual void ConstructScoringWorlds()
void SetPrintProgress(G4int i)
void SetPrimaryTransformer(G4PrimaryTransformer *pt)
G4UserSteppingAction * userSteppingAction
Definition: G4Run.hh:49
#define G4RUN_DLL
Definition: rundefs.hh:45
#define G4ThreadLocal
Definition: tls.hh:77