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 Member Functions
evf::rb_statemachine::Enabled Class Reference

#include <RBStateMachine.h>

Inheritance diagram for evf::rb_statemachine::Enabled:
evf::rb_statemachine::BaseState

Public Types

typedef boost::mpl::list< STreactions
 
typedef bsc::transition< Stop,
Stopping
ST
 

Public Member Functions

virtual void do_stateNotify ()
 
 Enabled (my_context)
 
virtual int stateID () const
 
virtual ~Enabled ()
 
- Public Member Functions inherited from evf::rb_statemachine::BaseState
 BaseState ()
 
virtual bool discardDataEvent (MemRef_t *bufRef) const
 
virtual bool discardDqmEvent (MemRef_t *bufRef) const
 
virtual void do_stateAction () const
 
void moveToFailedState (xcept::Exception &exception) const
 
std::string stateName () const
 
virtual ~BaseState ()=0
 

Private Member Functions

virtual void do_entryActionWork ()
 
virtual void do_exitActionWork ()
 
virtual void do_moveToFailedState (xcept::Exception &exception) const
 
virtual std::string do_stateName () const
 

Additional Inherited Members

- Protected Member Functions inherited from evf::rb_statemachine::BaseState
void fail ()
 
void safeEntryAction ()
 
void safeExitAction ()
 

Detailed Description

Enabled state

Definition at line 532 of file RBStateMachine.h.

Member Typedef Documentation

Definition at line 537 of file RBStateMachine.h.

typedef bsc::transition<Stop, Stopping> evf::rb_statemachine::Enabled::ST

Definition at line 536 of file RBStateMachine.h.

Constructor & Destructor Documentation

Enabled::Enabled ( my_context  c)

Definition at line 30 of file Enabled.cc.

References evf::rb_statemachine::BaseState::safeEntryAction().

30  :
31  my_base(c) {
33 }
Enabled::~Enabled ( )
virtual

Definition at line 35 of file Enabled.cc.

References evf::rb_statemachine::BaseState::safeExitAction().

35  {
37 }

Member Function Documentation

void Enabled::do_entryActionWork ( )
privatevirtual

Implements evf::rb_statemachine::BaseState.

Definition at line 16 of file Enabled.cc.

16  {
17 }
void Enabled::do_exitActionWork ( )
privatevirtual

Implements evf::rb_statemachine::BaseState.

Definition at line 41 of file Enabled.cc.

41  {
42 }
void Enabled::do_moveToFailedState ( xcept::Exception &  exception) const
privatevirtual

Implements evf::rb_statemachine::BaseState.

Definition at line 48 of file Enabled.cc.

References edm::hlt::Fail, and evf::rb_statemachine::BaseState::fail().

48  {
49  SharedResourcesPtr_t res = outermost_context().getSharedResources();
50  res->reasonForFailed_ = exception.what();
51  LOG4CPLUS_FATAL(res->log_,
52  "Moving to FAILED state! Reason: " << exception.what());
53  EventPtr fail(new Fail());
54  res->commands_.enqEvent(fail);
55 }
boost::shared_ptr< SharedResources > SharedResourcesPtr_t
reject
Definition: HLTenums.h:23
boost::shared_ptr< boost::statechart::event_base > EventPtr
Definition: CommandQueue.h:23
string Enabled::do_stateName ( ) const
privatevirtual

Implements evf::rb_statemachine::BaseState.

Definition at line 44 of file Enabled.cc.

44  {
45  return string("Enabled");
46 }
void Enabled::do_stateNotify ( )
virtual

State entry notifications

Implements evf::rb_statemachine::BaseState.

Definition at line 19 of file Enabled.cc.

References evf::rb_statemachine::BaseState::stateName().

19  {
20  SharedResourcesPtr_t res = outermost_context().getSharedResources();
21  LOG4CPLUS_INFO(res->log_, "--> ResourceBroker: NEW STATE: " << stateName());
22  outermost_context().setExternallyVisibleState(stateName());
23  outermost_context().setInternalStateName(stateName());
24  // notify RCMS of the new state
25  outermost_context().rcmsStateChangeNotify();
26 }
boost::shared_ptr< SharedResources > SharedResourcesPtr_t
std::string stateName() const
Definition: BaseState.cc:31
virtual int evf::rb_statemachine::Enabled::stateID ( ) const
inlinevirtual

Return the current state ID

Implements evf::rb_statemachine::BaseState.

Definition at line 542 of file RBStateMachine.h.

References evf::rb_statemachine::ENABLED.