11#include "TRACE/trace.h"
12#define TRACE_NAME "TAMakerADCSimpleWindowAlgorithm"
18using Logging::TLVL_DEBUG_ALL;
19using Logging::TLVL_DEBUG_HIGH;
20using Logging::TLVL_DEBUG_LOW;
21using Logging::TLVL_IMPORTANT;
38 TLOG_DEBUG(TLVL_DEBUG_HIGH) <<
"[TAM:ADCSW] Window not yet complete, adding the input_tp to the window.";
46 TLOG_DEBUG(TLVL_DEBUG_LOW) <<
"[TAM:ADCSW] ADC integral in window is greater than specified threshold.";
48 TLOG_DEBUG(TLVL_DEBUG_HIGH) <<
"[TAM:ADCSW] Resetting window with input_tp.";
53 TLOG_DEBUG(TLVL_DEBUG_ALL) <<
"[TAM:ADCSW] Window is at required length but adc threshold not met, shifting window along.";
70 if (config.is_object()){
71 if (config.contains(
"window_length"))
m_window_length = config[
"window_length"];
72 if (config.contains(
"adc_threshold"))
m_adc_threshold = config[
"adc_threshold"];
75 TLOG_DEBUG(TLVL_IMPORTANT) <<
"[TAM:ADCSW] The DEFAULT values of window_length and adc_threshold are being used.";
77 TLOG_DEBUG(TLVL_IMPORTANT) <<
"[TAM:ADCSW] If the total ADC of trigger primitives with times within a "
84 TLOG_DEBUG(TLVL_DEBUG_LOW) <<
"[TAM:ADCSW] I am constructing a trigger activity!";
#define REGISTER_TRIGGER_ACTIVITY_MAKER(tam_name, tam_class)
std::vector< TriggerPrimitive > tp_list
void reset(TriggerPrimitive const &input_tp)
void move(TriggerPrimitive const &input_tp, timestamp_t const &window_length)
void add(TriggerPrimitive const &input_tp)
uint64_t m_primitive_count
void configure(const nlohmann::json &config)
TriggerActivity construct_ta() const
timestamp_t m_window_length
void process(const TriggerPrimitive &input_tp, std::vector< TriggerActivity > &output_ta)
TP processing function that creates & fills TAs.
virtual void configure(const nlohmann::json &config)
#define TLOG_DEBUG(lvl,...)
std::vector< TriggerPrimitive > inputs