11#include "TRACE/trace.h"
12#define TRACE_NAME "TCMakerPlaneCoincidenceAlgorithm"
26 std::vector<TriggerCandidate>& output_tc)
29 std::vector<TriggerActivity::TriggerActivityData> ta_list = {
static_cast<TriggerActivity::TriggerActivityData
>(
46 output_tc.push_back(tc);
70 output_tc.push_back(tc);
87 TLOG_DEBUG(
TLVL_DEBUG_HIGH) <<
"[TCM:PC] TAWindow is at required length but specified threshold not met, shifting window along.";
100 if (config.is_object()) {
101 if (config.contains(
"trigger_on_adc"))
103 if (config.contains(
"trigger_on_n_channels"))
105 if (config.contains(
"adc_threshold"))
107 if (config.contains(
"n_channels_threshold"))
109 if (config.contains(
"window_length"))
165 std::ofstream outfile;
166 outfile.open(
"window_record_tcm.csv", std::ios_base::app);
169 outfile << window.time_start <<
",";
170 outfile << window.inputs.back().time_start <<
",";
171 outfile << window.inputs.back().time_start - window.time_start <<
",";
172 outfile << window.adc_integral <<
",";
173 outfile << window.n_channels_hit() <<
",";
174 outfile << window.inputs.size() << std::endl;
#define REGISTER_TRIGGER_CANDIDATE_MAKER(tcm_name, tcm_class)
TAWindow m_current_window
void dump_window_record()
std::vector< TAWindow > m_window_record
TriggerCandidate construct_tc() const
uint64_t m_activity_count
timestamp_t m_window_length
void configure(const nlohmann::json &config)
bool check_adjacency() const
void add_window_to_record(TAWindow window)
bool m_trigger_on_n_channels
void process(const TriggerActivity &, std::vector< TriggerCandidate > &)
TA processing function that creates & fills TCs.
uint16_t m_n_channels_threshold
TriggerCandidate::Type m_tc_type_out
Configurable TC type output.
virtual void configure(const nlohmann::json &config)
#define TLOG_DEBUG(lvl,...)
std::vector< dunedaq::trgdataformats::TriggerActivityData > inputs