62 throw cms::Exception(
"NoTreeAvailable") <<
"No TTree set in TreeReader::addBranch." << std::endl;
64 TBranch *
branch =
tree->GetBranch(expression.c_str());
66 throw cms::Exception(
"BranchMissing") <<
"Tree branch \"" << expression <<
"\" missing." << std::endl;
80 TString
typeName = leaf->GetTypeName();
106 "unsupported type \"" 121 <<
"\" is not known to the " 125 pos->second.setOpt(
opt, optVal);
131 throw cms::Exception(
"DuplicateVariable") <<
"Duplicate Variable \"" <<
name <<
"\"." << std::endl;
136 "TreeReader::addTypeSingle." 168 template <
typename T>
170 return std::pair<void *, std::vector<T> >(
nullptr, std::vector<T>());
176 throw cms::Exception(
"DuplicateVariable") <<
"Duplicate Variable \"" <<
name <<
"\"." << std::endl;
181 "TreeReader::addTypeMulti." 197 multiInt.push_back(makeMulti<Int_t>());
201 multiBool.push_back(makeMulti<Bool_t>());
215 throw cms::Exception(
"NoTreeAvailable") <<
"No TTree set in TreeReader::automaticAdd." << std::endl;
217 TIter iter(
tree->GetListOfBranches());
219 while ((
obj = iter())) {
220 TBranch *
branch =
dynamic_cast<TBranch *
>(
obj);
224 if (skipTarget && !std::strcmp(
branch->GetName(),
"__TARGET__"))
227 if (skipWeight && !std::strcmp(
branch->GetName(),
"__WEIGHT__"))
252 throw cms::Exception(
"NoTreeAvailable") <<
"No TTree set in TreeReader::automaticAdd." << std::endl;
254 for (std::map<AtomicId, Value>::iterator iter =
valueMap.begin(); iter !=
valueMap.end(); iter++)
255 iter->second.update(
this);
262 throw cms::Exception(
"NoTreeAvailable") <<
"No TTree set in TreeReader::automaticAdd." << std::endl;
267 Long64_t entries =
tree->GetEntries();
277 for (std::map<AtomicId, Value>::const_iterator iter =
valueMap.begin(); iter !=
valueMap.end(); iter++)
278 iter->second.fill(iter->first,
this);
287 for (std::map<AtomicId, Value>::const_iterator iter =
valueMap.begin(); iter !=
valueMap.end(); iter++)
288 iter->second.fill(iter->first,
this);
297 std::vector<AtomicId>
result;
298 for (std::map<AtomicId, Value>::const_iterator iter =
valueMap.begin(); iter !=
valueMap.end(); iter++)
299 result.push_back(iter->first);
308 void *
value =
nullptr;
352 const std::vector<Double_t> *
values =
static_cast<const std::vector<Double_t> *
>(ptr);
355 for (std::vector<Double_t>::const_iterator iter =
values->
begin(); iter !=
values->
end(); iter++)
360 const std::vector<Float_t> *
values =
static_cast<const std::vector<Float_t> *
>(ptr);
363 for (std::vector<Float_t>::const_iterator iter =
values->
begin(); iter !=
values->
end(); iter++)
368 const std::vector<Int_t> *
values =
static_cast<const std::vector<Int_t> *
>(ptr);
376 const std::vector<Bool_t> *
values =
static_cast<const std::vector<Bool_t> *
>(ptr);
407 #define TREEREADER_ADD_IMPL(T, C) \ 409 void TreeReader::addSingle<T>(AtomicId name, const T *value, bool opt) { \ 410 addTypeSingle(name, value, C, opt); \ 414 void TreeReader::addMulti(AtomicId name, const std::vector<T> *value) { \ 415 addTypeMulti(name, value, C); \ 423 #undef TREEREADER_ADD_IMPL
const std::complex< double > I
unsigned long long uint64_t
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
#define TREEREADER_ADD_IMPL(T, C)