39TAProcessor::TAProcessor(std::unique_ptr<datahandlinglibs::FrameErrorRegistry>& error_registry,
bool post_processing_enabled)
40 : datahandlinglibs::TaskRawDataProcessorModel<
TAWrapper>(error_registry, post_processing_enabled)
82 for (
auto output :
conf->get_outputs()) {
84 if (output->get_data_type() ==
"TriggerCandidate") {
88 ers::error(datahandlinglibs::ResourceQueueError(
ERS_HERE,
"tc",
"DefaultRequestHandlerModel", excpt));
94 std::vector<const appmodel::TCAlgorithm*> tc_algorithms;
95 auto dp =
conf->get_module_configuration()->get_data_processor();
98 tc_algorithms = proc_conf->get_algorithms();
101 for (
auto algo : tc_algorithms) {
102 TLOG() <<
"Selected TC algorithm: " << algo->UID();
103 std::shared_ptr<triggeralgs::TriggerCandidateMaker> maker =
make_tc_maker(algo->class_name());
104 nlohmann::json algo_json = algo->to_json(
true);
105 maker->configure(algo_json[algo->UID()]);
135 this->
publish(std::move(info));
143 this->
publish(std::move(lat_info));
156 std::vector<triggeralgs::TriggerCandidate> tcs;
158 for (
auto tc : tcs) {
175 TLOG() <<
"TAProcessor opmon counters summary:";
176 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)
std::atomic< metric_counter_type > m_ta_received_count
std::atomic< bool > m_running_flag
void generate_opmon_data() override
dunedaq::trigger::Latency m_latency_instance
std::atomic< metric_counter_type > m_tc_failed_sent_count
void find_tc(const TAWrapper *ta, std::shared_ptr< triggeralgs::TriggerCandidateMaker > tcm)
std::vector< std::shared_ptr< triggeralgs::TriggerCandidateMaker > > m_tcms
void start(const nlohmann::json &args) override
Start operation.
daqdataformats::SourceID m_sourceid
std::atomic< metric_counter_type > m_tc_made_count
std::atomic< metric_counter_type > m_tc_sent_count
void scrap(const nlohmann::json &args) override
Unconfigure.
std::atomic< bool > m_latency_monitoring
std::shared_ptr< iomanager::SenderConcept< triggeralgs::TriggerCandidate > > m_tc_sink
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.
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::TriggerCandidateMaker > make_tc_maker(std::string const &plugin_name)
Load a TriggerCandidateMaker 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
triggeralgs::TriggerActivity activity