 |
Belle II Software
release-05-02-19
|
13 #include <tracking/trackFindingVXD/filterMap/filterFramework/TBranchLeafType.h>
28 template<
typename Type>
29 class SingleElementSet {
41 template<
class VariableType >
53 void persist(TTree* t,
const std::string& branchName,
const std::string& variableName)
57 leafList += variableName;
61 TBranch* branch =
new TBranch(t, branchName.c_str() , &
m_element, leafList.c_str());
62 t->GetListOfBranches()->Add(branch);
73 std::string
getNameAndReference(std::vector<std::pair<char, void*>>* pointers =
nullptr,
const std::string& varname =
"x")
75 std::string val = std::to_string(
m_element);
77 if (pointers !=
nullptr) {
79 val =
"#" + std::to_string(pointers->size());
82 return (
"(" + val +
" == " + varname +
")");
char TBranchLeafType(const char *)
Overloading TBranchLeafType to be able to get identifier 'C' for type char*.
bool contains(const VariableType &x) const
Method used by the filter tools to decide on the fate of the pair.
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.
Abstract base class for different kinds of events.
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
Type getElement(void) const
Accessor to the sup of the set.
Type m_element
Member variable for the single element of the set.
SingleElementSet(Type element)
Constructor.