DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter > Class Template Reference

#include <TPCEthFrameProcessor.hpp>

Inheritance diagram for dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >:
[legend]
Collaboration diagram for dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >:
[legend]

Public Types

using inherited = datahandlinglibs::TaskRawDataProcessorModel<ReadoutTypeAdapter>
 
using frameptr = ReadoutTypeAdapter*
 
using constframeptr = const ReadoutTypeAdapter*
 
using tpcframeptr = ReadoutTypeAdapter::FrameType*
 
- 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

 TPCEthFrameProcessor (std::unique_ptr< datahandlinglibs::FrameErrorRegistry > &error_registry, bool processing_enabled)
 
void start (const appfwk::DAQModule::CommandData_t &args) override
 Start operation.
 
void stop (const appfwk::DAQModule::CommandData_t &args) override
 Stop operation.
 
void conf (const appmodel::DataHandlerModule *conf) override
 Set the emulator mode, if active, timestamps of processed packets are overwritten with new ones.
 
void scrap (const appfwk::DAQModule::CommandData_t &cfg) override
 Unconfigure.
 
- Public Member Functions inherited from dunedaq::datahandlinglibs::TaskRawDataProcessorModel< ReadoutTypeAdapter >
 TaskRawDataProcessorModel (std::unique_ptr< FrameErrorRegistry > &error_registry, bool post_processing_enabled)
 
 ~TaskRawDataProcessorModel ()
 
void reset_last_daq_time ()
 
std::uint64_t get_last_daq_time () override
 Get newest timestamp of last seen packet.
 
void preprocess_item (ReadoutTypeAdapter *item) override
 Preprocess one element.
 
void postprocess_item (const ReadoutTypeAdapter *item) override
 Postprocess one element.
 
void invoke_postprocess_schedule_timeout_policy (std::uint64_t accumilated_timeout_ticks) override
 Handle postprocess timeout event.
 
void add_preprocess_task (Task &&task)
 
void add_postprocess_task (Task &&task)
 
void invoke_all_preprocess_functions (ReadoutTypeAdapter *item)
 
void launch_all_preprocess_functions (ReadoutTypeAdapter *item)
 
- Public Member Functions inherited from dunedaq::datahandlinglibs::RawDataProcessorConcept< ReadoutTypeAdapter >
 RawDataProcessorConcept ()
 
 RawDataProcessorConcept (const RawDataProcessorConcept &)=delete
 RawDataProcessorConcept is not copy-constructible.
 
 RawDataProcessorConcept (RawDataProcessorConcept &&)=delete
 RawDataProcessorConcept is not move-constructible.
 
virtual ~RawDataProcessorConcept ()
 
RawDataProcessorConceptoperator= (const RawDataProcessorConcept &)=delete
 RawDataProcessorConcept is not copy-assginable.
 
RawDataProcessorConceptoperator= (RawDataProcessorConcept &&)=delete
 RawDataProcessorConcept is not move-assignable.
 
- Public Member Functions inherited from dunedaq::opmonlib::MonitorableObject
 MonitorableObject (const MonitorableObject &)=delete
 
MonitorableObjectoperator= (const MonitorableObject &)=delete
 
 MonitorableObject (MonitorableObject &&)=delete
 
MonitorableObjectoperator= (MonitorableObject &&)=delete
 
virtual ~MonitorableObject ()=default
 
auto get_opmon_id () const noexcept
 
auto get_opmon_level () const noexcept
 

Protected Member Functions

void generate_opmon_data () override
 
void configure_source_and_geo_ids (const appmodel::DataHandlerModule *conf)
 
void configure_preprocessing (const appmodel::DataHandlerModule *conf)
 
void configure_postprocessing (const appmodel::DataHandlerModule *conf)
 
void configure_channel_plane_numbers (const appmodel::TPCRawDataProcessor *proc_conf)
 
void configure_find_tps (const appmodel::DataHandlerModule *conf, const appmodel::TPCRawDataProcessor *proc_conf)
 
void scrap_source_and_geo_ids ()
 
void scrap_preprocessing ()
 
void scrap_postprocessing ()
 
void scrap_channel_plane_numbers ()
 
void scrap_find_tps ()
 
void publish_processor_metric_to_opmon ()
 
void publish_processor_metric_to_opmon_with_aggregation ()
 
std::map< int16_t, std::map< std::string, std::tuple< float, int16_t, int16_t, float, dunedaq::trgdataformats::channel_t, dunedaq::trgdataformats::channel_t > > > calculate_all_metric_summaries_across_planes (const std::unordered_map< dunedaq::trgdataformats::channel_t, std::vector< std::pair< std::string, int16_t > > > &metrics)
 
void sequence_check (frameptr fp)
 
void timestamp_check (frameptr fp)
 
void find_tps (constframeptr fp)
 
- Protected Member Functions inherited from dunedaq::datahandlinglibs::TaskRawDataProcessorModel< ReadoutTypeAdapter >
void run_post_processing_thread (std::function< void(const ReadoutTypeAdapter *)> &function, folly::ProducerConsumerQueue< const ReadoutTypeAdapter * > &queue)
 
- 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

bool m_emulator_mode = false
 
bool m_first_frame = true
 
dunedaq::daqdataformats::timestamp_t m_previous_ts = 0
 
dunedaq::daqdataformats::timestamp_t m_current_ts = 0
 
dunedaq::daqdataformats::timestamp_t m_pattern_generator_previous_ts = 0
 
dunedaq::daqdataformats::timestamp_t m_pattern_generator_current_ts = 0
 
bool m_first_ts_missmatch = true
 
bool m_ts_problem_reported = false
 
bool m_ts_error_state = false
 
std::atomic< uint64_t > m_ts_error_ctr { 0 }
 
uint16_t m_previous_seq_id = 0
 
uint16_t m_current_seq_id = 0
 
bool m_first_seq_id_mismatch = true
 
bool m_seq_id_problem_reported = false
 
bool m_seq_id_error_state = false
 
std::atomic< uint64_t > m_seq_id_error_ctr { 0 }
 
std::atomic< int16_t > m_seq_id_min_jump { 0 }
 
std::atomic< int16_t > m_seq_id_max_jump { 0 }
 
std::unique_ptr< tpglibs::TPGeneratorm_tp_generator
 
std::unique_ptr< fdreadoutlibs::TPGInternalStateHarvesterm_state_harvester
 
std::vector< std::pair< std::string, nlohmann::json > > m_tpg_configs
 
std::unordered_map< unsigned int, std::vector< trigger::TriggerPrimitiveTypeAdapter > > m_plane_to_tpa_vector_map
 
