DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType > Class Template Reference

#include <DataHandlingModel.hpp>

Inheritance diagram for dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >:
[legend]
Collaboration diagram for dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >:
[legend]

Classes

class  PostprocessScheduleAlgorithm

Public Types

using RDT = ReadoutType
using RHT = RequestHandlerType
using LBT = LatencyBufferType
using RPT = RawDataProcessorType
using IDT = InputDataType
using timestamp_t = std::uint64_t
Public Types inherited from dunedaq::opmonlib::MonitorableObject
using NodePtr = std::weak_ptr<MonitorableObject>
using NewNodePtr = std::shared_ptr<MonitorableObject>
using ElementId = std::string

Public Member Functions

 DataHandlingModel (std::atomic< bool > &run_marker)
virtual ~DataHandlingModel ()=default
void init (const appmodel::DataHandlerModule *modconf)
 Forward calls from the appfwk.
void conf (const appfwk::DAQModule::CommandData_t &args)
void scrap (const appfwk::DAQModule::CommandData_t &args)
void start (const appfwk::DAQModule::CommandData_t &args)
void stop (const appfwk::DAQModule::CommandData_t &args)
void record (const appfwk::DAQModule::CommandData_t &args) override
Public Member Functions inherited from dunedaq::datahandlinglibs::DataHandlingConcept
 DataHandlingConcept ()
virtual ~DataHandlingConcept ()
 DataHandlingConcept (const DataHandlingConcept &)=delete
 DataHandlingConcept is not copy-constructible.
DataHandlingConcept & operator= (const DataHandlingConcept &)=delete
 DataHandlingConcept is not copy-assginable.
 DataHandlingConcept (DataHandlingConcept &&)=delete
 DataHandlingConcept is not move-constructible.
DataHandlingConcept & operator= (DataHandlingConcept &&)=delete
 DataHandlingConcept is not move-assignable.
Public Member Functions inherited from dunedaq::opmonlib::MonitorableObject
 MonitorableObject (const MonitorableObject &)=delete
MonitorableObject & operator= (const MonitorableObject &)=delete
 MonitorableObject (MonitorableObject &&)=delete
MonitorableObject & operator= (MonitorableObject &&)=delete
virtual ~MonitorableObject ()=default
auto get_opmon_id () const noexcept
auto get_opmon_level () const noexcept

Public Attributes

std::function< void(IDT &&)> m_consume_callback

Static Public Attributes

static constexpr timestamp_t ns = 1
static constexpr timestamp_t us = 1000 * ns
static constexpr timestamp_t ms = 1000 * us
static constexpr timestamp_t s = 1000 * ms

Protected Types

using metric_t = dunedaq::datahandlinglibs::opmon::DataHandlerInfo
using num_payload_t = std::remove_const<std::invoke_result<decltype(&metric_t::num_payloads), metric_t>::type>::type
using sum_payload_t = std::remove_const<std::invoke_result<decltype(&metric_t::sum_payloads), metric_t>::type>::type
using num_request_t = std::remove_const<std::invoke_result<decltype(&metric_t::num_requests), metric_t>::type>::type
using sum_request_t = std::remove_const<std::invoke_result<decltype(&metric_t::sum_requests), metric_t>::type>::type
using rawq_timeout_count_t
using num_lb_insert_failures_t
using num_post_processing_delay_max_waits_t
using raw_receiver_ct = iomanager::ReceiverConcept<InputDataType>
using request_receiver_ct = iomanager::ReceiverConcept<dfmessages::DataRequest>
using timesync_sender_ct = iomanager::SenderConcept<dfmessages::TimeSync>

Protected Member Functions

void process_item (RDT &&payload)
void transform_and_process (IDT &&payload)
void consume_callback (IDT &&payload)
void run_consume ()
 Function that will be run in its own thread to read the raw packets from the connection and add them to the LB.
void run_timesync ()
 Function that will be run in its own thread and sends periodic timesync messages by pushing them to the connection.
void run_postprocess_scheduler ()
folly::coro::Task< void > postprocess_schedule ()
void dispatch_requests (dfmessages::DataRequest &data_request)
virtual std::vector< RDT > transform_payload (IDT &original) const
virtual void invoke_postprocess_schedule_timeout_policy () const
virtual void generate_opmon_data () override
Protected Member Functions inherited from dunedaq::opmonlib::MonitorableObject
 MonitorableObject ()=default
void register_node (ElementId name, NewNodePtr)
void publish (google::protobuf::Message &&, CustomOrigin &&co={}, OpMonLevel l=to_level(EntryOpMonLevel::kDefault)) const noexcept

Protected Attributes

