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")) {}
def rm(path, rec=False)
Definition: eostools.py:363
std::string m_stopFile
Definition: RunAction.h:28
SimRunInterface * m_runInterface
Definition: RunAction.h:27

◆ ~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.

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

Referenced by RunManagerMT::initG4().

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 }
void abortRun(bool softAbort)
std::string m_stopFile
Definition: RunAction.h:28
SimActivityRegistry::BeginOfRunSignal m_beginOfRunSignal
Definition: RunAction.h:23
Log< level::Warning, false > LogWarning
SimRunInterface * m_runInterface
Definition: RunAction.h:27

◆ EndOfRunAction()

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

Definition at line 26 of file RunAction.cc.

References m_endOfRunSignal, and alignCSCRings::r.

Referenced by RunManagerMT::terminateRun().

26  {
27  EndOfRun r(aRun);
29 }
SimActivityRegistry::EndOfRunSignal m_endOfRunSignal
Definition: RunAction.h:24

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 RunManagerMT::Connect(), RunManagerMTWorker::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().