CMS 3D CMS Logo

Public Types | Public Member Functions

statemachine::FirstLumi Class Reference

#include <EPStates.h>

Inheritance diagram for statemachine::FirstLumi:
state

List of all members.

Public Types

typedef mpl::list
< sc::transition< Event,
HandleEvent >
, sc::custom_reaction< Lumi >
, sc::custom_reaction< File > > 
reactions

Public Member Functions

bool checkInvariant ()
 FirstLumi (my_context ctx)
sc::result react (Lumi const &lumi)
sc::result react (File const &file)
 ~FirstLumi ()

Detailed Description

Definition at line 354 of file EPStates.h.


Member Typedef Documentation

typedef mpl::list< sc::transition<Event, HandleEvent>, sc::custom_reaction<Lumi>, sc::custom_reaction<File> > statemachine::FirstLumi::reactions

Definition at line 364 of file EPStates.h.


Constructor & Destructor Documentation

statemachine::FirstLumi::FirstLumi ( my_context  ctx)

Definition at line 457 of file EPStates.cc.

References checkInvariant().

                                     :
      my_base(ctx) {
    context<HandleLumis>().setupCurrentLumi();
    checkInvariant();
  }
statemachine::FirstLumi::~FirstLumi ( )

Definition at line 463 of file EPStates.cc.

References checkInvariant().


Member Function Documentation

bool statemachine::FirstLumi::checkInvariant ( )

Definition at line 467 of file EPStates.cc.

References fjr2json::lumi, DTTTrigCorrFirst::run, and convertSQLiteXML::runNumber.

Referenced by FirstLumi(), react(), and ~FirstLumi().

                                 {
    assert(context<HandleRuns>().currentRun() != INVALID_RUN);
    assert(context<HandleLumis>().currentLumi().processHistoryID() == context<HandleRuns>().currentRun().processHistoryID());
    assert(context<HandleLumis>().currentLumi().run() == context<HandleRuns>().currentRun().runNumber());
    assert(context<HandleLumis>().currentLumi().lumi() != INVALID_LUMI);
    assert(context<HandleLumis>().currentLumiEmpty() == true);
    return true;
  }
sc::result statemachine::FirstLumi::react ( File const &  file)

Definition at line 483 of file EPStates.cc.

References checkInvariant().

                                       {
    checkInvariant();
    if(!context<HandleFiles>().shouldWeCloseOutput()) {
      return transit<HandleNewInputFile3>();
    }
    return forward_event();
  }
sc::result statemachine::FirstLumi::react ( Lumi const &  lumi)

Definition at line 476 of file EPStates.cc.

References statemachine::Lumi::id().

                                            {
    if(lumi.id() == context<HandleLumis>().currentLumi().lumi()) {
      return transit<ContinueLumi>();
    }
    return transit<AnotherLumi>();
  }