artdaq  v3_00_03
BoardReaderApp.hh
1 #ifndef artdaq_Application_MPI2_BoardReaderApp_hh
2 #define artdaq_Application_MPI2_BoardReaderApp_hh
3 
4 #include <future>
5 
6 #include "artdaq/Application/Commandable.hh"
7 #include "artdaq/Application/BoardReaderCore.hh"
8 
9 namespace artdaq
10 {
11  class BoardReaderApp;
12 }
13 
18 {
19 public:
25  BoardReaderApp(int rank, std::string name);
26 
30  BoardReaderApp(BoardReaderApp const&) = delete;
31 
35  virtual ~BoardReaderApp() = default;
36 
41  BoardReaderApp& operator=(BoardReaderApp const&) = delete;
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 
124  bool do_meta_command(std::string const& command, std::string const& arg) override;
125 
126  /* Report_ptr */
132  std::string report(std::string const& which) const override;
133 
134 private:
135  std::unique_ptr<artdaq::BoardReaderCore> fragment_receiver_ptr_;
136  boost::thread fragment_processing_thread_;
137 };
138 
139 #endif /* artdaq_Application_MPI2_BoardReaderApp_hh */
bool do_soft_initialize(fhicl::ParameterSet const &pset, uint64_t timeout, uint64_t timestamp) override
Soft-Initialize the BoardReaderCore.
bool do_resume(uint64_t timeout, uint64_t timestamp) override
Resume the BoardReaderCore.
Commandable is the base class for all artdaq components which implement the artdaq state machine...
Definition: Commandable.hh:20
BoardReaderApp & operator=(BoardReaderApp const &)=delete
Copy Assignment Operator is deleted.
virtual ~BoardReaderApp()=default
Default Destructor.
BoardReaderApp is an artdaq::Commandable derived class which controls the BoardReaderCore state machi...
bool do_stop(uint64_t timeout, uint64_t timestamp) override
Stop the BoardReaderCore.
bool do_meta_command(std::string const &command, std::string const &arg) override
Perform a user-defined command (passed to CommandableFragmentGenerator)
bool do_shutdown(uint64_t timeout) override
Shutdown the BoardReaderCore.
bool do_reinitialize(fhicl::ParameterSet const &pset, uint64_t timeout, uint64_t timestamp) override
Reinitialize the BoardReaderCore.
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 ...
void BootedEnter() override
Action taken upon entering the &quot;Booted&quot; state.
bool do_start(art::RunID id, uint64_t timeout, uint64_t timestamp) override
Start the BoardReaderCore.
BoardReaderApp(int rank, std::string name)
BoardReaderApp Constructor.
bool do_initialize(fhicl::ParameterSet const &pset, uint64_t timeout, uint64_t timestamp) override
Initialize the BoardReaderCore.
bool do_pause(uint64_t timeout, uint64_t timestamp) override
Pause the BoardReaderCore.