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
00028 DispatcherCore();
00029
00033 DispatcherCore(DispatcherCore const&) = delete;
00034
00038 ~DispatcherCore();
00039
00044 DispatcherCore& operator=(DispatcherCore const&) = delete;
00045
00079 bool initialize(fhicl::ParameterSet const& pset) override;
00080
00088 std::string register_monitor(fhicl::ParameterSet const& pset);
00089
00095 std::string unregister_monitor(std::string const& label);
00096
00097
00098 private:
00099 fhicl::ParameterSet generate_filter_fhicl_();
00100 fhicl::ParameterSet merge_parameter_sets_(fhicl::ParameterSet skel, std::string label, fhicl::ParameterSet pset);
00101
00102 std::mutex dispatcher_transfers_mutex_;
00103 std::unordered_map<std::string, fhicl::ParameterSet> registered_monitors_;
00104 std::unordered_map<std::string, pid_t> registered_monitor_pids_;
00105 fhicl::ParameterSet pset_;
00106 bool broadcast_mode_;
00107 };
00108
00109 #endif
00110
00111