std::unordered_map< unsigned int, std::shared_ptr< iomanager::SenderConcept< std::vector< trigger::TriggerPrimitiveTypeAdapter > > > > m_plane_to_tp_sink_map
 
uint32_t m_tp_count_limit = 0
 
uint32_t m_frame_count_limit = 0
 
uint32_t m_current_tp_count = 0
 
uint32_t m_frame_count_at_last_send = 0
 
bool m_tp_limit_enabled = false
 
bool m_frame_limit_enabled = false
 
std::set< unsigned int > m_channel_mask_set
 
std::set< unsigned int > m_plane_numbers_set
 
std::vector< std::pair< trgdataformats::channel_t, int16_t > > m_channel_plane_numbers
 
std::unordered_map< trgdataformats::channel_t, unsigned int > m_channel_plane_map
 
bool m_tpg_metric_collect_enabled {false}
 
uint32_t m_metric_collect_opmon_period { 128 }
 
std::map< uint, std::atomic< int > > m_tp_channel_rate_map
 
std::atomic< uint64_t > m_num_new_tps { 0 }
 
std::atomic< uint64_t > m_tps_suppressed_too_long { 0 }
 
std::atomic< uint64_t > m_tps_send_failed { 0 }
 
std::chrono::time_point< std::chrono::high_resolution_clock > m_t0
 
std::atomic< uint64_t > m_frame_counter { 0 }
 
uint32_t m_det_id
 
uint32_t m_crate_id
 
uint32_t m_slot_id
 
uint32_t m_stream_id
 
daqdataformats::SourceID m_sourceid
 
- Protected Attributes inherited from dunedaq::datahandlinglibs::TaskRawDataProcessorModel< ReadoutTypeAdapter >
std::vector< std::function< void(ReadoutTypeAdapter *)> > m_preprocess_functions
 
std::unique_ptr< FrameErrorRegistry > & m_error_registry
 
bool m_post_processing_enabled
 
std::atomic< boolm_run_marker
 
std::vector< std::function< void(const ReadoutTypeAdapter *)> > m_post_process_functions
 
std::vector< std::unique_ptr< folly::ProducerConsumerQueue< const ReadoutTypeAdapter * > > > m_items_to_postprocess_queues
 
std::vector< std::unique_ptr< utilities::ReusableThread > > m_post_process_threads
 
size_t m_postprocess_queue_sizes
 
daqdataformats::SourceID m_sourceid
 
std::atomic< uint64_t > m_last_processed_daq_ts
 

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 ReadoutTypeAdapter>
class dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >

Definition at line 58 of file TPCEthFrameProcessor.hpp.

Member Typedef Documentation

◆ constframeptr

template<class ReadoutTypeAdapter >
using dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::constframeptr = const ReadoutTypeAdapter*

Definition at line 64 of file TPCEthFrameProcessor.hpp.

◆ frameptr

template<class ReadoutTypeAdapter >
using dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::frameptr = ReadoutTypeAdapter*

Definition at line 63 of file TPCEthFrameProcessor.hpp.

◆ inherited

template<class ReadoutTypeAdapter >
using dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::inherited = datahandlinglibs::TaskRawDataProcessorModel<ReadoutTypeAdapter>

Definition at line 62 of file TPCEthFrameProcessor.hpp.

◆ tpcframeptr

template<class ReadoutTypeAdapter >
using dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::tpcframeptr = ReadoutTypeAdapter::FrameType*

Definition at line 65 of file TPCEthFrameProcessor.hpp.

Constructor & Destructor Documentation

◆ TPCEthFrameProcessor()

template<class ReadoutTypeAdapter >
dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::TPCEthFrameProcessor ( std::unique_ptr< datahandlinglibs::FrameErrorRegistry > & error_registry,
bool processing_enabled )
explicit

Definition at line 11 of file TPCEthFrameProcessor.hxx.

12 : datahandlinglibs::TaskRawDataProcessorModel<ReadoutTypeAdapter>(error_registry, processing_enabled)
13{
14}

Member Function Documentation

◆ calculate_all_metric_summaries_across_planes()

template<class ReadoutTypeAdapter >
std::map< int16_t, std::map< std::string, std::tuple< float, int16_t, int16_t, float, dunedaq::trgdataformats::channel_t, dunedaq::trgdataformats::channel_t > > > dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::calculate_all_metric_summaries_across_planes ( const std::unordered_map< dunedaq::trgdataformats::channel_t, std::vector< std::pair< std::string, int16_t > > > & metrics)
protected

Optimized version that calculates all metric summaries across all planes in a single pass Returns a map of plane_number -> map of metric_name -> summary statistics

Definition at line 444 of file TPCEthFrameProcessor.hxx.

444 {
445 // Structure to hold all statistics: plane -> metric -> (mean, min, max, stddev, min_channel_id, max_channel_id)
446 std::map<int16_t, std::map<std::string, std::tuple<float, int16_t, int16_t, float, dunedaq::trgdataformats::channel_t, dunedaq::trgdataformats::channel_t>>> all_stats;
447
448 // Structure to accumulate statistics: plane -> metric -> (count, mean, M2, min, max, min_channel_id, max_channel_id)
449 std::map<int16_t, std::map<std::string, std::tuple<size_t, double, double, int16_t, int16_t, dunedaq::trgdataformats::channel_t, dunedaq::trgdataformats::channel_t>>> accumulators;
450
451 // Single pass through all metrics to collect data using Welford's online algorithm for variance
452 for (const auto& [channel, vec] : metrics) {
453 if (m_channel_plane_map.empty()) continue;
454
455 int16_t plane = m_channel_plane_map[channel];
456
457 for (const auto& [name, val] : vec) {
458 auto& [count, mean, M2, min, max, min_channel_id, max_channel_id] = accumulators[plane][name];
459
460 count++;
461
462 if (count == 1 || val < min) {
463 min = val;
464 min_channel_id = channel;
465 }
466 if (count == 1 || val > max) {
467 max = val;
468 max_channel_id = channel;
469 }
470
471 // Welford's online algorithm for variance calculation
472 if (count == 1) {
473 // First value: initialize mean and M2
474 mean = val;
475 M2 = 0.0;
476 } else {
477 // Update mean and M2 using Welford's algorithm
478 double delta = val - mean;
479 mean += delta / count;
480 double delta2 = val - mean;
481 M2 += delta * delta2;
482 }
483 }
484 }
485
486 // Calculate final statistics from accumulated data
487 for (const auto& [plane, metric_map] : accumulators) {
488 for (const auto& [metric_name, acc_data] : metric_map) {
489 const auto& [count, mean, M2, min, max, min_channel_id, max_channel_id] = acc_data;
490
491 if (count == 0) continue;
492
493 float stddev = 0.0f;
494
495 // Calculate standard deviation using accumulated M2
496 if (count > 1) {
497 stddev = std::sqrt(M2 / (count - 1));
498 }
499
500 all_stats[plane][metric_name] = std::make_tuple(static_cast<float>(mean), min, max, stddev, min_channel_id, max_channel_id);
501 }
502 }
503
504 return all_stats;
505}
std::unordered_map< trgdataformats::channel_t, unsigned int > m_channel_plane_map

