00001 #ifndef artdaq_Application_MPI2_AggregatorApp_hh
00002 #define artdaq_Application_MPI2_AggregatorApp_hh
00003
00004 #include <future>
00005
00006 #include "artdaq/Application/AggregatorCore.hh"
00007 #include "artdaq/Application/Commandable.hh"
00008
00009 namespace artdaq
00010 {
00011 class AggregatorApp;
00012 }
00013
00017 class artdaq::AggregatorApp : public artdaq::Commandable
00018 {
00019 public:
00025 AggregatorApp(int rank, std::string name);
00026
00030 AggregatorApp(AggregatorApp const&) = delete;
00031
00035 virtual ~AggregatorApp() = default;
00036
00041 AggregatorApp& operator=(AggregatorApp const&) = delete;
00042
00043
00049 bool do_initialize(fhicl::ParameterSet const& pset, uint64_t, uint64_t) override;
00050
00056 bool do_start(art::RunID id, uint64_t, uint64_t) override;
00057
00062 bool do_stop(uint64_t, uint64_t) override;
00063
00068 bool do_pause(uint64_t, uint64_t) override;
00069
00074 bool do_resume(uint64_t, uint64_t) override;
00075
00080 bool do_shutdown(uint64_t) override;
00081
00086 bool do_soft_initialize(fhicl::ParameterSet const&, uint64_t, uint64_t) override;
00087
00092 bool do_reinitialize(fhicl::ParameterSet const&, uint64_t, uint64_t) override;
00093
00099 std::string report(std::string const& which) const override;
00100
00106 std::string register_monitor(fhicl::ParameterSet const& info) override;
00107
00113 std::string unregister_monitor(std::string const& label) override;
00114
00115 private:
00116 int rank_;
00117 std::string name_;
00118 std::unique_ptr<AggregatorCore> aggregator_ptr_;
00119 std::future<size_t> aggregator_future_;
00120 };
00121
00122 #endif