CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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)
 
void EndOfRunAction (const G4Run *aRun)
 
 RunAction (const edm::ParameterSet &ps, SimRunInterface *)
 

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 
)

Definition at line 12 of file RunAction.cc.

13  : m_runInterface(rm),
14  m_stopFile(p.getParameter<std::string>("StopFile")) {}
std::string m_stopFile
Definition: RunAction.h:26
SimRunInterface * m_runInterface
Definition: RunAction.h:25

Member Function Documentation

void RunAction::BeginOfRunAction ( const G4Run *  aRun)

Definition at line 16 of file RunAction.cc.

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

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

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

Definition at line 28 of file RunAction.cc.

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

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

29 {
30  if (std::ifstream(m_stopFile.c_str()))
31  {
32  edm::LogWarning("SimG4CoreApplication")
33  << "EndOfRunAction: termination signal received";
34  m_runInterface->abortRun(true);
35  }
36  EndOfRun r(aRun);
38 }
SimActivityRegistry::EndOfRunSignal m_endOfRunSignal
Definition: RunAction.h:23
void abortRun(bool softAbort)
std::string m_stopFile
Definition: RunAction.h:26
SimRunInterface * m_runInterface
Definition: RunAction.h:25

Member Data Documentation

SimActivityRegistry::BeginOfRunSignal RunAction::m_beginOfRunSignal

Definition at line 22 of file RunAction.h.

Referenced by BeginOfRunAction(), RunManager::Connect(), and RunManagerMT::Connect().

SimActivityRegistry::EndOfRunSignal RunAction::m_endOfRunSignal

Definition at line 23 of file RunAction.h.

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

SimRunInterface* RunAction::m_runInterface
private

Definition at line 25 of file RunAction.h.

Referenced by BeginOfRunAction(), and EndOfRunAction().

std::string RunAction::m_stopFile
private

Definition at line 26 of file RunAction.h.

Referenced by BeginOfRunAction(), and EndOfRunAction().