Re: Retrieving tree name

Rene Brun (Rene.Brun@cern.ch)
Wed, 12 Aug 1998 09:59:47 +0200


> Hello Rooters,
>
> Is it an easy way to retrieve a tree/ntuple name?
> I would like to pass a name of the HBOOK ntuple into root generated
> histograms, plots, etc after capplying h2root.
>
> Michal Lijowski
>

What do you want to do exactly?
You can retrieve the name of a Tree via tree->GetName().
You can get the list of branches or leaves via
TTree::GetListOfBranches
TTree::GetListOfLeaves
These 2 functions return a pointer to a TList object.
You can get a pointer to a branch or leaf via
TTree::GetBranch
TTree::GetLeaf

Rene Brun