CMS 3D CMS Logo

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 13 of file SimRunInterface.cc.

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

14  : m_runManager(runm),m_runManagerMT(nullptr),m_runManagerMTWorker(nullptr),
15  m_SimTrackManager(nullptr),
17 {
18  if(m_runManager) {
20  }
21 }
Master< F > master(const F &f)
Definition: FunctClone.h:68
SimTrackManager * GetSimTrackManager()
Definition: RunManager.cc:555
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.

24  : m_runManager(nullptr),m_runManagerMT(runm),m_runManagerMTWorker(nullptr),
26 {}
Master< F > master(const F &f)
Definition: FunctClone.h:68
RunManagerMTWorker * m_runManagerMTWorker
SimTrackManager * m_SimTrackManager
RunManager * m_runManager
RunManagerMT * m_runManagerMT
SimRunInterface::SimRunInterface ( RunManagerMTWorker run,
bool  master 
)

Definition at line 28 of file SimRunInterface.cc.

References RunManagerMTWorker::GetSimTrackManager(), m_runManagerMTWorker, and m_SimTrackManager.

29  : m_runManager(nullptr),m_runManagerMT(nullptr),m_runManagerMTWorker(runm),
31 {
34  }
35 }
Master< F > master(const F &f)
Definition: FunctClone.h:68
SimTrackManager * GetSimTrackManager()
RunManagerMTWorker * m_runManagerMTWorker
SimTrackManager * m_SimTrackManager
RunManager * m_runManager
RunManagerMT * m_runManagerMT
SimRunInterface::~SimRunInterface ( )

Definition at line 37 of file SimRunInterface.cc.

38 {}

Member Function Documentation

void SimRunInterface::abortEvent ( )

Definition at line 87 of file SimRunInterface.cc.

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

Referenced by EventAction::abortEvent().

88 {
89  if(m_runManager) {
91  } else if(m_runManagerMTWorker) {
93  }
94 }
void abortEvent()
Definition: RunManager.cc:452
RunManagerMTWorker * m_runManagerMTWorker
RunManager * m_runManager
void SimRunInterface::abortRun ( bool  softAbort)

Definition at line 96 of file SimRunInterface.cc.

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

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

97 {
98  if(m_runManager) {
99  m_runManager->abortRun(softAbort);
100  } else if(m_runManagerMTWorker) {
101  m_runManagerMTWorker->abortRun(softAbort);
102  }
103 }
void abortRun(bool softAbort=false)
Definition: RunManager.cc:537
RunManagerMTWorker * m_runManagerMTWorker
void abortRun(bool softAbort=false)
RunManager * m_runManager
void SimRunInterface::Connect ( RunAction runAction)

Definition at line 44 of file SimRunInterface.cc.

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

45 {
46  if(m_runManager) {
47  m_runManager->Connect(runAction);
48  } else if(m_runManagerMT) {
49  m_runManagerMT->Connect(runAction);
50  } else if(m_runManagerMTWorker) {
51  m_runManagerMTWorker->Connect(runAction);
52  }
53 }
void Connect(RunAction *)
RunManagerMTWorker * m_runManagerMTWorker
RunManager * m_runManager
RunManagerMT * m_runManagerMT
void Connect(RunAction *)
Definition: RunManager.cc:560
void Connect(RunAction *)
void SimRunInterface::Connect ( EventAction eventAction)

Definition at line 55 of file SimRunInterface.cc.

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

56 {
57  if(m_runManager) {
58  m_runManager->Connect(eventAction);
59  } else if(m_runManagerMTWorker) {
60  m_runManagerMTWorker->Connect(eventAction);
61  }
62 }
RunManagerMTWorker * m_runManagerMTWorker
RunManager * m_runManager
void Connect(RunAction *)
Definition: RunManager.cc:560
void Connect(RunAction *)
void SimRunInterface::Connect ( TrackingAction trackAction)

Definition at line 64 of file SimRunInterface.cc.

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

65 {
66  if(m_runManager) {
67  m_runManager->Connect(trackAction);
68  } else if(m_runManagerMTWorker) {
69  m_runManagerMTWorker->Connect(trackAction);
70  }
71 }
RunManagerMTWorker * m_runManagerMTWorker
RunManager * m_runManager
void Connect(RunAction *)
Definition: RunManager.cc:560
void Connect(RunAction *)
void SimRunInterface::Connect ( SteppingAction stepAction)

Definition at line 73 of file SimRunInterface.cc.

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

74 {
75  if(m_runManager) {
76  m_runManager->Connect(stepAction);
77  } else if(m_runManagerMTWorker) {
78  m_runManagerMTWorker->Connect(stepAction);
79  }
80 }
RunManagerMTWorker * m_runManagerMTWorker
RunManager * m_runManager
void Connect(RunAction *)
Definition: RunManager.cc:560
void Connect(RunAction *)
SimTrackManager * SimRunInterface::GetSimTrackManager ( )

Definition at line 82 of file SimRunInterface.cc.

References m_SimTrackManager.

83 {
84  return m_SimTrackManager;
85 }
SimTrackManager * m_SimTrackManager
void SimRunInterface::setRunManagerMTWorker ( RunManagerMTWorker run)

Definition at line 40 of file SimRunInterface.cc.

References m_runManagerMTWorker, and findQualityFiles::run.

40  {
42 }
RunManagerMTWorker * m_runManagerMTWorker
G4SimEvent * SimRunInterface::simEvent ( )

Definition at line 105 of file SimRunInterface.cc.

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

Referenced by EventAction::EndOfEventAction().

106 {
107  G4SimEvent* ptr = nullptr;
108  if(m_runManager) {
109  ptr = m_runManager->simEvent();
110  } else if(m_runManagerMTWorker) {
112  }
113  return ptr;
114 }
RunManagerMTWorker * m_runManagerMTWorker
G4SimEvent * simEvent()
RunManager * m_runManager
G4SimEvent * simEvent()
Definition: RunManager.h:78

Member Data Documentation

bool SimRunInterface::m_isMaster
private

Definition at line 59 of file SimRunInterface.h.

RunManager* SimRunInterface::m_runManager
private

Definition at line 53 of file SimRunInterface.h.

Referenced by abortEvent(), abortRun(), Connect(), simEvent(), and SimRunInterface().

RunManagerMT* SimRunInterface::m_runManagerMT
private

Definition at line 54 of file SimRunInterface.h.

Referenced by Connect().

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

Definition at line 57 of file SimRunInterface.h.

Referenced by GetSimTrackManager(), and SimRunInterface().