◆ conf()

template<class ReadoutTypeAdapter >
void dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::conf ( const appmodel::DataHandlerModule * conf)
overridevirtual

Set the emulator mode, if active, timestamps of processed packets are overwritten with new ones.

Reimplemented from dunedaq::datahandlinglibs::TaskRawDataProcessorModel< ReadoutTypeAdapter >.

Definition at line 229 of file TPCEthFrameProcessor.hxx.

230{
232
234
235 if (this->m_post_processing_enabled) {
237 }
238
240}
void configure_postprocessing(const appmodel::DataHandlerModule *conf)
void configure_source_and_geo_ids(const appmodel::DataHandlerModule *conf)
void configure_preprocessing(const appmodel::DataHandlerModule *conf)
void conf(const appmodel::DataHandlerModule *conf) override
Set the emulator mode, if active, timestamps of processed packets are overwritten with new ones.

◆ configure_channel_plane_numbers()

template<class ReadoutTypeAdapter >
void dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::configure_channel_plane_numbers ( const appmodel::TPCRawDataProcessor * proc_conf)
protected

Definition at line 96 of file TPCEthFrameProcessor.hxx.

97{
98 const std::shared_ptr<detchannelmaps::TPCChannelMap> channel_map = dunedaq::detchannelmaps::make_tpc_map(proc_conf->get_channel_map());
99 const std::vector<unsigned int> channel_mask_vec = proc_conf->get_channel_mask();
100
101 for (int chan = 0; chan < 64; chan++) {
102 trgdataformats::channel_t off_channel = channel_map->get_offline_channel_from_det_crate_slot_stream_chan(m_det_id, m_crate_id, m_slot_id, m_stream_id, chan);
103 int16_t plane = channel_map->get_plane_from_offline_channel(off_channel);
104 m_channel_plane_numbers.push_back(std::make_pair(off_channel, plane));
105
106 // This processor only needs to handle some (maybe 0) of the masked channels.
107 // Only get those relevant channels for the later check.
108 // Only get the planes for the channels that are not masked.
109 if (std::find(channel_mask_vec.begin(), channel_mask_vec.end(), off_channel) != channel_mask_vec.end()) {
110 m_channel_mask_set.insert(off_channel);
111 } else {
112 m_channel_plane_map[off_channel] = plane;
113 m_plane_numbers_set.insert(plane);
114 }
115 }
116}
std::vector< std::pair< trgdataformats::channel_t, int16_t > > m_channel_plane_numbers

◆ configure_find_tps()

template<class ReadoutTypeAdapter >
void dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::configure_find_tps ( const appmodel::DataHandlerModule * conf,
const appmodel::TPCRawDataProcessor * proc_conf )
protected

Definition at line 120 of file TPCEthFrameProcessor.hxx.

121{
122 // Setting TP sinks.
123 // Configurations currently have the sinks iterate in order, but there may be more sinks than planes.
124 int plane_number = 0;
125 for (auto output : conf->get_outputs()) {
126 try {
127 if (output->get_data_type() == "TriggerPrimitiveVector") {
128 if (m_plane_numbers_set.contains(plane_number)) {
130 }
131 plane_number++;
132 }
133 } catch (const ers::Issue& excpt) {
134 ers::error(datahandlinglibs::ResourceQueueError(ERS_HERE, "tp", "DefaultRequestHandlerModel", excpt));
135 }
136 }
137
138 // We do need a coverage for all planes.
139 if (m_plane_numbers_set.size() > m_plane_to_tp_sink_map.size()) {
140 ers::error(DetectorPlaneToTPSinkMismatch(ERS_HERE, m_plane_numbers_set.size(), m_plane_to_tp_sink_map.size()));
141 }
142
143 m_tp_generator = std::make_unique<tpglibs::TPGenerator>();
144
145 // Set the minimum TP samples over threshold.
146 auto conf_sot_minima = proc_conf->get_sot_minima();
147 std::vector<uint16_t> sot_minima{conf_sot_minima->get_sot_minimum_plane0(),
148 conf_sot_minima->get_sot_minimum_plane1(),
149 conf_sot_minima->get_sot_minimum_plane2()};
150 m_tp_generator->set_sot_minima(sot_minima);
151
152 std::vector<const appmodel::ProcessingStep*> processing_steps = proc_conf->get_processing_steps();
153 for (auto step : processing_steps) {
154 m_tpg_configs.push_back(std::make_pair(step->class_name(), step->to_json(false).back()));
155 }
156
157 // Let the TPG generator configure
158 m_tp_generator->configure(m_tpg_configs, m_channel_plane_numbers, ReadoutTypeAdapter::samples_tick_difference);
159
160 // Set the limits on when to send TPs and check that we can actually send on these limits.
161 m_frame_count_limit = proc_conf->get_frame_count_limit();
162 m_tp_count_limit = proc_conf->get_tp_count_limit();
165
168 }
169
170 m_metric_collect_opmon_period = proc_conf->get_metric_collect_opmon_period();
171
172 // Check if metric collection is enabled in the configs
174 for (const auto& name_config : m_tpg_configs) {
175 if (name_config.second.contains("metric_collect_toggle_state") &&
176 name_config.second["metric_collect_toggle_state"] == true) {
178 break;
179 }
180 }
181
182 // Only create and configure state harvester if metric collection is enabled
184 auto processsor_references = m_tp_generator->get_all_processor_references_with_pipeline_index();
185
186 m_state_harvester = std::make_unique<fdreadoutlibs::TPGInternalStateHarvester>();
187
188 const uint8_t channels_per_pipeline = 16;
189 const uint8_t pipelines = static_cast<uint8_t>(m_channel_plane_numbers.size() / channels_per_pipeline);
190
191 TLOG_DEBUG(TLVL_BOOKKEEPING) << "Configuring state harvester with " << static_cast<int>(channels_per_pipeline)
192 << " channels per pipeline, " << static_cast<int>(pipelines) << " pipelines, "
193 << processsor_references.size() << " processor references";
194
195 m_state_harvester->update_channel_plane_numbers(m_channel_plane_numbers,
196 channels_per_pipeline, pipelines);
197 m_state_harvester->set_processor_references(processsor_references);
198
199 // Start the collection thread immediately after configuration
200 m_state_harvester->start_collection_thread();
201
202 TLOG_DEBUG(TLVL_BOOKKEEPING) << "State harvester configured and started successfully";
203 }
204
206}
#define ERS_HERE
std::unique_ptr< fdreadoutlibs::TPGInternalStateHarvester > m_state_harvester
std::vector< std::pair< std::string, nlohmann::json > > m_tpg_configs
std::unique_ptr< tpglibs::TPGenerator > m_tp_generator
std::unordered_map< unsigned int, std::shared_ptr< iomanager::SenderConcept< std::vector< trigger::TriggerPrimitiveTypeAdapter > > > > m_plane_to_tp_sink_map
Base class for any user define issue.
Definition Issue.hpp:69
#define TLOG_DEBUG(lvl,...)
Definition Logging.hpp:112
static std::shared_ptr< iomanager::SenderConcept< Datatype > > get_iom_sender(iomanager::ConnectionId const &id)
void error(const Issue &issue)
Definition ers.hpp:81