std::atomic< bool > & m_run_marker
bool m_fake_trigger
bool m_generate_timesync = false
int m_current_fake_trigger_id
daqdataformats::SourceID m_sourceid
daqdataformats::run_number_t m_run_number
uint64_t m_processing_delay_ticks
uint64_t m_post_processing_delay_min_wait
uint64_t m_post_processing_delay_max_wait
std::atomic< num_payload_t > m_num_payloads { 0 }
std::atomic< sum_payload_t > m_sum_payloads { 0 }
std::atomic< num_request_t > m_num_requests { 0 }
std::atomic< sum_request_t > m_sum_requests { 0 }
std::atomic< rawq_timeout_count_t > m_rawq_timeout_count { 0 }
std::atomic< num_lb_insert_failures_t > m_num_lb_insert_failures { 0 }
std::atomic< num_post_processing_delay_max_waits_t > m_num_post_processing_delay_max_waits { 0 }
std::atomic< int > m_stats_packet_count { 0 }
utilities::ReusableThread m_consumer_thread
std::chrono::milliseconds m_raw_receiver_timeout_ms
std::chrono::microseconds m_raw_receiver_sleep_us
std::shared_ptr< raw_receiver_ct > m_raw_data_receiver
std::string m_raw_data_receiver_connection_name
const appmodel::DataMoveCallbackConf * m_raw_data_callback_conf
std::shared_ptr< request_receiver_ct > m_data_request_receiver
std::shared_ptr< timesync_sender_ct > m_timesync_sender
utilities::ReusableThread m_timesync_thread
std::string m_timesync_connection_name
utilities::ReusableThread m_postprocess_scheduler_thread
folly::coro::Baton m_baton
std::unique_ptr< folly::Timekeeper > m_timekeeper
std::shared_ptr< LatencyBufferType > m_latency_buffer_impl
std::shared_ptr< RawDataProcessorType > m_raw_processor_impl
std::shared_ptr< RequestHandlerType > m_request_handler_impl
bool m_request_handler_supports_cutoff_timestamp
std::unique_ptr< FrameErrorRegistry > m_error_registry
std::chrono::time_point< std::chrono::high_resolution_clock > m_t0

Additional Inherited Members

Static Public Member Functions inherited from dunedaq::opmonlib::MonitorableObject
static bool publishable_metric (OpMonLevel entry, OpMonLevel system) noexcept

Detailed Description

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
class dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >

Definition at line 73 of file DataHandlingModel.hpp.

Member Typedef Documentation

◆ IDT

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
using dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::IDT = InputDataType

Definition at line 81 of file DataHandlingModel.hpp.

◆ LBT

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
using dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::LBT = LatencyBufferType

Definition at line 79 of file DataHandlingModel.hpp.

◆ metric_t

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
using dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::metric_t = dunedaq::datahandlinglibs::opmon::DataHandlerInfo
protected

Definition at line 334 of file DataHandlingModel.hpp.

◆ num_lb_insert_failures_t

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
using dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::num_lb_insert_failures_t
protected
Initial value:
std::remove_const<std::invoke_result<decltype(&metric_t::num_lb_insert_failures), metric_t>::type>::type
dunedaq::datahandlinglibs::opmon::DataHandlerInfo metric_t

Definition at line 341 of file DataHandlingModel.hpp.

◆ num_payload_t

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
using dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::num_payload_t = std::remove_const<std::invoke_result<decltype(&metric_t::num_payloads), metric_t>::type>::type
protected

Definition at line 335 of file DataHandlingModel.hpp.

◆ num_post_processing_delay_max_waits_t

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
using dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::num_post_processing_delay_max_waits_t
protected
Initial value:
std::remove_const<

Definition at line 343 of file DataHandlingModel.hpp.

◆ num_request_t

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
using dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::num_request_t = std::remove_const<std::invoke_result<decltype(&metric_t::num_requests), metric_t>::type>::type
protected

Definition at line 337 of file DataHandlingModel.hpp.

◆ raw_receiver_ct

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
using dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::raw_receiver_ct = iomanager::ReceiverConcept<InputDataType>
protected

Definition at line 361 of file DataHandlingModel.hpp.

◆ rawq_timeout_count_t

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
using dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::rawq_timeout_count_t
protected
Initial value:
std::remove_const<std::invoke_result<decltype(&metric_t::num_data_input_timeouts), metric_t>::type>::type

Definition at line 339 of file DataHandlingModel.hpp.

◆ RDT

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
using dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::RDT = ReadoutType

Definition at line 77 of file DataHandlingModel.hpp.

◆ request_receiver_ct

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
using dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::request_receiver_ct = iomanager::ReceiverConcept<dfmessages::DataRequest>
protected

