9 #ifndef ICARUSCODE_PMT_TRIGGER_ALGORITHMS_SLIDINGWINDOWCOMBINERALG_H 
   10 #define ICARUSCODE_PMT_TRIGGER_ALGORITHMS_SLIDINGWINDOWCOMBINERALG_H 
   24 #include "messagefacility/MessageLogger/MessageLogger.h" 
   36 namespace icarus::trigger {
 
   59     std::vector<raw::Channel_t> missingChannels = {},
 
   60     bool requireFullCoverage = 
true,
 
   61     std::string logCategory = 
"SlidingWindowCombinerAlg" 
   65   std::vector<TrackedTriggerGate_t> 
combine 
   66     (std::vector<TrackedTriggerGate_t> 
const& gates) 
const;
 
  110     (std::vector<raw::Channel_t> channels);
 
  113   template <
typename Cont, 
typename T>
 
  127   return std::find(fMissingChannels.begin(), fMissingChannels.end(), channel)
 
  128     != fMissingChannels.end();
 
  134 #endif // ICARUSCODE_PMT_TRIGGER_ALGORITHMS_SLIDINGWINDOWCOMBINERALG_H 
void checkInput(TriggerGateIndex_t const &gates) const 
Throws an exception if the gates are not suitable for input. 
Utilities for the conversion of trigger gate data formats. 
icarus::trigger::TriggerWindowChannels_t WindowChannels_t
Type of optical detector channel list in a window. 
A wrapper to trigger gate objects tracking the input of operations. 
icarus::trigger::TriggerWindowDefs_t Windows_t
Type of content of all windows. 
std::string fLogCategory
Category for messages to MessageFacility. 
icarus::trigger::TriggerGateIndex< TrackedTriggerGate_t > TriggerGateIndex_t
bool isMissingChannel(raw::Channel_t channel) const 
Returns if channel is configured to be missing. 
std::vector< raw::Channel_t > TriggerWindowChannels_t
Type of optical detector channel list in a window. 
auto cend(FixedBins< T, C > const &) noexcept
WindowChannels_t::const_iterator firstChannelPresent(WindowChannels_t const &channels) const 
Returns an iterator to the first of the channels which is not missing. 
Utilities for the conversion of trigger gate data formats. 
Test of util::counter and support utilities. 
static Windows_t sortedWindowChannels(Windows_t const &windows)
Returns windows with numerically sorted channel numbers. 
Definition for PMT sliding windows. 
TrackedTriggerGate_t combineChannels(TriggerGateIndex_t const &gates, WindowChannels_t const &channels) const 
Returns the combination of the channels selected from the gates. 
static bool mergeGateInto(TrackedTriggerGate_t &dest, TrackedTriggerGate_t const &input)
static std::vector< raw::Channel_t > sortChannels(std::vector< raw::Channel_t > channels)
Returns a sorted copy of channels. 
std::vector< TrackedTriggerGate_t > combine(std::vector< TrackedTriggerGate_t > const &gates) const 
Combines the gates according to the configured grouping. 
std::vector< raw::Channel_t > fMissingChannels
Channels known (and required) to be missing (sorted). 
Associates each optical detector channel to a gate. 
A simple alias for a most commonly used TrackedTriggerGate type. 
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). 
std::vector< TriggerWindowChannels_t > TriggerWindowDefs_t
Definition of all windows. 
static bool inList(Cont const &c, T const &value)
Returns whether the container c has value. 
bool const fRequireFullCoverage
Whether to require all channels to be used. 
Windows_t const fWindowChannels
Content of channels of each window.