1 #ifndef _ots_EventBuilderApp_h_
2 #define _ots_EventBuilderApp_h_
4 #include "otsdaq-core/WorkLoopManager/WorkLoopManager.h"
5 #include "otsdaq-core/FiniteStateMachine/RunControlStateMachine.h"
6 #include "otsdaq-core/Supervisor/SupervisorsInfo.h"
7 #include "otsdaq-core/SOAPUtilities/SOAPMessenger.h"
8 #include "otsdaq-core/SupervisorDescriptorInfo/SupervisorDescriptorInfo.h"
10 #pragma GCC diagnostic push
11 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
12 #include <xdaq/Application.h>
13 #pragma GCC diagnostic pop
14 #include <xgi/Method.h>
21 #include "artdaq/Application/MPI2/MPISentry.hh"
27 class ConfigurationManager;
28 class ConfigurationGroupKey;
29 class EventBuilderInterface;
38 EventBuilderApp (xdaq::ApplicationStub * s)
throw (xdaq::exception::Exception);
42 void Default (xgi::Input* in, xgi::Output* out)
throw (xgi::exception::Exception);
46 void stateMachineXgiHandler (xgi::Input* in, xgi::Output* out )
throw (xgi::exception::Exception);
47 void stateMachineResultXgiHandler (xgi::Input* in, xgi::Output* out )
throw (xgi::exception::Exception);
48 xoap::MessageReference stateMachineXoapHandler (xoap::MessageReference message )
throw (xoap::exception::Exception);
49 xoap::MessageReference stateMachineResultXoapHandler(xoap::MessageReference message )
throw (xoap::exception::Exception);
50 bool stateMachineThread (toolbox::task::WorkLoop* workLoop);
52 xoap::MessageReference stateMachineStateRequest (xoap::MessageReference message )
throw (xoap::exception::Exception);
54 void stateInitial (toolbox::fsm::FiniteStateMachine& fsm)
throw (toolbox::fsm::exception::Exception);
55 void statePaused (toolbox::fsm::FiniteStateMachine& fsm)
throw (toolbox::fsm::exception::Exception);
56 void stateRunning (toolbox::fsm::FiniteStateMachine& fsm)
throw (toolbox::fsm::exception::Exception);
57 void stateHalted (toolbox::fsm::FiniteStateMachine& fsm)
throw (toolbox::fsm::exception::Exception);
58 void stateConfigured (toolbox::fsm::FiniteStateMachine& fsm)
throw (toolbox::fsm::exception::Exception);
59 void inError (toolbox::fsm::FiniteStateMachine& fsm)
throw (toolbox::fsm::exception::Exception);
61 void transitionConfiguring (toolbox::Event::Reference e)
throw (toolbox::fsm::exception::Exception);
62 void transitionHalting (toolbox::Event::Reference e)
throw (toolbox::fsm::exception::Exception);
63 void transitionInitializing(toolbox::Event::Reference e)
throw (toolbox::fsm::exception::Exception);
64 void transitionPausing (toolbox::Event::Reference e)
throw (toolbox::fsm::exception::Exception);
65 void transitionResuming (toolbox::Event::Reference e)
throw (toolbox::fsm::exception::Exception);
66 void transitionStarting (toolbox::Event::Reference e)
throw (toolbox::fsm::exception::Exception);
67 void transitionStopping (toolbox::Event::Reference e)
throw (toolbox::fsm::exception::Exception);
68 void enteringError (toolbox::Event::Reference e)
throw (toolbox::fsm::exception::Exception);
72 toolbox::BSem stateMachineSemaphore_;
76 std::string XDAQContextConfigurationName_;
77 std::string supervisorConfigurationPath_;
78 std::string supervisorContextUID_;
79 std::string supervisorApplicationUID_;
81 std::map<int, ots::EventBuilderInterface*> theARTDAQEventBuilderInterfaces_;
82 std::unique_ptr<artdaq::MPISentry> mpiSentry_;