CMS 3D CMS Logo

Public Member Functions | Private Attributes

stor::StateMachine Class Reference

#include <StateMachine.h>

List of all members.

Public Member Functions

Operations const & getCurrentState () const
std::string getCurrentStateName () const
EventDistributorgetEventDistributor () const
FragmentStoregetFragmentStore () const
NotifiergetNotifier ()
SharedResourcesPtr getSharedResources () const
void setExternallyVisibleState (const std::string &)
 StateMachine (EventDistributor *ed, FragmentStore *fs, Notifier *n, SharedResourcesPtr sr)
void unconsumed_event (bsc::event_base const &)
void updateHistory (const TransitionRecord &tr)

Private Attributes

DiskWriterdiskWriter_
EventDistributoreventDistributor_
FragmentStorefragmentStore_
Notifiernotifier_
SharedResourcesPtr sharedResources_

Detailed Description

State machine class

Author:
mommsen
Revision:
1.11
Date:
2011/03/07 15:31:32

Definition at line 127 of file StateMachine.h.


Constructor & Destructor Documentation

stor::StateMachine::StateMachine ( EventDistributor ed,
FragmentStore fs,
Notifier n,
SharedResourcesPtr  sr 
)

Definition at line 19 of file StateMachine.cc.


Member Function Documentation

Operations const & stor::StateMachine::getCurrentState ( ) const

Definition at line 32 of file StateMachine.cc.

Referenced by getCurrentStateName().

  {
    return state_cast<Operations const&>();
  }
std::string stor::StateMachine::getCurrentStateName ( ) const

Definition at line 37 of file StateMachine.cc.

References getCurrentState(), and stor::Operations::stateName().

Referenced by unconsumed_event().

  {
    return getCurrentState().stateName();
  }
EventDistributor* stor::StateMachine::getEventDistributor ( ) const [inline]

Definition at line 143 of file StateMachine.h.

References eventDistributor_.

{ return eventDistributor_; }
FragmentStore* stor::StateMachine::getFragmentStore ( ) const [inline]

Definition at line 144 of file StateMachine.h.

References fragmentStore_.

{ return fragmentStore_; }
Notifier* stor::StateMachine::getNotifier ( ) [inline]

Definition at line 145 of file StateMachine.h.

References notifier_.

{ return notifier_; }
SharedResourcesPtr stor::StateMachine::getSharedResources ( ) const [inline]

Definition at line 146 of file StateMachine.h.

References sharedResources_.

{ return sharedResources_; }
void stor::StateMachine::setExternallyVisibleState ( const std::string &  s)

Definition at line 64 of file StateMachine.cc.

References sharedResources_.

  {
    sharedResources_->statisticsReporter_->
      getStateMachineMonitorCollection().setExternallyVisibleState( s );
  }
void stor::StateMachine::unconsumed_event ( bsc::event_base const &  event)

Definition at line 51 of file StateMachine.cc.

References ExpressReco_HICollisions_FallBack::cerr, event(), getCurrentStateName(), AlCaRecoCosmics_cfg::name, notifier_, and stor::Notifier::reportNewState().

  {
    
    std::cerr << "The " << 
      //event.dynamic_type()
      typeid(event).name()
      << " event is not supported from the "
      << getCurrentStateName() << " state!" << std::endl;
    
    // Tell run control not to wait:
    notifier_->reportNewState( "Unchanged" );
  }
void stor::StateMachine::updateHistory ( const TransitionRecord tr)

Definition at line 42 of file StateMachine.cc.

References sharedResources_.

  {
    sharedResources_->statisticsReporter_->
      getStateMachineMonitorCollection().updateHistory(tr);
    // std::ostringstream msg;
    // msg << tr;
    // LOG4CPLUS_WARN(sharedResources_->statisticsReporter_->alarmHandler()->getLogger(), msg.str());
  }

Member Data Documentation

Definition at line 154 of file StateMachine.h.

Definition at line 155 of file StateMachine.h.

Referenced by getEventDistributor().

Definition at line 156 of file StateMachine.h.

Referenced by getFragmentStore().

Definition at line 157 of file StateMachine.h.

Referenced by getNotifier(), and unconsumed_event().

Definition at line 158 of file StateMachine.h.

Referenced by getSharedResources(), setExternallyVisibleState(), and updateHistory().