CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Enabled.cc
Go to the documentation of this file.
1 // $Id: Enabled.cc,v 1.10.6.1 2011/03/07 11:33:05 mommsen Exp $
3 
10 
11 #include <iostream>
12 
13 using namespace std;
14 using namespace stor;
15 
16 Enabled::Enabled( my_context c ): my_base(c)
17 {
19 }
20 
22 {
23 
24  TransitionRecord tr( stateName(), true );
25  outermost_context().updateHistory( tr );
26 
27  SharedResourcesPtr sharedResources =
28  outermost_context().getSharedResources();
29 
30  // reset all statistics (needs to be done first)
31  sharedResources->statisticsReporter_->reset();
32 
33  // clear the INIT message collection at begin run
34  sharedResources->initMsgCollection_->clear();
35 
36  // update the run-based configuration parameters
37  sharedResources->configuration_->updateRunParams();
38 }
39 
41 {
43 }
44 
46 {
47 
48  TransitionRecord tr( stateName(), false );
49  outermost_context().updateHistory( tr );
50 
51  // clear the stream selections in the event distributor
52  outermost_context().getEventDistributor()->clearStreams();
53 
54 }
55 
56 string Enabled::do_stateName() const
57 {
58  return std::string( "Enabled" );
59 }
60 
62 {
63  outermost_context().getSharedResources()->moveToFailedState( exception );
64 }
65 
66 void Enabled::logHaltRequest( const Halt& request )
67 {
68  outermost_context().unconsumed_event( request );
69 }
70 
72 {
73  outermost_context().unconsumed_event( request );
74 }
75 
76 
std::string stateName() const
Definition: Operations.cc:39
virtual void do_entryActionWork()
Definition: Enabled.cc:21
void logReconfigureRequest(const Reconfigure &request)
Definition: Enabled.cc:71
boost::shared_ptr< SharedResources > SharedResourcesPtr
virtual void do_moveToFailedState(xcept::Exception &exception) const
Definition: Enabled.cc:61
virtual std::string do_stateName() const
Definition: Enabled.cc:56
void safeExitAction()
Definition: Operations.cc:108
virtual ~Enabled()
Definition: Enabled.cc:40
virtual void do_exitActionWork()
Definition: Enabled.cc:45
void logHaltRequest(const Halt &request)
Definition: Enabled.cc:66
void safeEntryAction()
Definition: Operations.cc:77