DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
#include <WIBEthFrameProcessor.hpp>
Public Types | |
using | inherited = datahandlinglibs::TaskRawDataProcessorModel<types::DUNEWIBEthTypeAdapter> |
using | frameptr = types::DUNEWIBEthTypeAdapter* |
using | constframeptr = const types::DUNEWIBEthTypeAdapter* |
using | wibframeptr = dunedaq::fddetdataformats::WIBEthFrame* |
![]() | |
using | NodePtr = std::weak_ptr<MonitorableObject> |
using | NewNodePtr = std::shared_ptr<MonitorableObject> |
using | ElementId = std::string |
Public Member Functions | |
WIBEthFrameProcessor (std::unique_ptr< datahandlinglibs::FrameErrorRegistry > &error_registry, bool processing_enabled) | |
void | start (const nlohmann::json &args) override |
Start operation. | |
void | stop (const nlohmann::json &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. | |
![]() | |
TaskRawDataProcessorModel (std::unique_ptr< FrameErrorRegistry > &error_registry, bool post_processing_enabled) | |
~TaskRawDataProcessorModel () | |
void | scrap (const nlohmann::json &) override |
Unconfigure. | |
void | reset_last_daq_time () |
std::uint64_t | get_last_daq_time () override |
Get newest timestamp of last seen packet. | |
void | preprocess_item (types::DUNEWIBEthTypeAdapter *item) override |
Preprocess one element. | |
void | postprocess_item (const types::DUNEWIBEthTypeAdapter *item) override |
Postprocess one element. | |
void | add_preprocess_task (Task &&task) |
void | add_postprocess_task (Task &&task) |
void | invoke_all_preprocess_functions (types::DUNEWIBEthTypeAdapter *item) |
void | launch_all_preprocess_functions (types::DUNEWIBEthTypeAdapter *item) |
![]() | |
RawDataProcessorConcept () | |
RawDataProcessorConcept (const RawDataProcessorConcept &)=delete | |
RawDataProcessorConcept is not copy-constructible. | |
RawDataProcessorConcept (RawDataProcessorConcept &&)=delete | |
RawDataProcessorConcept is not move-constructible. | |
virtual | ~RawDataProcessorConcept () |
RawDataProcessorConcept & | operator= (const RawDataProcessorConcept &)=delete |
RawDataProcessorConcept is not copy-assginable. | |
RawDataProcessorConcept & | operator= (RawDataProcessorConcept &&)=delete |
RawDataProcessorConcept is not move-assignable. | |
![]() | |
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 |
Protected Member Functions | |
virtual void | generate_opmon_data () override |
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 | use_pattern_generator (frameptr fp) |
void | sequence_check (frameptr fp) |
void | timestamp_check (frameptr fp) |
void | find_hits (constframeptr fp) |
![]() | |
void | run_post_processing_thread (std::function< void(const types::DUNEWIBEthTypeAdapter *)> &function, folly::ProducerConsumerQueue< const types::DUNEWIBEthTypeAdapter * > &queue) |
![]() | |
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 | |
dunedaq::daqdataformats::timestamp_t | m_previous_ts = 0 |
dunedaq::daqdataformats::timestamp_t | m_current_ts = 0 |
uint16_t | m_previous_seq_id = 0 |
uint16_t | m_current_seq_id = 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 } |
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::vector< std::function< void(types::DUNEWIBEthTypeAdapter *)> > | m_preprocess_functions |
std::unique_ptr< FrameErrorRegistry > & | m_error_registry |
bool | m_post_processing_enabled |
std::atomic< bool > | m_run_marker |
std::vector< std::function< void(const types::DUNEWIBEthTypeAdapter *)> > | m_post_process_functions |
std::vector< std::unique_ptr< folly::ProducerConsumerQueue< const types::DUNEWIBEthTypeAdapter * > > > | 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 |
Private Attributes | |
bool | m_first_hit = true |
bool | m_tpg_metric_collect_enabled {false} |
uint32_t | m_metric_collect_opmon_period { 128 } |
std::unique_ptr< tpglibs::TPGenerator > | m_tp_generator |
std::vector< std::pair< std::string, nlohmann::json > > | m_tpg_configs |
uint32_t | m_tp_max_width |
std::set< unsigned int > | m_channel_mask_set |
uint16_t | m_tpg_threshold_selected |
std::map< uint, std::atomic< int > > | m_tp_channel_rate_map |
size_t | m_num_msg = 0 |
size_t | m_num_push_fail = 0 |
std::atomic< int > | m_tpg_hits_count { 0 } |
uint32_t | m_det_id |
uint32_t | m_crate_id |
uint32_t | m_slot_id |
uint32_t | m_stream_id |
bool | m_emulator_mode = false |
std::shared_ptr< detchannelmaps::TPCChannelMap > | m_channel_map |
std::vector< std::pair< trgdataformats::channel_t, int16_t > > | m_channel_plane_numbers |
std::vector< trigger::TriggerPrimitiveTypeAdapter > | m_tpa_vectors [3] |
std::shared_ptr< iomanager::SenderConcept< std::vector< trigger::TriggerPrimitiveTypeAdapter > > > | m_tp_sink [3] |
std::shared_ptr< iomanager::SenderConcept< fddetdataformats::WIBEthFrame > > | m_err_frame_sink |
daqdataformats::SourceID | m_sourceid |
std::atomic< uint64_t > | m_new_hits { 0 } |
std::atomic< uint64_t > | m_new_tps { 0 } |
std::atomic< uint64_t > | m_tps_suppressed_too_long { 0 } |
std::atomic< uint64_t > | m_tps_send_failed { 0 } |
std::atomic< uint64_t > | m_frame_counter { 0 } |
std::chrono::time_point< std::chrono::high_resolution_clock > | m_t0 |
Additional Inherited Members | |
![]() | |
static bool | publishable_metric (OpMonLevel entry, OpMonLevel system) noexcept |
Definition at line 52 of file WIBEthFrameProcessor.hpp.
using dunedaq::fdreadoutlibs::WIBEthFrameProcessor::constframeptr = const types::DUNEWIBEthTypeAdapter* |
Definition at line 58 of file WIBEthFrameProcessor.hpp.
Definition at line 57 of file WIBEthFrameProcessor.hpp.
using dunedaq::fdreadoutlibs::WIBEthFrameProcessor::inherited = datahandlinglibs::TaskRawDataProcessorModel<types::DUNEWIBEthTypeAdapter> |
Definition at line 56 of file WIBEthFrameProcessor.hpp.
using dunedaq::fdreadoutlibs::WIBEthFrameProcessor::wibframeptr = dunedaq::fddetdataformats::WIBEthFrame* |
Definition at line 59 of file WIBEthFrameProcessor.hpp.
|
explicit |
Definition at line 32 of file WIBEthFrameProcessor.cpp.
|
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 249 of file WIBEthFrameProcessor.cpp.
|
overridevirtual |
Set the emulator mode, if active, timestamps of processed packets are overwritten with new ones.
Reimplemented from dunedaq::datahandlinglibs::TaskRawDataProcessorModel< types::DUNEWIBEthTypeAdapter >.
Definition at line 83 of file WIBEthFrameProcessor.cpp.
|
protected |
Pipeline Stage 2.: Do software TPG
Definition at line 466 of file WIBEthFrameProcessor.cpp.
|
overrideprotectedvirtual |
Hook for customisable pubblication. The function can throw, exception will be caught by the monitoring thread
Reimplemented from dunedaq::datahandlinglibs::TaskRawDataProcessorModel< types::DUNEWIBEthTypeAdapter >.
Definition at line 164 of file WIBEthFrameProcessor.cpp.
|
protected |
Publishes collected processor metrics to opmon, currently called in generate_opmon_data()
Definition at line 233 of file WIBEthFrameProcessor.cpp.
|
protected |
Publishes collected processor metrics to opmon, with aggregation of metrics to summary statistics across physical planes
Definition at line 313 of file WIBEthFrameProcessor.cpp.
|
protected |
Pipeline Stage 1.: Check proper sequence id increments in DAQ Eth header
Pipeline Stage 1.: Check proper timestamp increments in WIB frame
Definition at line 341 of file WIBEthFrameProcessor.cpp.
|
overridevirtual |
Start operation.
Reimplemented from dunedaq::datahandlinglibs::TaskRawDataProcessorModel< types::DUNEWIBEthTypeAdapter >.
Definition at line 38 of file WIBEthFrameProcessor.cpp.
|
overridevirtual |
Stop operation.
Reimplemented from dunedaq::datahandlinglibs::TaskRawDataProcessorModel< types::DUNEWIBEthTypeAdapter >.
Definition at line 69 of file WIBEthFrameProcessor.cpp.
|
protected |
Pipeline Stage 1.: Check proper timestamp increments in DAQ Eth header
Pipeline Stage 1.: Check proper timestamp increments in WIB frame
Definition at line 408 of file WIBEthFrameProcessor.cpp.
|
protected |
Pipeline Stage 0: Pattern generator for hit finding in emulated mode
|
private |
Definition at line 161 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 145 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 165 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 156 of file WIBEthFrameProcessor.hpp.
|
protected |
Definition at line 96 of file WIBEthFrameProcessor.hpp.
|
protected |
Definition at line 93 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 155 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 159 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 169 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 139 of file WIBEthFrameProcessor.hpp.
|
protected |
Definition at line 106 of file WIBEthFrameProcessor.hpp.
|
protected |
Definition at line 101 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 179 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 141 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 175 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 176 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 150 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 151 of file WIBEthFrameProcessor.hpp.
|
protected |
Definition at line 99 of file WIBEthFrameProcessor.hpp.
|
protected |
Definition at line 98 of file WIBEthFrameProcessor.hpp.
|
protected |
Definition at line 95 of file WIBEthFrameProcessor.hpp.
|
protected |
Definition at line 92 of file WIBEthFrameProcessor.hpp.
|
protected |
Definition at line 109 of file WIBEthFrameProcessor.hpp.
|
protected |
Definition at line 108 of file WIBEthFrameProcessor.hpp.
|
protected |
Definition at line 111 of file WIBEthFrameProcessor.hpp.
|
protected |
Definition at line 110 of file WIBEthFrameProcessor.hpp.
|
protected |
Definition at line 107 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 157 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 173 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 158 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 181 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 148 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 142 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 144 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 168 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 166 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 143 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 153 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 140 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 146 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 178 of file WIBEthFrameProcessor.hpp.
|
private |
Definition at line 177 of file WIBEthFrameProcessor.hpp.
|
protected |
Definition at line 104 of file WIBEthFrameProcessor.hpp.
|
protected |
Definition at line 103 of file WIBEthFrameProcessor.hpp.
|
protected |
Definition at line 102 of file WIBEthFrameProcessor.hpp.