11 class TRange :
public std::pair<T, T> {
17 TRange(
const std::pair<T, T>& apair) :
std::pair<
T,
T>(apair) {}
28 bool empty()
const {
return (this->second < this->
first); }
68 std::ostream& operator<<(std::ostream& out, const TRange<T>&
r) {
69 return out <<
"(" <<
r.min() <<
"," <<
r.max() <<
")";
bool inside(const T &value) const
check if object is inside region
const T & max() const
upper edge of range
U second(std::pair< T, U > const &p)
const T & min() const
lower edge of range
bool empty() const
true for empty region. note that region [x,x] is not empty
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
TRange< T > sum(const TRange< T > &r) const
sum of overlaping regions. the overlapping should be checked before.
TRange(const std::pair< T, T > &apair)
TRange(const T &aMin, const T &aMax)