47 {
if(start>end)
throw std::runtime_error(
"Inserted invalid range: end before start."); }
59 if(s>=e)
throw std::runtime_error(
"Inserted invalid range: end before start.");
74 {
return !( (*this) == rhs ); }
80 {
return (
_window.second < rhs); }
82 {
return (
_window.first > rhs); }
108 {
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.
static int max(int a, int b)
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 Range &rhs) const
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
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.