9#ifndef TRIGGERALGS_SRC_TRIGGERALGS_SUPERNOVA_TRIGGERDECISIONMAKERSUPERNOVA_HPP_
10#define TRIGGERALGS_SRC_TRIGGERALGS_SUPERNOVA_TRIGGERDECISIONMAKERSUPERNOVA_HPP_
32 std::atomic<dunedaq::trgdataformats::timestamp_t>
m_time_window = { 500'000'000 };
41 dunedaq::trgdataformats::timestamp_diff_t how_far = time_now -
m_time_window;
42 auto end = std::remove_if(
43 m_candidate.begin(),
m_candidate.end(), [how_far,
this](
auto& c) ->
bool { return (static_cast<dunedaq::trgdataformats::timestamp_diff_t>(c.time_start) < how_far); });
std::atomic< dunedaq::trgdataformats::timestamp_t > m_time_window
Sliding time window to count activities.
std::atomic< uint16_t > m_hit_threshold
Minimum number of primities in an activity.
void operator()(const TriggerCandidate &, std::vector< TriggerDecision > &)
This decision maker just spits out the trigger candidates.
std::atomic< uint16_t > m_threshold
Minimum number of activities in the time window to issue a trigger.
void FlushOldCandidate(dunedaq::trgdataformats::timestamp_t time_now)
this function gets rid of the old activities
std::vector< TriggerCandidate > m_candidate