9#ifndef TRIGGERALGS_MICHELELECTRON_TRIGGERACTIVITYMAKERMICHELELECTRON_HPP_
10#define TRIGGERALGS_MICHELELECTRON_TRIGGERACTIVITYMAKERMICHELELECTRON_HPP_
23 void configure(
const nlohmann::json& config);
35 inputs.push_back(input_tp);
46 uint32_t n_tps_to_erase = 0;
48 if (!(input_tp.
time_start - tp.time_start < window_length)) {
64 if (!(
inputs.size() == 0)) {
85 inputs.push_back(input_tp);
91 os <<
"Window is empty!\n";
93 os <<
"Window start: " << window.
time_start <<
", end: " << window.
inputs.back().time_start;
94 os <<
". Total of: " << window.
adc_integral <<
" ADC counts with " << window.
inputs.size() <<
" TPs.\n";
95 os << window.
channel_states.size() <<
" independent channels have hits.\n";
109 bool check_kinks(std::vector<TriggerPrimitive> trackHits);
void add(TriggerPrimitive const &input_tp)
std::unordered_map< channel_t, uint16_t > channel_states
void reset(TriggerPrimitive const &input_tp)
friend std::ostream & operator<<(std::ostream &os, const Window &window)
std::vector< TriggerPrimitive > inputs
uint16_t n_channels_hit()
void move(TriggerPrimitive const &input_tp, timestamp_t const &window_length)
std::vector< TriggerPrimitive > longest_activity() const
bool check_kinks(std::vector< TriggerPrimitive > trackHits)
std::vector< Window > m_window_record
uint16_t m_adjacency_threshold
TriggerActivity construct_ta() const
bool check_bragg_peak(std::vector< TriggerPrimitive > trackHits)
uint64_t m_primitive_count
void add_window_to_record(Window window)
void configure(const nlohmann::json &config)
void dump_tp(TriggerPrimitive const &input_tp)
timestamp_t m_window_length
void dump_window_record()
void process(const TriggerPrimitive &input_tp, std::vector< TriggerActivity > &output_ta)
TP processing function that creates & fills TAs.
dunedaq::trgdataformats::timestamp_t timestamp_t