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