artdaq  v3_12_02
RoutingManagerApp.hh
1 #ifndef artdaq_Application_MPI2_RoutingManagerApp_hh
2 #define artdaq_Application_MPI2_RoutingManagerApp_hh
3 
4 #include "artdaq/Application/Commandable.hh"
5 #include "artdaq/Application/RoutingManagerCore.hh"
6 
7 #include <boost/thread.hpp>
8 
9 #include <memory>
10 
11 namespace artdaq {
12 class RoutingManagerApp;
13 }
14 
19 {
20 public:
25 
29  RoutingManagerApp(RoutingManagerApp const&) = delete;
30 
34  virtual ~RoutingManagerApp() = default;
35 
43 
44  // these methods provide the operations that are used by the state machine
52  bool do_initialize(fhicl::ParameterSet const& pset, uint64_t timeout, uint64_t timestamp) override;
53 
61  bool do_start(art::RunID id, uint64_t timeout, uint64_t timestamp) override;
62 
69  bool do_stop(uint64_t timeout, uint64_t timestamp) override;
70 
77  bool do_pause(uint64_t timeout, uint64_t timestamp) override;
78 
85  bool do_resume(uint64_t timeout, uint64_t timestamp) override;
86 
92  bool do_shutdown(uint64_t timeout) override;
93 
101  bool do_soft_initialize(fhicl::ParameterSet const& pset, uint64_t timeout, uint64_t timestamp) override;
102 
110  bool do_reinitialize(fhicl::ParameterSet const& pset, uint64_t timeout, uint64_t timestamp) override;
111 
117  void BootedEnter() override;
118 
119  /* Report_ptr */
125  std::string report(std::string const&) const override;
126 
127 private:
128  std::unique_ptr<artdaq::RoutingManagerCore> routing_manager_ptr_;
129  boost::thread routing_manager_thread_;
130 };
131 
132 #endif /* artdaq_Application_MPI2_RoutingManagerApp_hh */
bool do_resume(uint64_t timeout, uint64_t timestamp) override
Resume the RoutingManagerCore.
Commandable is the base class for all artdaq components which implement the artdaq state machine...
Definition: Commandable.hh:22
bool do_shutdown(uint64_t timeout) override
Shutdown the RoutingManagerCore.
bool do_stop(uint64_t timeout, uint64_t timestamp) override
Stop the RoutingManagerCore.
bool do_initialize(fhicl::ParameterSet const &pset, uint64_t timeout, uint64_t timestamp) override
Initialize the RoutingManagerCore.
RoutingManagerApp is an artdaq::Commandable derived class which controls the RoutingManagerCore state...
bool do_soft_initialize(fhicl::ParameterSet const &pset, uint64_t timeout, uint64_t timestamp) override
Soft-Initialize the RoutingManagerCore.
bool do_start(art::RunID id, uint64_t timeout, uint64_t timestamp) override
Start the RoutingManagerCore.
RoutingManagerApp & operator=(RoutingManagerApp const &)=delete
Copy Assignment Operator is deleted.
void BootedEnter() override
Action taken upon entering the &quot;Booted&quot; state.
std::string report(std::string const &) const override
If which is &quot;transition_status&quot;, report the status of the last transition. Otherwise pass through to ...
virtual ~RoutingManagerApp()=default
Default Destructor.
bool do_pause(uint64_t timeout, uint64_t timestamp) override
Pause the RoutingManagerCore.
RoutingManagerApp()
RoutingManagerApp Constructor.
bool do_reinitialize(fhicl::ParameterSet const &pset, uint64_t timeout, uint64_t timestamp) override
Reinitialize the RoutingManagerCore.