9#include <unordered_set>
24 uint16_t insert_at = 0;
47 uint32_t n_tas_to_erase = 0;
49 if (!(input_ta.
time_start - ta.time_start < window_length)) {
94 inputs.push_back(input_ta);
101 os <<
"Window is empty!\n";
103 os <<
"Window start: " << window.
time_start <<
", end: " << window.
inputs.back().time_start;
104 os <<
". Total of: " << window.
adc_integral <<
" ADC counts with " << window.
inputs.size() <<
" TPs.\n";
105 os << window.
channel_states.size() <<
" independent channels have hits.\n";
void clear()
Clear all inputs.
void add(const TriggerActivity &input_ta)
Add the input TA's contribution to the total ADC, increase the hit count of all of the channels which...
std::vector< TriggerActivity > inputs
std::unordered_map< channel_t, uint16_t > channel_states
void reset(TriggerActivity const &input_ta)
Reset window content on the input.
void move(TriggerActivity const &input_ta, timestamp_t const &window_length)
Find all of the TAs in the window that need to be removed if the input_ta is to be added and the size...
dunedaq::trgdataformats::timestamp_t timestamp_t
std::ostream & operator<<(std::ostream &os, const TAWindow &window)
std::vector< TriggerPrimitive > inputs