Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4EventManager Class Reference

#include <G4EventManager.hh>

Public Member Functions

 G4EventManager ()
 
 ~G4EventManager ()
 
void ProcessOneEvent (G4Event *anEvent)
 
void ProcessOneEvent (G4TrackVector *trackVector, G4Event *anEvent=0)
 
const G4EventGetConstCurrentEvent ()
 
G4EventGetNonconstCurrentEvent ()
 
void AbortCurrentEvent ()
 
void SetUserAction (G4UserEventAction *userAction)
 
void SetUserAction (G4UserStackingAction *userAction)
 
void SetUserAction (G4UserTrackingAction *userAction)
 
void SetUserAction (G4UserSteppingAction *userAction)
 
G4UserEventActionGetUserEventAction ()
 
G4UserStackingActionGetUserStackingAction ()
 
G4UserTrackingActionGetUserTrackingAction ()
 
G4UserSteppingActionGetUserSteppingAction ()
 
void SetNumberOfAdditionalWaitingStacks (G4int iAdd)
 
void KeepTheCurrentEvent ()
 
G4StackManagerGetStackManager () const
 
G4TrackingManagerGetTrackingManager () const
 
G4int GetVerboseLevel ()
 
void SetVerboseLevel (G4int value)
 
void SetUserInformation (G4VUserEventInformation *anInfo)
 
G4VUserEventInformationGetUserInformation ()
 
G4PrimaryTransformerGetPrimaryTransformer () const
 
void SetPrimaryTransformer (G4PrimaryTransformer *tf)
 
void StoreRandomNumberStatusToG4Event (G4int vl)
 

Static Public Member Functions

static G4EventManagerGetEventManager ()
 

Detailed Description

Definition at line 60 of file G4EventManager.hh.

Constructor & Destructor Documentation

G4EventManager::G4EventManager ( )

Definition at line 49 of file G4EventManager.cc.

50 :currentEvent(nullptr),trajectoryContainer(nullptr),
51  verboseLevel(0),tracking(false),abortRequested(false),
52  storetRandomNumberStatusToG4Event(false)
53 {
54  if(fpEventManager)
55  {
56  G4Exception("G4EventManager::G4EventManager","Event0001",FatalException,
57  "G4EventManager::G4EventManager() has already been made.");
58  }
59  else
60  {
61  trackManager = new G4TrackingManager;
62  transformer = new G4PrimaryTransformer;
63  trackContainer = new G4StackManager;
64  theMessenger = new G4EvManMessenger(this);
66  stateManager = G4StateManager::GetStateManager();
67  fpEventManager = this;
68  userEventAction = nullptr;
69  userStackingAction = nullptr;
70  userTrackingAction = nullptr;
71  userSteppingAction = nullptr;
72  }
73 }
static G4StateManager * GetStateManager()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static G4SDManager * GetSDMpointerIfExist()
Definition: G4SDManager.cc:49

Here is the call graph for this function:

G4EventManager::~G4EventManager ( )

Definition at line 81 of file G4EventManager.cc.

82 {
83  delete trackContainer;
84  delete transformer;
85  delete trackManager;
86  delete theMessenger;
87  delete userEventAction;
88  fpEventManager = 0;
89 }

Member Function Documentation

void G4EventManager::AbortCurrentEvent ( )

Definition at line 387 of file G4EventManager.cc.

388 {
389  abortRequested = true;
390  trackContainer->clear();
391  if(tracking) trackManager->EventAborted();
392 }

Here is the call graph for this function:

Here is the caller graph for this function:

const G4Event* G4EventManager::GetConstCurrentEvent ( )
inline

Definition at line 125 of file G4EventManager.hh.

126  { return currentEvent; }

Here is the caller graph for this function:

G4EventManager * G4EventManager::GetEventManager ( )
static

Definition at line 46 of file G4EventManager.cc.

47 { return fpEventManager; }

Here is the caller graph for this function:

G4Event* G4EventManager::GetNonconstCurrentEvent ( )
inline

Definition at line 127 of file G4EventManager.hh.

128  { return currentEvent; }
G4PrimaryTransformer* G4EventManager::GetPrimaryTransformer ( ) const
inline

Definition at line 184 of file G4EventManager.hh.

185  { return transformer; }

Here is the caller graph for this function:

G4StackManager* G4EventManager::GetStackManager ( ) const
inline

Definition at line 162 of file G4EventManager.hh.

163  { return trackContainer; }

Here is the caller graph for this function:

G4TrackingManager* G4EventManager::GetTrackingManager ( ) const
inline

Definition at line 164 of file G4EventManager.hh.

165  { return trackManager; }

Here is the caller graph for this function:

G4UserEventAction* G4EventManager::GetUserEventAction ( )
inline

Definition at line 145 of file G4EventManager.hh.

146  { return userEventAction; }

Here is the caller graph for this function:

G4VUserEventInformation * G4EventManager::GetUserInformation ( )

Definition at line 375 of file G4EventManager.cc.

376 {
377  G4ApplicationState currentState = stateManager->GetCurrentState();
378  if(currentState!=G4State_EventProc || currentEvent==0)
379  { return 0; }
380 
381  return currentEvent->GetUserInformation();
382 }
G4VUserEventInformation * GetUserInformation() const
Definition: G4Event.hh:199
G4ApplicationState GetCurrentState() const
G4ApplicationState

Here is the call graph for this function:

G4UserStackingAction* G4EventManager::GetUserStackingAction ( )
inline

Definition at line 147 of file G4EventManager.hh.

148  { return userStackingAction; }

Here is the caller graph for this function:

