artdaq  v2_02_03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
RoutingMasterApp.hh
1 #ifndef artdaq_Application_MPI2_RoutingMasterApp_hh
2 #define artdaq_Application_MPI2_RoutingMasterApp_hh
3 
4 #include <future>
5 
6 #include "artdaq/Application/Commandable.hh"
7 #include "artdaq/Application/RoutingMasterCore.hh"
8 
9 namespace artdaq
10 {
11  class RoutingMasterApp;
12 }
13 
18 {
19 public:
25  RoutingMasterApp(int rank, std::string name);
26 
30  RoutingMasterApp(RoutingMasterApp const&) = delete;
31 
35  virtual ~RoutingMasterApp() = default;
36 
42 
43  // these methods provide the operations that are used by the state machine
51  bool do_initialize(fhicl::ParameterSet const& pset, uint64_t timeout, uint64_t timestamp) override;
52 
60  bool do_start(art::RunID id, uint64_t timeout, uint64_t timestamp) override;
61 
68  bool do_stop(uint64_t timeout, uint64_t timestamp) override;
69 
76  bool do_pause(uint64_t timeout, uint64_t timestamp) override;
77 
84  bool do_resume(uint64_t timeout, uint64_t timestamp) override;
85 
91  bool do_shutdown(uint64_t timeout) override;
92 
100  bool do_soft_initialize(fhicl::ParameterSet const& pset, uint64_t timeout, uint64_t timestamp) override;
101 
109  bool do_reinitialize(fhicl::ParameterSet const& pset, uint64_t timeout, uint64_t timestamp) override;
110 
116  void BootedEnter() override;
117 
118  /* Report_ptr */
124  std::string report(std::string const&) const override;
125 
126 private:
127  int rank_;
128  std::unique_ptr<artdaq::RoutingMasterCore> routing_master_ptr_;
129  std::string name_;
130  std::future<size_t> routing_master_future_;
131 };
132 
133 #endif /* artdaq_Application_MPI2_RoutingMasterApp_hh */
bool do_initialize(fhicl::ParameterSet const &pset, uint64_t timeout, uint64_t timestamp) override
Initialize the RoutingMasterCore.
bool do_pause(uint64_t timeout, uint64_t timestamp) override
Pause the RoutingMasterCore.
Commandable is the base class for all artdaq components which implement the artdaq state machine...
Definition: Commandable.hh:20
virtual ~RoutingMasterApp()=default
Default Destructor.
bool do_resume(uint64_t timeout, uint64_t timestamp) override
Resume the RoutingMasterCore.
RoutingMasterApp & operator=(RoutingMasterApp const &)=delete
Copy Assignment Operator is deleted.
RoutingMasterApp(int rank, std::string name)
RoutingMasterApp Constructor.
bool do_stop(uint64_t timeout, uint64_t timestamp) override
Stop the RoutingMasterCore.
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 ...
bool do_shutdown(uint64_t timeout) override
Shutdown the RoutingMasterCore.
bool do_soft_initialize(fhicl::ParameterSet const &pset, uint64_t timeout, uint64_t timestamp) override
Soft-Initialize the RoutingMasterCore.
bool do_reinitialize(fhicl::ParameterSet const &pset, uint64_t timeout, uint64_t timestamp) override
Reinitialize the RoutingMasterCore.
bool do_start(art::RunID id, uint64_t timeout, uint64_t timestamp) override
Start the RoutingMasterCore.
void BootedEnter() override
Action taken upon entering the &quot;Booted&quot; state.
RoutingMasterApp is an artdaq::Commandable derived class which controls the RoutingMasterCore state m...