CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
stor::StateMachine Class Reference

#include <StateMachine.h>

Inheritance diagram for stor::StateMachine:

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.

24  :
26  fragmentStore_(fs),
27  notifier_(n),
29  {}
Notifier * notifier_
Definition: StateMachine.h:157
SharedResourcesPtr sharedResources_
Definition: StateMachine.h:158
EventDistributor * eventDistributor_
Definition: StateMachine.h:155
FragmentStore * fragmentStore_
Definition: StateMachine.h:156

Member Function Documentation

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

Definition at line 32 of file StateMachine.cc.

Referenced by getCurrentStateName().

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

Definition at line 37 of file StateMachine.cc.

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

Referenced by unconsumed_event().

38  {
39  return getCurrentState().stateName();
40  }
std::string stateName() const
Definition: Operations.cc:39
Operations const & getCurrentState() const
Definition: StateMachine.cc:32
EventDistributor* stor::StateMachine::getEventDistributor ( ) const
inline

Definition at line 143 of file StateMachine.h.

References eventDistributor_.

143 { return eventDistributor_; }
EventDistributor * eventDistributor_
Definition: StateMachine.h:155
FragmentStore* stor::StateMachine::getFragmentStore ( ) const
inline

Definition at line 144 of file StateMachine.h.

References fragmentStore_.

144 { return fragmentStore_; }
FragmentStore * fragmentStore_
Definition: StateMachine.h:156
Notifier* stor::StateMachine::getNotifier ( )
inline

Definition at line 145 of file StateMachine.h.

References notifier_.

145 { return notifier_; }
Notifier * notifier_
Definition: StateMachine.h:157
SharedResourcesPtr stor::StateMachine::getSharedResources ( ) const
inline

Definition at line 146 of file StateMachine.h.

References sharedResources_.

146 { return sharedResources_; }
SharedResourcesPtr sharedResources_
Definition: StateMachine.h:158
void stor::StateMachine::setExternallyVisibleState ( const std::string &  s)

Definition at line 64 of file StateMachine.cc.

References sharedResources_.

65  {
66  sharedResources_->statisticsReporter_->
67  getStateMachineMonitorCollection().setExternallyVisibleState( s );
68  }
SharedResourcesPtr sharedResources_
Definition: StateMachine.h:158
void stor::StateMachine::unconsumed_event ( bsc::event_base const &  event)

Definition at line 51 of file StateMachine.cc.

References dtNoiseDBValidation_cfg::cerr, event(), getCurrentStateName(), mergeVDriftHistosByStation::name, notifier_, and stor::Notifier::reportNewState().

52  {
53 
54  std::cerr << "The " <<
55  //event.dynamic_type()
56  typeid(event).name()
57  << " event is not supported from the "
58  << getCurrentStateName() << " state!" << std::endl;
59 
60  // Tell run control not to wait:
61  notifier_->reportNewState( "Unchanged" );
62  }
std::string getCurrentStateName() const
Definition: StateMachine.cc:37
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
Notifier * notifier_
Definition: StateMachine.h:157
virtual void reportNewState(const std::string &stateName)=0
void stor::StateMachine::updateHistory ( const TransitionRecord tr)

Definition at line 42 of file StateMachine.cc.

References sharedResources_.

43  {
44  sharedResources_->statisticsReporter_->
45  getStateMachineMonitorCollection().updateHistory(tr);
46  // std::ostringstream msg;
47  // msg << tr;
48  // LOG4CPLUS_WARN(sharedResources_->statisticsReporter_->alarmHandler()->getLogger(), msg.str());
49  }
SharedResourcesPtr sharedResources_
Definition: StateMachine.h:158

Member Data Documentation

DiskWriter* stor::StateMachine::diskWriter_
private

Definition at line 154 of file StateMachine.h.

EventDistributor* stor::StateMachine::eventDistributor_
private

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().

SharedResourcesPtr stor::StateMachine::sharedResources_
private

Definition at line 158 of file StateMachine.h.

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