CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FinishingDQM.cc
Go to the documentation of this file.
1 // $Id: FinishingDQM.cc,v 1.12 2011/11/08 10:48:40 mommsen Exp $
3 
10 
11 #include <iostream>
12 #include <unistd.h>
13 
14 using namespace std;
15 using namespace stor;
16 
17 FinishingDQM::FinishingDQM( my_context c ): my_base(c)
18 {
20 }
21 
23 {
24 
25  TransitionRecord tr( stateName(), true );
26  outermost_context().updateHistory( tr );
27 
28  SharedResourcesPtr sharedResources =
29  outermost_context().getSharedResources();
30 
31  // request end-of-run processing in DQMEventProcessor
32  sharedResources->dqmEventProcessorResources_->requestEndOfRun();
33 
34 }
35 
37 {
39 }
40 
42 {
43  TransitionRecord tr( stateName(), false );
44  outermost_context().updateHistory( tr );
45 }
46 
48 {
49  return std::string( "FinishingDQM" );
50 }
51 
53 {
54  outermost_context().getSharedResources()->alarmHandler_->moveToFailedState( exception );
55 }
56 
57 void
59 {
61  {
62  SharedResourcesPtr sharedResources =
63  outermost_context().getSharedResources();
64  EventPtr_t stMachEvent( new EndRun() );
65  sharedResources->commandQueue_->enqWait( stMachEvent );
66  }
67 }
68 
69 bool
71 {
72  SharedResourcesPtr sharedResources =
73  outermost_context().getSharedResources();
74 
75  if ( sharedResources->dqmEventProcessorResources_->requestsOngoing() ) return false;
76 
77  return true;
78 }
79 
virtual std::string do_stateName() const
Definition: FinishingDQM.cc:47
std::string stateName() const
Definition: Operations.cc:39
virtual void do_moveToFailedState(xcept::Exception &exception) const
Definition: FinishingDQM.cc:52
boost::shared_ptr< SharedResources > SharedResourcesPtr
virtual void do_noFragmentToProcess() const
Definition: FinishingDQM.cc:58
boost::shared_ptr< boost::statechart::event_base > EventPtr_t
Definition: CommandQueue.h:21
void safeExitAction()
Definition: Operations.cc:108
virtual ~FinishingDQM()
Definition: FinishingDQM.cc:36
bool endOfRunProcessingIsDone() const
Definition: FinishingDQM.cc:70
virtual void do_entryActionWork()
Definition: FinishingDQM.cc:22
virtual void do_exitActionWork()
Definition: FinishingDQM.cc:41
void safeEntryAction()
Definition: Operations.cc:77