76 std::vector<std::string> tokenized;
78 for (
const auto& token : tokenized) {
79 auto ipart = token.find(
'/');
80 if (ipart == std::string::npos) {
82 log << MSG::ERROR <<
"Tree " <<
m_histDef->alias <<
": Badly formed variable definition " << token
86 auto branch = token.substr(0, ipart);
87 auto type = token.substr(ipart+1);
88 std::function<void(TBranch*,
const IMonitoredVariable&)> fillerFunc;
90 if (
type ==
"B") fillerFunc = scalarFillerFunc<Char_t>;
91 else if (
type ==
"b") fillerFunc = scalarFillerFunc<UChar_t>;
92 else if (
type ==
"S") fillerFunc = scalarFillerFunc<Short_t>;
93 else if (
type ==
"s") fillerFunc = scalarFillerFunc<UShort_t>;
94 else if (
type ==
"I") fillerFunc = scalarFillerFunc<Int_t>;
95 else if (
type ==
"i") fillerFunc = scalarFillerFunc<UInt_t>;
96 else if (
type ==
"F") fillerFunc = scalarFillerFunc<Float_t>;
97 else if (
type ==
"f") fillerFunc = scalarFillerFunc<Float16_t>;
98 else if (
type ==
"D") fillerFunc = scalarFillerFunc<Double_t>;
99 else if (
type ==
"d") fillerFunc = scalarFillerFunc<Double32_t>;
100 else if (
type ==
"L") fillerFunc = scalarFillerFunc<Long64_t>;
101 else if (
type ==
"l") fillerFunc = scalarFillerFunc<ULong64_t>;
102 else if (
type ==
"O") fillerFunc = scalarFillerFunc<Bool_t>;
103 else if (
type ==
"string") fillerFunc = scalarFillerFunc<std::string>;
104 else if (
type ==
"vector<char>") fillerFunc = vectorFillerFunc<char>;
105 else if (
type ==
"vector<unsigned char>") fillerFunc = vectorFillerFunc<unsigned char>;
106 else if (
type ==
"vector<int>") fillerFunc = vectorFillerFunc<int>;
107 else if (
type ==
"vector<unsigned int>") fillerFunc = vectorFillerFunc<unsigned int>;
108 else if (
type ==
"vector<float>") fillerFunc = vectorFillerFunc<float>;
109 else if (
type ==
"vector<double>") fillerFunc = vectorFillerFunc<double>;
110 else if (
type ==
"vector<long>") fillerFunc = vectorFillerFunc<long>;
111 else if (
type ==
"vector<unsigned long>") fillerFunc = vectorFillerFunc<unsigned long>;
112 else if (
type ==
"vector<string>") fillerFunc = vectorFillerFunc<std::string>;
113 else if (
type ==
"C") {
115 log << MSG::ERROR <<
"Tree " <<
m_histDef->alias <<
": Branch type \"C\" not supported for branch" <<
branch
116 <<
"; please use \"string\"" <<
endmsg;
120 log << MSG::ERROR <<
"Tree " <<
m_histDef->alias <<
": Unrecognized branch type " <<
type <<
" for branch " <<
branch
121 <<
"; ignoring branch " <<
endmsg;