#include <TAMakerADCSimpleWindowAlgorithm.hpp>
◆ configure()
void TAMakerADCSimpleWindowAlgorithm::configure |
( |
const nlohmann::json & | config | ) |
|
|
virtual |
Reimplemented from triggeralgs::TriggerActivityMaker.
Definition at line 65 of file TAMakerADCSimpleWindowAlgorithm.cpp.
66{
68
69
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"];
73 }
74 else{
75 TLOG_DEBUG(TLVL_IMPORTANT) <<
"[TAM:ADCSW] The DEFAULT values of window_length and adc_threshold are being used.";
76 }
77 TLOG_DEBUG(TLVL_IMPORTANT) <<
"[TAM:ADCSW] If the total ADC of trigger primitives with times within a "
79}
timestamp_t m_window_length
virtual void configure(const nlohmann::json &config)
#define TLOG_DEBUG(lvl,...)
◆ construct_ta()
Definition at line 82 of file TAMakerADCSimpleWindowAlgorithm.cpp.
83{
84 TLOG_DEBUG(TLVL_DEBUG_LOW) <<
"[TAM:ADCSW] I am constructing a trigger activity!";
85
86
88
89
104 return ta;
105}
std::vector< TriggerPrimitive > tp_list
std::vector< TriggerPrimitive > inputs
◆ process()
TP processing function that creates & fills TAs.
- Parameters
-
input_tp[in] | Input TP for the triggering algorithm |
output_ta[out] | Output vector of TAs to fill by the algorithm |
Implements triggeralgs::TriggerActivityMaker.
Definition at line 24 of file TAMakerADCSimpleWindowAlgorithm.cpp.
25{
26
27
28
32 return;
33 }
34
35
36
38 TLOG_DEBUG(TLVL_DEBUG_HIGH) <<
"[TAM:ADCSW] Window not yet complete, adding the input_tp to the window.";
40 }
41
42
43
44
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.";
50 }
51
52 else{
53 TLOG_DEBUG(TLVL_DEBUG_ALL) <<
"[TAM:ADCSW] Window is at required length but adc threshold not met, shifting window along.";
55 }
56
58
60
61 return;
62}
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
TriggerActivity construct_ta() const
◆ m_adc_threshold
uint32_t triggeralgs::TAMakerADCSimpleWindowAlgorithm::m_adc_threshold = 1200000 |
|
private |
◆ m_current_window
Window triggeralgs::TAMakerADCSimpleWindowAlgorithm::m_current_window |
|
private |
◆ m_primitive_count
uint64_t triggeralgs::TAMakerADCSimpleWindowAlgorithm::m_primitive_count = 0 |
|
private |
◆ m_window_length
timestamp_t triggeralgs::TAMakerADCSimpleWindowAlgorithm::m_window_length = 100000 |
|
private |
The documentation for this class was generated from the following files: