CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions
statemachine::FirstLumi Class Reference

#include <EPStates.h>

Inheritance diagram for statemachine::FirstLumi:

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 355 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 365 of file EPStates.h.

Constructor & Destructor Documentation

statemachine::FirstLumi::FirstLumi ( my_context  ctx)

Definition at line 454 of file EPStates.cc.

References checkInvariant().

454  :
455  my_base(ctx) {
456  context<HandleLumis>().setupCurrentLumi();
457  checkInvariant();
458  }
statemachine::FirstLumi::~FirstLumi ( )

Definition at line 460 of file EPStates.cc.

References checkInvariant().

460  {
461  checkInvariant();
462  }

Member Function Documentation

bool statemachine::FirstLumi::checkInvariant ( )

Definition at line 464 of file EPStates.cc.

References csvLumiCalc::lumi, findQualityFiles::run, and convertSQLiteXML::runNumber.

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

464  {
465  assert(context<HandleRuns>().currentRun() != INVALID_RUN);
466  assert(context<HandleLumis>().currentLumi().processHistoryID() == context<HandleRuns>().currentRun().processHistoryID());
467  assert(context<HandleLumis>().currentLumi().run() == context<HandleRuns>().currentRun().runNumber());
468  assert(context<HandleLumis>().currentLumi().lumi() != INVALID_LUMI);
469  assert(context<HandleLumis>().currentLumiEmpty() == true);
470  return true;
471  }
sc::result statemachine::FirstLumi::react ( Lumi const &  lumi)

Definition at line 473 of file EPStates.cc.

References statemachine::Lumi::id().

473  {
474  if(lumi.id() == context<HandleLumis>().currentLumi().lumi()) {
475  return transit<ContinueLumi>();
476  }
477  return transit<AnotherLumi>();
478  }
sc::result statemachine::FirstLumi::react ( File const &  file)

Definition at line 480 of file EPStates.cc.

References checkInvariant().

480  {
481  checkInvariant();
482  if(!context<HandleFiles>().shouldWeCloseOutput()) {
483  return transit<HandleNewInputFile3>();
484  }
485  return forward_event();
486  }