Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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  trackIDCounter(0),
52  verboseLevel(0),tracking(false),abortRequested(false),
53  storetRandomNumberStatusToG4Event(false)
54 {
55  if(fpEventManager)
56  {
57  G4Exception("G4EventManager::G4EventManager","Event0001",FatalException,
58  "G4EventManager::G4EventManager() has already been made.");
59  }
60  else
61  {
62  trackManager = new G4TrackingManager;
63  transformer = new G4PrimaryTransformer;
64  trackContainer = new G4StackManager;
65  theMessenger = new G4EvManMessenger(this);
67  stateManager = G4StateManager::GetStateManager();
68  fpEventManager = this;
69  userEventAction = nullptr;
70  userStackingAction = nullptr;
71  userTrackingAction = nullptr;
72  userSteppingAction = nullptr;
73  }
74 }
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 82 of file G4EventManager.cc.

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

Member Function Documentation

void G4EventManager::AbortCurrentEvent ( )

Definition at line 390 of file G4EventManager.cc.

391 {
392  abortRequested = true;
393  trackContainer->clear();
394  if(tracking) trackManager->EventAborted();
395 }

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; }

Here is the caller graph for this function:

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 378 of file G4EventManager.cc.

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

Here is the call graph for this function:

Here is the caller 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 387 of file G4EventManager.cc.

388 { 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 335 of file G4EventManager.cc.

336 {
337  trackIDCounter = 0;
338  DoProcessing(anEvent);
339 }

Here is the caller graph for this function:

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

Definition at line 341 of file G4EventManager.cc.

342 {
343  static G4ThreadLocal G4String *randStat = 0;
344  if (!randStat) randStat = new G4String;
345  trackIDCounter = 0;
346  G4bool tempEvent = false;
347  if(!anEvent)
348  {
349  anEvent = new G4Event();
350  tempEvent = true;
351  }
352  if(storetRandomNumberStatusToG4Event==1 || storetRandomNumberStatusToG4Event==3)
353  {
354  std::ostringstream oss;
356  anEvent->SetRandomNumberStatus(*randStat=oss.str());
357  }
358  StackTracks(trackVector,false);
359  DoProcessing(anEvent);
360  if(tempEvent)
361  { delete anEvent; }
362 }
#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 311 of file G4EventManager.cc.

312 {
313  userEventAction = userAction;
314  if(userEventAction) userEventAction->SetEventManager(this);
315 }
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 317 of file G4EventManager.cc.

318 {
319  userStackingAction = userAction;
320  trackContainer->SetUserStackingAction(userAction);
321 }
void SetUserStackingAction(G4UserStackingAction *value)

Here is the call graph for this function:

void G4EventManager::SetUserAction ( G4UserTrackingAction userAction)

Definition at line 323 of file G4EventManager.cc.

324 {
325  userTrackingAction = userAction;
326  trackManager->SetUserAction(userAction);
327 }
void SetUserAction(G4UserTrackingAction *apAction)

Here is the call graph for this function:

void G4EventManager::SetUserAction ( G4UserSteppingAction userAction)

Definition at line 329 of file G4EventManager.cc.

330 {
331  userSteppingAction = userAction;
332  trackManager->SetUserAction(userAction);
333 }
void SetUserAction(G4UserTrackingAction *apAction)

Here is the call graph for this function:

void G4EventManager::SetUserInformation ( G4VUserEventInformation anInfo)

Definition at line 364 of file G4EventManager.cc.

365 {
366  G4ApplicationState currentState = stateManager->GetCurrentState();
367  if(currentState!=G4State_EventProc || currentEvent==0)
368  {
369  G4Exception("G4EventManager::SetUserInformation",
370  "Event0003", JustWarning,
371  "G4VUserEventInformation cannot be set because of ansense of G4Event.");
372  return;
373  }
374 
375  currentEvent->SetUserInformation(anInfo);
376 }
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:

Here is the caller 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: