CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions

stor::Running Class Reference

#include <StateMachine.h>

Inheritance diagram for stor::Running:
state stor::Operations

List of all members.

Public Types

typedef bsc::transition
< EmergencyStop, Stopping
EST
typedef bsc::transition
< EndRun, Stopping
ET
typedef bsc::in_state_reaction
< HaltDone, Running,&Running::logHaltDoneRequest > 
HaltDoneIR
typedef bsc::transition< Halt,
Halting
HT
typedef boost::mpl::list< ET,
EST, HT, StopDoneIR,
HaltDoneIR
reactions
typedef bsc::in_state_reaction
< StopDone, Running,&Running::logStopDoneRequest > 
StopDoneIR

Public Member Functions

void logHaltDoneRequest (const HaltDone &request)
void logStopDoneRequest (const StopDone &request)
 Running (my_context)
virtual ~Running ()

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

Detailed Description

Running state

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

Definition at line 469 of file StateMachine.h.


Member Typedef Documentation

typedef bsc::transition<EmergencyStop,Stopping> stor::Running::EST

Definition at line 478 of file StateMachine.h.

typedef bsc::transition<EndRun,Stopping> stor::Running::ET

Definition at line 477 of file StateMachine.h.

typedef bsc::in_state_reaction<HaltDone,Running,&Running::logHaltDoneRequest> stor::Running::HaltDoneIR

Definition at line 481 of file StateMachine.h.

typedef bsc::transition<Halt,Halting> stor::Running::HT

Definition at line 479 of file StateMachine.h.

Definition at line 482 of file StateMachine.h.

typedef bsc::in_state_reaction<StopDone,Running,&Running::logStopDoneRequest> stor::Running::StopDoneIR

Definition at line 480 of file StateMachine.h.


Constructor & Destructor Documentation

Running::Running ( my_context  c)

Definition at line 20 of file Running.cc.

References stor::Operations::safeEntryAction().

                              : my_base(c)
{
  safeEntryAction();
}
Running::~Running ( ) [virtual]

Definition at line 53 of file Running.cc.

References stor::Operations::safeExitAction().


Member Function Documentation

void Running::do_entryActionWork ( ) [private, virtual]

Implements stor::Operations.

Definition at line 25 of file Running.cc.

References stor::EventDistributor::clearConsumers(), stor::EventDistributor::registerErrorStreams(), stor::EventDistributor::registerEventStreams(), and stor::Operations::stateName().

{

  TransitionRecord tr( stateName(), true );
  outermost_context().updateHistory( tr );

  SharedResourcesPtr sharedResources =
    outermost_context().getSharedResources();

  // Configure event distributor
  EventDistributor* ed = outermost_context().getEventDistributor();
  EvtStrConfigListPtr evtCfgList = sharedResources->configuration_->
    getCurrentEventStreamConfig();
  ErrStrConfigListPtr errCfgList = sharedResources->configuration_->
    getCurrentErrorStreamConfig();
  ed->registerEventStreams(evtCfgList);
  ed->registerErrorStreams(errCfgList);

  // Clear old consumer registrations:
  sharedResources->registrationCollection_->clearRegistrations();
  ed->clearConsumers();
  sharedResources->eventQueueCollection_->removeQueues();
  sharedResources->dqmEventQueueCollection_->removeQueues();

  // Enable consumer registration:
  sharedResources->registrationCollection_->enableConsumerRegistration();
}
void Running::do_exitActionWork ( ) [private, virtual]

Implements stor::Operations.

Definition at line 58 of file Running.cc.

References stor::Operations::stateName().

{

  TransitionRecord tr( stateName(), false );
  outermost_context().updateHistory( tr );

  SharedResourcesPtr sharedResources =
    outermost_context().getSharedResources();

  // Disable consumer registration:
  sharedResources->registrationCollection_->disableConsumerRegistration();

  // Clear consumer queues
  sharedResources->eventQueueCollection_->clearQueues();
  sharedResources->dqmEventQueueCollection_->clearQueues();

  // Clear the queues
  sharedResources->fragmentQueue_->clear();
  sharedResources->streamQueue_->clear();
  sharedResources->dqmEventQueue_->clear();
  sharedResources->registrationQueue_->clear();

  // Clear any fragments left in the fragment store
  outermost_context().getFragmentStore()->clear();

}
void Running::do_moveToFailedState ( xcept::Exception exception) const [private, virtual]

Implements stor::Operations.

Definition at line 90 of file Running.cc.

{
  outermost_context().getSharedResources()->alarmHandler_->moveToFailedState( exception );
}
string Running::do_stateName ( ) const [private, virtual]

Implements stor::Operations.

Definition at line 85 of file Running.cc.

{
  return std::string( "Running" );
}
void Running::logHaltDoneRequest ( const HaltDone request)

Definition at line 100 of file Running.cc.

{
  outermost_context().unconsumed_event( request );
}
void Running::logStopDoneRequest ( const StopDone request)

Definition at line 95 of file Running.cc.

{
  outermost_context().unconsumed_event( request );
}