CMS 3D CMS Logo

Classes | Public Types | Public Member Functions | Private Attributes

statemachine::HandleLumis Class Reference

#include <EPStates.h>

Inheritance diagram for statemachine::HandleLumis:
state

List of all members.

Classes

class  LumiID

Public Types

typedef sc::transition< Run,
NewRun, HandleRuns,&HandleRuns::finalizeRun > 
reactions

Public Member Functions

bool checkInvariant ()
LumiID const & currentLumi () const
bool currentLumiEmpty () const
void exit ()
void finalizeLumi (bool cleaningUpAfterException)
 HandleLumis (my_context ctx)
void markLumiNonEmpty ()
void setupCurrentLumi ()
 ~HandleLumis ()

Private Attributes

LumiID currentLumi_
bool currentLumiEmpty_
edm::IEventProcessorep_
bool exitCalled_
bool lumiException_

Detailed Description

Definition at line 313 of file EPStates.h.


Member Typedef Documentation

typedef sc::transition<Run, NewRun, HandleRuns, &HandleRuns::finalizeRun> statemachine::HandleLumis::reactions

Definition at line 339 of file EPStates.h.


Constructor & Destructor Documentation

statemachine::HandleLumis::HandleLumis ( my_context  ctx)

Definition at line 369 of file EPStates.cc.

References checkInvariant().

                                         :
      my_base(ctx),
      ep_(context<Machine>().ep()),
      exitCalled_(false),
      currentLumiEmpty_(true),
      currentLumi_(InvalidLumiID),
      lumiException_(false) {
    checkInvariant();
  }
statemachine::HandleLumis::~HandleLumis ( )

Definition at line 388 of file EPStates.cc.

References checkInvariant(), ep_, exitCalled_, finalizeLumi(), lumiException_, python::rootplot::argparse::message, and edm::IEventProcessor::setExceptionMessageLumis().

                            {
    if(!exitCalled_) {
      try {
        checkInvariant();
        if(!lumiException_ && !context<HandleRuns>().runException()) {
          finalizeLumi(true);
        }
      }
      catch(...) {
        std::string message("Another exception was caught while trying to clean up lumis after the primary fatal exception.");
        ep_.setExceptionMessageLumis(message);
      }
    }
  }

Member Function Documentation

bool statemachine::HandleLumis::checkInvariant ( )

Definition at line 403 of file EPStates.cc.

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

                                   {
    assert(context<HandleRuns>().currentRun() != INVALID_RUN);
    return true;
  }
HandleLumis::LumiID const & statemachine::HandleLumis::currentLumi ( ) const

Definition at line 408 of file EPStates.cc.

References currentLumi_.

Referenced by finalizeLumi(), markLumiNonEmpty(), and setupCurrentLumi().

{ return currentLumi_; }
bool statemachine::HandleLumis::currentLumiEmpty ( ) const

Definition at line 410 of file EPStates.cc.

References currentLumiEmpty_.

{ return currentLumiEmpty_; }
void statemachine::HandleLumis::exit ( )

Definition at line 379 of file EPStates.cc.

References edm::IEventProcessor::alreadyHandlingException(), checkInvariant(), ep_, exitCalled_, finalizeLumi(), and lumiException_.

                         {
    if(ep_.alreadyHandlingException()) return;
    exitCalled_ = true;
    checkInvariant();
    if(!lumiException_ && !context<HandleRuns>().runException()) {
      finalizeLumi(false);
    }
  }
void statemachine::HandleLumis::finalizeLumi ( bool  cleaningUpAfterException)
void statemachine::HandleLumis::markLumiNonEmpty ( )
void statemachine::HandleLumis::setupCurrentLumi ( )

Definition at line 412 of file EPStates.cc.

References edm::IEventProcessor::beginLumi(), currentLumi(), currentLumi_, currentLumiEmpty_, ep_, statemachine::handleEmptyRunsAndLumis, fjr2json::lumi, lumiException_, statemachine::Run::processHistoryID(), edm::IEventProcessor::readAndCacheLumi(), DTTTrigCorrFirst::run, and statemachine::Run::runNumber().

                                     {

    Run const& run = context<HandleRuns>().currentRun();
    assert(run != INVALID_RUN);
    lumiException_ = true;
    currentLumi_ = HandleLumis::LumiID(run.processHistoryID(), run.runNumber(), ep_.readAndCacheLumi(false));

    if(context<Machine>().emptyRunLumiMode() == handleEmptyRunsAndLumis) {
      assert(context<HandleRuns>().beginRunCalled());
      ep_.beginLumi(currentLumi().processHistoryID(), currentLumi().run(), currentLumi().lumi());
    }

    lumiException_ = false;

    currentLumiEmpty_ = true;
  }

Member Data Documentation

Definition at line 345 of file EPStates.h.

Referenced by currentLumi(), finalizeLumi(), and setupCurrentLumi().

Definition at line 344 of file EPStates.h.

Referenced by currentLumiEmpty(), finalizeLumi(), markLumiNonEmpty(), and setupCurrentLumi().

Definition at line 342 of file EPStates.h.

Referenced by exit(), finalizeLumi(), markLumiNonEmpty(), setupCurrentLumi(), and ~HandleLumis().

Definition at line 343 of file EPStates.h.

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

Definition at line 346 of file EPStates.h.

Referenced by exit(), finalizeLumi(), markLumiNonEmpty(), setupCurrentLumi(), and ~HandleLumis().