I have root files with a tree. I need the variable
When I do
it shows several branches with one name:
*Br 10 :nHits : Int_t
*Br 15 :nHits : Int_t
with different compression level. The first branch is filled with 0-s, and when I try to get
nHits from a compiled program, I get only zeroes. However, I can plot the variable using the tree viewer.
Root generated this script from the root file (there were two lines with
nHits, I had to comment out one of them to have no errors),
fChain->SetBranchAddress(“nHits”, &nHits, &b_RecoBAMAInfoBranch_nHits);
but I can’t get such branch or get nHits from branch like that.
Can I get Branch 15 from the tree?
(there is no such method in TTree documentation)
I also tried to TTree::Scan this variable, but this gives only part of events (I want all data be processed from the script or better from a C++ program).
I can’t regenerate root files. They are read-only and there are many of them.
ROOT Version: 6.12/06