CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

statemachine::HandleRuns Class Reference

#include <EPStates.h>

Inheritance diagram for statemachine::HandleRuns:
state

List of all members.

Public Types

typedef sc::transition< File,
NewInputAndOutputFiles
reactions

Public Member Functions

void beginRun (Run const &run)
bool beginRunCalled () const
void beginRunIfNotDoneAlready ()
Run const & currentRun () const
void endRun (Run const &run, bool cleaningUpAfterException)
void exit ()
void finalizeRun (Run const &)
void finalizeRun (bool cleaningUpAfterException)
 HandleRuns (my_context ctx)
bool runException () const
void setupCurrentRun ()
 ~HandleRuns ()

Private Attributes

bool beginRunCalled_
Run currentRun_
edm::IEventProcessorep_
bool exitCalled_
bool runException_

Detailed Description

Definition at line 233 of file EPStates.h.


Member Typedef Documentation

Definition at line 240 of file EPStates.h.


Constructor & Destructor Documentation

statemachine::HandleRuns::HandleRuns ( my_context  ctx)

Definition at line 192 of file EPStates.cc.

                                       :
    my_base(ctx),
    ep_(context<Machine>().ep()),
    exitCalled_(false),
    beginRunCalled_(false),
    currentRun_(INVALID_RUN),
    runException_(false) { }
statemachine::HandleRuns::~HandleRuns ( )

Definition at line 206 of file EPStates.cc.

References ep_, exitCalled_, finalizeRun(), python::rootplot::argparse::message, and edm::IEventProcessor::setExceptionMessageRuns().

                          {
    if(!exitCalled_) {
      try {
        finalizeRun(true);
      }
      catch(...) {
        std::string message("Another exception was caught while trying to clean up runs after the primary fatal exception.");
        ep_.setExceptionMessageRuns(message);
      }
    }
  }

Member Function Documentation

void statemachine::HandleRuns::beginRun ( Run const &  run)
bool statemachine::HandleRuns::beginRunCalled ( ) const

Definition at line 218 of file EPStates.cc.

References beginRunCalled_.

{ return beginRunCalled_; }
void statemachine::HandleRuns::beginRunIfNotDoneAlready ( )

Definition at line 265 of file EPStates.cc.

References beginRun(), beginRunCalled_, and currentRun().

Run const & statemachine::HandleRuns::currentRun ( ) const

Definition at line 219 of file EPStates.cc.

References currentRun_.

Referenced by beginRunIfNotDoneAlready(), finalizeRun(), and setupCurrentRun().

{ return currentRun_; }
void statemachine::HandleRuns::endRun ( Run const &  run,
bool  cleaningUpAfterException 
)

Definition at line 241 of file EPStates.cc.

References beginRunCalled_, edm::IEventProcessor::endRun(), ep_, and runException_.

Referenced by finalizeRun().

                                                                       {
    beginRunCalled_ = false;

    runException_ = true;
    ep_.endRun(run, cleaningUpAfterException);
    runException_ = false;
  }
void statemachine::HandleRuns::exit ( )

Definition at line 200 of file EPStates.cc.

References edm::IEventProcessor::alreadyHandlingException(), ep_, exitCalled_, and finalizeRun().

                        {
    if(ep_.alreadyHandlingException()) return;
    exitCalled_ = true;
    finalizeRun(false);
  }
void statemachine::HandleRuns::finalizeRun ( bool  cleaningUpAfterException)
void statemachine::HandleRuns::finalizeRun ( Run const &  )
bool statemachine::HandleRuns::runException ( ) const

Definition at line 220 of file EPStates.cc.

References runException_.

{ return runException_; }
void statemachine::HandleRuns::setupCurrentRun ( )

Member Data Documentation

Definition at line 254 of file EPStates.h.

Referenced by beginRun(), beginRunCalled(), beginRunIfNotDoneAlready(), endRun(), and finalizeRun().

Definition at line 255 of file EPStates.h.

Referenced by currentRun(), finalizeRun(), and setupCurrentRun().

Definition at line 252 of file EPStates.h.

Referenced by beginRun(), endRun(), exit(), finalizeRun(), setupCurrentRun(), and ~HandleRuns().

Definition at line 253 of file EPStates.h.

Referenced by exit(), and ~HandleRuns().

Definition at line 256 of file EPStates.h.

Referenced by beginRun(), endRun(), finalizeRun(), runException(), and setupCurrentRun().