11#include <tracking/trackFindingVXD/filterMap/filterFramework/TBranchLeafType.h>
15#include <framework/logging/Logger.h>
29 template<
typename InfType >
45 template<
class VariableType >
46 inline bool contains(
const VariableType& x)
const {
return m_inf < x ;};
57 void persist(TTree* t,
const std::string& branchName,
const std::string& variableName)
61 leafList += variableName;
64 TBranch* branch =
new TBranch(t, branchName.c_str(), &
m_inf, leafList.c_str());
65 t->GetListOfBranches()->Add(branch);
75 if (t->SetBranchAddress(branchName, &
m_inf) < 0) B2FATAL(
"LowerBoundedSet: branch address not valid");
86 std::string
getNameAndReference(std::vector<std::pair<char, void*>>* pointers =
nullptr,
const std::string& varname =
"X")
88 std::string minVal = std::to_string(
m_inf);
90 if (pointers !=
nullptr) {
92 minVal =
"#" + std::to_string(pointers->size());
95 return (
"(" + minVal +
" < " + varname +
")");
Represents a lower bounded set of arithmetic types.
LowerBoundedSet(InfType inf)
Constructor.
void persist(TTree *t, const std::string &branchName, const std::string &variableName)
Creates and sets the addresses of the leaves to store the inf value.
InfType m_inf
infinity value
LowerBoundedSet()
Constructor without argument.
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
bool contains(const VariableType &x) const
Method used by the filter tools to decide on the fate of the pair.
void setBranchAddress(TTree *t, const std::string &branchName, const std::string &)
Setting the branch address for a filter in a TTree.
InfType getInf(void) const
Accessor to the inf of the set.
char TBranchLeafType(const char *)
Overloading TBranchLeafType to be able to get identifier 'C' for type char*.
Abstract base class for different kinds of events.