test
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 387 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 397 of file EPStates.h.

Constructor & Destructor Documentation

statemachine::HandleEvent::HandleEvent ( my_context  ctx)

Definition at line 523 of file EPStates.cc.

References checkInvariant(), and readAndProcessEvent().

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

Definition at line 530 of file EPStates.cc.

References checkInvariant().

530  {
531  checkInvariant();
532  }

Member Function Documentation

bool statemachine::HandleEvent::checkInvariant ( )

Definition at line 534 of file EPStates.cc.

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

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

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

Definition at line 558 of file EPStates.cc.

Referenced by readAndProcessEvent().

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

Definition at line 544 of file EPStates.cc.

References checkInvariant().

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

Definition at line 552 of file EPStates.cc.

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

Referenced by HandleEvent().

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

Member Data Documentation

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

Definition at line 403 of file EPStates.h.

Referenced by readAndProcessEvent().