Definition at line 367 of file DataHandlingModel.hpp.

◆ RHT

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
using dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::RHT = RequestHandlerType

Definition at line 78 of file DataHandlingModel.hpp.

◆ RPT

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
using dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::RPT = RawDataProcessorType

Definition at line 80 of file DataHandlingModel.hpp.

◆ sum_payload_t

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
using dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::sum_payload_t = std::remove_const<std::invoke_result<decltype(&metric_t::sum_payloads), metric_t>::type>::type
protected

Definition at line 336 of file DataHandlingModel.hpp.

◆ sum_request_t

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
using dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::sum_request_t = std::remove_const<std::invoke_result<decltype(&metric_t::sum_requests), metric_t>::type>::type
protected

Definition at line 338 of file DataHandlingModel.hpp.

◆ timestamp_t

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
using dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::timestamp_t = std::uint64_t

Definition at line 84 of file DataHandlingModel.hpp.

◆ timesync_sender_ct

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
using dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::timesync_sender_ct = iomanager::SenderConcept<dfmessages::TimeSync>
protected

Definition at line 376 of file DataHandlingModel.hpp.

Constructor & Destructor Documentation

◆ DataHandlingModel()

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::DataHandlingModel ( std::atomic< bool > & run_marker)
inlineexplicit

◆ ~DataHandlingModel()

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
virtual dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::~DataHandlingModel ( )
virtualdefault

Member Function Documentation

◆ conf()

template<class RDT, class RHT, class LBT, class RPT, class IDT>
void dunedaq::datahandlinglibs::DataHandlingModel< RDT, RHT, LBT, RPT, IDT >::conf ( const appfwk::DAQModule::CommandData_t & args)
virtual

Implements dunedaq::datahandlinglibs::DataHandlingConcept.

Definition at line 103 of file DataHandlingModel.hxx.

104{
105 // Register callbacks if operating in that mode.
106 if (m_raw_data_callback_conf != nullptr) {
107 // Configure and register consume callback
110
111 // Register callback
114 }
115
116 // Configure threads:
117 m_consumer_thread.set_name("consumer", m_sourceid.id);
119 m_timesync_thread.set_name("timesync", m_sourceid.id);
120 }
122 m_postprocess_scheduler_thread.set_name("pprocsched", m_sourceid.id);
124 }
125}
static std::shared_ptr< DataMoveCallbackRegistry > get()

◆ consume_callback()

template<class RDT, class RHT, class LBT, class RPT, class IDT>
void dunedaq::datahandlinglibs::DataHandlingModel< RDT, RHT, LBT, RPT, IDT >::consume_callback ( IDT && payload)
protected

Definition at line 245 of file DataHandlingModel.hxx.

◆ dispatch_requests()

template<class RDT, class RHT, class LBT, class RPT, class IDT>
void dunedaq::datahandlinglibs::DataHandlingModel< RDT, RHT, LBT, RPT, IDT >::dispatch_requests ( dfmessages::DataRequest & data_request)
protected

Definition at line 471 of file DataHandlingModel.hxx.

472{
473 if (data_request.request_information.component != m_sourceid) {
474 ers::error(RequestSourceIDMismatch(ERS_HERE, m_sourceid, data_request.request_information.component));
475 return;
476 }
477 TLOG_DEBUG(TLVL_QUEUE_POP) << "Received DataRequest"
478 << " for trig/seq_number " << data_request.trigger_number << "."
479 << data_request.sequence_number << ", runno " << data_request.run_number
480 << ", trig timestamp " << data_request.trigger_timestamp
481 << ", SourceID: " << data_request.request_information.component << ", window begin/end "
482 << data_request.request_information.window_begin << "/"
483 << data_request.request_information.window_end
484 << ", dest: " << data_request.data_destination;
485 m_request_handler_impl->issue_request(data_request);
488}
void error(const Issue &issue)
Definition ers.hpp:101

◆ generate_opmon_data()

template<class RDT, class RHT, class LBT, class RPT, class IDT>
void dunedaq::datahandlinglibs::DataHandlingModel< RDT, RHT, LBT, RPT, IDT >::generate_opmon_data ( )
overrideprotectedvirtual

Hook for customisable pubblication. The function can throw, exception will be caught by the monitoring thread

Reimplemented from dunedaq::opmonlib::MonitorableObject.

Definition at line 197 of file DataHandlingModel.hxx.

