artdaq  v3_00_03
DispatcherCore.hh
1 #ifndef artdaq_Application_MPI2_DispatcherCore_hh
2 #define artdaq_Application_MPI2_DispatcherCore_hh
3 
4 #include <string>
5 
6 #include "fhiclcpp/ParameterSet.h"
7 #include "canvas/Persistency/Provenance/RunID.h"
8 
9 #include "artdaq/Application/DataReceiverCore.hh"
10 
11 
12 namespace artdaq
13 {
14  class DispatcherCore;
15 }
16 
22 {
23 public:
24 
29 
33  DispatcherCore(DispatcherCore const&) = delete;
34 
39 
44  DispatcherCore& operator=(DispatcherCore const&) = delete;
45 
78  bool initialize(fhicl::ParameterSet const& pset) override;
79 
87  std::string register_monitor(fhicl::ParameterSet const& pset);
88 
94  std::string unregister_monitor(std::string const& label);
95 
96 
97 private:
98  fhicl::ParameterSet generate_filter_fhicl_();
99  fhicl::ParameterSet merge_parameter_sets_(fhicl::ParameterSet skel, std::string label, fhicl::ParameterSet pset);
100 
101  std::mutex dispatcher_transfers_mutex_;
102  std::unordered_map<std::string, fhicl::ParameterSet> registered_monitors_;
103  std::unordered_map<std::string, pid_t> registered_monitor_pids_;
104  fhicl::ParameterSet pset_; // The ParameterSet initially passed to the Dispatcher (contains input info)
105  bool broadcast_mode_;
106 };
107 
108 #endif
109 
110 // LocalWords: ds
DispatcherCore & operator=(DispatcherCore const &)=delete
Copy Assignment operator is deleted.
DataReceiverCore implements the state machine for the DataReceiver artdaq application. DataReceiverCore receives Fragment objects from the DataReceiverManager, and sends them to the EventStore.
std::string unregister_monitor(std::string const &label)
Delete the TransferInterface having the given unique label.
DispatcherCore implements the state machine for the Dispatcher artdaq application. DispatcherCore processes incoming events in one of three roles: Data Logger, Online Monitor, or Dispatcher.
std::string register_monitor(fhicl::ParameterSet const &pset)
Create a new TransferInterface instance using the given configuration.
DispatcherCore()
DispatcherCore Constructor.
bool initialize(fhicl::ParameterSet const &pset) override
Processes the initialize request.