Re: TTree::CloneTree()

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Feb 05 1999 - 11:39:16 MET


> 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



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:29 MET