198{
200 ri.set_sum_payloads(m_sum_payloads.load());
201 ri.set_num_payloads(m_num_payloads.exchange(0));
202
203 ri.set_num_data_input_timeouts(m_rawq_timeout_count.exchange(0));
204
206 int new_packets = m_stats_packet_count.exchange(0);
208 m_t0 = now;
209
210 // 08-May-2025, KAB: added a message to warn users when latency buffer inserts are failing.
215 }
216
217 ri.set_rate_payloads_consumed(new_packets / seconds / 1000.);
218 ri.set_num_lb_insert_failures(local_num_lb_insert_failures);
219 ri.set_sum_requests(m_sum_requests.load());
220 ri.set_num_requests(m_num_requests.exchange(0));
221 ri.set_num_post_processing_delay_max_waits(m_num_post_processing_delay_max_waits.exchange(0));
222 ri.set_last_daq_timestamp(m_raw_processor_impl->get_last_daq_time());
223 ri.set_newest_timestamp(m_raw_processor_impl->get_last_daq_time());
224 ri.set_oldest_timestamp(m_request_handler_impl->get_oldest_time());
225
226 this->publish(std::move(ri));
227}
void warning(const Issue &issue)
Definition ers.hpp:150

◆ init()

template<class RDT, class RHT, class LBT, class RPT, class IDT>
void dunedaq::datahandlinglibs::DataHandlingModel< RDT, RHT, LBT, RPT, IDT >::init ( const appmodel::DataHandlerModule * mcfg)
virtual

Forward calls from the appfwk.

Implements dunedaq::datahandlinglibs::DataHandlingConcept.

Definition at line 16 of file DataHandlingModel.hxx.

17{
18 // Check if a callback is defined (TPs use IOManager Queues instead)
19 m_raw_data_callback_conf = mcfg->get_raw_data_callback();
20 if (m_raw_data_callback_conf != nullptr) {
21 m_raw_data_callback_conf = mcfg->get_raw_data_callback();
22 TLOG_DEBUG(TLVL_WORK_STEPS) << "DataHandlingModel operating in callback mode.";
23 } else {
24 TLOG_DEBUG(TLVL_WORK_STEPS) << "DataHandlingModel operating in message polling mode.";
25 }
26
27 try {
28 for (auto input : mcfg->get_inputs()) {
29 if (input->get_data_type() == "DataRequest") {
31 } else {
33
34 if (m_raw_data_callback_conf == nullptr) {
37 }
38 }
39 }
40 for (auto output : mcfg->get_outputs()) {
41 if (output->get_data_type() == "TimeSync") {
45 break;
46 }
47 }
48 } catch (const ers::Issue& excpt) {
49 throw ResourceQueueError(ERS_HERE, "raw_input or frag_output", "DataHandlingModel", excpt);
50 }
51
52 // Raw input connection sensibility check
53 if (m_raw_data_callback_conf == nullptr && m_raw_data_receiver == nullptr) {
54 ers::error(ConfigurationError(ERS_HERE, m_sourceid, "No callback configuration, and receiver is unset!"));
55 }
56
57 // Instantiate functionalities
59 m_error_registry->set_ers_metadata("DLH of SourceID[" + std::to_string(mcfg->get_source_id()) + "] ");
60 m_latency_buffer_impl.reset(new LBT());
61 m_raw_processor_impl.reset(new RPT(m_error_registry, mcfg->get_post_processing_enabled()));
63
64 register_node(mcfg->get_module_configuration()->get_latency_buffer()->UID(), m_latency_buffer_impl);
65 register_node(mcfg->get_module_configuration()->get_data_processor()->UID(), m_raw_processor_impl);
66 register_node(mcfg->get_module_configuration()->get_request_handler()->UID(), m_request_handler_impl);
67
68 // m_request_handler_impl->init(args);
69 // m_raw_processor_impl->init(args);
71 m_fake_trigger = false;
73 m_sourceid.id = mcfg->get_source_id();
74 m_sourceid.subsystem = RDT::subsystem;
75 m_processing_delay_ticks = mcfg->get_module_configuration()->get_post_processing_delay_ticks();
76 m_post_processing_delay_min_wait = mcfg->get_module_configuration()->get_post_processing_delay_min_wait();
77 m_post_processing_delay_max_wait = mcfg->get_module_configuration()->get_post_processing_delay_max_wait();
78
80 if constexpr (ExpectsOrder<LBT>) {
84 "Queue buffers (FixedRateQueue, BinarySearchQueue) expect in-order data and must use "
85 "post_processing_delay_ticks = 0."));
86 }
87 }
88
89 // Configure implementations:
91 // Configure the latency buffer before the request handler so the request handler can check for alignment
92 // restrictions
93 try {
94 m_latency_buffer_impl->conf(mcfg->get_module_configuration()->get_latency_buffer());
95 } catch (const std::bad_alloc& be) {
96 ers::error(ConfigurationError(ERS_HERE, m_sourceid, "Latency Buffer can't be allocated with size!"));
97 }
99}
void conf(const appfwk::DAQModule::CommandData_t &args)

