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 (EventAction *)
 
void Connect (RunAction *)
 
void Connect (SteppingAction *)
 
void Connect (TrackingAction *)
 
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() [1/3]

SimRunInterface::SimRunInterface ( RunManager run,
bool  master 
)

Definition at line 13 of file SimRunInterface.cc.

14  : m_runManager(runm),
15  m_runManagerMT(nullptr),
16  m_runManagerMTWorker(nullptr),
17  m_SimTrackManager(nullptr),
19  if (m_runManager) {
21  }
22 }

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

◆ SimRunInterface() [2/3]

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) {}

◆ SimRunInterface() [3/3]

SimRunInterface::SimRunInterface ( RunManagerMTWorker run,
bool  master 
)

◆ ~SimRunInterface()

SimRunInterface::~SimRunInterface ( )

Definition at line 42 of file SimRunInterface.cc.

42 {}

Member Function Documentation

◆ abortEvent()

void SimRunInterface::abortEvent ( )

Definition at line 82 of file SimRunInterface.cc.

82  {
83  if (m_runManager) {
85  } else if (m_runManagerMTWorker) {
87  }
88 }

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

Referenced by EventAction::abortEvent().

◆ abortRun()

void SimRunInterface::abortRun ( bool  softAbort)

Definition at line 90 of file SimRunInterface.cc.

90  {
91  if (m_runManager) {
92  m_runManager->abortRun(softAbort);
93  } else if (m_runManagerMTWorker) {
94  m_runManagerMTWorker->abortRun(softAbort);
95  }
96 }

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

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

◆ Connect() [1/4]

void SimRunInterface::Connect ( EventAction eventAction)

Definition at line 56 of file SimRunInterface.cc.

56  {
57  if (m_runManager) {
58  m_runManager->Connect(eventAction);
59  } else if (m_runManagerMTWorker) {
60  m_runManagerMTWorker->Connect(eventAction);
61  }
62 }

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

◆ Connect() [2/4]

void SimRunInterface::Connect ( RunAction runAction)

Definition at line 46 of file SimRunInterface.cc.

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 }

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

◆ Connect() [3/4]

void SimRunInterface::Connect ( SteppingAction stepAction)

Definition at line 72 of file SimRunInterface.cc.

72  {
73  if (m_runManager) {
74  m_runManager->Connect(stepAction);
75  } else if (m_runManagerMTWorker) {
76  m_runManagerMTWorker->Connect(stepAction);
77  }
78 }

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

◆ Connect() [4/4]

void SimRunInterface::Connect ( TrackingAction trackAction)

Definition at line 64 of file SimRunInterface.cc.

64  {
65  if (m_runManager) {
66  m_runManager->Connect(trackAction);
67  } else if (m_runManagerMTWorker) {
68  m_runManagerMTWorker->Connect(trackAction);
69  }
70 }

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

◆ GetSimTrackManager()

SimTrackManager * SimRunInterface::GetSimTrackManager ( )

Definition at line 80 of file SimRunInterface.cc.

80 { return m_SimTrackManager; }

References m_SimTrackManager.

◆ setRunManagerMTWorker()

void SimRunInterface::setRunManagerMTWorker ( RunManagerMTWorker run)

Definition at line 44 of file SimRunInterface.cc.

References m_runManagerMTWorker, and writedatasetfile::run.

◆ simEvent()

G4SimEvent * SimRunInterface::simEvent ( )

Definition at line 98 of file SimRunInterface.cc.

98  {
99  G4SimEvent* ptr = nullptr;
100  if (m_runManager) {
101  ptr = m_runManager->simEvent();
102  } else if (m_runManagerMTWorker) {
104  }
105  return ptr;
106 }

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

Referenced by EventAction::EndOfEventAction().

Member Data Documentation

◆ m_isMaster

bool SimRunInterface::m_isMaster
private

Definition at line 55 of file SimRunInterface.h.

◆ m_runManager

RunManager* SimRunInterface::m_runManager
private

Definition at line 49 of file SimRunInterface.h.

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

◆ m_runManagerMT

RunManagerMT* SimRunInterface::m_runManagerMT
private

Definition at line 50 of file SimRunInterface.h.

Referenced by Connect().

◆ m_runManagerMTWorker

RunManagerMTWorker* SimRunInterface::m_runManagerMTWorker
private

◆ m_SimTrackManager

SimTrackManager* SimRunInterface::m_SimTrackManager
private

Definition at line 53 of file SimRunInterface.h.

Referenced by GetSimTrackManager(), and SimRunInterface().

RunManagerMTWorker::abortRun
void abortRun(bool softAbort=false)
Definition: RunManagerMTWorker.cc:560
G4SimEvent
Definition: G4SimEvent.h:14
RunManagerMTWorker::abortEvent
void abortEvent()
Definition: RunManagerMTWorker.cc:543
RunManagerMTWorker::simEvent
G4SimEvent * simEvent()
Definition: RunManagerMTWorker.h:55
RunManagerMTWorker::Connect
void Connect(RunAction *)
Definition: RunManagerMTWorker.cc:398
RunManagerMTWorker::GetSimTrackManager
SimTrackManager * GetSimTrackManager()
Definition: RunManagerMTWorker.cc:417
SimRunInterface::m_SimTrackManager
SimTrackManager * m_SimTrackManager
Definition: SimRunInterface.h:53
RunManager::Connect
void Connect(RunAction *)
Definition: RunManager.cc:568
SimRunInterface::m_isMaster
bool m_isMaster
Definition: SimRunInterface.h:55
SimRunInterface::m_runManager
RunManager * m_runManager
Definition: SimRunInterface.h:49
RunManager::GetSimTrackManager
SimTrackManager * GetSimTrackManager()
Definition: RunManager.cc:566
writedatasetfile.run
run
Definition: writedatasetfile.py:27
SimRunInterface::m_runManagerMT
RunManagerMT * m_runManagerMT
Definition: SimRunInterface.h:50
RunManagerMT::Connect
void Connect(RunAction *)
Definition: RunManagerMT.cc:249
SimRunInterface::m_runManagerMTWorker
RunManagerMTWorker * m_runManagerMTWorker
Definition: SimRunInterface.h:51
volumeBasedMagneticField_160812_cfi.master
master
Definition: volumeBasedMagneticField_160812_cfi.py:60
RunManager::abortRun
void abortRun(bool softAbort=false)
Definition: RunManager.cc:543
RunManager::simEvent
G4SimEvent * simEvent()
Definition: RunManager.h:71
RunManager::abortEvent
void abortEvent()
Definition: RunManager.cc:457