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