Geant4  10.00.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 77649 2013-11-27 08:39:54Z 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 <vector>
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 StackPreviousEvent(G4Event* anEvent);
264 
265  public:
267  protected:
268  //This constructor is called in case of Geant4 Multi-threaded build
269  G4RunManager( RMType rmType );
270 
271  protected:
274 
286 
287  private:
289 
290  protected:
296 
302 
305  std::vector<G4Event*>* previousEvents;
308 
315  virtual void StoreRNGStatus(const G4String& filenamePrefix );
316 
318 
320 
326 
327  public:
328  virtual void rndmSaveThisRun();
329  virtual void rndmSaveThisEvent();
330  virtual void RestoreRandomNumberStatus(const G4String& fileN);
331 
332  public: // with description
333  virtual void SetUserInitialization(G4VUserDetectorConstruction* userInit);
334  virtual void SetUserInitialization(G4VUserPhysicsList* userInit);
335  virtual void SetUserInitialization(G4VUserActionInitialization* userInit);
336  virtual void SetUserInitialization(G4UserWorkerInitialization* userInit);
338  virtual void SetUserAction(G4UserRunAction* userAction);
339  virtual void SetUserAction(G4VUserPrimaryGeneratorAction* userAction);
340  virtual void SetUserAction(G4UserEventAction* userAction);
341  virtual void SetUserAction(G4UserStackingAction* userAction);
342  virtual void SetUserAction(G4UserTrackingAction* userAction);
343  virtual void SetUserAction(G4UserSteppingAction* userAction);
344 
345  // These methods store respective user initialization and action classes.
347  { return userDetector; }
349  { return physicsList; }
351  { return userActionInitialization; }
353  { return userActionInitialization; }
355  { return userWorkerInitialization; }
358  inline const G4UserRunAction* GetUserRunAction() const
359  { return userRunAction; }
361  { return userPrimaryGeneratorAction; }
362  inline const G4UserEventAction* GetUserEventAction() const
363  { return userEventAction; }
365  { return userStackingAction; }
367  { return userTrackingAction; }
369  { return userSteppingAction; }
370  // These methods returns respective user initialization and action classes.
371 
373  { eventManager->SetNumberOfAdditionalWaitingStacks(iAdd); }
374  // Set the number of additional (optional) waiting stacks.
375  // This method must be invoked at PreInit, Init or Idle states.
376  // Once the user set the number of additional waiting stacks,
377  // he/she can use the corresponding ENUM in G4ClassificationOfNewTrack.
378 
379  inline const G4String& GetVersionString() const
380  { return kernel->GetVersionString(); }
381 
383  { kernel->SetPrimaryTransformer(pt); }
384 
386  // if vl = 1 : status before primary particle generation is stored
387  // if vl = 2 : status before event processing (after primary particle generation) is stored
388  // if vl = 3 : both are stored
389  // if vl = 0 : none is stored (default)
390  {
391  storeRandomNumberStatusToG4Event = vl;
392  eventManager->StoreRandomNumberStatusToG4Event(vl);
393  }
396 
397  public:
398  inline void SetRandomNumberStore(G4bool flag)
399  { storeRandomNumberStatus = flag; }
401  { return storeRandomNumberStatus; }
402  inline void SetRandomNumberStoreDir(const G4String& dir)
403  {
404  G4String dirStr = dir;
405  if( dirStr(dirStr.length()-1) != '/' ) dirStr += "/";
406 #ifndef WIN32
407  G4String shellCmd = "mkdir -p ";
408 #else
409  std::replace(dirStr.begin(), dirStr.end(),'/','\\');
410  G4String shellCmd = "if not exist " + dirStr + " mkdir ";
411 #endif
412  shellCmd += dirStr;
413  randomNumberStatusDir = dirStr;
414  G4int sysret = system(shellCmd);
415  if(sysret!=0)
416  {
417  G4String errmsg = "\"" + shellCmd + "\" returns non-zero value. Directory creation failed.";
418  G4Exception("GrRunManager::SetRandomNumberStoreDir","Run0071",JustWarning,errmsg);
419  G4cerr << " return value = " << sysret << G4endl;
420  }
421  }
422  inline const G4String& GetRandomNumberStoreDir() const
423  { return randomNumberStatusDir; }
425  { return randomNumberStatusForThisRun; }
427  {
428  if(storeRandomNumberStatusToG4Event==0 || storeRandomNumberStatusToG4Event==2)
429  { G4Exception("GrRunManager::SetRandomNumberStoreDir",
430  "Run0072",JustWarning,
431  "Random number status is not available for this event."); }
433  }
435  { rngStatusEventsFlag = flag; }
437  { return rngStatusEventsFlag; }
438  public: // with description
439  void GeometryHasBeenModified(G4bool prop=true);
440  // This method must be invoked (or equivalent UI command can be used)
441  // in case the user changes his/her detector geometry after Initialize()
442  // method has been invoked. Then, at the begining of the next BeamOn(),
443  // all necessary re-voxelization will be made.
444  // The parameter "prop" has to be true if this C++ method is directly
445  // invoked.
446 
447  void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true);
448  // This method must be invoked (or equivalent UI command can be used)
449  // in case the user needs his/her detector construction has to be
450  // re-invoked. Re-voxelization will be also done.
451  // If the first parameter "destroyFirst" is true, G4SolidStore,
452  // G4LogicalVolumeStore and G4PhysicalVolumeStore are cleaned up, and
453  // thus all solids, logical volumes and physical volumes previously defined
454  // are deleted.
455  // The second parameter "prop" has to be true if this C++ method is directly
456  // invoked.
457 
459  { kernel->PhysicsHasBeenModified(); }
460  // This method must be invoked (or equivalent UI command can be used)
461  // in case the user changes his/her physics process(es), e.g. (in)activate
462  // some processes. Once this method is invoked, regardless of cuts are
463  // changed or not, BuildPhysicsTable() of PhysicsList is invoked for
464  // refreshing all physics tables.
465 
466  inline void CutOffHasBeenModified()
467  {
468  G4cerr << "CutOffHasBeenModified becomes obsolete." << G4endl;
469  G4cerr << "It is safe to remove invoking this method." << G4endl;
470  }
471 
472  public: // with description
474  // This method may be used if the orientation and/or size of this
475  // particular physical volume has been modified while rest of the
476  // geometries in the world has not been changed. This avoids the
477  // full re-optimization of the entire geometry tree which is forced
478  // if GeometryHasBeenModified() method is invoked.
479 
481  // Same as above, but the mother logical volume is specified.
482 
483  public:
484  inline void SetVerboseLevel(G4int vl)
485  { verboseLevel = vl;
486  kernel->SetVerboseLevel(vl); }
487  inline G4int GetVerboseLevel() const
488  { return verboseLevel; }
490  { return printModulo; }
491  inline void SetPrintProgress(G4int i)
492  { printModulo = i; }
493 
495  {
496  if(geometryToBeOptimized != vl)
497  {
498  geometryToBeOptimized = vl;
499  kernel->GeometryHasBeenModified();
500  kernel->SetGeometryToBeOptimized(vl);
501  }
502  }
504  { return geometryToBeOptimized; }
505 
506  public: // with description
508  { n_perviousEventsToBeStored = val; }
509  // Sets the number of events to be kept after processing. That is, "val" previous
510  // events can be used with the most recent event for digitizing pileup. "val"+1
511  // previous event is deleted.
512  // This method must be invoked before starting the event loop.
513  inline const G4Run* GetCurrentRun() const
514  { return currentRun; }
515  inline G4Run* GetNonConstCurrentRun() const
516  { return currentRun; }
517  // Returns the pointer to the current run. This method is available for Geant4
518  // states of GeomClosed and EventProc.
519  inline const G4Event* GetCurrentEvent() const
520  { return currentEvent; }
521  // Returns the pointer to the current event. This method is available for EventProc
522  // state.
523  inline const G4Event* GetPreviousEvent(G4int i) const
524  {
525  if(i>=1 && i<=n_perviousEventsToBeStored)
526  { return (*previousEvents)[i-1]; }
527  return 0;
528  }
529  // Returns the pointer to the "i" previous event. This method is availavle for
530  // EventProc state. In case the event loop has not yet to reach to the requested
531  // event, null will be returned. To use this method, SetNumberOfEventsToBeStored()
532  // method mentioned above must be invoked previously to the event loop.
533  inline void SetRunIDCounter(G4int i)
534  { runIDCounter = i; }
535  // Set the run number counter. Initially, the counter is initialized to zero and
536  // incremented by one for every BeamOn().
537 
538  public:
540  { return nParallelWorlds; }
542  { numberOfEventToBeProcessed = val; }
544  { return numberOfEventToBeProcessed; }
546  { return n_select_msg; }
547  inline G4String GetSelectMacro() const
548  { return selectMacro; }
549  inline void SetDCtable(G4DCtable* DCtbl)
550  { DCtable = DCtbl; }
551 
552  public:
553  inline RMType GetRunManagerType() const
554  { return runManagerType; }
555 
556  protected:
558 
559  public:
560  virtual void ConstructScoringWorlds();
561  protected:
562  void UpdateScoring();
563  virtual void DeleteUserInitializations();
564  //Called by destructor to delete user detector. Note: the userdetector is shared by threads
565  //Thus this should be re-implemented to empty in derived classes that implement the worker model
566  private:
567  //disable assignment and copy constructors
569  G4RunManager& operator=(const G4RunManager&) { return *this; }
570 };
571 
572 #endif
573 
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
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 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:52
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)
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
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:74
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 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
std::vector< G4Event * > * previousEvents
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)