How to recover an object in a TTree?

Hy everbody,

please apologize if this is a thread that has already been discussed here, but I haven’t found anything yet about this in the forum…

Here’s the problem:
I have a TTree with branches and leaves. I believe that the leaves are all histos TH1F - at least the ones I’m interested in (as I can draw them). Is there a way to recover them as a TH1F object, so that I can continue working on them as I would do with a “normal” histogramm? If so, how can I do this?

I hope I have made myself clear enough :unamused: Thanks for your help…

Have a nice day,


To get a more precise answer, you should give more info about your Tree structure.
Assuming that your Tree has been created with one TH1F in a branch (called “hist”), you can do something like

    TH1F *myhist=0;
    tree.GetEntry(123);  //get histogram for entry number 123


Many thanks for your help, Rene…