Re: [ROOT] Add problem

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Aug 06 2002 - 19:00:53 MEST


Giuseppe,

What are you trying to do ?
You cannot add a file to a file !

Rene Brun

On Tue, 6 Aug 2002, [iso-8859-1] giuseppe.foggi@libero.it wrote:

> Hi,
> I have this named script
> 
> {
> ........................
> ....................
> TFile *project = new TFile("project.root","RECREATE");
> TDirectory *dir = new TDirectory("dir","dir.root");
> TFile *f  = new TFile("f.root","RECREATE");
> project->mkdir("dir","dir.root");
> project->Add(f);
> f->Write();
> project->Close();
> ....................
> ..................
> }
> 
> I run it , after I write:
> 	root[] TFile g("project.root","READ")
> 	root[]  g.ls()
> 
> and I get
> 	TFile ** 	project.root
> 	 TFile * 	project.root
> 	    Key: TDirectory dir;1  dir.root
> 
> Where is "f.root"?
> 
> My problem is:
> 	to append TFile obj to obj TDirectory
> 	to append TFile obj to obj TFile
> how can I do?
> Cheers.
> Giuseppe.
> 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:03 MET