#include <StateMachine.h>
Public Types | |
typedef bsc::transition < HaltDone, Halted > | DT |
typedef bsc::transition< Halt, Halted > | HT |
typedef boost::mpl::list< ST, HT, DT > | reactions |
typedef bsc::transition < Reconfigure, Ready > | ST |
Public Member Functions | |
Ready (my_context) | |
virtual | ~Ready () |
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 |
Ready state
Definition at line 278 of file StateMachine.h.
typedef bsc::transition<HaltDone,Halted> stor::Ready::DT |
Definition at line 285 of file StateMachine.h.
typedef bsc::transition<Halt,Halted> stor::Ready::HT |
Definition at line 284 of file StateMachine.h.
typedef boost::mpl::list<ST,HT,DT> stor::Ready::reactions |
Definition at line 286 of file StateMachine.h.
typedef bsc::transition<Reconfigure,Ready> stor::Ready::ST |
Definition at line 283 of file StateMachine.h.
Ready::Ready | ( | my_context | c | ) |
Definition at line 21 of file Ready.cc.
References stor::Operations::safeEntryAction().
: my_base(c) { safeEntryAction(); }
Ready::~Ready | ( | ) | [virtual] |
Definition at line 119 of file Ready.cc.
References stor::Operations::safeExitAction().
{ safeExitAction(); }
void Ready::do_entryActionWork | ( | ) | [private, virtual] |
Implements stor::Operations.
Definition at line 26 of file Ready.cc.
References stor::QueueConfigurationParams::commandQueueSize_, edm::errors::Configuration, stor::RunMonitorCollection::configureAlarms(), stor::ResourceMonitorCollection::configureAlarms(), stor::ResourceMonitorCollection::configureDisks(), stor::ResourceMonitorCollection::configureResources(), stor::QueueConfigurationParams::dqmEventQueueMemoryLimitMB_, stor::QueueConfigurationParams::dqmEventQueueSize_, exception, Exception, stor::QueueConfigurationParams::fragmentQueueMemoryLimitMB_, stor::QueueConfigurationParams::fragmentQueueSize_, stor::parseStreamConfiguration(), stor::QueueConfigurationParams::registrationQueueSize_, stor::Operations::stateName(), stor::DiskWritingParams::streamConfiguration_, stor::QueueConfigurationParams::streamQueueMemoryLimitMB_, and stor::QueueConfigurationParams::streamQueueSize_.
{ TransitionRecord tr( stateName(), true ); outermost_context().updateHistory( tr ); SharedResourcesPtr sharedResources = outermost_context().getSharedResources(); // update all configuration parameters std::string errorMsg = "Failed to update configuration parameters in Ready state"; try { sharedResources->configuration_->updateAllParams(); } catch(xcept::Exception &e) { XCEPT_DECLARE_NESTED(stor::exception::Configuration, sentinelException, errorMsg, e); sharedResources->moveToFailedState( sentinelException ); return; } catch( std::exception &e ) { errorMsg.append(": "); errorMsg.append( e.what() ); XCEPT_DECLARE(stor::exception::Configuration, sentinelException, errorMsg); sharedResources->moveToFailedState( sentinelException ); return; } catch(...) { errorMsg.append(": unknown exception"); XCEPT_DECLARE(stor::exception::Configuration, sentinelException, errorMsg); sharedResources->moveToFailedState( sentinelException ); return; } // configure the various queue sizes QueueConfigurationParams queueParams = sharedResources->configuration_->getQueueConfigurationParams(); sharedResources->commandQueue_-> setCapacity(queueParams.commandQueueSize_); sharedResources->fragmentQueue_-> setCapacity(queueParams.fragmentQueueSize_); sharedResources->fragmentQueue_-> setMemory(queueParams.fragmentQueueMemoryLimitMB_ * 1024*1024); sharedResources->registrationQueue_-> setCapacity(queueParams.registrationQueueSize_); sharedResources->streamQueue_-> setCapacity(queueParams.streamQueueSize_); sharedResources->streamQueue_-> setMemory(queueParams.streamQueueMemoryLimitMB_ * 1024*1024); sharedResources->dqmEventQueue_-> setCapacity(queueParams.dqmEventQueueSize_); sharedResources->dqmEventQueue_-> setMemory(queueParams.dqmEventQueueMemoryLimitMB_ * 1024*1024); // convert the SM configuration string into ConfigInfo objects // and store them for later use DiskWritingParams dwParams = sharedResources->configuration_->getDiskWritingParams(); EvtStrConfigListPtr evtCfgList(new EvtStrConfigList); ErrStrConfigListPtr errCfgList(new ErrStrConfigList); parseStreamConfiguration(dwParams.streamConfiguration_, evtCfgList, errCfgList); sharedResources->configuration_->setCurrentEventStreamConfig(evtCfgList); sharedResources->configuration_->setCurrentErrorStreamConfig(errCfgList); // configure the disk monitoring ResourceMonitorCollection& rmc = sharedResources->statisticsReporter_->getResourceMonitorCollection(); AlarmParams ap = sharedResources->configuration_->getAlarmParams(); ResourceMonitorParams rmp = sharedResources->configuration_->getResourceMonitorParams(); rmc.configureAlarms(ap); rmc.configureResources(rmp); rmc.configureDisks(dwParams); // configure the run monitoring RunMonitorCollection& run_mc = sharedResources->statisticsReporter_->getRunMonitorCollection(); run_mc.configureAlarms(ap); // configure the discard manager sharedResources->discardManager_->configure(); }
void Ready::do_exitActionWork | ( | ) | [private, virtual] |
Implements stor::Operations.
Definition at line 124 of file Ready.cc.
References stor::Operations::stateName().
{ TransitionRecord tr( stateName(), false ); outermost_context().updateHistory( tr ); }
void Ready::do_moveToFailedState | ( | xcept::Exception & | exception | ) | const [private, virtual] |
Implements stor::Operations.
Definition at line 135 of file Ready.cc.
{ outermost_context().getSharedResources()->moveToFailedState( exception ); }
string Ready::do_stateName | ( | ) | const [private, virtual] |
Implements stor::Operations.
Definition at line 130 of file Ready.cc.
{ return std::string( "Ready" ); }