RE: [ROOT] <TFile::cd> Unkknown directori db

From: Philippe Canal (pcanal@fnal.gov)
Date: Mon Nov 08 2004 - 19:11:30 MET


Hi Iouri,

To copy them with selection, you are going to add code like:
	origFile->cd("DB");
	t = (TTRee*)origFile->Get("Dbname");
	newFile->mkdir("DB"); newFile->cd("DB);
	t->CopyTree(....);
For all the directories and trees (STNTUPLE, DB, FillStntupleFolder,
InitStntupleFolder, StntuipleMarkerFolder).
You might also need to do the same for the histograms (see
$ROOTSYS/tutotials/hadd.C for some inspiration).

Cheers,
Philippe.

-----Original Message-----
From: Iouri Koultchitski [mailto:kulchits@mail.cern.ch] 
Sent: Monday, November 08, 2004 4:39 AM
To: Philippe Canal
Cc: 'ROOT'
Subject: RE: [ROOT] <TFile::cd> Unkknown directori db

Hi Philippe, 

Thank you very much for your answer. You are right. 
I cloned only STNTUPLE and did not clone the DB file to new root file. 

Do you know how one can copy (with selection) all files from STNTUPLE file
(STNTUPLE, DB, FillStntupleFolder, InitStntupleFolder,
StntuipleMarkerFolder)?

With best regards, Yuri


On Fri, 5 Nov 2004, Philippe Canal wrote:

> Date: Fri, 05 Nov 2004 10:42:19 -0600
> From: Philippe Canal <pcanal@fnal.gov>
> To: 'Iouri Koultchitski' <kulchits@mail.cern.ch>,
>      'ROOT' <roottalk@pcroot.cern.ch>
> Subject: RE: [ROOT] <TFile::cd> Unkknown directori db
> 
> Hi Iouri,
> 
> My guess is that  
>     The result is "Error in <TFile::cd> Unknown directory db".
> Means that you have code looking like
> 	file->cd("db");
> And that the directory 'db' does not exist in your file.
> 
> > I use the macro similar to copytree.C for production root ntuple 
> > from CDF
> STNtuple.
> 
> Did you make sure that the directory hiearchy was properly 'copied' 
> over to your new file?
> 
> Cheers,
> Philippe.
> 
> -----Original Message-----
> From: owner-roottalk@pcroot.cern.ch 
> [mailto:owner-roottalk@pcroot.cern.ch]
> On Behalf Of Iouri Koultchitski
> Sent: Friday, November 05, 2004 3:48 AM
> To: ROOT
> Subject: [ROOT] <TFile::cd> Unkknown directori db
> 
> Hi,
> 
> I use the macro similar to copytree.C for production root ntuple from 
> CDF STNtuple. The result is OK. But I can not make analysis of new 
> ntuple. The result is "Error in <TFile::cd> Unknown directory db".
> What is a reason of this error?
> 
> with best regards, Yuri
> 
> 



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:10 MET