Hi Martin,
Do:
TDirectory *dir = gDirectory;
TFile *f = new TFile("file.root","recreate");
myntuple->SetDirectory(0); //<====add this line
dir->GetList()->Write();
delete f;
Rene Brun
On Fri, 11 Jul 2003, Martin
Simard wrote:
>
> Hello,
>
> In my code I read a ntuple and do the following to write all histograms
> (objects);
>
>
> TDirectory *dir = gDirectory;
> TFile *f = new TFile("file.root","recreate");
> dir->GetList()->Write();
> delete f;
>
>
> The file.root contain all histograms but he contain also the ntuple that I
> read...
> I don't want to save the ntuple in the file. Writing histogram one by one
> works but do you have another solution.
>
> Martin
>
>
>
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET