[root] / trunk / io / io / inc / TDirectoryFile.h Repository:
ViewVC logotype

Log of /trunk/io/io/inc/TDirectoryFile.h

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 39611 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 8 19:35:17 2011 UTC (3 years, 7 months ago) by pcanal
File length: 6946 byte(s)
Diff to previous 34564
Introduce TMemFile and update TFileMerger to support incremental merges.

Add new tutorials ( net/treeClient.C + net/fastMergeServer.C )
demonstrating how a TMemFile can be used to do parallel merge
from many client. ( TMemFile still needs to be better integrated
with TMessage and TSocket).

The new TMemFile class support the TFile interface but only store
the information in memory.   This version is limited to 32MB.

   TMessage mess;
   ... 
   mess->ReadFastArray(scratch,length);
   transient = new TMemFile("hsimple.memroot",scratch,length);

will copy the content of 'scratch' into the in-memory buffer
created by/for the TMemFile.

   TMemFile *file = new TMemFile("hsimple.memroot","RECREATE");

Will create an empty in-memory of (currently fixed) size 32MB.

   file->ResetAfterMerge(0);

Will reset the objects in the TDirectory list of objects
so that they are ready for more data accumulations (i.e.
returns the data to 0 but keep the customizations).

Introduce the new function TFileMerger::IncrementalMerge will
will Merge the list of file _with_ the content of the output
file (if any).   This allows make several successive Merge
into the same TFile object.

Introduce non-static version of TFile::Cp allows the copy of
an existing TFile object.

Introduce new explicit interface for providing reseting 
capability after a merge.  If a class has a method with 
the name and signature:

   void ResetAfterMerge(TFileMergeInfo*);

it will be used by a TMemFile to reset its objects after
a merge operation has been done.

If this method does not exist, the TClass will use
a method with the name and signature:
  
   void Reset(Optiont_t *);

TClass now provides a quick access to these merging 
function via TClass::GetResetAfterMerge.   The wrapper function
is automatically created by rootcint and can be installed
via TClass::SetResetAfterMerge.   The wrapper function should have
the signature/type ROOT::ResetAfterMergeFunc_t:

   void (*)(void *thisobj, TFileMergeInfo*);

ResetAfterMerge functions were added to the following classes:
TDirectoryFile, TMemFile, TTree, TChain, TBranch, TBranhcElement, 
TBranchClones, TBranchObject and TBranchRef.

Revision 34564 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 23 02:50:45 2010 UTC (4 years, 6 months ago) by pcanal
File length: 6858 byte(s)
Diff to previous 24013
Resync the prototype and declaration of GetDirectory ; find typos

Revision 24013 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 26 12:07:40 2008 UTC (6 years, 8 months ago) by brun
File length: 6862 byte(s)
Diff to previous 23122
Add an optional argument Bool_t forceRead to TDirectory::ReadKeys.
When this argument is called with kFALSE, ReadKeys assume that the TKey members
have already been read before this call.

Revision 23122 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 10 14:56:30 2008 UTC (6 years, 9 months ago) by rdm
File length: 6840 byte(s)
Copied from: trunk/io/inc/TDirectoryFile.h revision 23121
Diff to previous 22992
move the following directories into "io":

castor, chrip, dcache, gfal, io, rfio, sql, xml

Revision 22992 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Apr 5 09:43:01 2008 UTC (6 years, 9 months ago) by pcanal
Original Path: trunk/io/inc/TDirectoryFile.h
File length: 6840 byte(s)
Diff to previous 22793
Use the DirectoryAutoAdd facility for the classes:
        TTree, TH1, TEventList, TEntryList, TGraph2D
(and hence their derived classes).

The instances of those classes are now added automatically 
to the current directory only when Constructe'd with arguments or Clone'd
and to the directory they are read from when their are stored
directly in a TKey. [Note: the default constructor never adds
the object to the current directory]

The directory auto add can still be disabled for instance
of TH1 and TGraph2D by setting TH1::AddDirectory.

Additionally one can disable the directory auto add for
a specific class by doing:

    TClass::GetClass("myclass")->SetDirectoryAutoAdd(0)

However you might want to also be able to restore the
behavior in which case you ought to do:

    TClass *cl = TClass::GetClass("myclass");
    ROOT::DirAutoAdd_t func = cl->GetDirectoryAutoAdd();
    cl->SetDirectoryAutoAdd(0);

TROOT::ReadingObject is marked as deprecated.. It is still
set (as it was) but is no longer used by the above mention
classes.

