test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
SimRunInterface Class Reference

#include <SimRunInterface.h>

Public Member Functions

void abortEvent ()
 
void abortRun (bool softAbort)
 
void Connect (RunAction *)
 
void Connect (EventAction *)
 
void Connect (TrackingAction *)
 
void Connect (SteppingAction *)
 
SimTrackManagerGetSimTrackManager ()
 
void setRunManagerMTWorker (RunManagerMTWorker *run)
 
G4SimEventsimEvent ()
 
 SimRunInterface (RunManager *run, bool master)
 
 SimRunInterface (RunManagerMT *run, bool master)
 
 SimRunInterface (RunManagerMTWorker *run, bool master)
 
 ~SimRunInterface ()
 

Private Attributes

bool m_isMaster
 
RunManagerm_runManager
 
RunManagerMTm_runManagerMT
 
RunManagerMTWorkerm_runManagerMTWorker
 
SimTrackManagerm_SimTrackManager
 

Detailed Description

Definition at line 19 of file SimRunInterface.h.

Constructor & Destructor Documentation

SimRunInterface::SimRunInterface ( RunManager run,
bool  master 
)

Definition at line 14 of file SimRunInterface.cc.

References RunManager::GetSimTrackManager(), m_runManager, and m_SimTrackManager.

17 {
18  if(m_runManager) {
20  }
21 }
SimTrackManager * GetSimTrackManager()
Definition: RunManager.cc:510
RunManagerMTWorker * m_runManagerMTWorker
SimTrackManager * m_SimTrackManager
RunManager * m_runManager
RunManagerMT * m_runManagerMT
SimRunInterface::SimRunInterface ( RunManagerMT run,
bool  master 
)

Definition at line 23 of file SimRunInterface.cc.

26 {}
RunManagerMTWorker * m_runManagerMTWorker
SimTrackManager * m_SimTrackManager
RunManager * m_runManager
RunManagerMT * m_runManagerMT
SimRunInterface::SimRunInterface ( RunManagerMTWorker run,
bool  master 
)
SimRunInterface::~SimRunInterface ( )

Definition at line 37 of file SimRunInterface.cc.

38 {}

Member Function Documentation

void SimRunInterface::abortEvent ( )

Definition at line 94 of file SimRunInterface.cc.

References RunManagerMTWorker::abortEvent(), RunManager::abortEvent(), m_runManager, and m_runManagerMTWorker.

Referenced by EventAction::abortEvent().

95 {
96  if(m_runManager) {
98  } else if(m_runManagerMTWorker) {
100  }
101 }
void abortEvent()
Definition: RunManager.cc:394
RunManagerMTWorker * m_runManagerMTWorker
RunManager * m_runManager
void SimRunInterface::abortRun ( bool  softAbort)

Definition at line 103 of file SimRunInterface.cc.

References RunManagerMTWorker::abortRun(), RunManager::abortRun(), m_runManager, and m_runManagerMTWorker.

Referenced by EventAction::BeginOfEventAction(), RunAction::BeginOfRunAction(), EventAction::EndOfEventAction(), and RunAction::EndOfRunAction().

104 {
105  if(m_runManager) {
106  m_runManager->abortRun(softAbort);
107  } else if(m_runManagerMTWorker) {
108  m_runManagerMTWorker->abortRun(softAbort);
109  }
110 }
void abortRun(bool softAbort=false)
Definition: RunManager.cc:491
RunManagerMTWorker * m_runManagerMTWorker
void abortRun(bool softAbort=false)
RunManager * m_runManager
void SimRunInterface::Connect ( RunAction runAction)

Definition at line 51 of file SimRunInterface.cc.

References RunManagerMTWorker::Connect(), RunManagerMT::Connect(), RunManager::Connect(), m_runManager, m_runManagerMT, and m_runManagerMTWorker.

52 {
53  if(m_runManager) {
54  m_runManager->Connect(runAction);
55  } else if(m_runManagerMT) {
56  m_runManagerMT->Connect(runAction);
57  } else if(m_runManagerMTWorker) {
58  m_runManagerMTWorker->Connect(runAction);
59  }
60 }
void Connect(RunAction *)
RunManagerMTWorker * m_runManagerMTWorker
RunManager * m_runManager
RunManagerMT * m_runManagerMT
void Connect(RunAction *)
Definition: RunManager.cc:515
void Connect(RunAction *)
void SimRunInterface::Connect ( EventAction eventAction)

Definition at line 62 of file SimRunInterface.cc.

References RunManagerMTWorker::Connect(), RunManager::Connect(), m_runManager, and m_runManagerMTWorker.

63 {
64  if(m_runManager) {
65  m_runManager->Connect(eventAction);
66  } else if(m_runManagerMTWorker) {
67  m_runManagerMTWorker->Connect(eventAction);
68  }
69 }
RunManagerMTWorker * m_runManagerMTWorker
RunManager * m_runManager
void Connect(RunAction *)
Definition: RunManager.cc:515
void Connect(RunAction *)
void SimRunInterface::Connect ( TrackingAction trackAction)

Definition at line 71 of file SimRunInterface.cc.

References RunManagerMTWorker::Connect(), RunManager::Connect(), m_runManager, and m_runManagerMTWorker.

72 {
73  if(m_runManager) {
74  m_runManager->Connect(trackAction);
75  } else if(m_runManagerMTWorker) {
76  m_runManagerMTWorker->Connect(trackAction);
77  }
78 }
RunManagerMTWorker * m_runManagerMTWorker
RunManager * m_runManager
void Connect(RunAction *)
Definition: RunManager.cc:515
void Connect(RunAction *)
void SimRunInterface::Connect ( SteppingAction stepAction)

Definition at line 80 of file SimRunInterface.cc.

References RunManagerMTWorker::Connect(), RunManager::Connect(), m_runManager, and m_runManagerMTWorker.

81 {
82  if(m_runManager) {
83  m_runManager->Connect(stepAction);
84  } else if(m_runManagerMTWorker) {
85  m_runManagerMTWorker->Connect(stepAction);
86  }
87 }
RunManagerMTWorker * m_runManagerMTWorker
RunManager * m_runManager
void Connect(RunAction *)
Definition: RunManager.cc:515
void Connect(RunAction *)
SimTrackManager * SimRunInterface::GetSimTrackManager ( )

Definition at line 89 of file SimRunInterface.cc.

References m_SimTrackManager.

90 {
91  return m_SimTrackManager;
92 }
SimTrackManager * m_SimTrackManager
void SimRunInterface::setRunManagerMTWorker ( RunManagerMTWorker run)

Definition at line 40 of file SimRunInterface.cc.

References m_runManager, m_runManagerMT, m_runManagerMTWorker, and DTTTrigCorrFirst::run.

40  {
41  if(m_runManager) {
42  throw SimG4Exception("Calling SimRunInterface::setRunManagerMTWorker() while RunManager has been set");
43  }
44  else if(m_runManagerMT) {
45  throw SimG4Exception("Calling SimRunInterface::setRunManagerMTWorker() while RunManagerMT has been set");
46  }
47 
49 }
RunManagerMTWorker * m_runManagerMTWorker
RunManager * m_runManager
RunManagerMT * m_runManagerMT
G4SimEvent * SimRunInterface::simEvent ( )

Definition at line 112 of file SimRunInterface.cc.

References m_runManager, m_runManagerMTWorker, RunManagerMTWorker::simEvent(), and RunManager::simEvent().

Referenced by EventAction::EndOfEventAction().

113 {
114  G4SimEvent* ptr = 0;
115  if(m_runManager) {
116  ptr = m_runManager->simEvent();
117  } else if(m_runManagerMTWorker) {
119  }
120  return ptr;
121 }
RunManagerMTWorker * m_runManagerMTWorker
G4SimEvent * simEvent()
RunManager * m_runManager
G4SimEvent * simEvent()
Definition: RunManager.h:76

Member Data Documentation

bool SimRunInterface::m_isMaster
private

Definition at line 59 of file SimRunInterface.h.

RunManager* SimRunInterface::m_runManager
private
RunManagerMT* SimRunInterface::m_runManagerMT
private

Definition at line 54 of file SimRunInterface.h.

Referenced by Connect(), and setRunManagerMTWorker().

RunManagerMTWorker* SimRunInterface::m_runManagerMTWorker
private
SimTrackManager* SimRunInterface::m_SimTrackManager
private

Definition at line 57 of file SimRunInterface.h.

Referenced by GetSimTrackManager(), and SimRunInterface().