I am using the TTree::SetBranchAddress member function to collect data from a TTree* that is passed into the function.
However, I am hoping for some guidance on what each return code value means. The online documentation suggests to use the documentation for TTree:ResetBranchAddress and suggests the return codes should mean the same thing.
When I check the return code of TTree::SetBranchAddress on a branch that exists, I get the return code 79520, however, if I try to use it with a branch that doesn’t exist, I get the return code 4113. However, these do not correspond to those in the documentation. Is there anywhere I can look to see what each code means?
the return codes are documented here: root.cern.ch/doc/master/classTT … 27252cad96
The numbers you report are indeed odd: what is the code which led to them?
As a side note, you may be interested in adopting the TTreeReader to read trees: see this example root.cern/doc/master/hsimpleReader_8C.html
Thanks for your prompt response D.
On further investigation I found that it is because my environment variables had loaded a version of ROOT and GCC that differed from those that I built my executable with, and so the binary and the shared libraries it was loading were incompatible.
Thanks for the link, and I will look at the TTreeReader class.
great. Don’t hesitate to post if something goes wrong but the new approach should be even simpler than direct usage of the TTree interface.