CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Attributes
RunAction Class Reference

#include <RunAction.h>

Inheritance diagram for RunAction:

Public Member Functions

void BeginOfRunAction (const G4Run *aRun) override
 
void EndOfRunAction (const G4Run *aRun) override
 
 RunAction (const edm::ParameterSet &ps, SimRunInterface *, bool master)
 
 ~RunAction () override
 

Public Attributes

SimActivityRegistry::BeginOfRunSignal m_beginOfRunSignal
 
SimActivityRegistry::EndOfRunSignal m_endOfRunSignal
 

Private Attributes

SimRunInterfacem_runInterface
 
std::string m_stopFile
 

Detailed Description

Definition at line 15 of file RunAction.h.

Constructor & Destructor Documentation

◆ RunAction()

RunAction::RunAction ( const edm::ParameterSet ps,
SimRunInterface rm,
bool  master 
)
explicit

Definition at line 12 of file RunAction.cc.

13  : m_runInterface(rm), m_stopFile(p.getParameter<std::string>("StopFile")) {}

◆ ~RunAction()

RunAction::~RunAction ( )
override

Definition at line 15 of file RunAction.cc.

15 {}

Member Function Documentation

◆ BeginOfRunAction()

void RunAction::BeginOfRunAction ( const G4Run *  aRun)
override

Definition at line 17 of file RunAction.cc.

17  {
18  if (!m_stopFile.empty() && std::ifstream(m_stopFile.c_str())) {
19  edm::LogWarning("SimG4CoreApplication") << "RunAction::BeginOfRunAction: termination signal received";
20  m_runInterface->abortRun(true);
21  }
22  BeginOfRun r(aRun);
24 }

References SimRunInterface::abortRun(), m_beginOfRunSignal, m_runInterface, m_stopFile, and alignCSCRings::r.

Referenced by RunManagerMT::initG4().

◆ EndOfRunAction()

void RunAction::EndOfRunAction ( const G4Run *  aRun)
override

Definition at line 26 of file RunAction.cc.

26  {
27  EndOfRun r(aRun);
29 }

References m_endOfRunSignal, and alignCSCRings::r.

Referenced by RunManagerMT::terminateRun().

Member Data Documentation

◆ m_beginOfRunSignal

SimActivityRegistry::BeginOfRunSignal RunAction::m_beginOfRunSignal

◆ m_endOfRunSignal

SimActivityRegistry::EndOfRunSignal RunAction::m_endOfRunSignal

Definition at line 24 of file RunAction.h.

Referenced by RunManagerMTWorker::Connect(), RunManagerMT::Connect(), and EndOfRunAction().

◆ m_runInterface

SimRunInterface* RunAction::m_runInterface
private

Definition at line 27 of file RunAction.h.

Referenced by BeginOfRunAction().

◆ m_stopFile

std::string RunAction::m_stopFile
private

Definition at line 28 of file RunAction.h.

Referenced by BeginOfRunAction().

SimRunInterface::abortRun
void abortRun(bool softAbort)
Definition: SimRunInterface.cc:60
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
RunAction::m_beginOfRunSignal
SimActivityRegistry::BeginOfRunSignal m_beginOfRunSignal
Definition: RunAction.h:23
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
submit.rm
rm
Definition: submit.py:77
RunAction::m_runInterface
SimRunInterface * m_runInterface
Definition: RunAction.h:27
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
BeginOfRun
Definition: BeginOfRun.h:6
EndOfRun
Definition: EndOfRun.h:6
alignCSCRings.r
r
Definition: alignCSCRings.py:93
RunAction::m_endOfRunSignal
SimActivityRegistry::EndOfRunSignal m_endOfRunSignal
Definition: RunAction.h:24
RunAction::m_stopFile
std::string m_stopFile
Definition: RunAction.h:28