Re: Writing an object in the directory

From: Otto Schaile <Otto.Schaile_at_physik.uni-muenchen.de>
Date: Wed, 30 Jul 2008 17:47:18 +0200


Hi Alberto,
only TH1, TTree and TEventList are automatically added to the current directory pointed to by gDirectory.
Your object must be added by a:
myobj->SetDirectory(gDirectory)
Be careful to remove it again in its dtor in case you delete it. Cheers
Otto

Alberto Pulvirenti wrote:
> Dear all,
>
> I have made a class which inherits from TNamed. I expected that, when
> I create an object of this class, I would then see it in the
> gDirectory using gDirectory->ls(). Instead, I don't see it after I
> created it.
> What else should one do in order to be able to see an object
> implemented this way in the gDirectory?
>
> Thanks, cheers
>
> Alberto
>

-- 
Dr. Otto Schaile            Department f"ur Physik, LMU M"unchen
Phone: +49 89 289 14070     Am Coulombwall 1, D-85748 Garching, Germany
Mobil: +49 160 1553598
FAX:   +49 89 289 14072     EMail: Otto.Schaile_at_Physik.Uni-Muenchen.DE
Received on Wed Jul 30 2008 - 17:47:28 CEST

This archive was generated by hypermail 2.2.0 : Wed Jul 30 2008 - 23:50:02 CEST