CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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.

13  : m_runInterface(rm), m_stopFile(p.getParameter<std::string>("StopFile")) {}
std::string m_stopFile
Definition: RunAction.h:28
SimRunInterface * m_runInterface
Definition: RunAction.h:27
RunAction::~RunAction ( )
override

Definition at line 15 of file RunAction.cc.

15 {}

Member Function Documentation

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
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

SimActivityRegistry::BeginOfRunSignal RunAction::m_beginOfRunSignal
SimActivityRegistry::EndOfRunSignal RunAction::m_endOfRunSignal

Definition at line 24 of file RunAction.h.

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

SimRunInterface* RunAction::m_runInterface
private

Definition at line 27 of file RunAction.h.

Referenced by BeginOfRunAction().

std::string RunAction::m_stopFile
private

Definition at line 28 of file RunAction.h.

Referenced by BeginOfRunAction().