CMS 3D CMS Logo

Public Types | Public Member Functions

statemachine::AnotherLumi Class Reference

#include <EPStates.h>

Inheritance diagram for statemachine::AnotherLumi:
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

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

Detailed Description

Definition at line 368 of file EPStates.h.


Member Typedef Documentation

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

Definition at line 378 of file EPStates.h.


Constructor & Destructor Documentation

statemachine::AnotherLumi::AnotherLumi ( my_context  ctx)

Definition at line 603 of file EPStates.cc.

References checkInvariant().

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

Definition at line 611 of file EPStates.cc.

References checkInvariant().


Member Function Documentation

bool statemachine::AnotherLumi::checkInvariant ( )

Definition at line 615 of file EPStates.cc.

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

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

                                   {
    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::AnotherLumi::react ( File const &  file)

Definition at line 632 of file EPStates.cc.

References checkInvariant().

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

Definition at line 624 of file EPStates.cc.

References statemachine::Lumi::id().

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