Skip to content
Snippets Groups Projects
Commit 924e97f2 authored by Philippe Canal's avatar Philippe Canal
Browse files

From Sergei Linev:

1) In normal constructor I add new argument - mother of directory.
   If it is not specified (for instance, if user creates TDirectory himself), gDirectory will be used.
   In principle, fMother was before, but now it consecutively used in most TDirecory methods, related to
   parent/child relationship.
2) Together with directory fMother member file pointer fFile propogated to all childs.
   Consequently, each directory knows to which file it belongs.
3) When streamed from the file, fFile memeber is assigned from TBuffer::GetParent(). fFile is enougth
   to read keys from the file. Mother directory is assigned later in TKey::ReadObj().


TDirectory::GetPath() uses static variable and will fails in multithread application.
   I introduce new GetPath() method and TString fPathBuffer to produce correct full path.
   Old code was moved in GetPathStatic() method. To optimize memory usage, one can replace TString
   by const char* (as it was before).


git-svn-id: http://root.cern.ch/svn/root/trunk@13910 27541ba8-7e3a-0410-8455-c3a389f83636
parent 0416eb6b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment