DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
TPG driving class. More...
#include <TPGenerator.hpp>
Public Member Functions | |
void | configure (const std::vector< std::pair< std::string, nlohmann::json > > &configs, const std::vector< std::pair< dunedaq::trgdataformats::channel_t, int16_t > > channel_plane_numbers, const int sample_tick_difference) |
Setup and configure the AVX pipelines. | |
void | set_sot_minima (const std::vector< uint16_t > &sot_minima) |
Set the minimum samples over threshold for a TP according to plane. | |
void * | get_processor_metric_collector () |
Lazily initialize and return the processor metric collector. | |
std::shared_ptr< ProcessorMetricCollector< __m256i > > | get_processor_metric_collector_ptr () |
void | set_metric_collector_enable_state (bool state) |
bool | get_metric_collector_enable_state () |
void | signal_metric_collection () |
std::unordered_map< dunedaq::trgdataformats::channel_t, std::vector< std::pair< std::string, int16_t > > > | get_processor_metrics () |
void | free_metric_collector () |
template<typename T > | |
std::vector< dunedaq::trgdataformats::TriggerPrimitive > | operator() (const T *frame) |
Driving function for the TPG. | |
Private Member Functions | |
__m256i | expand_frame (const __m256i ®i) |
__m256i | old_expand_frame (const __m256i ®i) |
Expansion from 14-bit signals to 16-bit. | |
Private Attributes | |
uint8_t | m_num_pipelines = 0 |
std::vector< AVXPipeline > | m_tpg_pipelines |
int | m_sample_tick_difference |
std::vector< uint16_t > | m_sot_minima {1,1,1} |
std::shared_ptr< ProcessorMetricCollector< __m256i > > | m_processor_metric_collector_ptr {nullptr} |
bool | m_tpg_metric_collect_enabled {false} |
Static Private Attributes | |
static const uint8_t | m_num_channels_per_pipeline = 16 |
TPG driving class.
This is the interface that receives raw data frames to process and outputs the TPs accordingly.
Definition at line 31 of file TPGenerator.hpp.
void tpglibs::TPGenerator::configure | ( | const std::vector< std::pair< std::string, nlohmann::json > > & | configs, |
const std::vector< std::pair< dunedaq::trgdataformats::channel_t, int16_t > > | channel_plane_numbers, | ||
const int | sample_tick_difference ) |
Setup and configure the AVX pipelines.
configs | A vector of pairs: AVX pipeline to use and its configuration. |
channel_plane_numbers | A vector of channel numbers and their plane numbers. |
sample_tick_difference | Number of ticks between time samples in expected data frames. |
Definition at line 14 of file TPGenerator.cpp.
|
private |
Definition at line 79 of file TPGenerator.cpp.
|
inline |
Definition at line 84 of file TPGenerator.hpp.
|
inline |
Definition at line 76 of file TPGenerator.hpp.
void * tpglibs::TPGenerator::get_processor_metric_collector | ( | ) |
Lazily initialize and return the processor metric collector.
If the collector has not yet been created, allocate a new ProcessorMetricCollector<__m256i> instance and store it in m_processor_metric_collector
.
std::shared_ptr< ProcessorMetricCollector< __m256i > > tpglibs::TPGenerator::get_processor_metric_collector_ptr | ( | ) |
Definition at line 50 of file TPGenerator.cpp.
std::unordered_map< dunedaq::trgdataformats::channel_t, std::vector< std::pair< std::string, int16_t > > > tpglibs::TPGenerator::get_processor_metrics | ( | ) |
Definition at line 61 of file TPGenerator.cpp.
|
private |
Expansion from 14-bit signals to 16-bit.
Definition at line 99 of file TPGenerator.cpp.
|
inline |
Driving function for the TPG.
This function receives the frames, expands, sends down AVX pipelines, and returns TPs that were generated.
frame | A data frame to process and generate TPs from. |
Definition at line 101 of file TPGenerator.hpp.
|
inline |
Definition at line 72 of file TPGenerator.hpp.
void tpglibs::TPGenerator::set_sot_minima | ( | const std::vector< uint16_t > & | sot_minima | ) |
Set the minimum samples over threshold for a TP according to plane.
sot_minima | TPs from plane i will have at least sot_minima[i] value for its samples_over_threshold. |
Definition at line 73 of file TPGenerator.cpp.
void tpglibs::TPGenerator::signal_metric_collection | ( | ) |
Definition at line 57 of file TPGenerator.cpp.
|
staticprivate |
Definition at line 32 of file TPGenerator.hpp.
|
private |
Definition at line 33 of file TPGenerator.hpp.
|
private |
Definition at line 37 of file TPGenerator.hpp.
|
private |
Definition at line 35 of file TPGenerator.hpp.
|
private |
Definition at line 36 of file TPGenerator.hpp.
|
private |
Definition at line 38 of file TPGenerator.hpp.
|
private |
Definition at line 34 of file TPGenerator.hpp.