9 #ifndef ICARUSCODE_PMT_TRIGGER_ALGORITHMS_SLIDINGWINDOWPATTERNALG_H
10 #define ICARUSCODE_PMT_TRIGGER_ALGORITHMS_SLIDINGWINDOWPATTERNALG_H
23 #include "cetlib_except/exception.h"
34 namespace icarus::trigger {
class SlidingWindowPatternAlg; }
80 std::size_t
windowIndex = std::numeric_limits<std::size_t>::max();
112 std::string
const&
logCategory =
"SlidingWindowPatternAlg"
131 std::string
const&
logCategory =
"SlidingWindowPatternAlg"
192 WindowTopology_t::WindowInfo_t
const& windowInfo,
203 std::size_t
windowIndex = std::numeric_limits<std::size_t>::max();
212 {
windowIndex = index; this->info = std::move(info); }
224 std::optional<icarus::trigger::ApplyBeamGateClass const>
fBeamGate;
264 #endif // ICARUSCODE_PMT_TRIGGER_ALGORITHMS_SLIDINGWINDOWPATTERNALG_H
Data structure to communicate internally a trigger response.
bool fired() const
Returns whether the trigger fired.
AllTriggerInfo_t simulateResponse(TriggerGates_t const &gates) const
Returns the trigger response from the specified gates.
void setBeamGate(icarus::trigger::ApplyBeamGateClass beamGate)
Changes the beam gate to the specified value.
TriggerGates_t applyBeamGate(TriggerGates_t const &gates) const
Returns a new collection of gates, set each in coincidence with beam gate.
TriggerInfo_t applyWindowPattern(WindowTopology_t::WindowInfo_t const &windowInfo, WindowPattern_t const &pattern, TriggerGates_t const &gates) const
Returns the trigger response for the specified window pattern.
icarus::trigger::WindowPattern WindowPattern_t
Type representing the requirement pattern for a window.
void verifyInputTopology(TriggerGates_t const &gates) const
Checks gates are compatible with the current window configuration.
std::size_t windowIndex
Index of the window which led the trigger.
A wrapper to trigger gate objects tracking the input of operations.
Base class facilitating logging to message facility.
Helper to manage a beam gate.
Information about composition and topology of trigger sliding windows.
SlidingWindowPatternAlg(WindowTopology_t windowTopology, WindowPattern_t windowPattern, icarus::trigger::ApplyBeamGateClass beamGate, std::string const &logCategory="SlidingWindowPatternAlg")
Constructor: configures window topology and times.
Helper applying a beam gate to any gate.
Helper for logging classes.
Helper data structure to store transient trigger result.
Specification of the requirement of sliding window firing pattern.
void clearBeamGate()
Do not apply any beam gate.
Logical multi-level gate associated to one or more readout channels.
Defines a (sliding) window trigger pattern.
icarus::trigger::ReadoutTriggerGate< TriggerGateTick_t, TriggerGateTicks_t, raw::Channel_t > OpticalTriggerGateData_t
Type of trigger gate data serialized into art data products.
icarus::trigger::details::TriggerInfo_t TriggerInfo_t
Record of the trigger response.
icarus::trigger::WindowChannelMap WindowTopology_t
Type holding information about composition and topology of all windows.
WindowTopology_t const fWindowTopology
Definition of the neighborhood of each window in terms of window indices.
WindowPattern_t const fWindowPattern
Requirement pattern to be applied to each window.
Applies sliding window patterns to discriminated waveforms.
Data structure enclosing information for trigger sliding windows.
bool hasBeamGate() const
Returns whether a beam gate is being applied.
Additional information on the trigger.
bool operator!() const
Returns whether this trigger did not fire.
TriggerInfo_t info
Standard trigger information.
std::optional< icarus::trigger::ApplyBeamGateClass const > fBeamGate
Time interval when to evaluate the trigger.
Helper class to store transient trigger result.
std::vector< InputTriggerGate_t > TriggerGates_t
A list of trigger gates from input.
void emplace(std::size_t index, TriggerInfo_t info)
A simple alias for a most commonly used TrackedTriggerGate type.
Complete information from this algorithm, standard + non-standard (extra).
std::string logCategory() const
Returns the logging category string for this object.