[ROOT] Questions regarding TDirectory

From: cstrato@EUnet.at
Date: Fri Jan 04 2002 - 23:58:55 MET


Dear Rene;

When trying to create a complicated directory hierarchy in TFile, I came

across the following questions:

1, Constructor: Sorrowly, mkdir() cannot be used to check if a directory

exists already, since "Error("TDirectory","Directory %s exists
already",name);"
in the constructor does not set "gDirectoy = 0;". I suppose this is a
feature to allow namecycles, but then I would suggest to change "Error"
to "Warning"?

2, RecursiveRemove(): Is it ok to call RecursiveRemove(), when I want to

delete a TObject, or does this have side effects? (I need to pass a
TObject and not a namecycle.)

3, Write(): Is there a reason why the variable "name" is not used in
method
Write(name = 0,..)? It would be great if I could use dir->Write(MyName)
to
write a single object to TFile.

4, FindObjectAny(): How can  I find an object in TFile containing a
complicated
hierarchy of TDirectories? It would be great to have a recursive method
analogous to "TFolder::FindObjectAny()".

5, EncodeNameCycle(): Since every TObject can be stored in TFile, would
it
be possible to move the methods Encode/DecodeNameCycle() to TObject?

6, Shortcut/Alias: A nice feature of TFolder is that one folder can be
added to different folders. It would be great if this could also be done

with TDirectory, e.g. as shortcut or alias as known from other file
systems.
Sorrowly, creating a reference TRef does not help, since TBrowser is not

able to recognize it as alias to TDirectory.

Thank you for your help.

Best regards
Christian
----------------------------------
C.h.r.i.s.t.i.a.n  S.t.r.a.t.o.w.a
V.i.e.n.n.a,  A.u.s.t.r.i.a



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