47 if (start > end)
throw std::runtime_error(
"Inserted invalid range: end before start.");
58 void Set(
const T& s,
const T&
e)
60 if (s >= e)
throw std::runtime_error(
"Inserted invalid range: end before start.");
106 return (*lhs) < (*rhs);
void Merge(const Range &a)
Merge two util::Range into 1.
Namespace for general, non-LArSoft-specific utilities.
Range()
Default ctor is hidden.
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
bool operator!=(const Range &rhs) const
bool operator()(const util::Range< T > *lhs, const util::Range< T > *rhs)
Range(const T &start, const T &end)
Enforced ctor. start must be less than end.
std::pair< T, T > _window
Protected to avoid user's illegal modification on first/second (sorry users!)
bool operator<(const Range &rhs) const
const T & Start() const
"start" accessor
bool operator<(const T &rhs) const
bool operator==(const Range &rhs) const
bool operator>(const T &rhs) const
std::set of util::Range, which does not allow any overlap in contained element. std::set<Range> w/ mo...
represents a "Range" w/ notion of ordering. A range is defined by a pair of "start" and "end" values...
const T & End() const
"end" accessor
bool operator>(const Range &rhs) const
void Set(const T &s, const T &e)
Setter.