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 ( const edm::ParameterSet ps,
SimRunInterface rm,
bool  master 
)
explicit

Definition at line 12 of file RunAction.cc.

RunAction::~RunAction ( )
override

Definition at line 16 of file RunAction.cc.

17 {}

Member Function Documentation

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

Definition at line 19 of file RunAction.cc.

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

Referenced by RunManagerMT::initG4(), and RunManager::initializeRun().

20 {
21  if (!m_stopFile.empty() && std::ifstream(m_stopFile.c_str()))
22  {
23  edm::LogWarning("SimG4CoreApplication")
24  << "RunAction::BeginOfRunAction: termination signal received";
25  m_runInterface->abortRun(true);
26  }
27  BeginOfRun r(aRun);
29 }
void abortRun(bool softAbort)
std::string m_stopFile
Definition: RunAction.h:29
SimActivityRegistry::BeginOfRunSignal m_beginOfRunSignal
Definition: RunAction.h:24
SimRunInterface * m_runInterface
Definition: RunAction.h:28
void RunAction::EndOfRunAction ( const G4Run *  aRun)
override

Definition at line 31 of file RunAction.cc.

References m_endOfRunSignal, and alignCSCRings::r.

Referenced by RunManager::terminateRun(), and RunManagerMT::terminateRun().

32 {
33  EndOfRun r(aRun);
35 }
SimActivityRegistry::EndOfRunSignal m_endOfRunSignal
Definition: RunAction.h:25

Member Data Documentation

SimActivityRegistry::BeginOfRunSignal RunAction::m_beginOfRunSignal
SimActivityRegistry::EndOfRunSignal RunAction::m_endOfRunSignal
SimRunInterface* RunAction::m_runInterface
private

Definition at line 28 of file RunAction.h.

Referenced by BeginOfRunAction().

std::string RunAction::m_stopFile
private

Definition at line 29 of file RunAction.h.

Referenced by BeginOfRunAction().