artdaq  v2_02_03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
EventBuilderApp.hh
1 #ifndef artdaq_Application_MPI2_EventBuilderApp_hh
2 #define artdaq_Application_MPI2_EventBuilderApp_hh
3 
4 #include <future>
5 
6 #include "artdaq/Application/Commandable.hh"
7 #include "artdaq/Application/EventBuilderCore.hh"
8 
9 namespace artdaq
10 {
11  class EventBuilderApp;
12 }
13 
18 {
19 public:
25  EventBuilderApp(int rank, std::string name);
26 
30  EventBuilderApp(EventBuilderApp const&) = delete;
31 
35  virtual ~EventBuilderApp() = default;
36 
41  EventBuilderApp& operator=(EventBuilderApp const&) = delete;
42 
43  // these methods provide the operations that are used by the state machine
49  bool do_initialize(fhicl::ParameterSet const& pset, uint64_t, uint64_t) override;
50 
56  bool do_start(art::RunID id, uint64_t, uint64_t) override;
57 
62  bool do_stop(uint64_t, uint64_t) override;
63 
68  bool do_pause(uint64_t, uint64_t) override;
69 
74  bool do_resume(uint64_t, uint64_t) override;
75 
80  bool do_shutdown(uint64_t) override;
81 
87  bool do_soft_initialize(fhicl::ParameterSet const& pset, uint64_t, uint64_t) override;
88 
94  bool do_reinitialize(fhicl::ParameterSet const& pset, uint64_t, uint64_t) override;
95 
101  void BootedEnter() override;
102 
103  /* Report_ptr */
109  std::string report(std::string const& which) const override;
110 
111 private:
112  int rank_;
113  std::string name_;
114  std::unique_ptr<artdaq::EventBuilderCore> event_builder_ptr_;
115  std::future<size_t> event_building_future_;
116 };
117 
118 #endif /* artdaq_Application_MPI2_EventBuilderApp_hh */
Commandable is the base class for all artdaq components which implement the artdaq state machine...
Definition: Commandable.hh:20
bool do_resume(uint64_t, uint64_t) override
Resume the EventBuilderCore.
void BootedEnter() override
Action taken upon entering the &quot;Booted&quot; state.
std::string report(std::string const &which) const override
If which is &quot;transition_status&quot;, report the status of the last transition. Otherwise pass through to ...
bool do_reinitialize(fhicl::ParameterSet const &pset, uint64_t, uint64_t) override
Reinitialize the EventBuilderCore.
virtual ~EventBuilderApp()=default
Default Destructor.
bool do_shutdown(uint64_t) override
Shutdown the EventBuilderCore.
bool do_pause(uint64_t, uint64_t) override
Pause the EventBuilderCore.
bool do_soft_initialize(fhicl::ParameterSet const &pset, uint64_t, uint64_t) override
Soft-Initialize the EventBuilderCore.
EventBuilderApp is an artdaq::Commandable derived class which controls the EventBuilderCore.
EventBuilderApp(int rank, std::string name)
EventBuilderApp Constructor.
EventBuilderApp & operator=(EventBuilderApp const &)=delete
Copy Assignment Operator is deleted.
bool do_initialize(fhicl::ParameterSet const &pset, uint64_t, uint64_t) override
Initialize the EventBuilderCore.
bool do_start(art::RunID id, uint64_t, uint64_t) override
Start the EventBuilderCore.
bool do_stop(uint64_t, uint64_t) override
Stop the EventBuilderCore.