9 #ifndef TPGLIBS_PROCESSORMETRICCOLLECTOR_HPP_
10 #define TPGLIBS_PROCESSORMETRICCOLLECTOR_HPP_
14#include <unordered_map>
21#include <nlohmann/json.hpp>
52 std::vector<int16_t>(16)
59 for (
size_t i = pipeline_id*16; i < (pipeline_id+1)*16; i++) {
60 for (
size_t j = 0; j < metrics.size(); j++) {
69 void configure(
const std::vector<std::pair<std::string, nlohmann::json>> configs,
70 const std::vector<std::pair<dunedaq::trgdataformats::channel_t, int16_t>> channel_plane_numbers,
71 uint8_t num_pipelines);
81 std::unordered_map<dunedaq::trgdataformats::channel_t, std::vector<std::pair<std::string, int16_t>>>
get_metrics();
105 std::unordered_map<dunedaq::trgdataformats::channel_t, std::vector<std::pair<std::string, int16_t>>>
m_metrics;
Abstract signal processor.
virtual std::vector< std::string > get_metric_items()
Returns the string name of metrics recorded (stored and can be read) for this processor.
std::vector< dunedaq::trgdataformats::channel_t > m_channel_numbers
void lock_metric_modify()
std::vector< ProcessorMetricInformation > m_processor_metric_table
ProcessorMetricCollector()
std::vector< std::vector< signal_t > > _get_retrieved_processor_metrics() const
void attach_processor(AbstractProcessor< signal_t > &processor, size_t pipeline_id)
void collect_metrics_from_attached_processors()
void cast_metrics_from_raw_type()
std::unordered_map< dunedaq::trgdataformats::channel_t, std::vector< std::pair< std::string, int16_t > > > m_metrics
std::atomic< bool > m_stop_flag
void convert_into_channel_metric_value()
std::unordered_map< dunedaq::trgdataformats::channel_t, std::vector< std::pair< std::string, int16_t > > > get_metrics()
std::vector< std::vector< std::vector< int16_t > > > _get_processor_casted_data_table()
std::vector< ProcessorMetricInformation > _get_processor_metric_table()
void unlock_metric_modify()
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, uint8_t num_pipelines)
std::vector< std::vector< signal_t > > m_processor_metric_collection_table
std::atomic< bool > m_signal_collect
std::thread m_collector_thread
std::vector< AbstractProcessor< signal_t > * > m_attached_processors
std::vector< AbstractProcessor< signal_t > * > _get_attached_processors()
std::vector< std::vector< std::vector< int16_t > > > m_processor_casted_data_table