◆ invoke_postprocess_schedule_timeout_policy()

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
virtual void dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::invoke_postprocess_schedule_timeout_policy ( ) const
inlineprotectedvirtual

Definition at line 311 of file DataHandlingModel.hpp.

312 {
313 return; // No-op for this class
314 }

◆ postprocess_schedule()

template<class RDT, class RHT, class LBT, class RPT, class IDT>
folly::coro::Task< void > dunedaq::datahandlinglibs::DataHandlingModel< RDT, RHT, LBT, RPT, IDT >::postprocess_schedule ( )
protected

Definition at line 338 of file DataHandlingModel.hxx.

339{
340
341 TLOG_DEBUG(TLVL_WORK_STEPS) << "Postprocess schedule coroutine started...";
342 TLOG() << "***** Starting post-process coroutine with timout " << m_post_processing_delay_max_wait << " *****";
343
349
350 const auto wait_data = [this]() -> folly::coro::Task<void> {
351 // folly::coro::timeout cancels the task on timeout.
352 // Baton is not cancellable, so we attach a callback to resume the coroutine.
354 folly::CancellationCallback cb(token, [this] { m_baton.post(); });
355 co_await m_baton; // Wait data
356 };
357
358 while (m_run_marker.load()) {
359 bool timeout = false;
360
362 try {
363 co_await folly::coro::timeout(
365
366 } catch (const folly::FutureTimeout&) {
367 timeout = true;
369 }
370 } else {
371 co_await m_baton;
372 }
373
374 m_baton.reset();
375
376 if (auto processed = sched_algo.run(timeout); processed > 0) {
380 }
381 }
382}

◆ process_item()

template<class RDT, class RHT, class LBT, class RPT, class IDT>
void dunedaq::datahandlinglibs::DataHandlingModel< RDT, RHT, LBT, RPT, IDT >::process_item ( RDT && payload)
protected

Definition at line 252 of file DataHandlingModel.hxx.

253{
254 m_raw_processor_impl->preprocess_item(&payload);
256 int64_t diff1 = payload.get_timestamp() - m_request_handler_impl->get_cutoff_timestamp();
257 if (diff1 <= 0) {
258 // m_request_handler_impl->increment_tardy_tp_count();
262 payload.get_timestamp(),
263 m_request_handler_impl->get_cutoff_timestamp(),
264 diff1,
265 (static_cast<double>(diff1) / 62500.0)));
266 }
267 }
268
269 const RDT* written = nullptr;
270 if constexpr (ExpectsOrder<LBT>) {
272 // TLOG_DEBUG(TLVL_TAKE_NOTE) << "***ERROR: Latency buffer insert failed! (Payload timestamp=" <<
273 // payload.get_timestamp() << ")";
275 return;
276 }
278 } else {
279 const auto [returned, result] = m_latency_buffer_impl->write_and_return(std::move(payload));
280 if (!result) {
281 // TLOG_DEBUG(TLVL_TAKE_NOTE) << "***ERROR: Latency buffer insert failed! (Payload timestamp=" <<
282 // payload.get_timestamp() << ")";
284 return;
285 }
287 }
288
289 if (m_processing_delay_ticks == 0) {
290 m_raw_processor_impl->postprocess_item(written);
294 } else {
295 m_baton.post();
296 }
297}

◆ record()

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
void dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::record ( const appfwk::DAQModule::CommandData_t & args)
inlineoverridevirtual

Implements dunedaq::datahandlinglibs::DataHandlingConcept.

Definition at line 128 of file DataHandlingModel.hpp.

void record(const appfwk::DAQModule::CommandData_t &args) override

◆ run_consume()

template<class RDT, class RHT, class LBT, class RPT, class IDT>
void dunedaq::datahandlinglibs::DataHandlingModel< RDT, RHT, LBT, RPT, IDT >::run_consume ( )
protectedvirtual

Function that will be run in its own thread to read the raw packets from the connection and add them to the LB.

Implements dunedaq::datahandlinglibs::DataHandlingConcept.

Definition at line 308 of file DataHandlingModel.hxx.

309{
310
311 TLOG_DEBUG(TLVL_WORK_STEPS) << "Consumer thread started...";
313 m_num_payloads = 0;
314 m_sum_payloads = 0;
317
318 while (m_run_marker.load()) {
319 // Try to acquire data
320
322
323 if (opt_payload) {
324 IDT& payload = opt_payload.value();
326 } else {
328 // Protection against a zero sleep becoming a yield
331 }
332 }
333 TLOG_DEBUG(TLVL_WORK_STEPS) << "Consumer thread joins... ";
334}

