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 641 of file EPStates.cc.

References checkInvariant(), and readAndProcessEvent().

641  :
642  my_base(ctx),
643  ep_(context<Machine>().ep())
644  {
646  checkInvariant();
647  }
edm::IEventProcessor & ep_
Definition: EPStates.h:400
statemachine::HandleEvent::~HandleEvent ( )

Definition at line 649 of file EPStates.cc.

References checkInvariant().

649  {
650  checkInvariant();
651  }

Member Function Documentation

bool statemachine::HandleEvent::checkInvariant ( )

Definition at line 653 of file EPStates.cc.

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

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

653  {
654  assert(context<HandleRuns>().currentRun() != INVALID_RUN);
655  assert(context<HandleRuns>().beginRunCalled());
656  assert(context<HandleLumis>().currentLumi().processHistoryID() == context<HandleRuns>().currentRun().processHistoryID());
657  assert(context<HandleLumis>().currentLumi().run() == context<HandleRuns>().currentRun().runNumber());
658  assert(context<HandleLumis>().currentLumi().lumi() != INVALID_LUMI);
659  assert(context<HandleLumis>().currentLumiEmpty() == false);
660  return true;
661  }
tuple lumi
Definition: fjr2json.py:41
void statemachine::HandleEvent::markNonEmpty ( )

Definition at line 678 of file EPStates.cc.

Referenced by readAndProcessEvent().

678  {
679  context<HandleRuns>().beginRunIfNotDoneAlready();
680  context<HandleLumis>().markLumiNonEmpty();
681  }
sc::result statemachine::HandleEvent::react ( File const &  file)

Definition at line 663 of file EPStates.cc.

References checkInvariant().

664  {
665  checkInvariant();
666  if (!context<HandleFiles>().shouldWeCloseOutput()) {
667  return transit<HandleNewInputFile3>();
668  }
669  return forward_event();
670  }
void statemachine::HandleEvent::readAndProcessEvent ( )

Definition at line 672 of file EPStates.cc.

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

Referenced by HandleEvent().

672  {
673  markNonEmpty();
675  if (ep_.shouldWeStop()) post_event(Stop());
676  }
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().