CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
statemachine::HandleEvent Class Reference

#include <EPStates.h>

Inheritance diagram for statemachine::HandleEvent:

Public Types

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

Public Member Functions

bool checkInvariant ()
 
 HandleEvent (my_context ctx)
 
void markNonEmpty ()
 
sc::result react (File const &file)
 
void readAndProcessEvent ()
 
 ~HandleEvent ()
 

Private Attributes

edm::IEventProcessorep_
 

Detailed Description

Definition at line 384 of file EPStates.h.

Member Typedef Documentation

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

Definition at line 394 of file EPStates.h.

Constructor & Destructor Documentation

statemachine::HandleEvent::HandleEvent ( my_context  ctx)

Definition at line 526 of file EPStates.cc.

References checkInvariant(), and readAndProcessEvent().

526  :
527  my_base(ctx),
528  ep_(context<Machine>().ep()) {
530  checkInvariant();
531  }
edm::IEventProcessor & ep_
Definition: EPStates.h:400
statemachine::HandleEvent::~HandleEvent ( )

Definition at line 533 of file EPStates.cc.

References checkInvariant().

533  {
534  checkInvariant();
535  }

Member Function Documentation

bool statemachine::HandleEvent::checkInvariant ( )

Definition at line 537 of file EPStates.cc.

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

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

537  {
538  assert(context<HandleRuns>().currentRun() != INVALID_RUN);
539  assert(context<HandleRuns>().beginRunCalled());
540  assert(context<HandleLumis>().currentLumi().processHistoryID() == context<HandleRuns>().currentRun().processHistoryID());
541  assert(context<HandleLumis>().currentLumi().run() == context<HandleRuns>().currentRun().runNumber());
542  assert(context<HandleLumis>().currentLumi().lumi() != INVALID_LUMI);
543  assert(context<HandleLumis>().currentLumiEmpty() == false);
544  return true;
545  }
tuple lumi
Definition: fjr2json.py:35
void statemachine::HandleEvent::markNonEmpty ( )

Definition at line 561 of file EPStates.cc.

Referenced by readAndProcessEvent().

561  {
562  context<HandleRuns>().beginRunIfNotDoneAlready();
563  context<HandleLumis>().markLumiNonEmpty();
564  }
sc::result statemachine::HandleEvent::react ( File const &  file)

Definition at line 547 of file EPStates.cc.

References checkInvariant().

547  {
548  checkInvariant();
549  if(!context<HandleFiles>().shouldWeCloseOutput()) {
550  return transit<HandleNewInputFile3>();
551  }
552  return forward_event();
553  }
void statemachine::HandleEvent::readAndProcessEvent ( )

Definition at line 555 of file EPStates.cc.

References ep_, markNonEmpty(), edm::IEventProcessor::readAndProcessEvent(), and edm::IEventProcessor::shouldWeStop().

Referenced by HandleEvent().

555  {
556  markNonEmpty();
558  if(ep_.shouldWeStop()) post_event(Stop());
559  }
virtual bool shouldWeStop() const =0
virtual void readAndProcessEvent()=0
edm::IEventProcessor & ep_
Definition: EPStates.h:400

Member Data Documentation

edm::IEventProcessor& statemachine::HandleEvent::ep_
private

Definition at line 400 of file EPStates.h.

Referenced by readAndProcessEvent().