Extracting an Object from a TTree

Hi,
I’m just trying to get an Object from a TTree and I don’t know how I can do it!
is there a way to do that?
Thanks!

How did you define your TTree and how did you store the object within the TTree?

first, thank you for replying,
my tree contain the output of a simulation, and it’s contain a 13 branch of type TH1F and TNtuple.
I’m trying to use TObjectobj=(TObject) leafobject->GetObject() (leafobject it’s a pointer of type TLeafObject) but i get a break.

This is quite weird to attach TH1F and TNtuple to a TTree. You should store all these objects in a TFile, not in a TTree (I was not aware that it was possible).

any way, thanks again!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.