◆ run_postprocess_scheduler()

template<class RDT, class RHT, class LBT, class RPT, class IDT>
void dunedaq::datahandlinglibs::DataHandlingModel< RDT, RHT, LBT, RPT, IDT >::run_postprocess_scheduler ( )
protected

Definition at line 301 of file DataHandlingModel.hxx.

◆ run_timesync()

template<class RDT, class RHT, class LBT, class RPT, class IDT>
void dunedaq::datahandlinglibs::DataHandlingModel< RDT, RHT, LBT, RPT, IDT >::run_timesync ( )
protectedvirtual

Function that will be run in its own thread and sends periodic timesync messages by pushing them to the connection.

Implements dunedaq::datahandlinglibs::DataHandlingConcept.

Definition at line 386 of file DataHandlingModel.hxx.

387{
388 TLOG_DEBUG(TLVL_WORK_STEPS) << "TimeSync thread started...";
389 m_num_requests = 0;
390 m_sum_requests = 0;
393 auto once_per_run = true;
394 size_t zero_timestamp_count = 0;
395 size_t duplicate_timestamp_count = 0;
396 size_t total_timestamp_count = 0;
397 while (m_run_marker.load()) {
398 try {
399 auto timesyncmsg = dfmessages::TimeSync(m_raw_processor_impl->get_last_daq_time());
401 // daq_time is zero for the first received timesync, and may
402 // be the same as the previous daq_time if the data has
403 // stopped flowing. In both cases we don't send the TimeSync
404 if (timesyncmsg.daq_time != 0 && timesyncmsg.daq_time != prev_timestamp) {
405 prev_timestamp = timesyncmsg.daq_time;
406 timesyncmsg.run_number = m_run_number;
407 timesyncmsg.sequence_number = ++msg_seqno;
408 timesyncmsg.source_id = m_sourceid.id;
409 TLOG_DEBUG(TLVL_TIME_SYNCS) << "New timesync: daq=" << timesyncmsg.daq_time
410 << " wall=" << timesyncmsg.system_time << " run=" << timesyncmsg.run_number
411 << " seqno=" << timesyncmsg.sequence_number
412 << " source_id=" << timesyncmsg.source_id;
413 try {
416 } catch (ers::Issue& excpt) {
418 }
419
420 if (m_fake_trigger) {
423 dr.trigger_number = m_current_fake_trigger_id;
424 dr.trigger_timestamp = timesyncmsg.daq_time > 500 * us ? timesyncmsg.daq_time - 500 * us : 0;
425 auto width = 300000;
426 uint offset = 100;
427 dr.request_information.window_begin = dr.trigger_timestamp > offset ? dr.trigger_timestamp - offset : 0;
428 dr.request_information.window_end = dr.request_information.window_begin + width;
429 dr.request_information.component = m_sourceid;
430 dr.data_destination = "data_fragments_q";
431 TLOG_DEBUG(TLVL_WORK_STEPS) << "Issuing fake trigger based on timesync. "
432 << " ts=" << dr.trigger_timestamp
433 << " window_begin=" << dr.request_information.window_begin
434 << " window_end=" << dr.request_information.window_end;
435 m_request_handler_impl->issue_request(dr);
436
439 }
440 } else {
441 if (timesyncmsg.daq_time == 0) {
443 }
444 if (timesyncmsg.daq_time == prev_timestamp) {
446 }
447 if (once_per_run) {
448 TLOG() << "Timesync with DAQ time 0 won't be sent out as it's an invalid sync.";
449 once_per_run = false;
450 }
451 }
452 } catch (const iomanager::TimeoutExpired& excpt) {
453 // ++m_timesyncqueue_timeout;
454 }
455 // Split up the 100ms sleep into 10 sleeps of 10ms, so we respond to "stop" quicker
456 for (size_t i = 0; i < 10; ++i) {
458 if (!m_run_marker.load()) {
459 break;
460 }
461 }
462 }
463 once_per_run = true;
464 TLOG_DEBUG(TLVL_WORK_STEPS) << "TimeSync thread joins... (timestamp count, zero/same/total = "
466 << total_timestamp_count << ")";
467}

◆ scrap()

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
void dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::scrap ( const appfwk::DAQModule::CommandData_t & args)
inlinevirtual

◆ start()

template<class RDT, class RHT, class LBT, class RPT, class IDT>
void dunedaq::datahandlinglibs::DataHandlingModel< RDT, RHT, LBT, RPT, IDT >::start ( const appfwk::DAQModule::CommandData_t & args)
virtual