◆ configure_postprocessing()

template<class ReadoutTypeAdapter >
void dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::configure_postprocessing ( const appmodel::DataHandlerModule * conf)
protected

Definition at line 210 of file TPCEthFrameProcessor.hxx.

211{
212 const appmodel::DataProcessor* dp = conf->get_module_configuration()->get_data_processor();
213 if (dp == nullptr) {
214 return;
215 }
216
217 const appmodel::TPCRawDataProcessor* proc_conf = dp->cast<appmodel::TPCRawDataProcessor>();
218 if (proc_conf == nullptr) {
219 return;
220 }
221
222 // Need TPCRawDataProcessor configurations to configure the following.
224 configure_find_tps(conf, proc_conf);
225}
void configure_channel_plane_numbers(const appmodel::TPCRawDataProcessor *proc_conf)
void configure_find_tps(const appmodel::DataHandlerModule *conf, const appmodel::TPCRawDataProcessor *proc_conf)

◆ configure_preprocessing()

template<class ReadoutTypeAdapter >
void dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::configure_preprocessing ( const appmodel::DataHandlerModule * conf)
protected

◆ configure_source_and_geo_ids()

template<class ReadoutTypeAdapter >
void dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::configure_source_and_geo_ids ( const appmodel::DataHandlerModule * conf)
protected

Definition at line 69 of file TPCEthFrameProcessor.hxx.

70{
71 m_sourceid.id = conf->get_source_id();
72 m_sourceid.subsystem = ReadoutTypeAdapter::subsystem;
73 auto geo_id = conf->get_geo_id();
74 if (geo_id != nullptr) {
75 m_det_id = geo_id->get_detector_id();
76 m_crate_id = geo_id->get_crate_id();
77 m_slot_id = geo_id->get_slot_id();
78 m_stream_id = geo_id->get_stream_id();
79 }
80}
Subsystem subsystem
The general subsystem of the source of the data.
Definition SourceID.hpp:69
ID_t id
Unique identifier of the source of the data.
Definition SourceID.hpp:74

◆ find_tps()

template<class ReadoutTypeAdapter >
void dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::find_tps ( constframeptr fp)
protected

Pipeline Stage 2.: Do software TPG

Definition at line 649 of file TPCEthFrameProcessor.hxx.

650{
651 if (!fp)
652 return;
653 auto wfptr = reinterpret_cast<tpcframeptr>((uint8_t*)fp); // NOLINT
654
655 std::vector<trgdataformats::TriggerPrimitive> tps = (*m_tp_generator)(wfptr);
656
657 uint64_t current_frame_count = m_frame_counter.fetch_add(1, std::memory_order_relaxed) + 1;
658
659 // Trigger asynchronous metric collection in background thread
661 current_frame_count % m_metric_collect_opmon_period == 0) {
662 m_state_harvester->trigger_harvest();
663 }
664
665 for (const auto& tp : tps) {
666 // If this TP is on a masked channel, skip it.
667 if (std::binary_search(m_channel_mask_set.begin(), m_channel_mask_set.end(), uint32_t(tp.channel)))
668 continue;
669 // Need to move into a type adapter.
670 trigger::TriggerPrimitiveTypeAdapter tpa;
671 tpa.tp = tp;
672
673 tpa.tp.detid = m_det_id; // Last missing piece.
674 m_plane_to_tpa_vector_map[m_channel_plane_map[uint32_t(tp.channel)]].push_back(tpa);
675 m_tp_channel_rate_map[uint32_t(tp.channel)]++;
677 }
678
679 const bool frame_limit_reached = m_frame_limit_enabled && (current_frame_count - m_frame_count_at_last_send >= m_frame_count_limit);
680 const bool tp_limit_reached = m_tp_limit_enabled && (m_current_tp_count >= m_tp_count_limit);
681
682 if (frame_limit_reached || tp_limit_reached) [[unlikely]] {
684 m_frame_count_at_last_send = current_frame_count;
685 for (auto& [plane_num, tpa_vector] : m_plane_to_tpa_vector_map) {
686 int num_new_tps = tpa_vector.size();
687 if (num_new_tps == 0) {
688 continue;
689 }
690 const auto ts_begin = tpa_vector.front().tp.time_start;
691 const auto channel_begin = tpa_vector.front().tp.channel;
692 const auto ts_end = tpa_vector.back().tp.time_start;
693 const auto channel_end = tpa_vector.back().tp.channel;
694 if (!m_plane_to_tp_sink_map[plane_num]->try_send(std::move(tpa_vector), iomanager::Sender::s_no_block)) {
695 ers::warning(FailedToSendTPVector(ERS_HERE, ts_begin, channel_begin, ts_end, channel_end));
697 } else {
698 m_num_new_tps += num_new_tps;
699 }
700 }
701 }
702 return;
703}
std::unordered_map< unsigned int, std::vector< trigger::TriggerPrimitiveTypeAdapter > > m_plane_to_tpa_vector_map
std::map< uint, std::atomic< int > > m_tp_channel_rate_map
static constexpr timeout_t s_no_block
Definition Sender.hpp:26
Both frame_count_limit and tp_count_limit were set FailedToSendTPVector
void warning(const Issue &issue)
Definition ers.hpp:115

◆ generate_opmon_data()

template<class ReadoutTypeAdapter >
void dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::generate_opmon_data ( )
overrideprotectedvirtual

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

Reimplemented from dunedaq::datahandlinglibs::TaskRawDataProcessorModel< ReadoutTypeAdapter >.

Definition at line 337 of file TPCEthFrameProcessor.hxx.

338{
339 datahandlinglibs::opmon::FixedRateDataProcessorInfo info;
340
341 info.set_num_seq_id_errors(m_seq_id_error_ctr.load());
342 info.set_min_seq_id_jump(m_seq_id_min_jump.exchange(0));
343 info.set_max_seq_id_jump(m_seq_id_max_jump.exchange(0));
344
345 info.set_num_ts_errors(m_ts_error_ctr.load());
346
347 this->publish(std::move(info));
348
349 this->m_error_registry->log_registered_errors();
350
351 if (this->m_post_processing_enabled) {
352 auto now = std::chrono::high_resolution_clock::now();
353 int num_new_tps = m_num_new_tps.exchange(0);
354 int num_new_tps_suppressed_too_long = m_tps_suppressed_too_long.exchange(0);
355 int num_new_tps_send_failed = m_tps_send_failed.exchange(0);
356 double seconds = std::chrono::duration_cast<std::chrono::microseconds>(now - m_t0).count() / 1000000.;
357 TLOG_DEBUG(TLVL_BOOKKEEPING) << "TP rate: " << std::to_string(num_new_tps / seconds / 1000.) << " [kHz]";
358 TLOG_DEBUG(TLVL_BOOKKEEPING) << "Total new TPs: " << num_new_tps;
359
360 datahandlinglibs::opmon::HitFindingInfo tp_info;
361 tp_info.set_rate_tp_hits(num_new_tps / seconds / 1000.);
362
363 tp_info.set_num_tps_sent(num_new_tps);
364 tp_info.set_num_tps_suppressed_too_long(num_new_tps_suppressed_too_long);
365 tp_info.set_num_tps_send_failed(num_new_tps_send_failed);
366
367 this->publish(std::move(tp_info));
368 // Find the channels with the top TP rates
369 // Create a vector of pairs to store the map elements
370 std::vector<std::pair<uint, int>> channel_tp_rate_vec(m_tp_channel_rate_map.begin(), m_tp_channel_rate_map.end());
371 // Sort the vector in descending order of the value of the pairs
372 sort(channel_tp_rate_vec.begin(), channel_tp_rate_vec.end(), [](std::pair<uint, int>& a, std::pair<uint, int>& b) { return a.second > b.second; });
373 // Add the metrics to opmon
374 // For convenience we are selecting only the top 10 elements
375 if (channel_tp_rate_vec.size() != 0) {
376 int top_highest_values = 10;
377 if (channel_tp_rate_vec.size() < 10) {
378 top_highest_values = channel_tp_rate_vec.size();
379 }
380 //datahandlinglibs::opmon::TPChannelsInfo channels_info;
381 for (int i = 0; i < top_highest_values; i++) {
382 datahandlinglibs::opmon::TPChannelInfo tpc_info;
383 tpc_info.set_number_of_tps(channel_tp_rate_vec[i].second);
384 tpc_info.set_channel_id(channel_tp_rate_vec[i].first);
385 this->publish(std::move(tpc_info), {{"channel", std::to_string(channel_tp_rate_vec[i].first)}});
386 }
387 }
388
389 // Reset the counter in the channel rate map
390 for (auto& el : m_tp_channel_rate_map) {
391 el.second = 0;
392 }
393 m_t0 = now;
394
398 }
399 }
400
402 }
std::chrono::time_point< std::chrono::high_resolution_clock > m_t0
void publish(google::protobuf::Message &&, CustomOrigin &&co={}, OpMonLevel l=to_level(EntryOpMonLevel::kDefault)) const noexcept
static int64_t now()

◆ publish_processor_metric_to_opmon()

template<class ReadoutTypeAdapter >
void dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::publish_processor_metric_to_opmon ( )
protected

Publishes collected processor metrics to opmon, currently called in generate_opmon_data()

Definition at line 406 of file TPCEthFrameProcessor.hxx.

406 {
407 if (!m_state_harvester) {
408 return;
409 }
410
411 // Get latest results from background collection thread
412 auto metrics = m_state_harvester->get_latest_results();
413
414 TLOG_DEBUG(TLVL_BOOKKEEPING) << "Publishing processor metrics for " << metrics.size() << " channels";
415
416 int metrics_published = 0;
417
418 // Publish per-channel metrics
419 for (const auto& [channel, vec] : metrics) {
420 datahandlinglibs::opmon::TPGProcessorInfo tpg_proc_info;
421 bool has_valid_metrics = false;
422
423 for (const auto& [name, val] : vec) {
424 if (name == "pedestal") {
425 tpg_proc_info.set_pedestal(val);
426 has_valid_metrics = true;
427 } else if (name == "accum") {
428 tpg_proc_info.set_accum(val);
429 has_valid_metrics = true;
430 }
431 }
432
433 if (has_valid_metrics) {
434 this->publish(std::move(tpg_proc_info), {{"channel", std::to_string(channel)}});
435 metrics_published++;
436 }
437 }
438
439 TLOG_DEBUG(TLVL_BOOKKEEPING) << "Published " << metrics_published << " channel metrics";
440}

◆ publish_processor_metric_to_opmon_with_aggregation()

template<class ReadoutTypeAdapter >
void dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::publish_processor_metric_to_opmon_with_aggregation ( )
protected

Publishes collected processor metrics to opmon, with aggregation of metrics to summary statistics across physical planes

Definition at line 509 of file TPCEthFrameProcessor.hxx.

509 {
510 if (!m_state_harvester) {
511 return;
512 }
513
514 // Get latest results from background collection thread
515 auto metrics = m_state_harvester->get_latest_results();
516
517 // Use optimized single-pass calculation for all metrics across all planes
518 auto all_stats = calculate_all_metric_summaries_across_planes(metrics);
519
520 TLOG_DEBUG(TLVL_BOOKKEEPING) << "Publishing aggregated metrics for " << all_stats.size() << " planes";
521
522 // Publish all calculated statistics
523 for (const auto& [plane, metric_map] : all_stats) {
524 for (const auto& [metric_name, stats] : metric_map) {
525 const auto& [mean, min, max, stddev, min_channel_id, max_channel_id] = stats;
526
527 datahandlinglibs::opmon::TPGProcessorReducedInfo info;
528 info.set_average(mean);
529 info.set_max(max);
530 info.set_min(min);
531 info.set_standard_dev(stddev);
532 info.set_max_channel_id(max_channel_id);
533 info.set_min_channel_id(min_channel_id);
534 this->publish(std::move(info), {{"plane", std::to_string(plane)}, {"metric", metric_name}});
535 }
536 }
537}
std::map< int16_t, std::map< std::string, std::tuple< float, int16_t, int16_t, float, dunedaq::trgdataformats::channel_t, dunedaq::trgdataformats::channel_t > > > calculate_all_metric_summaries_across_planes(const std::unordered_map< dunedaq::trgdataformats::channel_t, std::vector< std::pair< std::string, int16_t > > > &metrics)

