|
ATLAS Offline Software
|
Go to the documentation of this file.
11 #ifndef ANALYSISUTILS_FILTERRANGE_H
12 #define ANALYSISUTILS_FILTERRANGE_H
26 #include <boost/numeric/interval/interval.hpp>
27 #include <boost/numeric/interval/checking.hpp>
28 #include <boost/numeric/interval/policies.hpp>
29 #include <boost/numeric/interval/compare/certain.hpp>
98 bool isInRange(
const double point )
const;
118 void include(
const double xMin,
const double xMax);
132 void addRange(
double xMin,
double xMax);
188 std::string
error =
"ERROR : FilterRange is ACTIVE (Should NOT BE !!)";
189 std::cerr <<
error << std::endl;
271 #endif //> ANALYSISUTILS_FILTERRANGE_H
double MINUS_INF() const
Define -infinity according to specific implementation.
FilterRange()
Default constructor: it sets the minimum value to -infinity and the maximum value to +infinity.
bool isInRange(const double point) const
return Return true if the point is in range : min <= point <= max
bool isActive() const
return Return true if the range is active (optimize parsing of multiple ranges and returning the fina...
boost::numeric::interval< double > interval_t
std::optional< interval_t > m_range
The boost interval wrapped by a boost optional.
#define maxValue(current, test)
FilterRange implements the range (ie: [min, max]) the filters will use to take their filtering decisi...
double getMax() const
Return the maximum value of the range.
void include(const double xMin, const double xMax)
Add [xMin, xMax] interval to existing set of valid ranges.
double m_precision
Setup the wanted double precision.
double PLUS_INF() const
Define +infinity according to specific implementation.
bool operator!=(const FilterRange &r1, const FilterRange &r2)
double getMin() const
Return the minimum value of the range.
void includeAll()
Set full range (from MINUS_INF to PLUS_INF ).
void setRange(const double lower, const double upper)
Non-const methods:
bool operator>=(const FilterRange &r1, const FilterRange &r2)
bool operator<=(const FilterRange &r1, const FilterRange &r2)
void addRange(double xMin, double xMax)
add a new range [xmin,xmax] deleting previous ranges full contained
FilterRange & operator=(const FilterRange &obj)
Assignment operator:
void setMax(const double maxValue)
bool operator>(const FilterRange &r1, const FilterRange &r2)
double precision() const
Return the double precision for the comparaison of doubles.
bool operator<(const FilterRange &r1, const FilterRange &r2)
virtual ~FilterRange()
Destructor:
void setPrecision(const double delta)
bool operator==(const FilterRange &r1, const FilterRange &r2)
void setMin(const double minValue)
#define minValue(current, test)
double lower() const
Return the minimum value of the range.
double upper() const
Return the maximum value of the range.