#include <SlidingWindowCombinerAlg.h>
Public Types | |
using | WindowChannels_t = icarus::trigger::TriggerWindowChannels_t |
Type of optical detector channel list in a window. More... | |
using | Windows_t = icarus::trigger::TriggerWindowDefs_t |
Type of content of all windows. More... | |
using | TrackedTriggerGate_t = icarus::trigger::TrackedOpticalTriggerGate< sbn::OpDetWaveformMeta > |
Trigger gate data type (tracks sources via sbn::OpDetWaveformMeta ). More... | |
Public Member Functions | |
SlidingWindowCombinerAlg (Windows_t const &windows, std::vector< raw::Channel_t > missingChannels={}, bool requireFullCoverage=true, std::string logCategory="SlidingWindowCombinerAlg") | |
Constructor: learns about the window pattern (keeps a reference). More... | |
std::vector< TrackedTriggerGate_t > | combine (std::vector< TrackedTriggerGate_t > const &gates) const |
Combines the gates according to the configured grouping. More... | |
bool | isMissingChannel (raw::Channel_t channel) const |
Returns if channel is configured to be missing. More... | |
Private Types | |
using | TriggerGateIndex_t = icarus::trigger::TriggerGateIndex< TrackedTriggerGate_t > |
Private Member Functions | |
void | checkInput (TriggerGateIndex_t const &gates) const |
Throws an exception if the gates are not suitable for input. More... | |
TrackedTriggerGate_t | combineChannels (TriggerGateIndex_t const &gates, WindowChannels_t const &channels) const |
Returns the combination of the channels selected from the gates . More... | |
WindowChannels_t::const_iterator | firstChannelPresent (WindowChannels_t const &channels) const |
Returns an iterator to the first of the channels which is not missing. More... | |
Static Private Member Functions | |
static bool | mergeGateInto (TrackedTriggerGate_t &dest, TrackedTriggerGate_t const &input) |
static Windows_t | sortedWindowChannels (Windows_t const &windows) |
Returns windows with numerically sorted channel numbers. More... | |
static std::vector < raw::Channel_t > | sortChannels (std::vector< raw::Channel_t > channels) |
Returns a sorted copy of channels . More... | |
template<typename Cont , typename T > | |
static bool | inList (Cont const &c, T const &value) |
Returns whether the container c has value . More... | |
Private Attributes | |
Windows_t const | fWindowChannels |
Content of channels of each window. More... | |
std::vector< raw::Channel_t > | fMissingChannels |
Channels known (and required) to be missing (sorted). More... | |
bool const | fRequireFullCoverage |
Whether to require all channels to be used. More... | |
std::string | fLogCategory |
Category for messages to MessageFacility. More... | |
Definition at line 43 of file SlidingWindowCombinerAlg.h.
using icarus::trigger::SlidingWindowCombinerAlg::TrackedTriggerGate_t = icarus::trigger::TrackedOpticalTriggerGate<sbn::OpDetWaveformMeta> |
Trigger gate data type (tracks sources via sbn::OpDetWaveformMeta
).
Definition at line 54 of file SlidingWindowCombinerAlg.h.
|
private |
Definition at line 75 of file SlidingWindowCombinerAlg.h.
using icarus::trigger::SlidingWindowCombinerAlg::WindowChannels_t = icarus::trigger::TriggerWindowChannels_t |
Type of optical detector channel list in a window.
Definition at line 47 of file SlidingWindowCombinerAlg.h.
Type of content of all windows.
Definition at line 50 of file SlidingWindowCombinerAlg.h.
icarus::trigger::SlidingWindowCombinerAlg::SlidingWindowCombinerAlg | ( | Windows_t const & | windows, |
std::vector< raw::Channel_t > | missingChannels = {} , |
||
bool | requireFullCoverage = true , |
||
std::string | logCategory = "SlidingWindowCombinerAlg" |
||
) |
Constructor: learns about the window pattern (keeps a reference).
Definition at line 19 of file SlidingWindowCombinerAlg.cxx.
|
private |
Throws an exception if the gates are not suitable for input.
Definition at line 56 of file SlidingWindowCombinerAlg.cxx.
auto icarus::trigger::SlidingWindowCombinerAlg::combine | ( | std::vector< TrackedTriggerGate_t > const & | gates | ) | const |
Combines the gates
according to the configured grouping.
Definition at line 34 of file SlidingWindowCombinerAlg.cxx.
|
private |
Returns the combination of the channels
selected from the gates
.
Definition at line 165 of file SlidingWindowCombinerAlg.cxx.
|
private |
Returns an iterator to the first of the channels
which is not missing.
Definition at line 198 of file SlidingWindowCombinerAlg.cxx.
|
inlinestaticprivate |
Returns whether the container c
has value
.
Definition at line 114 of file SlidingWindowCombinerAlg.h.
|
inline |
Returns if channel
is configured to be missing.
Definition at line 125 of file SlidingWindowCombinerAlg.h.
|
staticprivate |
Adds the gate data of input
to dest
, unless it's already included.
Definition at line 209 of file SlidingWindowCombinerAlg.cxx.
|
staticprivate |
Returns a sorted copy of channels
.
Definition at line 235 of file SlidingWindowCombinerAlg.cxx.
|
staticprivate |
Returns windows with numerically sorted channel numbers.
Definition at line 225 of file SlidingWindowCombinerAlg.cxx.
|
private |
Category for messages to MessageFacility.
Definition at line 86 of file SlidingWindowCombinerAlg.h.
|
private |
Channels known (and required) to be missing (sorted).
Definition at line 81 of file SlidingWindowCombinerAlg.h.
|
private |
Whether to require all channels to be used.
Definition at line 84 of file SlidingWindowCombinerAlg.h.
|
private |
Content of channels of each window.
Definition at line 78 of file SlidingWindowCombinerAlg.h.