◆ scrap()

template<class ReadoutTypeAdapter >
void dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::scrap ( const appfwk::DAQModule::CommandData_t & )
overridevirtual

◆ scrap_channel_plane_numbers()

template<class ReadoutTypeAdapter >
void dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::scrap_channel_plane_numbers ( )
protected

◆ scrap_find_tps()

template<class ReadoutTypeAdapter >
void dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::scrap_find_tps ( )
protected

◆ scrap_postprocessing()

template<class ReadoutTypeAdapter >
void dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::scrap_postprocessing ( )
protected

Definition at line 289 of file TPCEthFrameProcessor.hxx.

290{
291 // Channel-plane variables
292 m_channel_mask_set.clear();
293 m_plane_numbers_set.clear();
295 m_channel_plane_map.clear();
296
297 // TP variables
298 m_tp_generator->reset();
299 m_tpg_configs.clear();
302
303 m_frame_limit_enabled = false;
304 m_tp_limit_enabled = false;
308
309 // OpMon variables
312 m_tp_channel_rate_map.clear();
313 m_num_new_tps.exchange(0);
314 m_tps_suppressed_too_long.exchange(0);
315 m_tps_send_failed.exchange(0);
316 m_frame_counter.exchange(0);
317 m_t0 = std::chrono::high_resolution_clock::now();
318}

◆ scrap_preprocessing()

template<class ReadoutTypeAdapter >
void dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::scrap_preprocessing ( )
protected

Definition at line 256 of file TPCEthFrameProcessor.hxx.

257{
258 m_emulator_mode = false;
259 m_first_frame = true;
260
261 // Timestamps.
262 m_previous_ts = 0;
263 m_current_ts = 0;
264
267
269 m_ts_problem_reported = false;
270 m_ts_error_state = false;
271 m_ts_error_ctr = 0;
272
273 // Sequence ID.
276
279 m_seq_id_error_state = false;
283
284 // The preprocessing tasks scrap is handled by inherited::scrap().
285}
dunedaq::daqdataformats::timestamp_t m_previous_ts
dunedaq::daqdataformats::timestamp_t m_pattern_generator_current_ts
dunedaq::daqdataformats::timestamp_t m_pattern_generator_previous_ts
dunedaq::daqdataformats::timestamp_t m_current_ts

◆ scrap_source_and_geo_ids()

template<class ReadoutTypeAdapter >
void dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::scrap_source_and_geo_ids ( )
protected

Definition at line 244 of file TPCEthFrameProcessor.hxx.

245{
246 m_sourceid = daqdataformats::SourceID();
247
248 m_det_id = 0;
249 m_crate_id = 0;
250 m_slot_id = 0;
251 m_stream_id = 0;
252}

◆ sequence_check()

template<class ReadoutTypeAdapter >
void dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::sequence_check ( frameptr fp)
protected

Pipeline Stage 1.: Check proper sequence id increments in DAQ Eth header

Pipeline Stage 1.: Check proper timestamp increments in TPC frame

Definition at line 545 of file TPCEthFrameProcessor.hxx.

546{
547 // Acquire timestamp
548 auto wfptr = reinterpret_cast<tpcframeptr>(fp); // NOLINT
549 m_current_seq_id = wfptr->daq_header.seq_id;
550
551 // Check that the system is properly configured from the first frame.
552 if (m_first_frame) [[unlikely]] {
553 if (wfptr->daq_header.crate_id != m_crate_id || wfptr->daq_header.slot_id != m_slot_id || wfptr->daq_header.stream_id != m_stream_id) {
554 ers::error(LinkMisconfiguration(ERS_HERE, wfptr->daq_header.crate_id, wfptr->daq_header.slot_id, wfptr->daq_header.stream_id, m_crate_id, m_slot_id, m_stream_id));
555 }
556
557 m_first_frame = false;
558 }
559
560 // Check sequence id
561 // Calculate the next sequence id (12 bits)
562 uint16_t expected_seq_id = (m_previous_seq_id + fp->get_num_frames()) & 0xfff;
563 int16_t delta_seq_id = m_current_seq_id-expected_seq_id;
564 if ( delta_seq_id > 0x800) {
565 delta_seq_id -= 0x1000;
566 } else if ( delta_seq_id < -0x7ff) {
567 delta_seq_id += 0x1000;
568 }
569
570 if (delta_seq_id == 0) {
571 m_seq_id_error_state = false;
572 } else {
573 // uint16_t delta_seq_id = (m_current_seq_id-expected_seq_id);
575 m_seq_id_max_jump = std::max(delta_seq_id, m_seq_id_max_jump.load());
576 m_seq_id_min_jump = std::min(delta_seq_id, m_seq_id_min_jump.load());
577
578 if (m_first_seq_id_mismatch) { // log once
579 TLOG_DEBUG(TLVL_BOOKKEEPING) << "First sequence id MISMATCH! -> | previous: " << std::to_string(m_previous_seq_id) << " current: " + std::to_string(m_current_seq_id);
581 } else {
583 this->m_error_registry->add_error("Sequence ID jump", datahandlinglibs::FrameErrorRegistry::ErrorInterval(expected_seq_id, m_current_seq_id));
585 }
586 }
587 }
588
589 if (m_seq_id_error_ctr > 1000) {
591 TLOG() << "*** Data Integrity ERROR *** Sequence ID continuity is completely broken! "
592 << "Something is wrong with the FE source or with the configuration!";
594 }
595 }
596
598
599}
#define TLOG(...)
Definition macro.hpp:22

◆ start()

template<class ReadoutTypeAdapter >
void dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::start ( const appfwk::DAQModule::CommandData_t & )
overridevirtual

Start operation.

Reimplemented from dunedaq::datahandlinglibs::TaskRawDataProcessorModel< ReadoutTypeAdapter >.

Definition at line 18 of file TPCEthFrameProcessor.hxx.

19{
20 // Reset software TPG resources
21 if (this->m_post_processing_enabled) {
24 }
25
26 // Reset timestamp check
27 m_previous_ts = 0;
28 m_current_ts = 0;
31 m_ts_error_state = false;
33
38
39
40 // Reset stats
41 m_t0 = std::chrono::high_resolution_clock::now();
42 m_num_new_tps.exchange(0);
43
44
45 // Start the state harvester collection thread if enabled
47 m_state_harvester->start_collection_thread();
48 }
49 inherited::start(args);
50}

