DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
RawDataHandlerBase.hpp
Go to the documentation of this file.
1
11#ifndef DATAHANDLINGLIBS_INCLUDE_DATAHANDLINGLIBS_DATALINKHANDLERBASE_HPP_
12#define DATAHANDLINGLIBS_INCLUDE_DATAHANDLINGLIBS_DATALINKHANDLERBASE_HPP_
13
18#include "logging/Logging.hpp"
19
20#include "nlohmann/json.hpp"
21#include "rcif/cmd/Nljs.hpp"
22
25
26#include <chrono>
27#include <memory>
28#include <string>
29#include <vector>
30
31namespace dunedaq {
32namespace datahandlinglibs {
33
35{
36public:
41 explicit RawDataHandlerBase(const std::string& name);
43
48
49 void init(std::shared_ptr<appfwk::ConfigurationManager> cfg);
50 // void get_info(opmonlib::InfoCollector& ci, int level);
51
52 virtual std::shared_ptr<dunedaq::datahandlinglibs::DataHandlingConcept>
53 create_readout(const appmodel::DataHandlerModule* modconf, std::atomic<bool>& run_marker) = 0;
54
55 // Commands
56 void do_conf(const nlohmann::json& /*args*/);
57 void do_scrap(const nlohmann::json& /*args*/);
58 void do_start(const nlohmann::json& /*args*/);
59 void do_stop(const nlohmann::json& /*args*/);
60 void do_record(const nlohmann::json& /*args*/);
61
62 std::string get_dlh_name() { return m_name; }
63
64private:
65
66 // Configuration
69
70 // Name
71 std::string m_name;
72
73 // Internal
74 std::shared_ptr<datahandlinglibs::DataHandlingConcept> m_readout_impl;
75
76 // Threading
77 std::atomic<bool> m_run_marker;
78};
79
80} // namespace datahandlinglibs
81} // namespace dunedaq
82
83// Declarations
85
86#endif // DATAHANDLINGLIBS_INCLUDE_DATAHANDLINGLIBS_DATALINKHANDLERBASE_HPP_
virtual std::shared_ptr< dunedaq::datahandlinglibs::DataHandlingConcept > create_readout(const appmodel::DataHandlerModule *modconf, std::atomic< bool > &run_marker)=0
RawDataHandlerBase & operator=(RawDataHandlerBase &&)=delete
RawDataHandlerBase is not move-assignable.
RawDataHandlerBase & operator=(const RawDataHandlerBase &)=delete
RawDataHandlerBase is not copy-assignable.
RawDataHandlerBase(const std::string &name)
RawDataHandlerBase Constructor.
void init(std::shared_ptr< appfwk::ConfigurationManager > cfg)
RawDataHandlerBase(const RawDataHandlerBase &)=delete
RawDataHandlerBase is not copy-constructible.
RawDataHandlerBase(RawDataHandlerBase &&)=delete
RawDataHandlerBase is not move-constructible.
std::shared_ptr< datahandlinglibs::DataHandlingConcept > m_readout_impl
std::atomic< bool > run_marker
Global atomic for process lifetime.
uint32_t run_number_t
Type used to represent run number.
Definition Types.hpp:20
Including Qt Headers.