I need to know the way to get the list of Histogram names in the Flat N-tuple, likewise we get from Tree -> MakeClass(“anyname”). Can anyone please tell me ?
Thanks in advance for positive and quick responses.
Hi,
you can use TTree::Print to print out available branches or you can loop over the list of branches, something like:
for (auto b : *t.GetListOfBranches()) { std::cout << b->GetName() << std::endl; }
Alternatively, you can construct a RDataFrame from the NTuple and then call dataframe.GetColumnNames(), which also returns non-top-level branches (but in the case of a flat NTuple it should not make a difference).