#include <G4EventManager.hh>
Definition at line 59 of file G4EventManager.hh.
G4EventManager::G4EventManager | ( | ) |
Definition at line 49 of file G4EventManager.cc.
References FatalException, G4Exception(), and G4SDManager::GetSDMpointerIfExist().
00050 :currentEvent(0),trajectoryContainer(0), 00051 verboseLevel(0),tracking(false),abortRequested(false), 00052 storetRandomNumberStatusToG4Event(false) 00053 { 00054 if(fpEventManager) 00055 { 00056 G4Exception("G4EventManager::G4EventManager","Event0001",FatalException, 00057 "G4EventManager::G4EventManager() has already been made."); 00058 } 00059 else 00060 { 00061 trackManager = new G4TrackingManager; 00062 transformer = new G4PrimaryTransformer; 00063 trackContainer = new G4StackManager; 00064 theMessenger = new G4EvManMessenger(this); 00065 sdManager = G4SDManager::GetSDMpointerIfExist(); 00066 fpEventManager = this; 00067 userEventAction = 0; 00068 userStackingAction = 0; 00069 userTrackingAction = 0; 00070 userSteppingAction = 0; 00071 } 00072 }
G4EventManager::~G4EventManager | ( | ) |
Definition at line 79 of file G4EventManager.cc.
00080 { 00081 delete trackContainer; 00082 delete transformer; 00083 delete trackManager; 00084 delete theMessenger; 00085 if(userEventAction) delete userEventAction; 00086 fpEventManager = 0; 00087 }
void G4EventManager::AbortCurrentEvent | ( | ) |
Definition at line 389 of file G4EventManager.cc.
References G4StackManager::clear(), and G4TrackingManager::EventAborted().
Referenced by G4RunManager::AbortEvent(), G4RunManager::AbortRun(), and G4EvManMessenger::SetNewValue().
00390 { 00391 abortRequested = true; 00392 trackContainer->clear(); 00393 if(tracking) trackManager->EventAborted(); 00394 }
const G4Event* G4EventManager::GetConstCurrentEvent | ( | ) | [inline] |
G4EventManager * G4EventManager::GetEventManager | ( | ) | [static] |
Definition at line 46 of file G4EventManager.cc.
Referenced by G4StackChecker::ClassifyNewTrack(), G4ErrorPropagator::G4ErrorPropagator(), G4MaterialScanner::G4MaterialScanner(), G4TheRayTracer::G4TheRayTracer(), G4ErrorPropagator::InvokePostUserTrackingAction(), G4ErrorPropagator::InvokePreUserTrackingAction(), G4ErrorPropagatorManager::SetSteppingManagerVerboseLevel(), G4ErrorRunManagerHelper::SetUserAction(), and G4ErrorPropagatorManager::SetUserAction().
G4Event* G4EventManager::GetNonconstCurrentEvent | ( | ) | [inline] |
G4PrimaryTransformer* G4EventManager::GetPrimaryTransformer | ( | ) | const [inline] |
Definition at line 181 of file G4EventManager.hh.
Referenced by G4RunManagerKernel::GetPrimaryTransformer().
G4StackManager* G4EventManager::GetStackManager | ( | ) | const [inline] |
Definition at line 159 of file G4EventManager.hh.
Referenced by G4RunManagerKernel::GetStackManager().
G4TrackingManager* G4EventManager::GetTrackingManager | ( | ) | const [inline] |
Definition at line 161 of file G4EventManager.hh.
Referenced by G4ErrorPropagator::G4ErrorPropagator(), G4RunManagerKernel::GetTrackingManager(), and G4ErrorPropagatorManager::SetSteppingManagerVerboseLevel().
G4UserEventAction* G4EventManager::GetUserEventAction | ( | ) | [inline] |
G4VUserEventInformation * G4EventManager::GetUserInformation | ( | ) |
Definition at line 376 of file G4EventManager.cc.
References G4State_EventProc, G4StateManager::GetCurrentState(), and G4StateManager::GetStateManager().
00377 { 00378 G4StateManager* stateManager = G4StateManager::GetStateManager(); 00379 G4ApplicationState currentState = stateManager->GetCurrentState(); 00380 if(currentState!=G4State_EventProc || currentEvent==0) 00381 { return 0; } 00382 00383 return currentEvent->GetUserInformation(); 00384 }
G4UserStackingAction* G4EventManager::GetUserStackingAction | ( | ) | [inline] |
G4UserSteppingAction* G4EventManager::GetUserSteppingAction | ( | ) | [inline] |
G4UserTrackingAction* G4EventManager::GetUserTrackingAction | ( | ) | [inline] |
Definition at line 146 of file G4EventManager.hh.
Referenced by G4ErrorPropagator::InvokePostUserTrackingAction(), G4ErrorPropagator::InvokePreUserTrackingAction(), and G4TheRayTracer::StoreUserActions().
G4int G4EventManager::GetVerboseLevel | ( | ) | [inline] |
Definition at line 165 of file G4EventManager.hh.
Referenced by G4EvManMessenger::GetCurrentValue().
void G4EventManager::KeepTheCurrentEvent | ( | ) |
Definition at line 386 of file G4EventManager.cc.
Referenced by G4EvManMessenger::SetNewValue().
00387 { if(currentEvent) currentEvent->KeepTheEvent(); }
void G4EventManager::ProcessOneEvent | ( | G4TrackVector * | trackVector, | |
G4Event * | anEvent = 0 | |||
) |
Definition at line 339 of file G4EventManager.cc.
References G4Event::SetRandomNumberStatus().
00340 { 00341 static G4String randStat; 00342 trackIDCounter = 0; 00343 G4bool tempEvent = false; 00344 if(!anEvent) 00345 { 00346 anEvent = new G4Event(); 00347 tempEvent = true; 00348 } 00349 if(storetRandomNumberStatusToG4Event==1 || storetRandomNumberStatusToG4Event==3) 00350 { 00351 std::ostringstream oss; 00352 CLHEP::HepRandom::saveFullState(oss); 00353 anEvent->SetRandomNumberStatus(randStat=oss.str()); 00354 } 00355 StackTracks(trackVector,false); 00356 DoProcessing(anEvent); 00357 if(tempEvent) 00358 { delete anEvent; } 00359 }
void G4EventManager::ProcessOneEvent | ( | G4Event * | anEvent | ) |
Definition at line 333 of file G4EventManager.cc.
Referenced by G4TheRayTracer::CreateBitMap(), and G4RunManager::ProcessOneEvent().
void G4EventManager::SetNumberOfAdditionalWaitingStacks | ( | G4int | iAdd | ) | [inline] |
Definition at line 153 of file G4EventManager.hh.
References G4StackManager::SetNumberOfAdditionalWaitingStacks().
Referenced by G4RunManager::SetNumberOfAdditionalWaitingStacks().
00154 { trackContainer->SetNumberOfAdditionalWaitingStacks(iAdd); }
void G4EventManager::SetPrimaryTransformer | ( | G4PrimaryTransformer * | tf | ) | [inline] |
Definition at line 183 of file G4EventManager.hh.
Referenced by G4RunManagerKernel::SetPrimaryTransformer().
void G4EventManager::SetUserAction | ( | G4UserSteppingAction * | userAction | ) |
Definition at line 327 of file G4EventManager.cc.
References G4TrackingManager::SetUserAction().
00328 { 00329 userSteppingAction = userAction; 00330 trackManager->SetUserAction(userAction); 00331 }
void G4EventManager::SetUserAction | ( | G4UserTrackingAction * | userAction | ) |
Definition at line 321 of file G4EventManager.cc.
References G4TrackingManager::SetUserAction().
00322 { 00323 userTrackingAction = userAction; 00324 trackManager->SetUserAction(userAction); 00325 }
void G4EventManager::SetUserAction | ( | G4UserStackingAction * | userAction | ) |
Definition at line 315 of file G4EventManager.cc.
References G4StackManager::SetUserStackingAction().
00316 { 00317 userStackingAction = userAction; 00318 trackContainer->SetUserStackingAction(userAction); 00319 }
void G4EventManager::SetUserAction | ( | G4UserEventAction * | userAction | ) |
Definition at line 309 of file G4EventManager.cc.
References G4UserEventAction::SetEventManager().
Referenced by G4TheRayTracer::RestoreUserActions(), G4RunManager::SetUserAction(), G4ErrorRunManagerHelper::SetUserAction(), G4ErrorPropagatorManager::SetUserAction(), and G4TheRayTracer::StoreUserActions().
00310 { 00311 userEventAction = userAction; 00312 if(userEventAction) userEventAction->SetEventManager(this); 00313 }
void G4EventManager::SetUserInformation | ( | G4VUserEventInformation * | anInfo | ) |
Definition at line 361 of file G4EventManager.cc.
References G4Exception(), G4State_EventProc, G4StateManager::GetCurrentState(), G4StateManager::GetStateManager(), and JustWarning.
00362 { 00363 G4StateManager* stateManager = G4StateManager::GetStateManager(); 00364 G4ApplicationState currentState = stateManager->GetCurrentState(); 00365 if(currentState!=G4State_EventProc || currentEvent==0) 00366 { 00367 G4Exception("G4EventManager::SetUserInformation", 00368 "Event0003", JustWarning, 00369 "G4VUserEventInformation cannot be set because of ansense of G4Event."); 00370 return; 00371 } 00372 00373 currentEvent->SetUserInformation(anInfo); 00374 }
void G4EventManager::SetVerboseLevel | ( | G4int | value | ) | [inline] |
Definition at line 167 of file G4EventManager.hh.
References G4PrimaryTransformer::SetVerboseLevel(), and G4StackManager::SetVerboseLevel().
Referenced by G4EvManMessenger::SetNewValue().
00168 { 00169 verboseLevel = value; 00170 trackContainer->SetVerboseLevel( value ); 00171 transformer->SetVerboseLevel( value ); 00172 }
void G4EventManager::StoreRandomNumberStatusToG4Event | ( | G4int | vl | ) | [inline] |
Definition at line 185 of file G4EventManager.hh.
Referenced by G4RunManager::StoreRandomNumberStatusToG4Event().