37TPProcessor::TPProcessor(std::unique_ptr<datahandlinglibs::FrameErrorRegistry>& error_registry,
bool post_processing_enabled)
80 for (
auto output :
conf->get_outputs()) {
82 if (output->get_data_type() ==
"TriggerActivity") {
86 ers::error(datahandlinglibs::ResourceQueueError(
ERS_HERE,
"ta",
"DefaultRequestHandlerModel", excpt));
93 std::vector<const appmodel::TAAlgorithm*> ta_algorithms;
94 auto dp =
conf->get_module_configuration()->get_data_processor();
97 ta_algorithms = proc_conf->get_algorithms();
100 for (
auto algo : ta_algorithms) {
101 TLOG() <<
"Selected TA algorithm: " << algo->UID() <<
" from class " << algo->class_name();
102 std::shared_ptr<triggeralgs::TriggerActivityMaker> maker =
make_ta_maker(algo->class_name());
103 nlohmann::json algo_json = algo->to_json(
true);
105 TLOG() <<
"Algo config:\n" << algo_json.dump();
107 maker->configure(algo_json[algo->UID()]);
137 this->
publish(std::move(info));
145 this->
publish(std::move(lat_info));
157 std::vector<triggeralgs::TriggerActivity> tas;
158 taa->operator()(tp->
tp, tas);
178 TLOG() <<
"TPProcessor opmon counters summary:";
179 TLOG() <<
"------------------------------";
#define DUNE_DAQ_TYPESTRING(Type, typestring)
void scrap(const nlohmann::json &) override
void start(const nlohmann::json &) override
void add_postprocess_task(Task &&task)
void conf(const appmodel::DataHandlerModule *conf) override
bool m_post_processing_enabled
void stop(const nlohmann::json &) override
std::atomic< uint64_t > m_last_processed_daq_ts
static constexpr timeout_t s_no_block
void publish(google::protobuf::Message &&, CustomOrigin &&co={}, OpMonLevel l=to_level(EntryOpMonLevel::kDefault)) const noexcept
void update_latency_out(uint64_t latency)
latency get_latency_in() const
latency get_latency_out() const
void update_latency_in(uint64_t latency)
dunedaq::trigger::Latency m_latency_instance
std::atomic< bool > m_latency_monitoring
void start(const nlohmann::json &args) override
Start operation.
daqdataformats::SourceID m_sourceid
std::vector< std::shared_ptr< triggeralgs::TriggerActivityMaker > > m_tams
std::atomic< metric_counter_type > m_ta_failed_sent_count
std::atomic< metric_counter_type > m_tp_received_count
std::atomic< metric_counter_type > m_ta_sent_count
void scrap(const nlohmann::json &args) override
Unconfigure.
void find_ta(const TriggerPrimitiveTypeAdapter *tp, std::shared_ptr< triggeralgs::TriggerActivityMaker > tam)
std::shared_ptr< iomanager::SenderConcept< triggeralgs::TriggerActivity > > m_ta_sink
std::atomic< metric_counter_type > m_ta_made_count
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.
std::atomic< bool > m_running_flag
void generate_opmon_data() override
void set_latency_out(::uint32_t value)
void set_latency_in(::uint32_t value)
Base class for any user define issue.
#define TLVL_ENTER_EXIT_METHODS
#define TLOG_DEBUG(lvl,...)
std::unique_ptr< triggeralgs::TriggerActivityMaker > make_ta_maker(std::string const &plugin_name)
Load a TriggerActivityMaker plugin and return a unique_ptr to the contained class.
static std::shared_ptr< iomanager::SenderConcept< Datatype > > get_iom_sender(iomanager::ConnectionId const &id)
void warning(const Issue &issue)
void error(const Issue &issue)
static const constexpr daqdataformats::SourceID::Subsystem subsystem
trgdataformats::TriggerPrimitive tp