Re: TTree::CloneTree()

Rene Brun (Rene.Brun@cern.ch)
Fri, 05 Feb 1999 10:39:16 +0000


> Thierry AUGER wrote:
>
> Hi Rooters,
>
> I create a copy of a Tree using TTree::CloneTree() in a method of one
> of my class .
> Should I delete the copy that was created by CloneTree in my class
> destructor?
> CloneTree() does invoque the TObject::Clone() method in the end but I
> don't understand what's really done in this method.
>
> thank you,
> Thierry.

Hi Thierry,
TTree::CloneTree creates a new TTree object. This new object is
automatically
added to the list of objects associated to your current directory/file.
This object will be automatically deleted when you close this
directory/file.
You can delete this object in your class destructor if you do not need
this object before you close the file.
use
gDirectory->ls();
to see the list of objects in your current directory.

use
gObjectTable->Print();
to see the total number of objects per class

Rene Brun