◆ stop()

template<class RDT, class RHT, class LBT, class RPT, class IDT>
void dunedaq::datahandlinglibs::DataHandlingModel< RDT, RHT, LBT, RPT, IDT >::stop ( const appfwk::DAQModule::CommandData_t & args)
virtual

Implements dunedaq::datahandlinglibs::DataHandlingConcept.

Definition at line 165 of file DataHandlingModel.hxx.

166{
167 TLOG_DEBUG(TLVL_WORK_STEPS) << "Stoppping threads...";
168
169 // Stop receiving data requests as first thing
170 m_data_request_receiver->remove_callback();
171 // Stop the other threads
174 while (!m_timesync_thread.get_readiness()) {
176 }
177 }
178 if (m_raw_data_callback_conf == nullptr) {
179 while (!m_consumer_thread.get_readiness()) {
181 }
182 }
184 m_baton.post(); // In case the coroutine is still waiting when the consumer has stopped
185 while (!m_postprocess_scheduler_thread.get_readiness()) {
187 }
188 }
189 TLOG_DEBUG(TLVL_WORK_STEPS) << "Flushing latency buffer with occupancy: " << m_latency_buffer_impl->occupancy();
190 m_latency_buffer_impl->flush();
192 m_raw_processor_impl->reset_last_daq_time();
193}
void stop(const appfwk::DAQModule::CommandData_t &args)

◆ transform_and_process()

template<class RDT, class RHT, class LBT, class RPT, class IDT>
void dunedaq::datahandlinglibs::DataHandlingModel< RDT, RHT, LBT, RPT, IDT >::transform_and_process ( IDT && payload)
protected

Definition at line 231 of file DataHandlingModel.hxx.

232{
233 if constexpr (std::is_same_v<IDT, RDT>) {
235 } else {
237 for (auto& i : transformed) {
239 }
240 }
241}

◆ transform_payload()

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
virtual std::vector< RDT > dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::transform_payload ( IDT & original) const
inlineprotectedvirtual

Definition at line 308 of file DataHandlingModel.hpp.

308{ return { reinterpret_cast<RDT&>(original) }; }

Member Data Documentation

◆ m_baton

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
folly::coro::Baton dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_baton
protected

Definition at line 383 of file DataHandlingModel.hpp.

◆ m_consume_callback

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::function<void(IDT&&)> dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_consume_callback

Definition at line 134 of file DataHandlingModel.hpp.

◆ m_consumer_thread

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
utilities::ReusableThread dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_consumer_thread
protected

Definition at line 356 of file DataHandlingModel.hpp.

◆ m_current_fake_trigger_id

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
int dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_current_fake_trigger_id
protected

Definition at line 326 of file DataHandlingModel.hpp.

◆ m_data_request_receiver

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::shared_ptr<request_receiver_ct> dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_data_request_receiver
protected

Definition at line 368 of file DataHandlingModel.hpp.

◆ m_error_registry

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::unique_ptr<FrameErrorRegistry> dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_error_registry
protected

Definition at line 397 of file DataHandlingModel.hpp.

◆ m_fake_trigger

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
bool dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_fake_trigger
protected

Definition at line 324 of file DataHandlingModel.hpp.

◆ m_generate_timesync

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
bool dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_generate_timesync = false
protected

Definition at line 325 of file DataHandlingModel.hpp.

◆ m_latency_buffer_impl

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::shared_ptr<LatencyBufferType> dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_latency_buffer_impl
protected

Definition at line 387 of file DataHandlingModel.hpp.

◆ m_num_lb_insert_failures

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::atomic<num_lb_insert_failures_t> dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_num_lb_insert_failures { 0 }
protected

Definition at line 351 of file DataHandlingModel.hpp.

◆ m_num_payloads

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::atomic<num_payload_t> dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_num_payloads { 0 }
protected

Definition at line 346 of file DataHandlingModel.hpp.

◆ m_num_post_processing_delay_max_waits

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::atomic<num_post_processing_delay_max_waits_t> dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_num_post_processing_delay_max_waits { 0 }
protected

Definition at line 352 of file DataHandlingModel.hpp.

◆ m_num_requests

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::atomic<num_request_t> dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_num_requests { 0 }
protected

Definition at line 348 of file DataHandlingModel.hpp.

◆ m_post_processing_delay_max_wait

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
uint64_t dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_post_processing_delay_max_wait
protected

Definition at line 331 of file DataHandlingModel.hpp.

◆ m_post_processing_delay_min_wait

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
uint64_t dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_post_processing_delay_min_wait
protected

Definition at line 330 of file DataHandlingModel.hpp.