G4UserSteppingAction* G4EventManager::GetUserSteppingAction ( )
inline

Definition at line 151 of file G4EventManager.hh.

152  { return userSteppingAction; }

Here is the caller graph for this function:

G4UserTrackingAction* G4EventManager::GetUserTrackingAction ( )
inline

Definition at line 149 of file G4EventManager.hh.

150  { return userTrackingAction; }

Here is the caller graph for this function:

G4int G4EventManager::GetVerboseLevel ( )
inline

Definition at line 168 of file G4EventManager.hh.

169  { return verboseLevel; }

Here is the caller graph for this function:

void G4EventManager::KeepTheCurrentEvent ( )

Definition at line 384 of file G4EventManager.cc.

385 { if(currentEvent) currentEvent->KeepTheEvent(); }
void KeepTheEvent(G4bool vl=true)
Definition: G4Event.hh:135

Here is the call graph for this function:

Here is the caller graph for this function:

void G4EventManager::ProcessOneEvent ( G4Event anEvent)

Definition at line 332 of file G4EventManager.cc.

333 {
334  trackIDCounter = 0;
335  DoProcessing(anEvent);
336 }

Here is the caller graph for this function:

void G4EventManager::ProcessOneEvent ( G4TrackVector trackVector,
G4Event anEvent = 0 
)

Definition at line 338 of file G4EventManager.cc.

339 {
340  static G4ThreadLocal G4String *randStat = 0;
341  if (!randStat) randStat = new G4String;
342  trackIDCounter = 0;
343  G4bool tempEvent = false;
344  if(!anEvent)
345  {
346  anEvent = new G4Event();
347  tempEvent = true;
348  }
349  if(storetRandomNumberStatusToG4Event==1 || storetRandomNumberStatusToG4Event==3)
350  {
351  std::ostringstream oss;
353  anEvent->SetRandomNumberStatus(*randStat=oss.str());
354  }
355  StackTracks(trackVector,false);
356  DoProcessing(anEvent);
357  if(tempEvent)
358  { delete anEvent; }
359 }
#define G4ThreadLocal
Definition: tls.hh:89
bool G4bool
Definition: G4Types.hh:79
void SetRandomNumberStatus(G4String &st)
Definition: G4Event.hh:125
static std::ostream & saveFullState(std::ostream &os)
Definition: Random.cc:285

Here is the call graph for this function:

void G4EventManager::SetNumberOfAdditionalWaitingStacks ( G4int  iAdd)
inline

Definition at line 156 of file G4EventManager.hh.

157  { trackContainer->SetNumberOfAdditionalWaitingStacks(iAdd); }
void SetNumberOfAdditionalWaitingStacks(G4int iAdd)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4EventManager::SetPrimaryTransformer ( G4PrimaryTransformer tf)
inline

Definition at line 186 of file G4EventManager.hh.

187  { transformer = tf; }

Here is the caller graph for this function:

void G4EventManager::SetUserAction ( G4UserEventAction userAction)

Definition at line 308 of file G4EventManager.cc.

309 {
310  userEventAction = userAction;
311  if(userEventAction) userEventAction->SetEventManager(this);
312 }
virtual void SetEventManager(G4EventManager *value)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4EventManager::SetUserAction ( G4UserStackingAction userAction)

Definition at line 314 of file G4EventManager.cc.

315 {
316  userStackingAction = userAction;
317  trackContainer->SetUserStackingAction(userAction);
318 }
void SetUserStackingAction(G4UserStackingAction *value)

Here is the call graph for this function:

void G4EventManager::SetUserAction ( G4UserTrackingAction userAction)

Definition at line 320 of file G4EventManager.cc.

321 {
322  userTrackingAction = userAction;
323  trackManager->SetUserAction(userAction);
324 }
void SetUserAction(G4UserTrackingAction *apAction)

Here is the call graph for this function:

void G4EventManager::SetUserAction ( G4UserSteppingAction userAction)

Definition at line 326 of file G4EventManager.cc.

327 {
328  userSteppingAction = userAction;
329  trackManager->SetUserAction(userAction);
330 }
void SetUserAction(G4UserTrackingAction *apAction)

Here is the call graph for this function:

void G4EventManager::SetUserInformation ( G4VUserEventInformation anInfo)

Definition at line 361 of file G4EventManager.cc.

362 {
363  G4ApplicationState currentState = stateManager->GetCurrentState();
364  if(currentState!=G4State_EventProc || currentEvent==0)
365  {
366  G4Exception("G4EventManager::SetUserInformation",
367  "Event0003", JustWarning,
368  "G4VUserEventInformation cannot be set because of ansense of G4Event.");
369  return;
370  }
371 
372  currentEvent->SetUserInformation(anInfo);
373 }
void SetUserInformation(G4VUserEventInformation *anInfo)
Definition: G4Event.hh:198
G4ApplicationState GetCurrentState() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4ApplicationState

Here is the call graph for this function:

void G4EventManager::SetVerboseLevel ( G4int  value)
inline

Definition at line 170 of file G4EventManager.hh.

171  {
172  verboseLevel = value;
173  trackContainer->SetVerboseLevel( value );
174  transformer->SetVerboseLevel( value );
175  }
const XML_Char int const XML_Char * value
Definition: expat.h:331
void SetVerboseLevel(G4int const value)
void SetVerboseLevel(G4int vl)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4EventManager::StoreRandomNumberStatusToG4Event ( G4int  vl)
inline

Definition at line 188 of file G4EventManager.hh.

189  { storetRandomNumberStatusToG4Event = vl; }

Here is the caller graph for this function:


The documentation for this class was generated from the following files: