#include <StateMachine.h>
Public Types | |
typedef bsc::transition < EmergencyStop, Stopping > | ET |
typedef bsc::in_state_reaction < HaltDone, Starting,&Starting::logHaltDoneRequest > | HaltDoneIR |
typedef boost::mpl::list< ST, ET, StopDoneIR, HaltDoneIR > | reactions |
typedef bsc::transition < StartRun, Running > | ST |
typedef bsc::in_state_reaction < StopDone, Starting,&Starting::logStopDoneRequest > | StopDoneIR |
Public Member Functions | |
void | logHaltDoneRequest (const HaltDone &request) |
void | logStopDoneRequest (const StopDone &request) |
Starting (my_context) | |
virtual | ~Starting () |
Private Member Functions | |
virtual void | do_entryActionWork () |
virtual void | do_exitActionWork () |
virtual void | do_moveToFailedState (xcept::Exception &exception) const |
virtual void | do_noFragmentToProcess () const |
virtual std::string | do_stateName () const |
bool | workerThreadsConfigured () const |
Starting state
Definition at line 369 of file StateMachine.h.
typedef bsc::transition<EmergencyStop,Stopping> stor::Starting::ET |
Definition at line 378 of file StateMachine.h.
typedef bsc::in_state_reaction<HaltDone,Starting,&Starting::logHaltDoneRequest> stor::Starting::HaltDoneIR |
Definition at line 380 of file StateMachine.h.
typedef boost::mpl::list<ST,ET,StopDoneIR,HaltDoneIR> stor::Starting::reactions |
Definition at line 381 of file StateMachine.h.
typedef bsc::transition<StartRun,Running> stor::Starting::ST |
Definition at line 377 of file StateMachine.h.
typedef bsc::in_state_reaction<StopDone,Starting,&Starting::logStopDoneRequest> stor::Starting::StopDoneIR |
Definition at line 379 of file StateMachine.h.
Starting::Starting | ( | my_context | c | ) |
Definition at line 21 of file Starting.cc.
References stor::Operations::safeEntryAction().
: my_base(c) { safeEntryAction(); }
Starting::~Starting | ( | ) | [virtual] |
Definition at line 55 of file Starting.cc.
References stor::Operations::safeExitAction().
{ safeExitAction(); }
void Starting::do_entryActionWork | ( | ) | [private, virtual] |
Implements stor::Operations.
Definition at line 26 of file Starting.cc.
References stor::WorkerThreadParams::DQMEPdeqWaitTime_, stor::WorkerThreadParams::DWdeqWaitTime_, and stor::Operations::stateName().
{ TransitionRecord tr( stateName(), true ); outermost_context().updateHistory( tr ); SharedResourcesPtr sharedResources = outermost_context().getSharedResources(); // Request DiskWriter to configure streams EvtStrConfigListPtr evtCfgList = sharedResources->configuration_-> getCurrentEventStreamConfig(); ErrStrConfigListPtr errCfgList = sharedResources->configuration_-> getCurrentErrorStreamConfig(); WorkerThreadParams workerParams = sharedResources->configuration_->getWorkerThreadParams(); sharedResources->diskWriterResources_-> requestStreamConfiguration(evtCfgList, errCfgList, sharedResources->configuration_->getDiskWritingParams(), sharedResources->configuration_->getRunNumber(), workerParams.DWdeqWaitTime_); // Request configuration of DQMEventProcessor sharedResources->dqmEventProcessorResources_-> requestConfiguration( sharedResources->configuration_->getDQMProcessingParams(), workerParams.DQMEPdeqWaitTime_); }
void Starting::do_exitActionWork | ( | ) | [private, virtual] |
Implements stor::Operations.
Definition at line 60 of file Starting.cc.
References stor::Operations::stateName().
{ TransitionRecord tr( stateName(), false ); outermost_context().updateHistory( tr ); }
void Starting::do_moveToFailedState | ( | xcept::Exception & | exception | ) | const [private, virtual] |
Implements stor::Operations.
Definition at line 71 of file Starting.cc.
{ outermost_context().getSharedResources()->alarmHandler_->moveToFailedState( exception ); }
void Starting::do_noFragmentToProcess | ( | ) | const [private, virtual] |
Reimplemented from stor::Operations.
Definition at line 87 of file Starting.cc.
References workerThreadsConfigured().
{ if ( workerThreadsConfigured() ) { SharedResourcesPtr sharedResources = outermost_context().getSharedResources(); EventPtr_t stMachEvent( new StartRun() ); sharedResources->commandQueue_->enqWait( stMachEvent ); } }
string Starting::do_stateName | ( | ) | const [private, virtual] |
Implements stor::Operations.
Definition at line 66 of file Starting.cc.
{ return std::string( "Starting" ); }
void Starting::logHaltDoneRequest | ( | const HaltDone & | request | ) |
Definition at line 81 of file Starting.cc.
{ outermost_context().unconsumed_event( request ); }
void Starting::logStopDoneRequest | ( | const StopDone & | request | ) |
Definition at line 76 of file Starting.cc.
{ outermost_context().unconsumed_event( request ); }
bool Starting::workerThreadsConfigured | ( | ) | const [private] |
Definition at line 99 of file Starting.cc.
Referenced by do_noFragmentToProcess().
{ SharedResourcesPtr sharedResources = outermost_context().getSharedResources(); // check if the requests are still being processed if ( sharedResources->diskWriterResources_->streamChangeOngoing() ) return false; if ( sharedResources->dqmEventProcessorResources_->requestsOngoing() ) return false; return true; }