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, RunManager *)
 

Public Attributes

SimActivityRegistry::BeginOfRunSignal m_beginOfRunSignal
 
SimActivityRegistry::EndOfRunSignal m_endOfRunSignal
 

Private Attributes

RunManagerm_runManager
 
std::string m_stopFile
 

Detailed Description

Definition at line 15 of file RunAction.h.

Constructor & Destructor Documentation

RunAction::RunAction ( const edm::ParameterSet ps,
RunManager rm 
)

Definition at line 10 of file RunAction.cc.

11  : m_runManager(rm),
12  m_stopFile(p.getParameter<std::string>("StopFile")) {}
std::string m_stopFile
Definition: RunAction.h:26
RunManager * m_runManager
Definition: RunAction.h:25

Member Function Documentation

void RunAction::BeginOfRunAction ( const G4Run *  aRun)

Definition at line 14 of file RunAction.cc.

References RunManager::abortRun(), gather_cfg::cout, m_beginOfRunSignal, m_runManager, m_stopFile, and alignCSCRings::r.

15 {
16  if (std::ifstream(m_stopFile.c_str()))
17  {
18  std::cout << "BeginOfRunAction: termination signal received" << std::endl;
19  //RunManager::instance()->abortRun(true);
20  m_runManager->abortRun(true);
21  }
22  BeginOfRun r(aRun);
24 }
void abortRun(bool softAbort=false)
Definition: RunManager.cc:470
std::string m_stopFile
Definition: RunAction.h:26
RunManager * m_runManager
Definition: RunAction.h:25
SimActivityRegistry::BeginOfRunSignal m_beginOfRunSignal
Definition: RunAction.h:22
tuple cout
Definition: gather_cfg.py:121
void RunAction::EndOfRunAction ( const G4Run *  aRun)

Definition at line 26 of file RunAction.cc.

References RunManager::abortRun(), gather_cfg::cout, m_endOfRunSignal, m_runManager, m_stopFile, and alignCSCRings::r.

27 {
28  if (std::ifstream(m_stopFile.c_str()))
29  {
30  std::cout << "EndOfRunAction: termination signal received" << std::endl;
31  //RunManager::instance()->abortRun(true);
32  m_runManager->abortRun(true);
33  }
34  EndOfRun r(aRun);
36 }
void abortRun(bool softAbort=false)
Definition: RunManager.cc:470
SimActivityRegistry::EndOfRunSignal m_endOfRunSignal
Definition: RunAction.h:23
std::string m_stopFile
Definition: RunAction.h:26
RunManager * m_runManager
Definition: RunAction.h:25
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

SimActivityRegistry::BeginOfRunSignal RunAction::m_beginOfRunSignal

Definition at line 22 of file RunAction.h.

Referenced by BeginOfRunAction(), and RunManager::initializeUserActions().

SimActivityRegistry::EndOfRunSignal RunAction::m_endOfRunSignal

Definition at line 23 of file RunAction.h.

Referenced by EndOfRunAction(), and RunManager::initializeUserActions().

RunManager* RunAction::m_runManager
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().