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::Stopped Class Reference

#include <RBStateMachine.h>

Inheritance diagram for evf::rb_statemachine::Stopped:
evf::rb_statemachine::BaseState

Public Types

typedef bsc::transition
< Enable, Enabling
ET
 
typedef boost::mpl::list< ETreactions
 

Public Member Functions

virtual void do_stateNotify ()
 
virtual int stateID () const
 
 Stopped (my_context)
 
virtual ~Stopped ()
 
- 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

Stopped state

Definition at line 466 of file RBStateMachine.h.

Member Typedef Documentation

Definition at line 470 of file RBStateMachine.h.

Definition at line 471 of file RBStateMachine.h.

Constructor & Destructor Documentation

Stopped::Stopped ( my_context  c)

Definition at line 34 of file Stopped.cc.

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

34  :
35  my_base(c) {
37 }
Stopped::~Stopped ( )
virtual

Definition at line 39 of file Stopped.cc.

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

39  {
41 }

Member Function Documentation

void Stopped::do_entryActionWork ( )
privatevirtual

Implements evf::rb_statemachine::BaseState.

Definition at line 16 of file Stopped.cc.

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

Implements evf::rb_statemachine::BaseState.

Definition at line 45 of file Stopped.cc.

45  {
46 }
void Stopped::do_moveToFailedState ( xcept::Exception &  exception) const
privatevirtual

Implements evf::rb_statemachine::BaseState.

Definition at line 52 of file Stopped.cc.

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

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

Implements evf::rb_statemachine::BaseState.

Definition at line 48 of file Stopped.cc.

48  {
49  return string("Stopped");
50 }
void Stopped::do_stateNotify ( )
virtual

State entry notifications

Implements evf::rb_statemachine::BaseState.

Definition at line 19 of file Stopped.cc.

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

19  {
20  /*
21  * Stopped will set the externally visible state to ready.
22  * (useful when re-entering Stopped after a _stop_ event)
23  */
24  SharedResourcesPtr_t res = outermost_context().getSharedResources();
25  LOG4CPLUS_INFO(res->log_, "--> ResourceBroker: NEW STATE: " << stateName());
26  outermost_context().setExternallyVisibleState("Ready");
27  outermost_context().setInternalStateName(stateName());
28  // notify RCMS of the new state
29  outermost_context().rcmsStateChangeNotify();
30 }
boost::shared_ptr< SharedResources > SharedResourcesPtr_t
std::string stateName() const
Definition: BaseState.cc:31
virtual int evf::rb_statemachine::Stopped::stateID ( ) const
inlinevirtual

Return the current state ID

Implements evf::rb_statemachine::BaseState.

Definition at line 476 of file RBStateMachine.h.

References evf::rb_statemachine::STOPPED.