artdaq  v3_00_03
DataLoggerApp.hh
1 #ifndef artdaq_Application_MPI2_DataLoggerApp_hh
2 #define artdaq_Application_MPI2_DataLoggerApp_hh
3 
4 #include <future>
5 
6 #include "artdaq/Application/DataLoggerCore.hh"
7 #include "artdaq/Application/Commandable.hh"
8 
9 namespace artdaq
10 {
11  class DataLoggerApp;
12 }
13 
18 {
19 public:
25  DataLoggerApp(int rank, std::string name);
26 
30  DataLoggerApp(DataLoggerApp const&) = delete;
31 
35  virtual ~DataLoggerApp() = default;
36 
41  DataLoggerApp& operator=(DataLoggerApp 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 
86  bool do_soft_initialize(fhicl::ParameterSet const&, uint64_t, uint64_t) override;
87 
92  bool do_reinitialize(fhicl::ParameterSet const&, uint64_t, uint64_t) override;
93 
99  std::string report(std::string const& which) const override;
100 
101 
102 private:
103  std::unique_ptr<DataLoggerCore> DataLogger_ptr_;
104 };
105 
106 #endif
bool do_initialize(fhicl::ParameterSet const &pset, uint64_t, uint64_t) override
Initialize the DataLoggerCore.
Commandable is the base class for all artdaq components which implement the artdaq state machine...
Definition: Commandable.hh:20
bool do_shutdown(uint64_t) override
Shutdown the DataLoggerCore.
bool do_soft_initialize(fhicl::ParameterSet const &, uint64_t, uint64_t) override
Soft-initialize the DataLoggerCore. No-Op.
DataLoggerApp is an artdaq::Commandable derived class which controls the DataLoggerCore.
bool do_resume(uint64_t, uint64_t) override
Resume the DataLoggerCore.
bool do_pause(uint64_t, uint64_t) override
Pause the DataLoggerCore.
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 ...
DataLoggerApp & operator=(DataLoggerApp const &)=delete
Copy Assignment operator is Deleted.
bool do_reinitialize(fhicl::ParameterSet const &, uint64_t, uint64_t) override
Reinitialize the DataLoggerCore. No-Op.
DataLoggerApp(int rank, std::string name)
DataLoggerApp Constructor.
Definition: DataLoggerApp.cc:7
bool do_start(art::RunID id, uint64_t, uint64_t) override
Start the DataLoggerCore.
virtual ~DataLoggerApp()=default
Default virtual destructor.
bool do_stop(uint64_t, uint64_t) override
Stop the DataLoggerCore.