CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RunAction.cc
Go to the documentation of this file.
3 
6 
8 
9 #include <iostream>
10 #include <fstream>
11 
13  : m_runInterface(rm), m_stopFile(p.getParameter<std::string>("StopFile")) {}
14 
16 
17 void RunAction::BeginOfRunAction(const G4Run* aRun) {
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 }
25 
26 void RunAction::EndOfRunAction(const G4Run* aRun) {
27  EndOfRun r(aRun);
28  m_endOfRunSignal(&r);
29 }
void BeginOfRunAction(const G4Run *aRun) override
Definition: RunAction.cc:17
RunAction(const edm::ParameterSet &ps, SimRunInterface *, bool master)
Definition: RunAction.cc:12
SimActivityRegistry::EndOfRunSignal m_endOfRunSignal
Definition: RunAction.h:24
~RunAction() override
Definition: RunAction.cc:15
void abortRun(bool softAbort)
std::string m_stopFile
Definition: RunAction.h:28
SimActivityRegistry::BeginOfRunSignal m_beginOfRunSignal
Definition: RunAction.h:23
def rm
Definition: eostools.py:363
Log< level::Warning, false > LogWarning
void EndOfRunAction(const G4Run *aRun) override
Definition: RunAction.cc:26
SimRunInterface * m_runInterface
Definition: RunAction.h:27