◆ stop()

template<class ReadoutTypeAdapter >
void dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::stop ( const appfwk::DAQModule::CommandData_t & )
overridevirtual

Stop operation.

Reimplemented from dunedaq::datahandlinglibs::TaskRawDataProcessorModel< ReadoutTypeAdapter >.

Definition at line 54 of file TPCEthFrameProcessor.hxx.

55{
56 inherited::stop(args);
57 if (this->m_post_processing_enabled) {
58 // Stop the state harvester collection thread if it exists
60 m_state_harvester->stop_collection_thread();
61 }
62 // Clears the pipelines and resets with the given configs.
63 m_tp_generator->configure(m_tpg_configs, m_channel_plane_numbers, ReadoutTypeAdapter::samples_tick_difference);
64 }
65}

◆ timestamp_check()

template<class ReadoutTypeAdapter >
void dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::timestamp_check ( frameptr fp)
protected

Pipeline Stage 1.: Check proper timestamp increments in DAQ Eth header

Pipeline Stage 1.: Check proper timestamp increments in TPC frame

Definition at line 606 of file TPCEthFrameProcessor.hxx.

607{
608
609 uint16_t tpceth_tick_difference = ReadoutTypeAdapter::expected_tick_difference;
610 uint16_t tpceth_frame_tick_difference = tpceth_tick_difference * fp->get_num_frames();
611
612 auto wfptr = reinterpret_cast<tpcframeptr>(fp); // NOLINT
613 m_current_ts = wfptr->get_timestamp();
614
615 // Check timestamp
616 if (m_previous_ts > 0 &&
617 m_current_ts - m_previous_ts != tpceth_frame_tick_difference) [[unlikely]] {
619 if (m_first_ts_missmatch) { // log once
620 TLOG_DEBUG(TLVL_BOOKKEEPING) << "First timestamp MISMATCH! -> | previous: " << std::to_string(m_previous_ts) << " current: " + std::to_string(m_current_ts);
621 m_first_ts_missmatch = false;
622 } else {
623 if (!m_ts_error_state) {
624 this->m_error_registry->add_error("Timestamp jump", datahandlinglibs::FrameErrorRegistry::ErrorInterval(m_previous_ts + tpceth_frame_tick_difference, m_current_ts));
625 m_ts_error_state = true;
626 }
627 }
628 } else {
629 m_ts_error_state = false;
630 }
631
632 if (m_ts_error_ctr > 1000) {
634 TLOG() << "*** Data Integrity ERROR *** Timestamp continuity is completely broken! "
635 << "Something is wrong with the FE source or with the configuration!";
637 }
638 }
639
642}

Member Data Documentation

◆ m_channel_mask_set

template<class ReadoutTypeAdapter >
std::set<unsigned int> dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_channel_mask_set
protected

Definition at line 177 of file TPCEthFrameProcessor.hpp.

◆ m_channel_plane_map

template<class ReadoutTypeAdapter >
std::unordered_map<trgdataformats::channel_t, unsigned int> dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_channel_plane_map
protected

Definition at line 180 of file TPCEthFrameProcessor.hpp.

◆ m_channel_plane_numbers

template<class ReadoutTypeAdapter >
std::vector<std::pair<trgdataformats::channel_t, int16_t> > dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_channel_plane_numbers
protected

Definition at line 179 of file TPCEthFrameProcessor.hpp.

◆ m_crate_id

template<class ReadoutTypeAdapter >
uint32_t dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_crate_id
protected

Definition at line 198 of file TPCEthFrameProcessor.hpp.

◆ m_current_seq_id

template<class ReadoutTypeAdapter >
uint16_t dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_current_seq_id = 0
protected

Definition at line 151 of file TPCEthFrameProcessor.hpp.

◆ m_current_tp_count

template<class ReadoutTypeAdapter >
uint32_t dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_current_tp_count = 0
protected

Definition at line 170 of file TPCEthFrameProcessor.hpp.

◆ m_current_ts

template<class ReadoutTypeAdapter >
dunedaq::daqdataformats::timestamp_t dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_current_ts = 0
protected

Definition at line 139 of file TPCEthFrameProcessor.hpp.

◆ m_det_id

template<class ReadoutTypeAdapter >
uint32_t dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_det_id
protected

Definition at line 197 of file TPCEthFrameProcessor.hpp.

◆ m_emulator_mode

template<class ReadoutTypeAdapter >
bool dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_emulator_mode = false
protected

Definition at line 134 of file TPCEthFrameProcessor.hpp.

◆ m_first_frame

template<class ReadoutTypeAdapter >
bool dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_first_frame = true
protected

Definition at line 135 of file TPCEthFrameProcessor.hpp.

◆ m_first_seq_id_mismatch

template<class ReadoutTypeAdapter >
bool dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_first_seq_id_mismatch = true
protected

Definition at line 153 of file TPCEthFrameProcessor.hpp.

◆ m_first_ts_missmatch

template<class ReadoutTypeAdapter >
bool dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_first_ts_missmatch = true
protected

Definition at line 144 of file TPCEthFrameProcessor.hpp.

◆ m_frame_count_at_last_send

template<class ReadoutTypeAdapter >
uint32_t dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_frame_count_at_last_send = 0
protected

Definition at line 171 of file TPCEthFrameProcessor.hpp.

◆ m_frame_count_limit

template<class ReadoutTypeAdapter >
uint32_t dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_frame_count_limit = 0
protected

Definition at line 169 of file TPCEthFrameProcessor.hpp.

◆ m_frame_counter

template<class ReadoutTypeAdapter >
std::atomic<uint64_t> dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_frame_counter { 0 }
protected

Definition at line 194 of file TPCEthFrameProcessor.hpp.

194{ 0 };

◆ m_frame_limit_enabled

template<class ReadoutTypeAdapter >
bool dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_frame_limit_enabled = false
protected

Definition at line 174 of file TPCEthFrameProcessor.hpp.

◆ m_metric_collect_opmon_period

template<class ReadoutTypeAdapter >
uint32_t dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_metric_collect_opmon_period { 128 }
protected

Definition at line 184 of file TPCEthFrameProcessor.hpp.

184{ 128 };

◆ m_num_new_tps

template<class ReadoutTypeAdapter >
std::atomic<uint64_t> dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_num_new_tps { 0 }
protected

Definition at line 188 of file TPCEthFrameProcessor.hpp.