NOTE:  One side effect of this change, is that instnace 
of TTree, TH1, TEventList, TEntryList, TGraph2D that are
retrieved from a TMessage (i.e. from a socket) no longer
auto register themselves to the current ROOT directory.

Add a new optional parameter to TDirectory::Append: 'replace'
If replace is true (the default is false), the Append will
first remove from the directory any existing object and
print the message:

   Replacing existing OldClass: thename (Potential memory leak).

Add a new option parameter to TDirectory::CloneObject: 'autoadd'
If autoadd is true (the default), CloneObject will call the
object 'DirectoryAutoAdd' function (if any)

In TDirectory::CloneObject add support for multiple inheritance
from TObject where TObject is not the left most base class.

Fix memory leak in TGraph2D::operator= (and add TGraph2D::Clear)

Cleanup some documentation

Revision 22793 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 20 15:48:19 2008 UTC (6 years, 10 months ago) by rdm
Original Path: trunk/io/inc/TDirectoryFile.h
File length: 6758 byte(s)
Diff to previous 20882
make SaveObjectAs() const.

Revision 20882 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 19 11:31:26 2007 UTC (7 years, 2 months ago) by rdm
Original Path: trunk/io/inc/TDirectoryFile.h
File length: 6753 byte(s)
Diff to previous 19826
Set property svn:eol-style LF on all source and Makefiles. This should avoid
problems with Win32 line endings ending up in the repository. All MS tools
support LF eols fine.

Revision 19826 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:56:11 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/io/inc/TDirectoryFile.h
File length: 6753 byte(s)
Diff to previous 19825
imported svn:keywords Id property

Revision 19825 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:49:10 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/io/inc/TDirectoryFile.h
File length: 6806 byte(s)
Diff to previous 18672
remove :$ from tag line

Revision 18672 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 4 22:15:36 2007 UTC (7 years, 8 months ago) by pcanal
Original Path: trunk/io/inc/TDirectoryFile.h
File length: 6816 byte(s)
Diff to previous 17819
Extend the functionality of TDirectory::TContext
The TContext objects will not longer cd back to a directory
that was deleted between creation and their deletion.
For example:
   f->cd();
   {
     TDirectory::TContext ctxt(0);
     .... do something that change gDirectory.
     delete f;
   }
In the prevision implementation this lead to a f->cd() (i.e. core dump).
In the new implementation this leads to a gROOT->cd().
With this improvement we now strong recomment to switch code pattern
similar to:
   TDirectory *cursav = gDirectory;
   ... do something that changes gDirectory;
   if (cursav) cursav->cd();
(which also leads to a core if cursav is directly or indirectly deleted)
to
   TDirectory::TContext ctxt(0);
   ... do something that changes gDirectory;

CVS ----------------------------------------------------------------------

Revision 17819 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 9 10:16:07 2007 UTC (7 years, 11 months ago) by rdm
Original Path: trunk/io/inc/TDirectoryFile.h
File length: 6777 byte(s)
Diff to previous 17539
correct cvs ident line (base/cont/meta -> io).

Revision 17539 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jan 28 18:28:12 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/io/inc/TDirectoryFile.h
File length: 6779 byte(s)
Diff to previous 17528
-Implement the changes required by the new version of TDirectory

Revision 17528 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 26 15:39:33 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/io/inc/TDirectoryFile.h
File length: 6595 byte(s)
Diff to previous 17420
Add the following new functions:
  virtual Int_t   ReadTObject(TObject *obj, const char *keyname);
  virtual Int_t   WriteTObject(const TObject *obj, const char *name=0, Option_t *option="");

Add an optional argument bufsize in the following functions
  virtual Int_t   Write(const char *name=0, Int_t opt=0, Int_t bufsize=0);
  virtual Int_t   Write(const char *name=0, Int_t opt=0, Int_t bufsize=0) const ;
  virtual Int_t   WriteObjectAny(const void *obj, const char *classname, const char *name, Option_t *option="", Int_t bufsize=0);
  virtual Int_t   WriteObjectAny(const void *obj, const TClass *cl, const char *name, Option_t *option="", Int_t bufsize=0);

Revision 17420 - (view) (download) (as text) (annotate) - [select for diffs]
Added Mon Jan 22 06:03:53 2007 UTC (8 years ago) by brun
Original Path: trunk/io/inc/TDirectoryFile.h
File length: 6441 byte(s)
The new class was forgotten in my previous check-in

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

Subversion Admin
ViewVC Help
Powered by ViewVC 1.0.9