Re: [ROOT] cd() and pwd()

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Nov 05 2003 - 18:49:43 MET


Hi Wolfgang,

I know that TFile::pwd is misleading. It simply shows the path
of the object for which you call pwd. The problem is that the working
directory may be in another file.
If you want to print the path of the current directory, do
  gDirectory->pwd();

Rene Brun

Wolfgang Waltenberger wrote:
> 
> Dear Root team,
> 
> in an interactive session I type:
> 
> root[13] TFile gg("new.root","recreate")
> root[14] gg.mkdir("folder")
> (class TDirectory*)0x93ef6c0
> root[15] gg.pwd()
> new.root:/
> root[16] gg.cd("folder")
> (Bool_t)1
> root[17] gg.pwd()
> new.root:/
> 
> My simple question is: why the last line? Why not
> new.root:/folder/
> ?
> 
> Cheers,
> 
> Wolfgang



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET