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 385 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 395 of file EPStates.h.

Constructor & Destructor Documentation

statemachine::HandleEvent::HandleEvent ( my_context  ctx)

Definition at line 522 of file EPStates.cc.

References checkInvariant(), and readAndProcessEvent().

522  :
523  my_base(ctx),
524  ep_(context<Machine>().ep()) {
526  checkInvariant();
527  }
edm::IEventProcessor & ep_
Definition: EPStates.h:401
statemachine::HandleEvent::~HandleEvent ( )

Definition at line 529 of file EPStates.cc.

References checkInvariant().

529  {
530  checkInvariant();
531  }

Member Function Documentation

bool statemachine::HandleEvent::checkInvariant ( )

Definition at line 533 of file EPStates.cc.

References assert(), fjr2json::lumi, DTTTrigCorrFirst::run, and convertSQLiteXML::runNumber.

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

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

Definition at line 557 of file EPStates.cc.

Referenced by readAndProcessEvent().

557  {
558  context<HandleRuns>().beginRunIfNotDoneAlready();
559  context<HandleLumis>().markLumiNonEmpty();
560  }
sc::result statemachine::HandleEvent::react ( File const &  file)

Definition at line 543 of file EPStates.cc.

References checkInvariant().

543  {
544  checkInvariant();
545  if(!context<HandleFiles>().shouldWeCloseOutput()) {
546  return transit<HandleNewInputFile3>();
547  }
548  return forward_event();
549  }
void statemachine::HandleEvent::readAndProcessEvent ( )

Definition at line 551 of file EPStates.cc.

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

Referenced by HandleEvent().

551  {
552  markNonEmpty();
554  if(ep_.shouldWeStop()) post_event(Stop());
555  }
virtual bool shouldWeStop() const =0
virtual void readAndProcessEvent()=0
edm::IEventProcessor & ep_
Definition: EPStates.h:401

Member Data Documentation

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

Definition at line 401 of file EPStates.h.

Referenced by readAndProcessEvent().