10 #ifndef LARDATA_UTILITIES_FILTERRANGEFOR_H 11 #define LARDATA_UTILITIES_FILTERRANGEFOR_H 15 #include <boost/iterator/filter_iterator.hpp> 59 template <
typename Range,
typename Pred>
73 template <
typename Range,
typename Pred>
88 auto end =
getEnd(std::forward<Range>(range));
90 boost::make_filter_iterator(std::forward<Pred>(
pred),
begin,
end);
96 auto end =
getEnd(std::forward<Range>(range));
98 boost::make_filter_iterator(std::forward<Pred>(
pred),
end,
end);
136 template <
typename Range,
typename Pred>
140 (std::forward<Range>(range), std::forward<Pred>(
pred));
151 #endif // LARDATA_UTILITIES_FILTERRANGEFOR_H end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
Namespace for general, non-LArSoft-specific utilities.
static auto makeEndIterator(Range &&range, Pred &&pred)
Create a Boost filter iterator pointing to the end of data.
auto filterRangeFor(Range &&range, Pred &&pred) -> decltype(auto)
Provides iteration only through elements passing a condition.
static auto makeBeginIterator(Range &&range, Pred &&pred)
Create a Boost filter iterator pointing to the beginning of data.
static auto getBegin(Range &&range) -> decltype(auto)
Extract the begin iterator from a range.
FilterRangeForStruct(Range &&range, Pred &&pred)
Extracts the iterators from the specified range.
static auto getEnd(Range &&range) -> decltype(auto)
Extract the end iterator from a range.
represents a "Range" w/ notion of ordering. A range is defined by a pair of "start" and "end" values...
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.