11#include "TRACE/trace.h"
12#define TRACE_NAME "TAMakerProtoDUNEBSMWindowAlgorithm"
32 unsigned int detelement =
channelMap->get_element_id_from_offline_channel(input_tp.
channel);
33 unsigned int plane =
channelMap->get_plane_from_offline_channel(input_tp.
channel);
80 TLOG_DEBUG(
TLVL_DEBUG_ALL) <<
"[TAM:BSMW] Window is at required length but adc threshold not met, shifting window along.";
95 if (config.is_object()){
96 if (config.contains(
"channel_map_name"))
m_channel_map_name = config[
"channel_map_name"];
97 if (config.contains(
"num_time_bins"))
m_num_timebins = config[
"num_time_bins"];
98 if (config.contains(
"adc_threshold"))
m_adc_threshold = config[
"adc_threshold"];
99 if (config.contains(
"ratio_threshold")) {
103 if (config.contains(
"window_length")) {
107 if (config.contains(
"bdt_threshold")) {
108 uint64_t int_bdt_threshold = config[
"bdt_threshold"];
109 if (int_bdt_threshold <= 100)
m_bdt_threshold =
static_cast<float>(int_bdt_threshold * 0.01);
110 else if (int_bdt_threshold <= 1000)
m_bdt_threshold =
static_cast<float>(int_bdt_threshold * 0.001);
111 else if (int_bdt_threshold <= 10000)
m_bdt_threshold =
static_cast<float>(int_bdt_threshold * 0.0001);
141 for (
size_t i = 0; i < num_feature; ++i) {
190 std::vector<float> result(
nbatch, 0.0f);
#define REGISTER_TRIGGER_ACTIVITY_MAKER(tam_name, tam_class)
uint64_t m_primitive_count
ProtoDUNEBSMWindow m_current_window
~TAMakerProtoDUNEBSMWindowAlgorithm() override
channel_t m_chan_bin_length
std::vector< float > flat_batched_inputs
std::vector< Entry > flat_batched_Entries
timestamp_t m_last_pred_time
timestamp_t m_window_length
std::string m_channel_map_name
void configure(const nlohmann::json &config)
channel_t m_first_channel
TriggerActivity construct_ta() const
bool compute_treelite_classification()
std::unique_ptr< PDVDEffectiveChannelMap > m_pdvd_eff_channel_mapper
void process(const TriggerPrimitive &input_tp, std::vector< TriggerActivity > &output_ta)
TP processing function that creates & fills TAs.
DetectorPlaneMap m_det_plane_map
std::shared_ptr< dunedaq::detchannelmaps::TPCChannelMap > channelMap
std::unique_ptr< CompiledModelInterface > m_compiled_model_interface
#define TLOG_DEBUG(lvl,...)
dunedaq::trgdataformats::timestamp_t timestamp_t
dunedaq::trgdataformats::TriggerPrimitive TriggerPrimitive
dunedaq::trgdataformats::channel_t channel_t
std::vector< TriggerPrimitive > inputs