CMS 3D CMS Logo

Public Member Functions | Public Attributes | Private Attributes

RunAction Class Reference

#include <RunAction.h>

List of all members.

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.

   : m_runManager(rm), 
    m_stopFile(p.getParameter<std::string>("StopFile")) {}

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.

{
    if (std::ifstream(m_stopFile.c_str()))
    {
        std::cout << "BeginOfRunAction: termination signal received" << std::endl;
        //RunManager::instance()->abortRun(true);
        m_runManager->abortRun(true);
    }
    BeginOfRun r(aRun);
    m_beginOfRunSignal(&r);
}
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.

{
    if (std::ifstream(m_stopFile.c_str()))
    {
        std::cout << "EndOfRunAction: termination signal received" << std::endl;
        //RunManager::instance()->abortRun(true);
        m_runManager->abortRun(true);
    }
    EndOfRun r(aRun);
    m_endOfRunSignal(&r);
}

Member Data Documentation

Definition at line 22 of file RunAction.h.

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

Definition at line 23 of file RunAction.h.

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

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().