Inspired by the following link root.cern.ch/download/doc/ROOTUs … 12s20.html , I have been trying to directly draw the getter methods of a user-defined object with which the TTree is filled. I am using the latest “root-v6-02”. The TTree seems properly filled though the private members appear in a TBrowser (while I thought Cling was not to display them). If in Cling, I set the branch address to the object, and then loop with the “GetEntry” method in Cling I do get the right values for the “getters”.
However, if I directly load the file containing the TTree (I do have a shared object, a .pcm file and a .rootmap for my classes), and try to directly type :
It creates a temporary histogram with the right number of entries but a 0 RMS and a 0 Mean. I have tried this for all the “getters”, it produces the same result (though everything works with “SetBranchAddress” followed by “GetEntry”).
I have tried using “@” too, it does work to display the size of a vector in the TTree, but not for the “getters” of MyClass.
I have searched through the forum, I reckon I am missing a simple thing, but I can’t figure it out !
Many thanks in advance,