Geant4  10.01.p01
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 //
27 // $Id: G4RunManager.hh 86753 2014-11-17 15:12:36Z gcosmo $
28 //
29 //
30 
31 // class description:
32 //
33 // This is a class for run control in GEANT4
34 //
35 // For the sequential mode of Geant4 application,
36 // user must provide his own classes derived from the following
37 // three abstract classes and register them to the RunManager.
38 // G4VUserDetectorConstruction - Detector Geometry, Materials
39 // G4VUserPhysicsList - Particle types and Processes
40 // G4VUserPrimaryGeneratorAction - Event Generator selection
41 //
42 // In addition to the above mandatory classes, user can easily
43 // customize of the default functionality of GEANT4 simulation
44 // by making his own classes derived from the following 5 user
45 // action classes.
46 // G4UserRunAction - Actions for each Run
47 // G4UserEventAction - Actions for each Event
48 // G4UserStackingAction - Tracks Stacking selection
49 // G4UserTrackingAction - Actions for each Track
50 // G4UserSteppingAction - Actions for each Step
51 //
52 // User may use G4VUserActionInitialization class to instantiate
53 // any of the six user action classes (1 mandatory + 6 optional).
54 // In this case, user's concrete G4VUserActionInitialization should
55 // be defined to RunManager.
56 //
57 // For the multi-threaed mode of Geant4 application,
58 // user must provide his own classes derived from the following
59 // two abstract classes and register them to the MTRunManager.
60 // G4VUserDetectorConstruction - Detector Geometry, Materials
61 // G4VUserPhysicsList - Particle types and Processes
62 // In addition, user may optionally specify the following.
63 // G4UserWorkerInitialization - Defining thread-local actions
64 // G4UserRunAction - Actions for entire Run
65 //
66 // For the multi-threaded mode, use of G4VUserActionInitialization
67 // is mandatory.
68 // In G4VUserActionInitialization, the user has to specify
69 // G4VUserPrimaryGeneratorAction class. In addition user may
70 // customize of the default functionality of GEANT4 simulation
71 // by making his own classes derived from the following 5 user
72 // action classes.
73 // G4VUserPrimaryGeneratorAction - Event Generator selection
74 // G4UserRunAction - Actions for each tread-local Run
75 // G4UserEventAction - Actions for each Event
76 // G4UserStackingAction - Tracks Stacking selection
77 // G4UserTrackingAction - Actions for each Track
78 // G4UserSteppingAction - Actions for each Step
79 //
80 // G4RunManager is the only manager class in Geant4 kernel which
81 // the user MUST construct an object by him/herself in the main()
82 // for sequential mode of Geant4 application.
83 //
84 // In the multi-threaded mode, G4MTRunManager is the dedicated
85 // run manager which the user MUST construct an object by him/herself
86 // in the main().
87 //
88 // Note) G4WorkerRunManager is the run manager for individual
89 // thread, and is instantiated automatically, and the user needs
90 // not to take care of instantiating/deleting it.
91 //
92 // Also, G4RunManager is the only manager class in Geant4 kernel
93 // which the user CAN derive it to costomize the behavior of the
94 // run control. For this case, user should use protected methods
95 // provided in this class for procedures he/she does not want to
96 // change.
97 //
98 // G4RunManager or the derived class of it MUST be a singleton.
99 // The user MUST NOT construct more than one object even if there
100 // are two different concrete implementations.
101 //
102 // G4RunManager controls all of state changes. See G4ApplicationState.hh
103 // in intercoms category for the meanings of each state.
104 //
105 
106 #ifndef G4RunManager_h
107 #define G4RunManager_h 1
108 
109 // userAction classes
111 class G4VUserPhysicsList;
115 class G4UserRunAction;
117 class G4UserEventAction;
121 
122 class G4VPhysicalVolume;
123 class G4LogicalVolume;
124 class G4Region;
125 class G4Timer;
126 class G4RunMessenger;
127 class G4DCtable;
128 class G4Run;
130 
131 #include "G4RunManagerKernel.hh"
132 #include "G4Event.hh"
133 #include "G4EventManager.hh"
134 #include "globals.hh"
135 #include <list>
136 #include <algorithm>
137 
139 {
140  public: // with description
141  static G4RunManager* GetRunManager();
142  // Static method which returns the singleton pointer of G4RunManager or
143  // its derived class.
144  // Note this returns the per-thread singleton in case of multi-threaded
145  // build
146 
147  private:
149  //Per-thread static instance of the run manager singleton
150 
151 public: // with description
152  G4RunManager();
153 
154  virtual ~G4RunManager();
155  // The constructor and the destructor. The user must construct this class
156  // object at the beginning of his/her main() and must delete it at the
157  // bottom of the main().
158 
159  public: // with description
160  virtual void BeamOn(G4int n_event,const char* macroFile=0,G4int n_select=-1);
161  // This method starts an event loop of "n_event" events. The condition of Geant4
162  // is examined before starting the event loop. This method must be invoked at
163  // Idle state. The state will be changed to GeomClosed during the event loop and
164  // will go back to Idle when the loop is over or aborted.
165  // In case a string "macroFile" which represents the name of a macro file is given,
166  // this macro file will be executed AT THE END of each event processing. In case
167  // "n_select" is greater than zero, at the end of first "n_select" events the macro
168  // file is executed.
169  virtual void Initialize();
170  // This method invokes all the necessary initialization procedures for an event
171  // loop. This method must be invoked at the Geant4 state of PreInit or Idle. The
172  // state will be changed to Init during the initialization procedures and then
173  // changed to Idle.
174  // This method invokes two protected methods, InitializeGeometry() and
175  // InitializePhysics().
176  // After some event loops, the user can invoke this method once again. It is
177  // required if the user changes geometry, physics process, and/or cut off value.
178  // If the user forget the second invokation, G4RunManager will invoke BeamOn()
179  // method will invoke this method. (Note that this feature is not valid for the
180  // first initialization.)
181  virtual void DefineWorldVolume(G4VPhysicalVolume * worldVol,
182  G4bool topologyIsChanged=true);
183  // This method must be invoked if the geometry setup has been changed between
184  // runs. The flag 'topologyIsChanged' will specify if the geometry topology is
185  // different from the original one used in the previous run; if not, it must be
186  // set to false, so that the original optimisation and navigation history is
187  // preserved. This method is invoked also at initialisation.
189  // Resets the state of the navigator for tracking; needed for geometry updates.
190  // It forces the optimisation and navigation history to be reset.
191  virtual void AbortRun(G4bool softAbort=false);
192  // This method safely aborts the current event loop even if an event is in progress.
193  // This method is available for Geant4 states of GeomClosed and EventProc. The state
194  // will be changed to Idle, so that another event loop can be done.
195  // If softAbort is true, the event loop is aborted after processing the current
196  // event, while the current event is aborted if it is false.
197  virtual void AbortEvent();
198  // This method aborts the currently processing event, remaining events in the
199  // current event loop will be processed. This method is available only for
200  // EventProc state.
201  public: // with description
202 
203  virtual void InitializeGeometry();
204  virtual void InitializePhysics();
205  // These protected methods are invoked from Initialize() method for the
206  // initializations of geometry and physics processes. The user's concrete
207  // G4VUserDetectorConstruction class will be accessed from InitializeGeometry() and
208  // G4VUserPhysicsList class will be accessed from InitializePhysics().
209 
210  virtual G4bool ConfirmBeamOnCondition();
211  virtual void RunInitialization();
212  virtual void DoEventLoop(G4int n_event,const char* macroFile=0,G4int n_select=-1);
213  virtual void RunTermination();
214  // These four protected methods are invoked from BeamOn() method. These four methods
215  // are invoked in this order.
216  // ConfirmBeamOnCondition() method checks if all the necessary initializations have
217  // already done. If the condition is not satisfied, false is returned and the follwing
218  // three methods will be skipped.
219  // RunInitialization() method initializes a run. For example, a G4Run class object
220  // is constructed in this method.
221  // DoEventLoop() method control an event loop. Arguments are same as BeamOn() method.
222  // Inide the event loop, two following protected methods are invoked at the begining
223  // and the end of each event.
224  // RunTermination() method terminates a run processing. For example, a G4Run class
225  // object is deleted in this class. If the user uses ODBMS and wants to store the
226  // G4Run class object, he/she must override this method.
227 
228  virtual void InitializeEventLoop(G4int n_event,const char* macroFile=0,G4int n_select=-1);
229  virtual void ProcessOneEvent(G4int i_event);
230  virtual void TerminateOneEvent();
231  virtual void TerminateEventLoop();
232  // Granular virtual methods invoked from DoEventLoop() method.
233 
235  // This method is invoked from RunInitialization() to create physics tables.
236 
237  virtual G4Event* GenerateEvent(G4int i_event);
238  virtual void AnalyzeEvent(G4Event* anEvent);
239  // These two protected methods are invoked from DoEventLoop() method at the begining
240  // and the end of each event processing.
241  // GenerateEvent() method constructs a G4Event class object and invoke the user's
242  // G4VUserPrimaryGeneratorAction concrete class. If the user is using ODBMS and event
243  // objects have been created and stored in the data base, he/she must override this
244  // method.
245  // AnalyzeEvent() stores an event to a data base if a concrete G4VPersistentManager
246  // class is defined.
247 
248  public: // with description
250  // Update region list.
251  // This method is mandatory before invoking following two dump methods.
252  // At RunInitialization(), this method is automatically invoked, and thus
253  // the user needs not invoke.
254 
255  void DumpRegion(const G4String& rname) const;
256  // Dump information of a region.
257 
258  void DumpRegion(G4Region* region=0) const;
259  // Dump information of a region.
260  // If the pointer is NULL, all regions are shown.
261 
262  protected:
263  void CleanUpPreviousEvents();
264  void CleanUpUnnecessaryEvents(G4int keepNEvents);
265  void StackPreviousEvent(G4Event* anEvent);
266 
267  public:
269  protected:
270  //This constructor is called in case of Geant4 Multi-threaded build
271  G4RunManager( RMType rmType );
272 
273  protected:
276 
288 
289  private:
291 
292  protected:
298 
304 
307  std::list<G4Event*>* previousEvents;
310 
317  virtual void StoreRNGStatus(const G4String& filenamePrefix );
318 
320 
322 
328 
329  public:
330  virtual void rndmSaveThisRun();
331  virtual void rndmSaveThisEvent();
332  virtual void RestoreRandomNumberStatus(const G4String& fileN);
333 
334  public: // with description
335  virtual void SetUserInitialization(G4VUserDetectorConstruction* userInit);
336  virtual void SetUserInitialization(G4VUserPhysicsList* userInit);
337  virtual void SetUserInitialization(G4VUserActionInitialization* userInit);
338  virtual void SetUserInitialization(G4UserWorkerInitialization* userInit);
340  virtual void SetUserAction(G4UserRunAction* userAction);
341  virtual void SetUserAction(G4VUserPrimaryGeneratorAction* userAction);
342  virtual void SetUserAction(G4UserEventAction* userAction);
343  virtual void SetUserAction(G4UserStackingAction* userAction);
344  virtual void SetUserAction(G4UserTrackingAction* userAction);
345  virtual void SetUserAction(G4UserSteppingAction* userAction);
346 
347  // These methods store respective user initialization and action classes.
349  { return userDetector; }
351  { return physicsList; }
353  { return userActionInitialization; }
355  { return userActionInitialization; }
357  { return userWorkerInitialization; }
360  inline const G4UserRunAction* GetUserRunAction() const
361  { return userRunAction; }
363  { return userPrimaryGeneratorAction; }
364  inline const G4UserEventAction* GetUserEventAction() const
365  { return userEventAction; }
367  { return userStackingAction; }
369  { return userTrackingAction; }
371  { return userSteppingAction; }
372  // These methods returns respective user initialization and action classes.
373 
375  { eventManager->SetNumberOfAdditionalWaitingStacks(iAdd); }
376  // Set the number of additional (optional) waiting stacks.
377  // This method must be invoked at PreInit, Init or Idle states.
378  // Once the user set the number of additional waiting stacks,
379  // he/she can use the corresponding ENUM in G4ClassificationOfNewTrack.
380 
381  inline const G4String& GetVersionString() const
382  { return kernel->GetVersionString(); }
383 
385  { kernel->SetPrimaryTransformer(pt); }
386 
388  // if vl = 1 : status before primary particle generation is stored
389  // if vl = 2 : status before event processing (after primary particle generation) is stored
390  // if vl = 3 : both are stored
391  // if vl = 0 : none is stored (default)
392  {
393  storeRandomNumberStatusToG4Event = vl;
394  eventManager->StoreRandomNumberStatusToG4Event(vl);
395  }
398 
399  public:
400  inline void SetRandomNumberStore(G4bool flag)
401  { storeRandomNumberStatus = flag; }
403  { return storeRandomNumberStatus; }
404  inline void SetRandomNumberStoreDir(const G4String& dir)
405  {
406  G4String dirStr = dir;
407  if( dirStr(dirStr.length()-1) != '/' ) dirStr += "/";
408 #ifndef WIN32
409  G4String shellCmd = "mkdir -p ";
410 #else
411  std::replace(dirStr.begin(), dirStr.end(),'/','\\');
412  G4String shellCmd = "if not exist " + dirStr + " mkdir ";
413 #endif
414  shellCmd += dirStr;
415  randomNumberStatusDir = dirStr;
416  G4int sysret = system(shellCmd);
417  if(sysret!=0)
418  {
419  G4String errmsg = "\"" + shellCmd + "\" returns non-zero value. Directory creation failed.";
420  G4Exception("GrRunManager::SetRandomNumberStoreDir","Run0071",JustWarning,errmsg);
421  G4cerr << " return value = " << sysret << G4endl;
422  }
423  }
424  inline const G4String& GetRandomNumberStoreDir() const
425  { return randomNumberStatusDir; }
427  { return randomNumberStatusForThisRun; }
429  {
430  if(storeRandomNumberStatusToG4Event==0 || storeRandomNumberStatusToG4Event==2)
431  { G4Exception("GrRunManager::SetRandomNumberStoreDir",
432  "Run0072",JustWarning,
433  "Random number status is not available for this event."); }
435  }
437  { rngStatusEventsFlag = flag; }
439  { return rngStatusEventsFlag; }
440  public: // with description
441  void GeometryHasBeenModified(G4bool prop=true);
442  // This method must be invoked (or equivalent UI command can be used)
443  // in case the user changes his/her detector geometry after Initialize()
444  // method has been invoked. Then, at the begining of the next BeamOn(),
445  // all necessary re-voxelization will be made.
446  // The parameter "prop" has to be true if this C++ method is directly
447  // invoked.
448 
449  void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true);
450  // This method must be invoked (or equivalent UI command can be used)
451  // in case the user needs his/her detector construction has to be
452  // re-invoked. Re-voxelization will be also done.
453  // If the first parameter "destroyFirst" is true, G4SolidStore,
454  // G4LogicalVolumeStore and G4PhysicalVolumeStore are cleaned up, and
455  // thus all solids, logical volumes and physical volumes previously defined
456  // are deleted.
457  // The second parameter "prop" has to be true if this C++ method is directly
458  // invoked.
459 
461  { kernel->PhysicsHasBeenModified(); }
462  // This method must be invoked (or equivalent UI command can be used)
463  // in case the user changes his/her physics process(es), e.g. (in)activate
464  // some processes. Once this method is invoked, regardless of cuts are
465  // changed or not, BuildPhysicsTable() of PhysicsList is invoked for
466  // refreshing all physics tables.
467 
468  inline void CutOffHasBeenModified()
469  {
470  G4cerr << "CutOffHasBeenModified becomes obsolete." << G4endl;
471  G4cerr << "It is safe to remove invoking this method." << G4endl;
472  }
473 
474  public: // with description
476  // This method may be used if the orientation and/or size of this
477  // particular physical volume has been modified while rest of the
478  // geometries in the world has not been changed. This avoids the
479  // full re-optimization of the entire geometry tree which is forced
480  // if GeometryHasBeenModified() method is invoked.
481 
483  // Same as above, but the mother logical volume is specified.
484 
485  public:
486  inline void SetVerboseLevel(G4int vl)
487  { verboseLevel = vl;
488  kernel->SetVerboseLevel(vl); }
489  inline G4int GetVerboseLevel() const
490  { return verboseLevel; }
492  { return printModulo; }
493  inline void SetPrintProgress(G4int i)
494  { printModulo = i; }
495 
497  {
498  if(geometryToBeOptimized != vl)
499  {
500  geometryToBeOptimized = vl;
501  kernel->GeometryHasBeenModified();
502  kernel->SetGeometryToBeOptimized(vl);
503  }
504  }
506  { return geometryToBeOptimized; }
507 
508  public: // with description
510  { n_perviousEventsToBeStored = val; }
511  // Sets the number of events to be kept after processing. That is, "val" previous
512  // events can be used with the most recent event for digitizing pileup. "val"+1
513  // previous event is deleted.
514  // This method must be invoked before starting the event loop.
515  inline const G4Run* GetCurrentRun() const
516  { return currentRun; }
517  inline G4Run* GetNonConstCurrentRun() const
518  { return currentRun; }
519  // Returns the pointer to the current run. This method is available for Geant4
520  // states of GeomClosed and EventProc.
521  inline const G4Event* GetCurrentEvent() const
522  { return currentEvent; }
523  // Returns the pointer to the current event. This method is available for EventProc
524  // state.
525  inline const G4Event* GetPreviousEvent(G4int i) const
526  {
527  if(i>=1 && i<=n_perviousEventsToBeStored)
528  {
529  std::list<G4Event*>::iterator itr = previousEvents->begin();
530  for(G4int j=1;j<i;j++) { itr++; }
531  return *itr;
532  }
533  return 0;
534  }
535  // Returns the pointer to the "i" previous event. This method is availavle for
536  // EventProc state. In case the event loop has not yet to reach to the requested
537  // event, null will be returned. To use this method, SetNumberOfEventsToBeStored()
538  // method mentioned above must be invoked previously to the event loop.
539  inline void SetRunIDCounter(G4int i)
540  { runIDCounter = i; }
541  // Set the run number counter. Initially, the counter is initialized to zero and
542  // incremented by one for every BeamOn().
543 
544  public:
546  { return nParallelWorlds; }
548  { numberOfEventToBeProcessed = val; }
550  { return numberOfEventToBeProcessed; }
552  { return n_select_msg; }
553  inline G4String GetSelectMacro() const
554  { return selectMacro; }
555  inline void SetDCtable(G4DCtable* DCtbl)
556  { DCtable = DCtbl; }
557 
558  public:
559  inline RMType GetRunManagerType() const
560  { return runManagerType; }
561 
562  protected:
564 
565  public:
566  virtual void ConstructScoringWorlds();
567  protected:
568  void UpdateScoring();
569  virtual void DeleteUserInitializations();
570  //Called by destructor to delete user detector. Note: the userdetector is shared by threads
571  //Thus this should be re-implemented to empty in derived classes that implement the worker model
572  private:
573  //disable assignment and copy constructors
575  G4RunManager& operator=(const G4RunManager&) { return *this; }
576 
577  protected:
578  // This boolean flag has to be shared by all G4RunManager objects
580  public:
582 };
583 
584 #endif
585 
G4Timer * timer
void GeometryHasBeenModified(G4bool prop=true)
G4int GetVerboseLevel() const
virtual void AbortRun(G4bool softAbort=false)
G4int numberOfEventToBeProcessed
const G4String & GetVersionString() const
virtual void ProcessOneEvent(G4int i_event)
virtual void TerminateEventLoop()
virtual void SetUserInitialization(G4VUserDetectorConstruction *userInit)
const G4VUserPrimaryGeneratorAction * GetUserPrimaryGeneratorAction() const
void SetPrimaryTransformer(G4PrimaryTransformer *pt)
G4int n_select_msg
G4int GetPrintProgress()
G4int numberOfEventProcessed
G4UserTrackingAction * userTrackingAction
G4String randomNumberStatusForThisRun
virtual void RunTermination()
G4VUserPhysicsList * physicsList
G4String randomNumberStatusForThisEvent
static G4bool fGeometryHasBeenDestroyed
const G4String & GetRandomNumberStoreDir() const
void SetVerboseLevel(G4int vl)
G4VUserActionInitialization * userActionInitialization
void SetPrimaryTransformer(G4PrimaryTransformer *pt)
G4bool GetRandomNumberStore() const
G4bool storeRandomNumberStatus
G4String GetSelectMacro() const
void SetPrintProgress(G4int i)
const G4VUserDetectorConstruction * GetUserDetectorConstruction() const
virtual void RunInitialization()
G4RunManager(const G4RunManager &)
G4UserWorkerThreadInitialization * userWorkerThreadInitialization
void CleanUpUnnecessaryEvents(G4int keepNEvents)
void SetGeometryToBeOptimized(G4bool vl)
G4bool physicsInitialized
G4VPhysicalVolume * currentWorld
const G4Event * GetPreviousEvent(G4int i) const
void SetRandomNumberStorePerEvent(G4bool flag)
virtual void BeamOn(G4int n_event, const char *macroFile=0, G4int n_select=-1)
const G4UserWorkerInitialization * GetUserWorkerInitialization() const
void SetRandomNumberStore(G4bool flag)
G4int GetFlagRandomNumberStatusToG4Event() const
#define G4ThreadLocal
Definition: tls.hh:89
virtual void InitializePhysics()
RMType runManagerType
void ReOptimize(G4LogicalVolume *)
G4String msgText
int G4int
Definition: G4Types.hh:78
void SetGeometryToBeOptimized(G4bool vl)
const G4UserSteppingAction * GetUserSteppingAction() const
G4bool runAborted
const G4Run * GetCurrentRun() const
G4Event * currentEvent
virtual void InitializeGeometry()
G4bool GetGeometryToBeOptimized()
virtual void DefineWorldVolume(G4VPhysicalVolume *worldVol, G4bool topologyIsChanged=true)
virtual G4bool ConfirmBeamOnCondition()
virtual void RestoreRandomNumberStatus(const G4String &fileN)
G4bool geometryInitialized
G4VUserPrimaryGeneratorAction * userPrimaryGeneratorAction
G4bool initializedAtLeastOnce
G4int GetNumberOfParallelWorld() const
virtual void rndmSaveThisRun()
virtual G4Event * GenerateEvent(G4int i_event)
static G4bool IfGeometryHasBeenDestroyed()
Definition: G4RunManager.cc:71
void StoreRandomNumberStatusToG4Event(G4int vl)
G4bool geometryToBeOptimized
const G4UserStackingAction * GetUserStackingAction() const
const G4String & GetVersionString() const
G4UserWorkerInitialization * userWorkerInitialization
G4String randomNumberStatusDir
void PhysicsHasBeenModified()
RMType GetRunManagerType() const
bool G4bool
Definition: G4Types.hh:79
G4bool rngStatusEventsFlag
virtual void ConstructScoringWorlds()
virtual void AnalyzeEvent(G4Event *anEvent)
const G4String & GetRandomNumberStatusForThisRun() const
G4int storeRandomNumberStatusToG4Event
G4UserEventAction * userEventAction
virtual void rndmSaveThisEvent()
G4bool GetRandomNumberStorePerEvent() const
Definition: G4Run.hh:46
const G4UserEventAction * GetUserEventAction() const
virtual void DeleteUserInitializations()
G4int GetNumberOfEventsToBeProcessed() const
const G4UserTrackingAction * GetUserTrackingAction() const
const G4VUserActionInitialization * GetUserActionInitialization() const
std::list< G4Event * > * previousEvents
G4UserRunAction * userRunAction
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4int GetNumberOfSelectEvents() const
void SetNumberOfEventsToBeProcessed(G4int val)
const G4UserWorkerThreadInitialization * GetUserWorkerThreadInitialization() const
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
void SetDCtable(G4DCtable *DCtbl)
G4int runIDCounter
G4String selectMacro
G4int nParallelWorlds
virtual void DoEventLoop(G4int n_event, const char *macroFile=0, G4int n_select=-1)
void CleanUpPreviousEvents()
void SetRunIDCounter(G4int i)
void ReOptimizeMotherOf(G4VPhysicalVolume *)
virtual void InitializeEventLoop(G4int n_event, const char *macroFile=0, G4int n_select=-1)
G4VUserActionInitialization * GetNonConstUserActionInitialization() const
void SetNumberOfAdditionalWaitingStacks(G4int iAdd)
virtual void StoreRNGStatus(const G4String &filenamePrefix)
virtual void Initialize()
void SetNumberOfEventsToBeStored(G4int val)
void StackPreviousEvent(G4Event *anEvent)
G4Run * currentRun
#define G4endl
Definition: G4ios.hh:61
const G4String & GetRandomNumberStatusForThisEvent() const
virtual void AbortEvent()
void CutOffHasBeenModified()
G4RunManagerKernel * kernel
const G4UserRunAction * GetUserRunAction() const
void StoreRandomNumberStatusToG4Event(G4int vl)
G4EventManager * eventManager
const G4Event * GetCurrentEvent() const
const G4VUserPhysicsList * GetUserPhysicsList() const
virtual void TerminateOneEvent()
void SetRandomNumberStoreDir(const G4String &dir)
G4VUserDetectorConstruction * userDetector
G4UserSteppingAction * userSteppingAction
G4RunMessenger * runMessenger
void SetVerboseLevel(G4int vl)
G4Run * GetNonConstCurrentRun() const
void UpdateScoring()
G4DCtable * DCtable
void DumpRegion(const G4String &rname) const
G4RunManager & operator=(const G4RunManager &)
G4int n_perviousEventsToBeStored
virtual ~G4RunManager()
void SetNumberOfAdditionalWaitingStacks(G4int iAdd)
G4int verboseLevel
static G4ThreadLocal G4RunManager * fRunManager
G4GLOB_DLL std::ostream G4cerr
G4UserStackingAction * userStackingAction
virtual void SetUserAction(G4UserRunAction *userAction)