Belle II Software development
|
Represents a closed set of arithmetic types. More...
#include <ClosedRange.h>
Public Member Functions | |
ClosedRange (MinType min, MaxType max) | |
Constructor. | |
template<class VariableType > | |
bool | contains (const VariableType &x) const |
Method used by the filter tools to decide if accept a combination. | |
void | persist (TTree *t, const std::string &branchName, const std::string &variableName) |
Creates and sets the addresses of the leaves to store the min and max values. | |
void | setBranchAddress (TTree *t, const std::string &branchName, const std::string &) |
sets branch addresses of the given tree to the m_min and m_msx. | |
MinType | getInf (void) const |
Accessor to the inf of the set (which is also the min) | |
MaxType | getSup (void) const |
Accessor to the sup of the set (which is alsto the max) | |
std::string | getNameAndReference (std::vector< std::pair< char, void * > > *pointers=nullptr, const std::string &varname="X") |
generates a "name" and fills the vector with the variable references | |
Private Attributes | |
MinType | m_min |
the minimum of this range | |
MaxType | m_max |
the maximum of this range | |
Represents a closed set of arithmetic types.
Range is used in conjunction with the SelectionVariable to define one of the building blocks of the Filters
Definition at line 32 of file ClosedRange.h.
|
inline |
|
inline |
Definition at line 37 of file ClosedRange.h.
|
inline |
Method used by the filter tools to decide if accept a combination.
x | is the result of some SelectionVariable It returns true if x belongs to the closed set [ m_min, m_max ] It does not throw. |
Definition at line 46 of file ClosedRange.h.
|
inline |
|
inline |
generates a "name" and fills the vector with the variable references
varname | pointer to vector which contains a pair of char which indicates the type object pointed to and the actual pointers to the bounds, if equal to nullptr it will not be filled |
pointers | optional name of the filter this range is attached to make the output look nicer |
Definition at line 95 of file ClosedRange.h.
|
inline |
Accessor to the sup of the set (which is alsto the max)
Definition at line 87 of file ClosedRange.h.
|
inline |
Creates and sets the addresses of the leaves to store the min and max values.
t | the pointer to the TTree that will contain the TBranch of this range. |
branchName | the name of the TBranch that will host this range. |
variableName | the name of the selection variable this range is applied to. |
The leaves will be named as the selection variable name with the "_min"/"_max" suffixes for the min/max value.
Definition at line 57 of file ClosedRange.h.
|
inline |
sets branch addresses of the given tree to the m_min and m_msx.
Note: it assumes a certain ordering
t | the tree of the which the branch addresses need to be set |
branchName | name of the branch |
Definition at line 76 of file ClosedRange.h.
|
private |
the maximum of this range
Definition at line 118 of file ClosedRange.h.
|
private |
the minimum of this range
Definition at line 116 of file ClosedRange.h.