|
DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
#include <TPGInternalStateHarvester.hpp>
Public Types | |
| using | ProcRef = std::pair<std::shared_ptr<tpglibs::AbstractProcessor<__m256i>>, int > |
Public Member Functions | |
| ~TPGInternalStateHarvester () | |
| void | set_processor_references (std::vector< ProcRef > refs) |
| const std::vector< ProcRef > & | get_processor_references () const |
| void | update_channel_plane_numbers (const std::vector< std::pair< trgdataformats::channel_t, int16_t > > &channel_plane_numbers, uint8_t num_channels_per_pipeline, uint8_t num_pipelines) |
| Cuts a full list of (channel, plane) into per-pipeline lists of 16 lanes each. | |
| std::unordered_map< trgdataformats::channel_t, std::vector< std::pair< std::string, int16_t > > > | harvest_once () |
| Harvest once, outputs channel -> [(metric_name, value)...]. | |
| void | start_collection_thread () |
| Start the background collection thread Must be called before using async collection features. | |
| void | stop_collection_thread () |
| Stop the background collection thread Blocks until thread is fully stopped. | |
| void | trigger_harvest () |
| Signal the collection thread to perform one harvest cycle Non-blocking - returns immediately. | |
| std::unordered_map< trgdataformats::channel_t, std::vector< std::pair< std::string, int16_t > > > | get_latest_results () const |
| Get the latest collected results (thread-safe, non-blocking) Returns a copy of the most recent harvest results. | |
| bool | is_collection_thread_running () const |
| Check if collection thread is running. | |
Private Types | |
| using | ResultContainer |
Private Member Functions | |
| void | collection_thread_worker_ () |
| void | rebuild_prealloc_caches_ () |
Private Attributes | |
| std::vector< ProcRef > | m_processor_references |
| std::vector< std::vector< std::pair< trgdataformats::channel_t, int16_t > > > | m_channel_plane_numbers_per_pipeline |
| uint8_t | m_num_channels_per_pipeline |
| uint8_t | m_num_pipelines |
| std::vector< std::vector< std::string > > | m_metric_items_per_proc |
| std::vector< size_t > | m_expected_items_per_pipeline |
| size_t | m_expected_total_channels = 0 |
| std::mutex | m_results_mutex |
| ResultContainer | m_latest_results |
| std::thread | m_collection_thread |
| std::atomic< bool > | m_thread_should_stop {false} |
| std::atomic< bool > | m_thread_running {false} |
| std::atomic< bool > | m_harvest_requested {false} |
| std::mutex | m_config_mutex |
| std::mutex | m_collection_mutex |
| std::condition_variable | m_collection_cv |
Definition at line 29 of file TPGInternalStateHarvester.hpp.
| using dunedaq::fdreadoutlibs::TPGInternalStateHarvester::ProcRef = std::pair<std::shared_ptr<tpglibs::AbstractProcessor<__m256i>>, int > |
Definition at line 31 of file TPGInternalStateHarvester.hpp.
Definition at line 109 of file TPGInternalStateHarvester.hpp.
| dunedaq::fdreadoutlibs::TPGInternalStateHarvester::~TPGInternalStateHarvester | ( | ) |
Definition at line 20 of file TPGInternalStateHarvester.cpp.
|
private |
Definition at line 250 of file TPGInternalStateHarvester.cpp.
| std::unordered_map< trgdataformats::channel_t, std::vector< std::pair< std::string, int16_t > > > dunedaq::fdreadoutlibs::TPGInternalStateHarvester::get_latest_results | ( | ) | const |
Get the latest collected results (thread-safe, non-blocking) Returns a copy of the most recent harvest results.
Definition at line 241 of file TPGInternalStateHarvester.cpp.
| const std::vector< TPGInternalStateHarvester::ProcRef > & dunedaq::fdreadoutlibs::TPGInternalStateHarvester::get_processor_references | ( | ) | const |
Definition at line 31 of file TPGInternalStateHarvester.cpp.
| std::unordered_map< trgdataformats::channel_t, std::vector< std::pair< std::string, int16_t > > > dunedaq::fdreadoutlibs::TPGInternalStateHarvester::harvest_once | ( | ) |
Harvest once, outputs channel -> [(metric_name, value)...].
Definition at line 85 of file TPGInternalStateHarvester.cpp.
| bool dunedaq::fdreadoutlibs::TPGInternalStateHarvester::is_collection_thread_running | ( | ) | const |
Check if collection thread is running.
Definition at line 246 of file TPGInternalStateHarvester.cpp.
|
private |
Definition at line 57 of file TPGInternalStateHarvester.cpp.
| void dunedaq::fdreadoutlibs::TPGInternalStateHarvester::set_processor_references | ( | std::vector< ProcRef > | refs | ) |
Definition at line 25 of file TPGInternalStateHarvester.cpp.
| void dunedaq::fdreadoutlibs::TPGInternalStateHarvester::start_collection_thread | ( | ) |
Start the background collection thread Must be called before using async collection features.
Definition at line 170 of file TPGInternalStateHarvester.cpp.
| void dunedaq::fdreadoutlibs::TPGInternalStateHarvester::stop_collection_thread | ( | ) |
Stop the background collection thread Blocks until thread is fully stopped.
Definition at line 191 of file TPGInternalStateHarvester.cpp.
| void dunedaq::fdreadoutlibs::TPGInternalStateHarvester::trigger_harvest | ( | ) |
Signal the collection thread to perform one harvest cycle Non-blocking - returns immediately.
Definition at line 225 of file TPGInternalStateHarvester.cpp.
| void dunedaq::fdreadoutlibs::TPGInternalStateHarvester::update_channel_plane_numbers | ( | const std::vector< std::pair< trgdataformats::channel_t, int16_t > > & | channel_plane_numbers, |
| uint8_t | num_channels_per_pipeline, | ||
| uint8_t | num_pipelines ) |
Cuts a full list of (channel, plane) into per-pipeline lists of 16 lanes each.
| channel_plane_numbers | |
| num_channels_per_pipeline | |
| num_pipelines |
Definition at line 35 of file TPGInternalStateHarvester.cpp.
|
private |
Definition at line 99 of file TPGInternalStateHarvester.hpp.
|
private |
Definition at line 125 of file TPGInternalStateHarvester.hpp.
|
private |
Definition at line 124 of file TPGInternalStateHarvester.hpp.
|
private |
Definition at line 117 of file TPGInternalStateHarvester.hpp.
|
mutableprivate |
Definition at line 123 of file TPGInternalStateHarvester.hpp.
|
private |
Definition at line 105 of file TPGInternalStateHarvester.hpp.
|
private |
Definition at line 106 of file TPGInternalStateHarvester.hpp.
|
private |
Definition at line 120 of file TPGInternalStateHarvester.hpp.
|
private |
Definition at line 114 of file TPGInternalStateHarvester.hpp.
|
private |
Definition at line 104 of file TPGInternalStateHarvester.hpp.
|
private |
Definition at line 100 of file TPGInternalStateHarvester.hpp.
|
private |
Definition at line 101 of file TPGInternalStateHarvester.hpp.
|
private |
Definition at line 97 of file TPGInternalStateHarvester.hpp.
|
mutableprivate |
Definition at line 113 of file TPGInternalStateHarvester.hpp.
|
private |
Definition at line 119 of file TPGInternalStateHarvester.hpp.
|
private |
Definition at line 118 of file TPGInternalStateHarvester.hpp.