I have a problem with a TTree having a branch which holds an object. The class (ParticleInfo) of those objects is derived from TObject and essentially contains a TClonesArray holding TParticle objects and a set of member functions which give access to the variables of the objects in the array.
I have attached the source here (ParticleInfo.cc and ParticleInfo.hh).
In my analyses I fill the tree with no problems and the output root file is just OK. The problem arise when I try to inspect the TTree with the TreeViewer or drawing histograms (with TTree::Draw()) using the class’s member functions. However if I don’t use these tools and I make analisys just retrieving the objects with SetBranchAddress and GetEntry, the member functions work perfect.
I have spent several days trying to solve this kind of problems and I would need a little help.
I have also attached a macro called analysis.C and the root file with the tree for an easy inspecting. Everything is compressed in the file test.tar.gz
Thanks in advance.
test.tar.gz (43.1 KB)