ATLAS Offline Software
|
FilterRange implements the range (ie: [min, max]) the filters will use to take their filtering decisions. More...
#include <FilterRange.h>
Public Member Functions | |
FilterRange () | |
Default constructor: it sets the minimum value to -infinity and the maximum value to +infinity. More... | |
FilterRange (const FilterRange &range) | |
Copy constructor: More... | |
FilterRange (const double min, const double max) | |
Constructor with parameters: More... | |
virtual | ~FilterRange () |
Destructor: More... | |
FilterRange & | operator= (const FilterRange &obj) |
Assignment operator: More... | |
double | precision () const |
Return the double precision for the comparaison of doubles. More... | |
double | lower () const |
Return the minimum value of the range. More... | |
double | upper () const |
Return the maximum value of the range. More... | |
double | getMin () const |
Return the minimum value of the range. More... | |
double | getMax () const |
Return the maximum value of the range. More... | |
double | PLUS_INF () const |
Define +infinity according to specific implementation. More... | |
double | MINUS_INF () const |
Define -infinity according to specific implementation. More... | |
bool | isInRange (const double point) const |
return Return true if the point is in range : min <= point <= max More... | |
bool | isActive () const |
return Return true if the range is active (optimize parsing of multiple ranges and returning the final decision) More... | |
void | setPrecision (const double delta) |
void | setRange (const double lower, const double upper) |
Non-const methods: More... | |
void | setMin (const double minValue) |
void | setMax (const double maxValue) |
void | include (const double xMin, const double xMax) |
Add [xMin, xMax] interval to existing set of valid ranges. More... | |
void | includeAll () |
Set full range (from MINUS_INF to PLUS_INF ). More... | |
Protected Types | |
typedef boost::numeric::interval< double > | interval_t |
Protected Member Functions | |
void | addRange (double xMin, double xMax) |
add a new range [xmin,xmax] deleting previous ranges full contained More... | |
Protected Attributes | |
std::optional< interval_t > | m_range |
The boost interval wrapped by a boost optional. More... | |
double | m_precision |
Setup the wanted double precision. More... | |
FilterRange implements the range (ie: [min, max]) the filters will use to take their filtering decisions.
Internally it uses the Boost class interval but maybe one could use a SEAL class (FML/RangeSet or FML/Bound)
Definition at line 34 of file FilterRange.h.
|
protected |
Definition at line 142 of file FilterRange.h.
|
inline |
Default constructor: it sets the minimum value to -infinity and the maximum value to +infinity.
Inline methods:
Constructors
Definition at line 170 of file FilterRange.h.
FilterRange::FilterRange | ( | const FilterRange & | range | ) |
Constructor with parameters:
min | : the minimum value of the range |
max | : the maximum value of the range |
Definition at line 175 of file FilterRange.h.
|
inlinevirtual |
|
protected |
add a new range [xmin,xmax] deleting previous ranges full contained
Special case where one adds a no-op interval
Definition at line 84 of file FilterRange.cxx.
|
inline |
Return the maximum value of the range.
Definition at line 232 of file FilterRange.h.
|
inline |
Return the minimum value of the range.
Definition at line 227 of file FilterRange.h.
Add [xMin, xMax] interval to existing set of valid ranges.
xMin | - lower bound of a new valid range |
xMax | - upper bound of a new valid range |
Reset the whole range : this is temporary, just to mimic FML::RangeSet API
Definition at line 68 of file FilterRange.cxx.
void FilterRange::includeAll | ( | ) |
Set full range (from MINUS_INF to PLUS_INF ).
Definition at line 75 of file FilterRange.cxx.
|
inline |
return Return true if the range is active (optimize parsing of multiple ranges and returning the final decision)
Definition at line 247 of file FilterRange.h.
bool FilterRange::isInRange | ( | const double | point | ) | const |
return Return true if the point is in range : min <= point <= max
Const methods:
Definition at line 45 of file FilterRange.cxx.
|
inline |
Return the minimum value of the range.
Definition at line 209 of file FilterRange.h.
|
inline |
Define -infinity according to specific implementation.
Definition at line 242 of file FilterRange.h.
FilterRange & FilterRange::operator= | ( | const FilterRange & | obj | ) |
|
inline |
Define +infinity according to specific implementation.
Definition at line 237 of file FilterRange.h.
|
inline |
Return the double precision for the comparaison of doubles.
Definition at line 204 of file FilterRange.h.
|
inline |
Definition at line 266 of file FilterRange.h.
|
inline |
Definition at line 261 of file FilterRange.h.
|
inline |
Definition at line 256 of file FilterRange.h.
|
inline |
Return the maximum value of the range.
Definition at line 218 of file FilterRange.h.
|
protected |
|
protected |
The boost interval wrapped by a boost optional.
This is to allow the instantiation of uninitialised ranges
Definition at line 147 of file FilterRange.h.