Re: Putting objects in a root file [newbie]

From: Roger Mason <rmason_at_esd.mun.ca>
Date: Tue, 27 Sep 2005 18:10:03 -0230


Hello Sue,

Sue Kasahara <schubert_at_hep.umn.edu> writes:

> Hi Roger,
> Open the output file before constructing the TNtuple like this:
>
> TFile f("MySpectrum.root","RECREATE");
> TNtuple *ntuple = new TNtuple("ntuple","data from ascii file","wn:shift:signal");
>
>
> The TNtuple automatically attaches itself on construction
> to the current gDirectory, which is set to the TFile root directory
> on TFile construction.
> Regards,
> -Sue

Thanks, that did it.

Roger Received on Tue Sep 27 2005 - 22:40:42 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:12 MET