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 18 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),
15  m_runManagerMT(nullptr),
16  m_runManagerMTWorker(nullptr),
17  m_SimTrackManager(nullptr),
19  if (m_runManager) {
21  }
22 }
SimTrackManager * GetSimTrackManager()
Definition: RunManager.cc:563
RunManagerMTWorker * m_runManagerMTWorker
SimTrackManager * m_SimTrackManager
RunManager * m_runManager
RunManagerMT * m_runManagerMT
SimRunInterface::SimRunInterface ( RunManagerMT run,
bool  master 
)

Definition at line 24 of file SimRunInterface.cc.

25  : m_runManager(nullptr),
26  m_runManagerMT(runm),
27  m_runManagerMTWorker(nullptr),
28  m_SimTrackManager(nullptr),
29  m_isMaster(master) {}
RunManagerMTWorker * m_runManagerMTWorker
SimTrackManager * m_SimTrackManager
RunManager * m_runManager
RunManagerMT * m_runManagerMT
SimRunInterface::SimRunInterface ( RunManagerMTWorker run,
bool  master 
)

Definition at line 31 of file SimRunInterface.cc.

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

32  : m_runManager(nullptr),
33  m_runManagerMT(nullptr),
35  m_SimTrackManager(nullptr),
39  }
40 }
SimTrackManager * GetSimTrackManager()
RunManagerMTWorker * m_runManagerMTWorker
SimTrackManager * m_SimTrackManager
RunManager * m_runManager
RunManagerMT * m_runManagerMT
SimRunInterface::~SimRunInterface ( )

Definition at line 42 of file SimRunInterface.cc.

42 {}

Member Function Documentation

void SimRunInterface::abortEvent ( )

Definition at line 82 of file SimRunInterface.cc.

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

Referenced by EventAction::abortEvent().

82  {
83  if (m_runManager) {
85  } else if (m_runManagerMTWorker) {
87  }
88 }
void abortEvent()
Definition: RunManager.cc:454
RunManagerMTWorker * m_runManagerMTWorker
RunManager * m_runManager
void SimRunInterface::abortRun ( bool  softAbort)

Definition at line 90 of file SimRunInterface.cc.

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

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

90  {
91  if (m_runManager) {
92  m_runManager->abortRun(softAbort);
93  } else if (m_runManagerMTWorker) {
94  m_runManagerMTWorker->abortRun(softAbort);
95  }
96 }
void abortRun(bool softAbort=false)
Definition: RunManager.cc:540
RunManagerMTWorker * m_runManagerMTWorker
void abortRun(bool softAbort=false)
RunManager * m_runManager
void SimRunInterface::Connect ( RunAction runAction)

Definition at line 46 of file SimRunInterface.cc.

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

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

Definition at line 56 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:565
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.

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

Definition at line 72 of file SimRunInterface.cc.

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

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

Definition at line 80 of file SimRunInterface.cc.

References m_SimTrackManager.

80 { return m_SimTrackManager; }
SimTrackManager * m_SimTrackManager
void SimRunInterface::setRunManagerMTWorker ( RunManagerMTWorker run)

Definition at line 44 of file SimRunInterface.cc.

References m_runManagerMTWorker, and writedatasetfile::run.

RunManagerMTWorker * m_runManagerMTWorker
G4SimEvent * SimRunInterface::simEvent ( )

Definition at line 98 of file SimRunInterface.cc.

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

Referenced by EventAction::EndOfEventAction().

98  {
99  G4SimEvent* ptr = nullptr;
100  if (m_runManager) {
101  ptr = m_runManager->simEvent();
102  } else if (m_runManagerMTWorker) {
104  }
105  return ptr;
106 }
RunManagerMTWorker * m_runManagerMTWorker
G4SimEvent * simEvent()
RunManager * m_runManager
G4SimEvent * simEvent()
Definition: RunManager.h:71

Member Data Documentation

bool SimRunInterface::m_isMaster
private

Definition at line 55 of file SimRunInterface.h.

RunManager* SimRunInterface::m_runManager
private

Definition at line 49 of file SimRunInterface.h.

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

RunManagerMT* SimRunInterface::m_runManagerMT
private

Definition at line 50 of file SimRunInterface.h.

Referenced by Connect().

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

Definition at line 53 of file SimRunInterface.h.

Referenced by GetSimTrackManager(), and SimRunInterface().