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
stor::Halting Class Reference

#include <StateMachine.h>

Inheritance diagram for stor::Halting:
stor::Operations

Public Types

typedef boost::mpl::list
< StopDoneIR
reactions
 
typedef bsc::in_state_reaction
< StopDone, Halting,&Halting::logStopDoneRequest
StopDoneIR
 

Public Member Functions

 Halting (my_context)
 
void logStopDoneRequest (const StopDone &request)
 
virtual ~Halting ()
 
- Public Member Functions inherited from stor::Operations
void moveToFailedState (xcept::Exception &exception) const
 
void noFragmentToProcess () const
 
 Operations ()
 
void processI2OFragment (I2OChain &frag) const
 
std::string stateName () const
 
virtual ~Operations ()=0
 

Private Member Functions

bool destructionIsDone () const
 
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
 

Additional Inherited Members

- Protected Member Functions inherited from stor::Operations
virtual void do_processI2OFragment (I2OChain &frag) const
 
void safeEntryAction ()
 
void safeExitAction ()
 

Detailed Description

Halting state

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

Definition at line 437 of file StateMachine.h.

Member Typedef Documentation

Definition at line 445 of file StateMachine.h.

Definition at line 444 of file StateMachine.h.

Constructor & Destructor Documentation

Halting::Halting ( my_context  c)

Definition at line 19 of file Halting.cc.

References stor::Operations::safeEntryAction().

19  : my_base(c)
20 {
22 }
void safeEntryAction()
Definition: Operations.cc:77
Halting::~Halting ( )
virtual

Definition at line 42 of file Halting.cc.

References stor::Operations::safeExitAction().

43 {
45 }
void safeExitAction()
Definition: Operations.cc:108

Member Function Documentation

bool Halting::destructionIsDone ( ) const
private

Definition at line 81 of file Halting.cc.

Referenced by do_noFragmentToProcess().

82 {
83  SharedResourcesPtr sharedResources =
84  outermost_context().getSharedResources();
85 
86  // check if the requests are still being processed
87  if ( sharedResources->diskWriterResources_->streamChangeOngoing() ) return false;
88 
89  if ( sharedResources->dqmEventProcessorResources_->requestsOngoing() ) return false;
90 
91  return true;
92 }
boost::shared_ptr< SharedResources > SharedResourcesPtr
void Halting::do_entryActionWork ( )
privatevirtual

Implements stor::Operations.

Definition at line 24 of file Halting.cc.

References stor::Operations::stateName().

25 {
26 
27  TransitionRecord tr( stateName(), true );
28  outermost_context().updateHistory( tr );
29 
30  SharedResourcesPtr sharedResources =
31  outermost_context().getSharedResources();
32 
33  // request that the streams that are currently configured in the disk
34  // writer be destroyed (this has the side effect of closing files)
35  sharedResources->diskWriterResources_->requestStreamDestruction();
36 
37  // request that the DQM event store is cleared
38  // if FinishingDQM has succeeded, the store is already empty
39  sharedResources->dqmEventProcessorResources_->requestStoreDestruction();
40 }
std::string stateName() const
Definition: Operations.cc:39
boost::shared_ptr< SharedResources > SharedResourcesPtr
void Halting::do_exitActionWork ( )
privatevirtual

Implements stor::Operations.

Definition at line 47 of file Halting.cc.

References stor::Operations::stateName().

48 {
49  TransitionRecord tr( stateName(), false );
50  outermost_context().updateHistory( tr );
51 }
std::string stateName() const
Definition: Operations.cc:39
void Halting::do_moveToFailedState ( xcept::Exception &  exception) const
privatevirtual

Implements stor::Operations.

Definition at line 58 of file Halting.cc.

59 {
60  outermost_context().getSharedResources()->alarmHandler_->moveToFailedState( exception );
61 }
void Halting::do_noFragmentToProcess ( ) const
privatevirtual

Reimplemented from stor::Operations.

Definition at line 69 of file Halting.cc.

References destructionIsDone().

70 {
71  if ( destructionIsDone() )
72  {
73  SharedResourcesPtr sharedResources =
74  outermost_context().getSharedResources();
75  EventPtr_t stMachEvent( new HaltDone() );
76  sharedResources->commandQueue_->enqWait( stMachEvent );
77  }
78 }
boost::shared_ptr< SharedResources > SharedResourcesPtr
boost::shared_ptr< boost::statechart::event_base > EventPtr_t
Definition: CommandQueue.h:21
bool destructionIsDone() const
Definition: Halting.cc:81
string Halting::do_stateName ( ) const
privatevirtual

Implements stor::Operations.

Definition at line 53 of file Halting.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

54 {
55  return std::string( "Halting" );
56 }
void Halting::logStopDoneRequest ( const StopDone request)

Definition at line 63 of file Halting.cc.

64 {
65  outermost_context().unconsumed_event( request );
66 }