CMS 3D CMS Logo

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 {}
15 
17 {}
18 
19 void RunAction::BeginOfRunAction(const G4Run * aRun)
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 }
30 
31 void RunAction::EndOfRunAction(const G4Run * aRun)
32 {
33  EndOfRun r(aRun);
34  m_endOfRunSignal(&r);
35 }
36 
void BeginOfRunAction(const G4Run *aRun) override
Definition: RunAction.cc:19
RunAction(const edm::ParameterSet &ps, SimRunInterface *, bool master)
Definition: RunAction.cc:12
SimActivityRegistry::EndOfRunSignal m_endOfRunSignal
Definition: RunAction.h:25
~RunAction() override
Definition: RunAction.cc:16
void abortRun(bool softAbort)
std::string m_stopFile
Definition: RunAction.h:29
SimActivityRegistry::BeginOfRunSignal m_beginOfRunSignal
Definition: RunAction.h:24
rm
Definition: submit.py:77
void EndOfRunAction(const G4Run *aRun) override
Definition: RunAction.cc:31
SimRunInterface * m_runInterface
Definition: RunAction.h:28