188{ 0 }; // NOLINT(build/unsigned)

◆ m_pattern_generator_current_ts

template<class ReadoutTypeAdapter >
dunedaq::daqdataformats::timestamp_t dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_pattern_generator_current_ts = 0
protected

Definition at line 142 of file TPCEthFrameProcessor.hpp.

◆ m_pattern_generator_previous_ts

template<class ReadoutTypeAdapter >
dunedaq::daqdataformats::timestamp_t dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_pattern_generator_previous_ts = 0
protected

Definition at line 141 of file TPCEthFrameProcessor.hpp.

◆ m_plane_numbers_set

template<class ReadoutTypeAdapter >
std::set<unsigned int> dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_plane_numbers_set
protected

Definition at line 178 of file TPCEthFrameProcessor.hpp.

◆ m_plane_to_tp_sink_map

template<class ReadoutTypeAdapter >
std::unordered_map<unsigned int, std::shared_ptr<iomanager::SenderConcept<std::vector<trigger::TriggerPrimitiveTypeAdapter> > > > dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_plane_to_tp_sink_map
protected

Definition at line 166 of file TPCEthFrameProcessor.hpp.

◆ m_plane_to_tpa_vector_map

template<class ReadoutTypeAdapter >
std::unordered_map<unsigned int, std::vector<trigger::TriggerPrimitiveTypeAdapter> > dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_plane_to_tpa_vector_map
protected

Definition at line 165 of file TPCEthFrameProcessor.hpp.

◆ m_previous_seq_id

template<class ReadoutTypeAdapter >
uint16_t dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_previous_seq_id = 0
protected

Definition at line 150 of file TPCEthFrameProcessor.hpp.

◆ m_previous_ts

template<class ReadoutTypeAdapter >
dunedaq::daqdataformats::timestamp_t dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_previous_ts = 0
protected

Definition at line 138 of file TPCEthFrameProcessor.hpp.

◆ m_seq_id_error_ctr

template<class ReadoutTypeAdapter >
std::atomic<uint64_t> dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_seq_id_error_ctr { 0 }
protected

Definition at line 156 of file TPCEthFrameProcessor.hpp.

156{ 0 };

◆ m_seq_id_error_state

template<class ReadoutTypeAdapter >
bool dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_seq_id_error_state = false
protected

Definition at line 155 of file TPCEthFrameProcessor.hpp.

◆ m_seq_id_max_jump

template<class ReadoutTypeAdapter >
std::atomic<int16_t> dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_seq_id_max_jump { 0 }
protected

Definition at line 158 of file TPCEthFrameProcessor.hpp.

158{ 0 };

◆ m_seq_id_min_jump

template<class ReadoutTypeAdapter >
std::atomic<int16_t> dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_seq_id_min_jump { 0 }
protected

Definition at line 157 of file TPCEthFrameProcessor.hpp.

157{ 0 };

◆ m_seq_id_problem_reported

template<class ReadoutTypeAdapter >
bool dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_seq_id_problem_reported = false
protected

Definition at line 154 of file TPCEthFrameProcessor.hpp.

◆ m_slot_id

template<class ReadoutTypeAdapter >
uint32_t dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_slot_id
protected

Definition at line 199 of file TPCEthFrameProcessor.hpp.

◆ m_sourceid

template<class ReadoutTypeAdapter >
daqdataformats::SourceID dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_sourceid
protected

Definition at line 202 of file TPCEthFrameProcessor.hpp.

◆ m_state_harvester

template<class ReadoutTypeAdapter >
std::unique_ptr<fdreadoutlibs::TPGInternalStateHarvester> dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_state_harvester
protected

Definition at line 162 of file TPCEthFrameProcessor.hpp.

◆ m_stream_id

template<class ReadoutTypeAdapter >
uint32_t dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_stream_id
protected

Definition at line 200 of file TPCEthFrameProcessor.hpp.

◆ m_t0

template<class ReadoutTypeAdapter >
std::chrono::time_point<std::chrono::high_resolution_clock> dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_t0
protected

Definition at line 192 of file TPCEthFrameProcessor.hpp.

◆ m_tp_channel_rate_map

template<class ReadoutTypeAdapter >
std::map<uint, std::atomic<int> > dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_tp_channel_rate_map
protected

Definition at line 186 of file TPCEthFrameProcessor.hpp.

◆ m_tp_count_limit

template<class ReadoutTypeAdapter >
uint32_t dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_tp_count_limit = 0
protected

Definition at line 168 of file TPCEthFrameProcessor.hpp.

◆ m_tp_generator

template<class ReadoutTypeAdapter >
std::unique_ptr<tpglibs::TPGenerator> dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_tp_generator
protected

Definition at line 161 of file TPCEthFrameProcessor.hpp.

◆ m_tp_limit_enabled

template<class ReadoutTypeAdapter >
bool dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_tp_limit_enabled = false
protected

Definition at line 173 of file TPCEthFrameProcessor.hpp.

◆ m_tpg_configs

template<class ReadoutTypeAdapter >
std::vector<std::pair<std::string, nlohmann::json> > dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_tpg_configs
protected

Definition at line 163 of file TPCEthFrameProcessor.hpp.

◆ m_tpg_metric_collect_enabled

template<class ReadoutTypeAdapter >
bool dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_tpg_metric_collect_enabled {false}
protected

Definition at line 183 of file TPCEthFrameProcessor.hpp.

183{false};

◆ m_tps_send_failed

template<class ReadoutTypeAdapter >
std::atomic<uint64_t> dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_tps_send_failed { 0 }
protected

Definition at line 190 of file TPCEthFrameProcessor.hpp.

190{ 0 };

◆ m_tps_suppressed_too_long

template<class ReadoutTypeAdapter >
std::atomic<uint64_t> dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_tps_suppressed_too_long { 0 }
protected

Definition at line 189 of file TPCEthFrameProcessor.hpp.

189{ 0 };

◆ m_ts_error_ctr

template<class ReadoutTypeAdapter >
std::atomic<uint64_t> dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_ts_error_ctr { 0 }
protected

Definition at line 147 of file TPCEthFrameProcessor.hpp.

147{ 0 };

◆ m_ts_error_state

template<class ReadoutTypeAdapter >
bool dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_ts_error_state = false
protected

Definition at line 146 of file TPCEthFrameProcessor.hpp.

◆ m_ts_problem_reported

template<class ReadoutTypeAdapter >
bool dunedaq::fdreadoutlibs::TPCEthFrameProcessor< ReadoutTypeAdapter >::m_ts_problem_reported = false
protected

Definition at line 145 of file TPCEthFrameProcessor.hpp.


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