00001 #ifndef artdaq_Application_MPI2_DispatcherCore_hh
00002 #define artdaq_Application_MPI2_DispatcherCore_hh
00003
00004 #include <string>
00005
00006 #include "fhiclcpp/ParameterSet.h"
00007 #include "canvas/Persistency/Provenance/RunID.h"
00008
00009 #include "artdaq/Application/DataReceiverCore.hh"
00010
00011
00012 namespace artdaq
00013 {
00014 class DispatcherCore;
00015 }
00016
00021 class artdaq::DispatcherCore : public DataReceiverCore
00022 {
00023 public:
00024
00031 DispatcherCore(int rank, std::string name);
00032
00036 DispatcherCore(DispatcherCore const&) = delete;
00037
00041 ~DispatcherCore();
00042
00047 DispatcherCore& operator=(DispatcherCore const&) = delete;
00048
00081 bool initialize(fhicl::ParameterSet const& pset) override;
00082
00090 std::string register_monitor(fhicl::ParameterSet const& pset);
00091
00097 std::string unregister_monitor(std::string const& label);
00098
00099
00100 private:
00101 fhicl::ParameterSet generate_filter_fhicl_();
00102 fhicl::ParameterSet merge_parameter_sets_(fhicl::ParameterSet skel, std::string label, fhicl::ParameterSet pset);
00103
00104 std::mutex dispatcher_transfers_mutex_;
00105 std::unordered_map<std::string, fhicl::ParameterSet> registered_monitors_;
00106 std::unordered_map<std::string, pid_t> registered_monitor_pids_;
00107 fhicl::ParameterSet pset_;
00108 bool broadcast_mode_;
00109 };
00110
00111 #endif
00112
00113