1 #ifndef artdaq_Application_MPI2_DataReceiverCore_hh
2 #define artdaq_Application_MPI2_DataReceiverCore_hh
8 #include "fhiclcpp/ParameterSet.h"
9 #include "canvas/Persistency/Provenance/RunID.h"
11 #include "artdaq-utilities/Plugins/MetricManager.hh"
13 #include "artdaq/DAQrate/DataReceiverManager.hh"
14 #include "artdaq/Application/StatisticsHelper.hh"
18 class DataReceiverCore;
69 virtual bool initialize(fhicl::ParameterSet
const& pset) = 0;
76 bool start(art::RunID
id);
135 std::string
report(std::string
const& which)
const;
167 bool initializeDataReceiver(fhicl::ParameterSet
const& pset, fhicl::ParameterSet
const& data_pset, fhicl::ParameterSet
const& metric_pset);
DataReceiverCore()
DataReceiverCore Constructor.
std::shared_ptr< SharedMemoryEventManager > event_store_ptr_
Pointer to the SharedMemoryEventManager.
bool soft_initialize(fhicl::ParameterSet const &pset)
Soft-Initializes the DataReceiverCore. No-Op.
DataReceiverCore implements the state machine for the DataReceiver artdaq application. DataReceiverCore receives Fragment objects from the DataReceiverManager, and sends them to the EventStore.
virtual ~DataReceiverCore()
bool resume()
Resumes the DataReceiverCore.
bool shutdown()
Shuts Down the DataReceiverCore.
bool start(art::RunID id)
Start the DataReceiverCore.
fhicl::ParameterSet art_pset_
ParameterSet sent to art process.
void logMessage_(std::string const &text)
Log a message, setting severity based on verbosity flag.
std::unique_ptr< DataReceiverManager > receiver_ptr_
Pointer to the DataReceiverManager.
bool stop()
Stops the DataReceiverCore.
std::string report(std::string const &which) const
Send a report on a given run-time quantity.
std::map< std::string, std::string > config_archive_entries_
Additional strings to archive as part of the art configuration.
bool verbose_
Whether to log transition messages.
bool pause()
Pauses the DataReceiverCore.
bool rollover_subrun(uint64_t eventNum, uint32_t subrun)
Rollover the subrun after the given event.
std::atomic< bool > run_is_paused_
Pause has been successfully completed?
DataReceiverCore & operator=(DataReceiverCore const &)=delete
Copy Assignment operator is deleted.
bool add_config_archive_entry(std::string const &key, std::string const &value)
Add the specified key and value to the configuration archive list.
bool initializeDataReceiver(fhicl::ParameterSet const &pset, fhicl::ParameterSet const &data_pset, fhicl::ParameterSet const &metric_pset)
Initialize the DataReceiverCore (should be called from initialize() overrides.
std::atomic< bool > pause_requested_
Pause has been requested?
bool clear_config_archive()
Clear the configuration archive list.
std::atomic< bool > stop_requested_
Stop has been requested?
bool reinitialize(fhicl::ParameterSet const &pset)
Reinitializes the DataReceiverCore.
virtual bool initialize(fhicl::ParameterSet const &pset)=0
Processes the initialize request.