![]() |
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. | |
| FilterRange (const FilterRange &range) | |
| Copy constructor: | |
| FilterRange (const double min, const double max) | |
| Constructor with parameters: | |
| virtual | ~FilterRange () |
| Destructor: | |
| FilterRange & | operator= (const FilterRange &obj) |
| Assignment operator: | |
| double | precision () const |
| Return the double precision for the comparaison of doubles. | |
| double | lower () const |
| Return the minimum value of the range. | |
| double | upper () const |
| Return the maximum value of the range. | |
| double | getMin () const |
| Return the minimum value of the range. | |
| double | getMax () const |
| Return the maximum value of the range. | |
| double | PLUS_INF () const |
| Define +infinity according to specific implementation. | |
| double | MINUS_INF () const |
| Define -infinity according to specific implementation. | |
| 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 final decision) | |
| void | setPrecision (const double delta) |
| void | setRange (const double lower, const double upper) |
| Non-const methods: | |
| 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. | |
| void | includeAll () |
| Set full range (from MINUS_INF to PLUS_INF ). | |
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 | |
Protected Attributes | |
| std::optional< interval_t > | m_range |
| The boost interval wrapped by a boost optional. | |
| double | m_precision |
| Setup the wanted double precision. | |
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 | ) |
Copy constructor:
Public methods:
Copy constructor
Definition at line 26 of file FilterRange.cxx.
|
inline |
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.
| void FilterRange::include | ( | const double | xMin, |
| const double | xMax ) |
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 | ) |
Assignment operator:
Assignment operator.
Definition at line 32 of file FilterRange.cxx.
|
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.
| void FilterRange::setRange | ( | const double | lower, |
| const double | upper ) |
|
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.