#include <StateMachine.h>
Public Member Functions | |
Operations const & | getCurrentState () const |
std::string | getCurrentStateName () const |
EventDistributor * | getEventDistributor () const |
FragmentStore * | getFragmentStore () const |
Notifier * | getNotifier () |
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 | |
DiskWriter * | diskWriter_ |
EventDistributor * | eventDistributor_ |
FragmentStore * | fragmentStore_ |
Notifier * | notifier_ |
SharedResourcesPtr | sharedResources_ |
State machine class
Definition at line 127 of file StateMachine.h.
stor::StateMachine::StateMachine | ( | EventDistributor * | ed, |
FragmentStore * | fs, | ||
Notifier * | n, | ||
SharedResourcesPtr | sr | ||
) |
Definition at line 19 of file StateMachine.cc.
: eventDistributor_(ed), fragmentStore_(fs), notifier_(n), sharedResources_(sr) {}
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] |
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()); }
DiskWriter* stor::StateMachine::diskWriter_ [private] |
Definition at line 154 of file StateMachine.h.
Definition at line 155 of file StateMachine.h.
Referenced by getEventDistributor().
FragmentStore* stor::StateMachine::fragmentStore_ [private] |
Definition at line 156 of file StateMachine.h.
Referenced by getFragmentStore().
Notifier* stor::StateMachine::notifier_ [private] |
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().