◆ m_postprocess_scheduler_thread

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
utilities::ReusableThread dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_postprocess_scheduler_thread
protected

Definition at line 382 of file DataHandlingModel.hpp.

◆ m_processing_delay_ticks

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
uint64_t dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_processing_delay_ticks
protected

Definition at line 329 of file DataHandlingModel.hpp.

◆ m_raw_data_callback_conf

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
const appmodel::DataMoveCallbackConf* dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_raw_data_callback_conf
protected

Definition at line 364 of file DataHandlingModel.hpp.

◆ m_raw_data_receiver

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::shared_ptr<raw_receiver_ct> dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_raw_data_receiver
protected

Definition at line 362 of file DataHandlingModel.hpp.

◆ m_raw_data_receiver_connection_name

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::string dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_raw_data_receiver_connection_name
protected

Definition at line 363 of file DataHandlingModel.hpp.

◆ m_raw_processor_impl

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::shared_ptr<RawDataProcessorType> dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_raw_processor_impl
protected

Definition at line 390 of file DataHandlingModel.hpp.

◆ m_raw_receiver_sleep_us

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::chrono::microseconds dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_raw_receiver_sleep_us
protected

Definition at line 360 of file DataHandlingModel.hpp.

◆ m_raw_receiver_timeout_ms

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::chrono::milliseconds dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_raw_receiver_timeout_ms
protected

Definition at line 359 of file DataHandlingModel.hpp.

◆ m_rawq_timeout_count

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::atomic<rawq_timeout_count_t> dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_rawq_timeout_count { 0 }
protected

Definition at line 350 of file DataHandlingModel.hpp.

◆ m_request_handler_impl

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::shared_ptr<RequestHandlerType> dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_request_handler_impl
protected

Definition at line 393 of file DataHandlingModel.hpp.

◆ m_request_handler_supports_cutoff_timestamp

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
bool dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_request_handler_supports_cutoff_timestamp
protected

Definition at line 394 of file DataHandlingModel.hpp.

◆ m_run_marker

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::atomic<bool>& dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_run_marker
protected

Definition at line 320 of file DataHandlingModel.hpp.

◆ m_run_number

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
daqdataformats::run_number_t dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_run_number
protected

Definition at line 328 of file DataHandlingModel.hpp.

◆ m_sourceid

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
daqdataformats::SourceID dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_sourceid
protected

Definition at line 327 of file DataHandlingModel.hpp.

◆ m_stats_packet_count

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::atomic<int> dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_stats_packet_count { 0 }
protected

Definition at line 353 of file DataHandlingModel.hpp.

◆ m_sum_payloads

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::atomic<sum_payload_t> dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_sum_payloads { 0 }
protected

Definition at line 347 of file DataHandlingModel.hpp.

◆ m_sum_requests

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::atomic<sum_request_t> dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_sum_requests { 0 }
protected

Definition at line 349 of file DataHandlingModel.hpp.

◆ m_t0

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::chrono::time_point<std::chrono::high_resolution_clock> dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_t0
protected

Definition at line 400 of file DataHandlingModel.hpp.

◆ m_timekeeper

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::unique_ptr<folly::Timekeeper> dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_timekeeper
protected

Definition at line 384 of file DataHandlingModel.hpp.

◆ m_timesync_connection_name

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::string dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_timesync_connection_name
protected

Definition at line 379 of file DataHandlingModel.hpp.

◆ m_timesync_sender

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
std::shared_ptr<timesync_sender_ct> dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_timesync_sender
protected

Definition at line 377 of file DataHandlingModel.hpp.

◆ m_timesync_thread

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
utilities::ReusableThread dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::m_timesync_thread
protected

Definition at line 378 of file DataHandlingModel.hpp.

◆ ms

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
timestamp_t dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::ms = 1000 * us
inlinestaticconstexpr

Definition at line 87 of file DataHandlingModel.hpp.

◆ ns

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
timestamp_t dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::ns = 1
inlinestaticconstexpr

Definition at line 85 of file DataHandlingModel.hpp.

◆ s

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
timestamp_t dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::s = 1000 * ms
inlinestaticconstexpr

Definition at line 88 of file DataHandlingModel.hpp.

◆ us

template<class ReadoutType, class RequestHandlerType, class LatencyBufferType, class RawDataProcessorType, class InputDataType = ReadoutType>
timestamp_t dunedaq::datahandlinglibs::DataHandlingModel< ReadoutType, RequestHandlerType, LatencyBufferType, RawDataProcessorType, InputDataType >::us = 1000 * ns
inlinestaticconstexpr

Definition at line 86 of file DataHandlingModel.hpp.


The documentation for this class was generated from the following files: