CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SimRunInterface.cc
Go to the documentation of this file.
11 
12 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
13 
15  : m_runManager(runm),m_runManagerMT(0),m_runManagerMTWorker(nullptr),m_SimTrackManager(0),
16  m_isMaster(master)
17 {
18  if(m_runManager) {
20  }
21 }
22 
24  : m_runManager(0),m_runManagerMT(runm),m_runManagerMTWorker(nullptr),m_SimTrackManager(0),
25  m_isMaster(master)
26 {}
27 
29  : m_runManager(0),m_runManagerMT(nullptr),m_runManagerMTWorker(runm),m_SimTrackManager(0),
30  m_isMaster(master)
31 {
34  }
35 }
36 
38 {}
39 
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 }
50 
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 }
61 
63 {
64  if(m_runManager) {
65  m_runManager->Connect(eventAction);
66  } else if(m_runManagerMTWorker) {
67  m_runManagerMTWorker->Connect(eventAction);
68  }
69 }
70 
72 {
73  if(m_runManager) {
74  m_runManager->Connect(trackAction);
75  } else if(m_runManagerMTWorker) {
76  m_runManagerMTWorker->Connect(trackAction);
77  }
78 }
79 
81 {
82  if(m_runManager) {
83  m_runManager->Connect(stepAction);
84  } else if(m_runManagerMTWorker) {
85  m_runManagerMTWorker->Connect(stepAction);
86  }
87 }
88 
90 {
91  return m_SimTrackManager;
92 }
93 
95 {
96  if(m_runManager) {
98  } else if(m_runManagerMTWorker) {
100  }
101 }
102 
103 void SimRunInterface::abortRun(bool softAbort)
104 {
105  if(m_runManager) {
106  m_runManager->abortRun(softAbort);
107  } else if(m_runManagerMTWorker) {
108  m_runManagerMTWorker->abortRun(softAbort);
109  }
110 }
111 
113 {
114  G4SimEvent* ptr = 0;
115  if(m_runManager) {
116  ptr = m_runManager->simEvent();
117  } else if(m_runManagerMTWorker) {
119  }
120  return ptr;
121 }
122 
123 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Connect(RunAction *)
SimTrackManager * GetSimTrackManager()
Definition: RunManager.cc:510
void setRunManagerMTWorker(RunManagerMTWorker *run)
void abortRun(bool softAbort=false)
Definition: RunManager.cc:491
SimTrackManager * GetSimTrackManager()
#define nullptr
G4SimEvent * simEvent()
void abortEvent()
Definition: RunManager.cc:388
RunManagerMTWorker * m_runManagerMTWorker
G4SimEvent * simEvent()
SimTrackManager * m_SimTrackManager
void abortRun(bool softAbort)
SimTrackManager * GetSimTrackManager()
SimRunInterface(RunManager *run, bool master)
void abortRun(bool softAbort=false)
RunManager * m_runManager
RunManagerMT * m_runManagerMT
void Connect(RunAction *)
Definition: RunManager.cc:515
G4SimEvent * simEvent()
Definition: RunManager.h:80
void Connect(RunAction *)
void Connect(RunAction *)