[root] / trunk / tree / tree / src / TBranch.cxx Repository:
ViewVC logotype

Log of /trunk/tree/tree/src/TBranch.cxx

Parent Directory Parent Directory


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

Revision 43954 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 25 21:53:30 2012 UTC (2 years, 8 months ago) by pcanal
File length: 86915 byte(s)
Diff to previous 43607
Fix coverity issues:
Dereference null return:
33380, 34035: TBranch::GetFile

Revision 43607 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 2 14:51:59 2012 UTC (2 years, 9 months ago) by pcanal
File length: 86863 byte(s)
Diff to previous 43518
When updating a cicurlar TTree, do not dereference null pointer (happens in some cases of branches without data that are part of an object hierarchy).  This fixes https://savannah.cern.ch/bugs/?93282

Revision 43518 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 28 01:04:07 2012 UTC (2 years, 9 months ago) by pcanal
File length: 86851 byte(s)
Diff to previous 43304
Fix for coding convention RS1 and RS2

Revision 43304 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 8 16:25:58 2012 UTC (2 years, 10 months ago) by pcanal
File length: 86925 byte(s)
Diff to previous 43207
Avoid null pointer dereferencing (coverity #33173)

Revision 43207 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 2 04:35:25 2012 UTC (2 years, 10 months ago) by pcanal
File length: 86874 byte(s)
Diff to previous 43052
Avoid null return dereference (cov 36312)

Revision 43052 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 17 22:08:25 2012 UTC (2 years, 11 months ago) by pcanal
File length: 86852 byte(s)
Diff to previous 42754
SetBufferOffset must be called before SetBufferDisplacement.  This was inadvertently broken in the (optimization) revision 38801 and is preventing the reading of files with partial buffer/basket fast merge (For example file from CDF) (Also update GetEntryExport with some of the optimization from GetEntry

Revision 42754 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 20 20:13:07 2012 UTC (3 years ago) by pcanal
File length: 86715 byte(s)
Diff to previous 42423
From Peter van Gemmeren:

Allow multiple read caches per file by adding a fCacheReadMap member and owner arguments to GetCacheRead() and SetCacheRead()
to TFile.

Index: io/io/inc/TFileCacheRead.h
Index: io/io/src/TFileCacheRead.cxx
* Adding new argument for constructor to specify TTree owner
* whitespace indents

Index: tree/tree/inc/TBasket.h
Index: tree/tree/src/TBasket.cxx
* Add optional tree owner argument to LoadBasketBuffers() to retrieve cache.
* In LoadBasketBuffers() and ReadBuffers() check the cache first than call TFile::ReadBuffer only if needed.

Index: tree/tree/inc/TChain.h
Index: tree/tree/src/TChain.cxx
* Override SetCacheSize() function to update TTree owner on the current cache.
* whitespace indents

Index: tree/tree/src/TTree.cxx
* Get TTreeCache for current TTree, by specifying owner in GetCacheRead() calls
* Always delete owned cache

Index: tree/tree/src/TTreeCache.cxx
* Adding new argument for constructor for TFileCacheRead to specify TTree owner

Index: tree/treeplayer/src/TTreePlayer.cxx
* Get TTreeCache for current TTree, by specifying owner in GetCacheRead() calls

Index: tree/tree/src/TTreeCloner.cxx
* Call TBasket::LoadBasketBuffers() with current TTree as owner of cache

Index: proof/proofplayer/src/TEventIter.cxx
* Get TTreeCache for current TTree, by specifying owner in GetCacheRead() and SetCacheRead() calls

Revision 42423 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 6 20:37:08 2011 UTC (3 years, 1 month ago) by pcanal
File length: 86710 byte(s)
Diff to previous 41074
In TBuffer::Expand, when shrinking the buffer do not shrink below the size of the
data already accumulated in the buffer (i. no less than the value of TBuffer::Length()).

In TBranch::SetBasketSize, instead of using the hard minimum of 100, use
100 + the length of the branch name (as 100 is too smalli to hold the 
basket's key information for any branch name larger than 30 characters).

This fixes the write past the end of buffer (leading to segfaults)
reported in Savannah:  <http://savannah.cern.ch/bugs/?89645>

Revision 41074 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 30 15:19:01 2011 UTC (3 years, 3 months ago) by pcanal
File length: 86661 byte(s)
Diff to previous 40872
From Matthew Straits:
Documentation update:

* Merge two very similar documentation blocks in TBranch.cxx and have one
simply refer to the other.

* Note the boolean type triggered by 'O' in all the lists.  Also clarify that
it is the letter Oh, not the number zero.

* Remove documentation claiming that if you say "foo/I2" it will write out 2
bytes instead of the default size.  My tests show that if I make a branch
like this, I can store numbers larger than 65535, and moreover I read through
the code and do not see the second character being used anywhere.  [Maybe I'm
wrong somehow?  If so, please explain, because I have no idea how to make
this functionality work if so.]

* Fix documentation saying that the leaftype can be "0, 1 or 2 characters". 
0 is not legal and provokes an error message (if you say "foo/", but if you
leave off the slash, it's ok).  2 or more are legal but ones after the first
do nothing.

* Remove strings of "*-*-*-" and similar in TBranch.cxx, which confuse the
web documentation generator.

* Note that TBranch::GetRow just always returns 1.

Revision 40872 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 13 21:33:33 2011 UTC (3 years, 4 months ago) by pcanal
File length: 90341 byte(s)
Diff to previous 40753
From Chris Jones:

Put in place the infrastructure to optimize the I/O writes in the same way we optimized the I/O reads.

Rename TBuffer::ReadSequence to TBuffer::ApplySequence as they can be used both for reading and writing.  The 3 new signatures:

1. virtual Int_t ApplySequence(const TStreamerInfoActions::TActionSequence &sequence, void *object);      
2. virtual Int_t ApplySequenceVecPtr(const TStreamerInfoActions::TActionSequence &sequence, void *start_collection, void *end_collection);      
3. virtual Int_t ApplySequence(const TStreamerInfoActions::TActionSequence &sequence, void *start_collection, void *end_collection);

The 1st version is optimized to read a single object. The 2nd version is optimized to read the content of TClonesArrays and vectors of pointers to objects.
The 3rd version is used to streamed any collections.

In TBranchElement, introduce a set FillLeaves member functions to precalculate many of the (existing) conditional.  Introduction support for the StreamerInfo write actions and sequences.

Revision 40753 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 29 20:57:23 2011 UTC (3 years, 4 months ago) by pcanal
File length: 90028 byte(s)
Diff to previous 40482
From Matthew Strait:
The class documentation for TTree, TBranch and TLeaf all say "If leaf name
has the form var[nelem], where nelem is a digit, then...".  This frightened
me for a moment because if taken literally it would mean arrays can't be
larger than 9 elements.  A look at the code reveals that it doesn't really
mean "digit" but rather "number".  Or, to be precise, "non-negative integer".
 *Whew*.

The attached patch changes "digit" to "non-negative integer" in all relevant
cases that I could find.  It also incidentally fixes some spelling and
punctuation and wraps a few gratuitously long lines of code.

Possibly "non-negative" could be "positive", but TLeaf::GetLeafCounter() at
least does not seem to make an exception for the case of zero.

Revision 40482 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 5 20:49:48 2011 UTC (3 years, 5 months ago) by pcanal
File length: 89968 byte(s)
Diff to previous 39754
From Matthew Strait: update function documentation

Revision 39754 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 15 16:19:41 2011 UTC (3 years, 7 months ago) by pcanal
File length: 89996 byte(s)
Diff to previous 39696
Remove stray debug disabling

Revision 39696 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 13 21:35:34 2011 UTC (3 years, 7 months ago) by pcanal
File length: 90001 byte(s)
Diff to previous 39611
From David Dagenhart:

Implement an option to allow ROOT to use the LZMA compression
algorithm to compress data instead of the ZLIB compression algorithm.
LZMA compression typically results in smaller files, but takes more
CPU time to compress data. To use the new feature, the external XZ
package must be installed when ROOT is configured and built:

Download 5.0.3 from here http://tukaani.org/xz/
and make sure to configure with fPIC:
   ./configure CFLAGS='-fPIC'

Then the client C++ code must call routines to explicitly request LZMA
compression.

ZLIB compression is still the default.

Setting the Compression Level and Algorithm:

There are three equivalent ways to set the compression level and 
algorithm. For example, to set the compression to the LZMA algorithm
and compression level 5.

1. TFile f(filename, option, title);
   f.SetCompressionSettings(ROOT::CompressionSettings(ROOT::kLZMA, 5));

OR

2. TFile f(filename, option, title, ROOT::CompressionSettings(ROOT::kLZMA, 5));

OR

3. TFile f(filename, option, title);
   f.SetCompressionAlgorithm(ROOT::kLZMA);
   f.SetCompressionLevel(5);

These methods work for TFile, TBranch, TMessage, TSocket, and TBufferXML. 
The compression algorithm and level settings only affect compression of
data after they have been set. TFile passes its settings to its branches 
only at the time the branches are created. This can be overidden by 
explicitly setting the level and algorithm for the branch. These classes 
also have the following methods to access the algorithm and level for 
compression.

   Int_t GetCompressionAlgorithm() const;
   Int_t GetCompressionLevel() const;
   Int_t GetCompressionSettings() const;

If the compression level is set to 0, then no compression will be
done. All of the currently supported algorithms allow the level to be
set to any value from 1 to 9. The higher the level, the larger the
compression factors will be (smaller compressed data size). The
tradeoff is that for higher levels more CPU time is used for
compression and possibly more memory. The ZLIB algorithm takes less
CPU time during compression than the LZMA algorithm, but the LZMA
algorithm usually delivers higher compression factors.

The header file core/zip/inc/Compression.h declares the function
"CompressionSettings" and the enumeration for the algorithms.
Currently the following selections can be made for the algorithm:
kZLIB (1), kLZMA (2), kOldCompressionAlgo (3), and kUseGlobalSetting
(0). The last option refers to an older interface used to control the
algorithm that is maintained for backward compatibility. The following
function is defined in core/zip/inc/Bits.h and it set the global
variable.

   R__SetZipMode(int algorithm)

If the algorithm is set to kUseGlobalSetting (0), the global variable
controls the algorithm for compression operations.  This is the
default and the default value for the global variable is kZLIB.

Note that the LZMA algorithm will only be available if the LZMA
libraries from the XZ package were available when the ROOT executable
being used was configured and built. If you are building ROOT and want
LZMA then you must do something similar to the following if XZ is not
already installed on your system.

  Download XZ version 5.0.3 from http://tukaani.org/xz/
  unwind the tarball
  cd xz-5.0.3
  ./configure CFLAGS='-fPIC'
  make

ROOT was tested with version 5.0.3 of XZ.  It might work with earlier
versions and will probably work with later versions of XZ.

Then either use "make install" to put the library and headers into
/usr/local/* so the scripts building ROOT can find them or use
arguments to the ROOT configure script to point to the proper
directories containing the XZ library and headers. These are the
library and the included header (lzma.h includes other headers in the
lzma subdirectory).

  src/liblzma/.libs/liblzma.a
  src/liblzma/api/lzma.h

WARNING: Data compressed with the LZMA algorithm cannot be read by
ROOT executables that were not built with LZMA support.

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: 88915 byte(s)
Diff to previous 39084
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 39084 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 4 02:13:32 2011 UTC (3 years, 8 months ago) by pcanal
File length: 87630 byte(s)
Diff to previous 38936
Make sure that a TBranch that was first created in an in-memory TTree and is later is attach to a file, does not inadvertently default to be not-compressed but instead default to the compression level of the file (as intended)

Revision 38936 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 19 21:06:30 2011 UTC (3 years, 9 months ago) by pcanal
File length: 87537 byte(s)
Diff to previous 38834
Merge the documentation that was duplicated in TTree and TTreePlayer and remove the duplicate from TTreePlayer.  Fix grammar in TLeaf/TBranch

Revision 38834 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 13 19:38:02 2011 UTC (3 years, 9 months ago) by pcanal
File length: 87497 byte(s)
Diff to previous 38801
Update the leaflist documentation to explicit the support for array (and note the required type of the counter)

Revision 38801 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 11 20:10:24 2011 UTC (3 years, 9 months ago) by pcanal
File length: 86033 byte(s)
Diff to previous 38743
Reduce by 40% the time taken GetEntry for a branch created using a leaflist (exclusive of the decompression time).

Cache the current basket and its limit.
Reorder the set of test to reduce the number of conditional jump in the most common cases
and use:
  #define unlikely(expr) __builtin_expect(!!(expr), 0)
  #define likely(expr) __builtin_expect(!!(expr), 1)
to tell the compiler/processor which branch is more likely.
Record whether the buffer's map of classname and object is used to avoid resetting unnecessarily at read time.

Revision 38743 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 5 20:56:55 2011 UTC (3 years, 9 months ago) by pcanal
File length: 80814 byte(s)
Diff to previous 38071
When setting fBranch in the loaded basket, make sure to set it also for the first/only basket ; this prevents a crash when calling SetBasketSize for a split top level branch in a file produced by v4.00/08

Revision 38071 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Feb 15 06:58:59 2011 UTC (3 years, 11 months ago) by pcanal
File length: 80813 byte(s)
Diff to previous 38059
Make that even when the TBasket is 'reused' the allocated length of the fEntryOffset array is decreased (to handle the case of the 'lone' large entry)

Revision 38059 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Feb 13 21:12:16 2011 UTC (3 years, 11 months ago) by pcanal
File length: 80715 byte(s)
Diff to previous 37965
Significant improvement of the performance of SetBranchAddress/SetAddress (by a factor 3 to 10 depending on the length/complexity of the classname ).

Revision 37965 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 3 15:27:37 2011 UTC (3 years, 11 months ago) by pcanal
File length: 79961 byte(s)
Diff to previous 37420
Make sure the basket we delete are always removed from the list of baskets

Revision 37420 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 8 21:25:20 2010 UTC (4 years, 1 month ago) by pcanal
File length: 79915 byte(s)
Diff to previous 37168
Add type information to the result of TTree::Print in the case of
TBranchElement.  Now:

*Br   17 :fH        : TH1F*                                                  *
*Entries :       20 : Total  Size=      19334 bytes  File Size  =       1671 *
*Baskets :        2 : Basket Size=      16000 bytes  Compression=  11.29     *
*............................................................................*
*Br   18 :fTriggerBits : TBits                                               *
*Entries :       20 : Total  Size=       1398 bytes  File Size  =        400 *
*Baskets :        1 : Basket Size=      16000 bytes  Compression=   2.23     *
*............................................................................*
*Br   19 :fIsValid  : Bool_t                                                 *
*Entries :       20 : Total  Size=        582 bytes  File Size  =         92 *
*Baskets :        1 : Basket Size=      16000 bytes  Compression=   1.00     *

Revision 37168 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Dec 2 02:34:55 2010 UTC (4 years, 1 month ago) by pcanal
File length: 79377 byte(s)
Diff to previous 36453
In TBranch CopyAddress (and hence indirectly in the fast cloning)
avoid having to read the first entry just to get the address set
and do the address setting directly.

In FlushOneBasket, do no delete the basket and buffer just because
it has already been flushed (it just so happen to be exactly full
at the same entry as the flushing is done).

Revision 36453 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 29 12:59:23 2010 UTC (4 years, 2 months ago) by brun
File length: 78931 byte(s)
Diff to previous 36260
Add a new function TBranch::SetStatus
It is much faster to call this function in case of a Tree with many branches
instead of calling TTree::SetBranchStatus

Revision 36260 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Oct 10 15:45:08 2010 UTC (4 years, 3 months ago) by brun
File length: 78669 byte(s)
Diff to previous 35942
use strlcpy

Revision 35942 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 30 15:56:20 2010 UTC (4 years, 3 months ago) by brun
File length: 78642 byte(s)
Diff to previous 35669
use snprintf

Revision 35669 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 23 14:54:13 2010 UTC (4 years, 4 months ago) by pcanal
File length: 78610 byte(s)
Diff to previous 35450
Fix deadcode (cov 21283)

Revision 35450 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 20 12:36:11 2010 UTC (4 years, 4 months ago) by pcanal
File length: 78625 byte(s)
Diff to previous 35231
Fix Coverity reports

TDatabasePDG.cxx: #11418 getc returns an int
TTree.cxx: #10577 unused variable
TTreeFormula.cxx: #10795,#10796,#13272,#13273,#13274,#14173 strcat -> strncat, strcpy -> strncpy
TTreePlayer.cxx: #10891,#10892,#14169,#14170,#14172 strcpy -> strncpy
TStreamerElement.cxx: #12537,#13200,#13318,#13586,#13587,#13588,#13589,#13590,#13591,#13596,#13597,#13598 strcpy,sprintf -> strncpy,snprintf (or TString)
TStreamerInfo.cxx: #13470,#13787,#13788 strcpy,sprintf -> strncpy,snprintf (or TString)
TBranchProxy.cxx: null pointer dereference.
TBranch.cxx: #10689 null pointer dereference.
loadfile.cxx: #10767,#12387.#12388,#12389,#12521,#12522,#13514,etc.. strcpy,sprintf -> strncpy,snprintf  (or TString)
TFileDrawMap.cxx: #10893,#10894,#10895,#13460,#14176,#14177,#14718,#14179 strcpy,sprintf -> strncpy,snprintf  (or TString)
TFile.cxx: #13789,#13193,#13450 strcpy,sprintf -> strncpy,snprintf  (or TString)
TMethod.cxx: #10802,#13310 strcpy,sprintf -> strncpy,snprintf  (or TString)
TClass.cxx: #10814,#13122,#13467,#13468,#13490 strcpy,sprintf -> strncpy,snprintf  (or TString)
TDataMember.cxx: #10825,#13241,#13329,#13330,#13584 strcpy,sprintf -> strncpy,snprintf  (or TString)
TFormula.cxx: #13263,#13783 sprintf -> snprintf or TString
stlLoader.cxx: #13599 static array -> G__FastAllocString

Revision 35231 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 10 17:59:10 2010 UTC (4 years, 4 months ago) by pcanal
File length: 78584 byte(s)
Diff to previous 34971
Dramatically reduce the amount of memory allocation induces by the management of the TBasket and TBuffer
for each branch.  Instead of creating one TBasket object and one TBuffer object and its associated memory buffer
for each onfile basket of each branch, we now create only one TBasket and one TBuffer object for the lifetime of
each branch.  The memory buffer associated with the TBuffer object is also created once and rarely reallocated;
it is reallocated only when the buffer size is reset (for example by the AutoFlush mechanism) and when the user
object do not fit in the currently allocated memory (but we do not shrink it after that.  The same minization 
is applied to the scratch area used to read the compressed version of a basket from the file.

In TBasket introduce new data member fCompressedBuffer and fCompressedSize to keep track of the scratch memory
area used to read compressed data from the file (Even though we already have fBufferRef and fBuffer from TKey,
they are too tied together to properly used in the case of long live TBasket).

Add a TBasket::Reset member function to return the basket to its original 'unread' or 'unfilled' state.

Add TBranch::GetFreshBasket to factor out the code deciding whether to create a new TBasket object or 
to reuse an existing one.

Revision 34971 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 24 19:05:29 2010 UTC (4 years, 5 months ago) by pcanal
File length: 76366 byte(s)
Diff to previous 34969
Update doc

Revision 34969 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 24 19:01:19 2010 UTC (4 years, 5 months ago) by pcanal
File length: 76367 byte(s)
Diff to previous 34832
Replace the ReadLeaves virtual function by a fReadLeaves pointer to member function,
this allows the customization of the ReadLeaves function at run-time depending on the
underlying user class layout in TBranchElement.  This removes many if statements whose
'answer' is known at initialization time.  [ReadLeavesMakeClass and ReadLeavesCollection
still need further decomposition]

Introduce TBranch::Set/GetMakeClass to independently set each branch in MakeClass mode 
and to have a good place to switch the ReadLeaves function appropriately (to and from
the MakeClass mode (also known as the decomposed object mode)).   This can also be
used to reset the mode of some branch with a MakeClass/MakeSelector file.

Revision 34832 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 17 14:47:30 2010 UTC (4 years, 5 months ago) by pcanal
File length: 75451 byte(s)
Diff to previous 34286
Fix TChain::GetListOfBranches documentation and add documentation to TBranch::GetClassName

Revision 34286 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 1 20:38:57 2010 UTC (4 years, 6 months ago) by rdm
File length: 75111 byte(s)
Diff to previous 34214
fix format errors related to TString::Form(), TString::Format(), Form()
and Printf().

Revision 34214 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 30 09:50:49 2010 UTC (4 years, 6 months ago) by brun
File length: 75231 byte(s)
Diff to previous 33847
Fix format in Warning statements

Revision 33847 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 11 12:01:23 2010 UTC (4 years, 7 months ago) by pcanal
File length: 75227 byte(s)
Diff to previous 33097
Fix coverity reports:
Avoid potential use of null pointer.
Remove resource leak.

Revision 33097 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 19 21:47:55 2010 UTC (4 years, 9 months ago) by pcanal
File length: 75154 byte(s)
Diff to previous 32930
Remove reliance on gDirectory to set TBranch::fDirectory ; instead use the new function TBranch::UpdateFile to be called from TTree::DirectoryAutoAdd.  This avoids forcing the user to explicitly cd to the input directory before calling TKey::ReadObj for a TTree object

Revision 32930 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 9 16:18:32 2010 UTC (4 years, 9 months ago) by pcanal
File length: 74522 byte(s)
Diff to previous 32507
Prefer the use of InheritsFrom(TClass*) over InheritsFrom(const char*) as long as 
it does not increase the library dependencies.

Revision 32507 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Mar 9 08:49:14 2010 UTC (4 years, 10 months ago) by brun
File length: 74515 byte(s)
Diff to previous 32504
Add a fix in TBranch::Streamer when reading old files and trying to access
a non existing entry.
see: http://root.cern.ch/phpBB2/viewtopic.php?t=9988

Revision 32504 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 8 14:22:31 2010 UTC (4 years, 10 months ago) by brun
File length: 73829 byte(s)
Diff to previous 32341
Fix potential memory leak reported by coverity

Revision 32341 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Feb 13 17:30:19 2010 UTC (4 years, 11 months ago) by pcanal
File length: 73765 byte(s)
Diff to previous 32339
Add missing initialization

Revision 32339 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 12 23:34:41 2010 UTC (4 years, 11 months ago) by pcanal
File length: 73720 byte(s)
Diff to previous 31344
Improve performance of TBranch::DropBaskets in the common case (only one basket).
Prevent DropBaskets from dropping baskets that are not stored individually (and hence potentially not recoverable).
Prevent DropBaskets from leaking TBaskets baskets.

Revision 31344 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 20 17:23:58 2009 UTC (5 years, 2 months ago) by pcanal
File length: 73108 byte(s)
Diff to previous 31170
Insure that after a TBranch::ResetAddress, TTreeFormula always correctly reload the information.

Revision 31170 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 13 20:21:56 2009 UTC (5 years, 2 months ago) by pcanal
File length: 73006 byte(s)
Diff to previous 31151
In TBranchElement::SetupAddress do not confuse the case where we have not setup
the address yet and the case where we already tried but could not (because the
data member is no longer in the main class layout).

Revision 31151 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 13 13:26:14 2009 UTC (5 years, 2 months ago) by brun
File length: 72898 byte(s)
Diff to previous 31139
From Philippe and me:
In TBranch::GetSubBranch the setting of fParent was missing

Revision 31139 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 13 00:23:46 2009 UTC (5 years, 2 months ago) by pcanal
File length: 72790 byte(s)
Diff to previous 31130
Reintroduce the lines removing the leaves in the TBranch and TLeaf destructors (see r31125)
This is necessary in case the TBranch is deleted outside of the TTree destructor; This is
used in particular by the TTreeCloner.
Avoid all the cost of RemoveAll when we are going through the TTree destructor (using the
fact that the list of leaves has already been emptied)

This fixes a crash in stress (in the 13th test).

Revision 31130 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 12 14:54:16 2009 UTC (5 years, 2 months ago) by brun
File length: 72876 byte(s)
Diff to previous 31125
Reintroduce the undocumented test on fSkipZip.
Add a comment indicating that this feature is still used by CDF.

Revision 31125 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 12 13:25:13 2009 UTC (5 years, 2 months ago) by brun
File length: 72790 byte(s)
Diff to previous 31119
Comment the lines removing the leaves in the TBranch and TLeaf destructors.
This is done in the TTree destructor.
Leaving the code in was a substantial performance penalty when destroying a Tree
with many leaves.

Revision 31119 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 12 11:48:14 2009 UTC (5 years, 2 months ago) by brun
File length: 72682 byte(s)
Diff to previous 31077
Comment statements referring to the unused fSkipZip.

Revision 31077 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 11 08:51:57 2009 UTC (5 years, 2 months ago) by brun
File length: 72678 byte(s)
Diff to previous 29963
Implement the cache functions AddBranch and SetSkipZip in TFileCacheRead too.
This speeds up TBranch::GetBasket where it is not necessary to test if the file cache
is a TTreeCache.

Revision 29963 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 28 10:07:34 2009 UTC (5 years, 4 months ago) by brun
File length: 72740 byte(s)
Diff to previous 29938
One more optimisation in TBranch::DropBaskets

Revision 29938 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 27 14:40:27 2009 UTC (5 years, 4 months ago) by brun
File length: 72788 byte(s)
Diff to previous 29934
Fix a typo (thanks Bertrand)

Revision 29934 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 27 13:54:34 2009 UTC (5 years, 4 months ago) by brun
File length: 72789 byte(s)
Diff to previous 29678
Modify TBranch::DropBaskets:
- small speedup in case of branches with many buffers.
-Remove the members fBasketsRAM and fNBasketsRAM

Revision 29678 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 4 18:31:40 2009 UTC (5 years, 5 months ago) by pcanal
File length: 74033 byte(s)
Diff to previous 29600
Add warning about leaflist ordering in a couple more places

Revision 29600 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 27 19:48:54 2009 UTC (5 years, 5 months ago) by pcanal
File length: 73256 byte(s)
Diff to previous 29599
Prevent changing fEntryOffsetLen to and from 0 when using Set[Default]EntryOffsetLen.

Revision 29599 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 27 15:42:23 2009 UTC (5 years, 5 months ago) by pcanal
File length: 73131 byte(s)
Diff to previous 29586
The default length fEntryOffset can now  be set via TTree::SetDefaultEntryOffsetLen which can be optionially applied to the  existing branches.

Revision 29586 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jul 26 21:37:25 2009 UTC (5 years, 5 months ago) by pcanal
File length: 72605 byte(s)
Diff to previous 27768
Allow for fEntryOffsetLen to decrease if the number of entries in the basket is less than 1/4 of fEntryOffsetLen, allow decrease of fEntryOffsetLen even after the 10th baskets

Revision 27768 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 12 22:39:12 2009 UTC (5 years, 10 months ago) by pcanal
File length: 72264 byte(s)
Diff to previous 27109
Fix LoadBasket (to follow the fact that we now 'flush' the write basket

Revision 27109 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 9 21:11:59 2009 UTC (6 years ago) by pcanal
File length: 72277 byte(s)
Diff to previous 27108
fix off by one test

Revision 27108 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 9 19:09:18 2009 UTC (6 years ago) by pcanal
File length: 72211 byte(s)
Diff to previous 25999
fBasket.GetSize() must be greater than fWriteBaskets (this was not correctly maintained during the code change to support flushing the write basket before streaming the branch)

Revision 25999 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 28 14:54:14 2008 UTC (6 years, 2 months ago) by pcanal
File length: 71929 byte(s)
Diff to previous 25980
add missing protection

Revision 25980 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 27 18:17:39 2008 UTC (6 years, 2 months ago) by pcanal
File length: 71832 byte(s)
Diff to previous 25822
From Christian Klein-Boesing and me:
Synchronize the algorithm to find the file where a branch is stored and the algorithm used
to find the file for closure (in the TBranch destructor).
Also, add protection in case branches are stored in a separate file and the file can not be open

Revision 25822 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 15 06:43:26 2008 UTC (6 years, 3 months ago) by brun
File length: 71542 byte(s)
Diff to previous 25657
Remove error message in TBranch::DropBaskets.

Revision 25657 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 1 15:16:47 2008 UTC (6 years, 3 months ago) by pcanal
File length: 71540 byte(s)
Diff to previous 25656
remove compilation warnings

Revision 25656 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 1 15:01:43 2008 UTC (6 years, 3 months ago) by pcanal
File length: 71539 byte(s)
Diff to previous 25574
In FindBranch avoid reading past the end of the input string (avoid crash on window)

Revision 25574 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Sep 27 16:03:37 2008 UTC (6 years, 3 months ago) by pcanal
File length: 71497 byte(s)
Diff to previous 25372
Reduce 'cost' of revision 25572 for stress -b 30 by 90% (it was about 1%)

Replace 'expensive' iterators by their 'fast' alternative (i.e TIter vs UncheckedAt); Avoid
creating TString and std::string object unless really necessary; And when a string temporary 
is necessary, make sure it is allocating the underlying memory buffer only once
(instead of 2 or 3 times in some the case where we need to 'append' to the string).

Revision 25372 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Sep 7 06:50:34 2008 UTC (6 years, 4 months ago) by pcanal
File length: 71069 byte(s)
Diff to previous 25314
Avoid crash in cases where the basket entry list is incorrect

Revision 25314 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 29 16:53:33 2008 UTC (6 years, 4 months ago) by pcanal
File length: 70922 byte(s)
Diff to previous 25058
From Paul:
In TBranch::File, in the case of importing the data directly from an external TBuffer,
remove 80 char limit on reading the class name

Revision 25058 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 5 19:20:32 2008 UTC (6 years, 5 months ago) by pcanal
File length: 70349 byte(s)
Diff to previous 25053
Insure that the in-memory tree (not attached to a file)
are saved as expected by revision 24454 (i.e. each
basket saved separately) and prevent the printing
of the misleading error message:
Error in <TBasket::Create>: Cannot create key without file

Revision 25053 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 5 13:54:35 2008 UTC (6 years, 5 months ago) by pcanal
File length: 70344 byte(s)
Diff to previous 25007
Adapt TBranch::Refresh to revision 24454 (the WriteBasket might no longer be in memory)

Revision 25007 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 31 17:07:29 2008 UTC (6 years, 5 months ago) by pcanal
File length: 70323 byte(s)
Diff to previous 24501
remove (incorrect) mention of pointer to object in the leaflist description

Revision 24501 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 24 06:25:26 2008 UTC (6 years, 7 months ago) by brun
File length: 70392 byte(s)
Diff to previous 24454
Do not execute FlushBaskets when fDirectory is null.

Revision 24454 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jun 21 03:13:04 2008 UTC (6 years, 7 months ago) by pcanal
File length: 70378 byte(s)
Diff to previous 24289
Disk and Memory Space Gain

In ROOT older than v5.20/00, the branches' last basket, also known as the write basket, was always saved in the same "key" as the TTree object and was always present in memory when reading or writing. When reading this write basket was always present in memory even if the branch was never accessed. 

Starting in v5.20/00, TTree::Write closes out, compresses (when requested) and writes to disk in their own file record the write baskets of all the branches. (This is implemented via the new function TTree::FlushBaskets, TBranch::FlushBaskets, TBranch::FlushOneBaskets) 

TTree::AutoSave supports a new option "FlushBaskets" which will call FlushBaskets before saving the TTree object. 

Benefits

- Flushing the write baskets has several advantages: 
- Reduce the file size of the TTree object (it not longer contains the last basket), improving read time of the TTree object 
- Reduce memory footprint of the TTree object. 
   - In a TTree which "flushed" buffer, there is now usually only zero or one buffer in memory. 
   - Previously each branch always had at least one basket in memory and usually 2 (the write basket and one read basket). 
   - Now only the basket of the branches actually read are loaded in memory. 
- allow for the basket to be compressed and stored separated, increasing the compression factor. 

Note: Calling FlushBaskets too often (either directly of via AutoSave("FlushBaskets")) can lead to unnecessary fragmentation of the ROOT file, since it write the baskets to disk (and a new basket will be started at the next fill) whether or not the content was close to filling the basket or not. 

The fast tree cloning (TTreeCloner) was enhanced to support copying in-memory TTrees (that have been save as a single key on file). This issue was preventing hadd to fast clone files containing any 'in-memory' tree.

Revision 24289 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 16 17:07:26 2008 UTC (6 years, 7 months ago) by pcanal
File length: 68538 byte(s)
Diff to previous 24083
add protection in case GetFile() is zero

Revision 24083 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jun 1 07:10:43 2008 UTC (6 years, 7 months ago) by brun
File length: 68532 byte(s)
Diff to previous 23685
Fix a problem when calling the Error function.
see:  <http://savannah.cern.ch/bugs/?37260>

Revision 23685 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 7 15:18:39 2008 UTC (6 years, 8 months ago) by brun
File length: 68545 byte(s)
Diff to previous 23631
Introducing a parallel unzipping algorithm for pre-fetched buffers. Since we already know what buffers are going to be read, we can decompress a few of them in advance in an additional thread and give the impression that the data decompression comes for free (we gain up to 30% in reading intensive jobs).

The size of this unzipping cache is 20% the size of the TTreeCache and can be modified with TTreeCache::SetUnzipBufferSize(Long64_t bufferSize). Theoretically, we only need one buffer in advance but in practice we might fall short if the unzipping cache is too small (synchronization costs).

This experimental feature is disabled by default, to activate it use the static function TTreeCache::SetParallelUnzip(TTreeCacheUnzip::EParUnzipMode option = TTreeCacheUnzip::kEnable). The possible values to pass are: TTreeCacheUnzip::kEnable to enable it,TTreeCacheUnzip::kDisable to disable it and TTreeCacheUnzip::kForce to force it. Since it will only work if you have more than one core, the TTreeCacheUnzip::kForce option is useful to run it even if you have only one cpu (to measure the overhead, for example).

Revision 23631 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 1 10:50:11 2008 UTC (6 years, 8 months ago) by rdm
File length: 68338 byte(s)
Diff to previous 23466
Fix coding conventions.

Revision 23466 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 23 13:52:45 2008 UTC (6 years, 9 months ago) by brun
File length: 68338 byte(s)
Diff to previous 23378
Fix shadowed variables

Revision 23378 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 22 07:13:36 2008 UTC (6 years, 9 months ago) by brun
File length: 68351 byte(s)
Diff to previous 23236
Add a new function
void TBranch::DeleteBaskets(Option_t* option)
   // Loop on all branch baskets. If the file where branch buffers reside is
   // writable, free the disk space associated to the baskets of the branch,
   // then call Reset(). If the option contains "all", delete also the baskets
   // for the subbranches.
   // The branch is reset.
   // NOTE that this function must be used with extreme care. Deleting branch baskets
   // fragments the file and may introduce inefficiencies when adding new entries
   // in the Tree or later on when reading the Tree.

Revision 23236 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 15 16:32:25 2008 UTC (6 years, 9 months ago) by pcanal
File length: 67075 byte(s)
Diff to previous 23230
remove warning

Revision 23230 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 15 15:33:32 2008 UTC (6 years, 9 months ago) by pcanal
File length: 67068 byte(s)
Diff to previous 23213
Introduce a way to create branch using directly
an object:
  MyClass object;
  TBranch *branch = tree->Branch(branchname, &object, bufsize, splitlevel)

Revision 23213 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 14 16:30:09 2008 UTC (6 years, 9 months ago) by pcanal
File length: 66786 byte(s)
Diff to previous 22990
proper calculate the number of BasketRAM if one of the entry points to an already removed basket

Revision 22990 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 4 22:38:18 2008 UTC (6 years, 9 months ago) by pcanal
File length: 66761 byte(s)
Diff to previous 22902
add comment clarification

Revision 22902 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 31 09:48:42 2008 UTC (6 years, 9 months ago) by rdm
File length: 66531 byte(s)
Diff to previous 22805
move tree, treeplayer and treeviewer under tree meta directory.

Revision 22805 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 20 22:04:03 2008 UTC (6 years, 10 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 66531 byte(s)
Diff to previous 21867
Remove unnecessary change of the current ROOT directory
and reduce the span of those that are still compulsory
(hence aiding threadsafety)

Revision 21867 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jan 28 08:34:00 2008 UTC (6 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 66511 byte(s)
Diff to previous 21861
Fix coding conventions

Revision 21861 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jan 26 09:47:41 2008 UTC (6 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 66458 byte(s)
Diff to previous 20882
From Lukasz Janyst:
   * TBranch: add a possibility of starting from non-zero entry

   * TBranchSTL and TIndArray: new classes for handling STL collections
     of pointers

   * TTree, TBranchElement, TTreeFormula: code handling new type of
     branch added

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/tree/src/TBranch.cxx
File length: 66030 byte(s)
Diff to previous 20631
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 20631 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 2 20:01:49 2007 UTC (7 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 66030 byte(s)
Diff to previous 20214
From Marian Ivanov:
Add a protection in TBranch::GetFile

Revision 20214 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 4 17:50:13 2007 UTC (7 years, 3 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 66006 byte(s)
Diff to previous 19826
Add warning message in case of missing leaf name in leaflist.  Use _noname as the name of the leaf

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/tree/src/TBranch.cxx
File length: 65678 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/tree/src/TBranch.cxx
File length: 65729 byte(s)
Diff to previous 19673
remove :$ from tag line

Revision 19673 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 23 14:34:03 2007 UTC (7 years, 5 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 65739 byte(s)
Diff to previous 19578
Add an optional argument and extend functionality of the following functions in TBranch
Long64_t TBranch::GetTotBytes(Option_t *option) const
   // Return total number of bytes in the branch (excluding current buffer)
   // if option ="*" includes all sub-branches of this branch too

Long64_t TBranch::GetZipBytes(Option_t *option) const
   // Return total number of zip bytes in the branch
   // if option ="*" includes all sub-branches of this branch too

Revision 19578 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 9 08:33:55 2007 UTC (7 years, 5 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 64549 byte(s)
Diff to previous 19308
Move the inline implementation of TBranch::ResetCount to the implementation file such
that the function can be called from another DLL on Windows.

Revision 19308 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 11 12:14:08 2007 UTC (7 years, 6 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 64380 byte(s)
Diff to previous 19182
Change an internal dimension in the TBranch constructor from 64 to 640.
This part of the code should be rewritten to be dynamic.

Revision 19182 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 26 08:52:01 2007 UTC (7 years, 7 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 64378 byte(s)
Diff to previous 19181
Fix one more portability problem on Windows.

Revision 19181 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 26 08:44:57 2007 UTC (7 years, 7 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 64396 byte(s)
Diff to previous 19178
Fix a fatal compilation error on Windows with VC7.1

Revision 19178 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 25 21:11:37 2007 UTC (7 years, 7 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 64419 byte(s)
Diff to previous 18733
Fix the bound of the loop setting TBasket::fBranch in TBranch::Streamer

Revision 18733 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 11 06:37:41 2007 UTC (7 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 64420 byte(s)
Diff to previous 18675
In TBranch::LoadBaskets the member fNBasketsRAM was not incremented.
As a result when calling TBranch::DropBaskets, not all baskets buffers were dropped.
This fixes the problem reported by Andreas Petzold at: http://root.cern.ch/phpBB2/viewtopic.php?t=4873

Revision 18675 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat May 5 17:37:27 2007 UTC (7 years, 8 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 64392 byte(s)
Diff to previous 18667
add the code needed to remove gBranch to the reading of very old files

Revision 18667 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 4 17:32:45 2007 UTC (7 years, 8 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 64258 byte(s)
Diff to previous 18617
The value of TBasket:;fBasket was incorrect in some cases when using
the TTreeCloner.  This is solved (and thread safetly is improved) by
removing the gBranch global variable and using alternative mechanism
to set TBakset::fBasket.

Revision 18617 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 27 16:49:16 2007 UTC (7 years, 8 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 63481 byte(s)
Diff to previous 18403
Remove unused parameters from TBranch::Init

Revision 18403 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 26 16:02:09 2007 UTC (7 years, 10 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 63550 byte(s)
Diff to previous 17731
Cache the branch mother and direct parent to improve performance

Revision 17731 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Feb 6 15:30:25 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 59711 byte(s)
Diff to previous 17711
In the Streamer functions replace the lines like
         TPad::Class()->ReadBuffer(b, this, v, R__s, R__c);
         TPad::Class()->WriteBuffer(b,this);
by
         b.ReadClassBuffer(TPad::Class(), this, v, R__s, R__c);
         b.WriteClassBuffer(TPad::Class(),this);

Revision 17711 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Feb 5 18:11:29 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 59703 byte(s)
Diff to previous 17591
-Implement necessary casts due to TVirtualStreamerinfo.

Revision 17591 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 31 07:33:31 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 59730 byte(s)
Diff to previous 17412
Fix by Philippe and Stephan Otto for a problem reported at: https://savannah.cern.ch/bugs/?23353
Use TDirectory::TContext to save/restore the current directory.

Revision 17412 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jan 20 19:29:35 2007 UTC (8 years ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 59770 byte(s)
Diff to previous 17402
-Remove Varargs.h from TString.h and TObject.h and add this include
in the few files that need it.

-Move the following enums from TBuffer.h to TBufferFile.h

   enum { kMapSize = 503 };
   enum { kStreamedMemberWise = BIT(14) }; //added to version number to know if a collection has been stored member-wise
   enum { kNotDecompressed = BIT(15) };    //indicates a weird buffer, used by TBasket
   enum { kCannotHandleMemberWiseStreaming = BIT(17), //if set TClonesArray should not use memeber wise streaming
          kTextBasedStreaming = BIT(18) };            // indicates if buffer used for XML/SQL object streaming

Revision 17402 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 19 16:48:00 2007 UTC (8 years ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 59725 byte(s)
Diff to previous 17306
CVs been changed into a pure abstract interface.
The concrete implementation is in the new class TBufferFile.
All classes previously deriving from TBuffer derive now from TBufferFile, ie

  TBuffer  <- TBufferFile  <- TMessage
                           <- TBufferXML
                           <- TBufferSQL
                           <- TBufferSQL2

Because there are several problems with C++ operators overloading,
The I/O operators are defined in TBuffer. These are inline functions
calling C++ virtual functions defined in TBuffer and overloaded
by TBufferFile and all other derived classes when necessary.

The previous implementation of TBuffer.h included <vector> and Bytes.h.
The two include statements have been moved to TBufferFile.h. As a result the
compilation of the ROOT system is now slightly faster and a big bonus
is that changes in TBufferFile or Bytes.h will affect only TBufferFile
and will not force the recompilation of the entire system.
This change has some side-effects. If you assumed that include <vector>
was done by TBuffer.h, you may have to specify this include directly
in your class. This was the case for a few ROOT classes.


 : ----------------------------------------------------------------------

Revision 17306 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 12 16:03:17 2007 UTC (8 years ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 59721 byte(s)
Diff to previous 17197
   TMath::Abs, TMath::Min, TMath::Max, TMath::Sign, TMath::Range
These functions are unfortunately not defined in a standard way in std::

This include is referenced by a new version of TMath.h.
As a result, TMath.h is back compatible with the previous version.

TMathBase.h is used in place of TMath.h in all the classes
that will go into the future miniCore library.
TMath.h and the TMath implementation will go into a new math sub-directory.

TString.h uses TMathBase.h instead of TMath.h.
As a result, it was necessary to include "TMath.h" in some classes
assuming that TMath was included via TString and using other functions
than the ones defined in TMathBase.h
 ----------------------------------------------------------------------

Revision 17197 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 12 17:29:03 2006 UTC (8 years, 1 month ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 59704 byte(s)
Diff to previous 16750
From Gerri:
Marian Ivanov has found a problem in TBranch::GetFile();
the problem shows up when the parent tree and the friends are in different
files of the same archive.
The filename for the branch is then uncorrectly derived from the parent tree,
resulting in a failure while opening the file.

This patch fixes this problem. Basically if the parent file is an archive
and the branch filename is simple (non absolute, non-URL), it just replaces
the member name.

Revision 16750 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 10 20:00:45 2006 UTC (8 years, 2 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 59438 byte(s)
Diff to previous 16176
Insure that the leaves address (in a long leaflist) are properly set when SetAddress(0) is called (fixing CloneTree)

Revision 16176 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 31 11:05:20 2006 UTC (8 years, 4 months ago) by rdm
Original Path: trunk/tree/src/TBranch.cxx
File length: 59395 byte(s)
Diff to previous 16036
changed all Riostream.h in headers to Riosfwd.h. Riostream.h has "using namespace std"
and should only appear in implementation files.

Revision 16036 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 17 22:46:41 2006 UTC (8 years, 5 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 59385 byte(s)
Diff to previous 16018
remove any artifical limitation in branch names

Revision 16018 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Aug 16 05:50:36 2006 UTC (8 years, 5 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 59477 byte(s)
Diff to previous 15955
Another fix for the ordering of entry numbers when using the fast cloning.
This affect some cases where the first two baskets where stored out of order
(due to deletion within the file, for example with AutoSave on).

Revision 15955 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 8 20:56:25 2006 UTC (8 years, 5 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 59367 byte(s)
Diff to previous 15938
From Paul:
o Clean up the treatment of fReadEntry in a TBranch/TBranchElement.
   It now consistently and predictably remembers the most recent
   entry number passed to a GetEntry() call.  (This is in particular
   useful when dealing with TRef::Object being called from a streamer
   and need the BranchRef facility ; This fixes a problem seen by DZero)

Revision 15938 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Aug 6 16:09:40 2006 UTC (8 years, 5 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 59278 byte(s)
Diff to previous 15849
Fix the ordering of entry numbers when using the fast cloning.
This affect some cases where the basket where stored out of order
(due to deletion within the file, for example with AutoSave on).

Revision 15849 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 26 13:36:44 2006 UTC (8 years, 6 months ago) by rdm
Original Path: trunk/tree/src/TBranch.cxx
File length: 59264 byte(s)
Diff to previous 15833
Instead of providing default implementations for copy ctor's and assignment
operators we better make them private (and not implemented) to avoid people
from accidentally using them. Especially the collections classes and the
TQObject derived classes. In these classes the default implementations would
cause havoc due to multiple deletions of the same objects and other
potential memory corruptions.

Revision 15833 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 20 17:44:37 2006 UTC (8 years, 6 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 61407 byte(s)
Diff to previous 15786
Problem print long branch name in TBranch::Print.
See https://savannah.cern.ch/bugs/?func=detailitem&item_id=18344

Revision 15786 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 13 05:26:07 2006 UTC (8 years, 6 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 61316 byte(s)
Diff to previous 15584
From Paul Russo:

     o (Constructor) Initialize all data members in the
       proper order in the member intializer list.

     o (Destructor) Zero all freed pointers.

     o (Fill) Set released pointers to zero.

     o (GetEntry) Make sure all stack variables are initialized
       before use.

     o (GetEntryExport) Make sure all stack variables are initialized
       before use.

Revision 15584 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 27 17:30:19 2006 UTC (8 years, 6 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 59836 byte(s)
Diff to previous 15572
Modify a format in TBranch::GetBasket

Revision 15572 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 27 14:36:28 2006 UTC (8 years, 6 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 59814 byte(s)
Diff to previous 15421
-Rename class TFilePrefetch -> TFileCacheRead
-Rename class TTreeFilePrefetch -> TTreeCache
-Add new class TFileCacheWrite that implements automatic caching
 when writing network files. This class replaces the previous class TCache.
-old TCache class deleted.
-TFileCacheRead can read buffers from the wite cache in TFileCacheWrite.
-As a result TFile::UseCache is obsolete. The function is kept for
  backward compatibility.
-Remove references to TCache from TXMLFile, TSQLFile, TwebFile, TNetFile
-remove pointer TFile::fCache
-Add pointers TFile::fCacheRead and TFile::fCacheWrite
-Remove members fMaxCacheSize and fPageSize from TChain

NOTE that it is recommended to
  rm -f base/src/*.d base/src/*.o
  rm -f net/src/*.d  net/src/*.o
  rm -f tree/src/*.d tree/src/*.o

Revision 15421 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 14 13:15:55 2006 UTC (8 years, 7 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 59838 byte(s)
Diff to previous 15168
mprove the prefetching algorithm in case of Trees.
A learning phase is introduced (by default one percent of
all entries) to find the list of branches referenced.
The learning fraction can be changed via TTreeFilePrefetch::SetLearnRatio

Revision 15168 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 24 15:10:47 2006 UTC (8 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 59645 byte(s)
Diff to previous 15134
Fix coding conventions violations

Revision 15134 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 23 04:47:42 2006 UTC (8 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 59540 byte(s)
Diff to previous 14741
From Federico Carminati:

"I have implemented all copy and equal operators needed to silence all
warnings in AliRoot, as requested. I have implemented shallow copies as
would do the default operators synthetized by the compiler.
Most operators are protected. If users complain, you just have to move
them into the public area, but class derivation is of course supported.
It has been a terrible job, I have modified 278 files, but the changes
are backward compabile, and this goes a long way to permitting user to
use the effc++ flag with root headers."

Revision 14741 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 18 15:58:28 2006 UTC (8 years, 9 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 57511 byte(s)
Diff to previous 14721
Finish the addition of support in the fast cloning method for files where the basket
have been stored 'out-of-order'

Revision 14721 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 17 21:21:59 2006 UTC (8 years, 9 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 57884 byte(s)
Diff to previous 14336
Add support in the fast cloning method for files where the basket
have been stored 'out-of-order' (i.e. for a given branch a basket with
higher entry number is located early in the file)

Revision 14336 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 20 21:43:44 2006 UTC (8 years, 10 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 56703 byte(s)
Diff to previous 14086
Reduce direct dependencies on TClass.h, TROOT.h and TStreamerInfo.h.
Warning:  This means that some file that relied on the indirect
inclusion of these header file might now fail to compile with
an error message mention that gROOT is no known or that TClass,
TROOT or TStreamerInfo is incompletely defined.  Simply add the
proper include directive.

Revision 14086 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 22 23:26:12 2006 UTC (8 years, 11 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 56683 byte(s)
Diff to previous 13966
In FindBranch do not add a . if it is already present at the end of a
branchname.  This will speed TTree::Draw in some case where it wasn't
able to find the split branch and reverted to use the top level object
and its data members.

Revision 13966 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 31 20:58:45 2006 UTC (8 years, 11 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 56616 byte(s)
Diff to previous 13914
improve error message

Revision 13914 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 24 21:32:46 2006 UTC (9 years ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 56582 byte(s)
Diff to previous 13262
From Sergei Linev:
1) In normal TBasket constructor mother directory assigned to TBranch directory.
2) In TBasket::CopyTo method file for copy is used directly without setting gFile/gDirectory
3) In TBasket::WriteBuffer mother dir assigned once again. It is required when basket with
   default constructor was created.

Revision 13262 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 16 20:20:01 2005 UTC (9 years, 2 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 56574 byte(s)
Diff to previous 13207
Add utility functions to implement the raw copy of a basket

Revision 13207 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 11 22:16:04 2005 UTC (9 years, 2 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 55692 byte(s)
Diff to previous 12946
Update the spacing and documentation to match the coding rule

Revision 12946 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 13 10:26:46 2005 UTC (9 years, 3 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 55554 byte(s)
Diff to previous 12805
Simplify the logic with circular trees.
Keep only one buffer per branch.
Remove the unnecessary TBranchElement::KeepCircular

Revision 12805 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 21 21:04:13 2005 UTC (9 years, 4 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 56008 byte(s)
Diff to previous 12804
Previous fix had a misplaced statement in TBranch::Streamer
(Thanks Constantin Loizides)

Revision 12804 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 21 19:02:25 2005 UTC (9 years, 4 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 56205 byte(s)
Diff to previous 12482
In TBranch::Streamer reset fMaxBaskets to its original value before calling TClass::WriteBuffer.

Revision 12482 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 15 21:23:51 2005 UTC (9 years, 5 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 56135 byte(s)
Diff to previous 11999
Prepare the basket for each entry not just the first one

Revision 11999 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 8 21:19:36 2005 UTC (9 years, 7 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 56138 byte(s)
Diff to previous 11925
From Markus and Philippe.
Improve the performance of TBranchElement::SetAddress by increasing the
caching of TClass pointers and offsets.  Also leverage the use of TClassRef
to reduce the number of calls to gROOT->GetClass.  Optimize a couple of
additional functions.  The improvement is dramatic for the 2nd call to
SetAddress on the same branch object (90%)!

Revision 11925 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 31 19:47:41 2005 UTC (9 years, 7 months ago) by pcanal
Original Path: trunk/tree/src/TBranch.cxx
File length: 56048 byte(s)
Diff to previous 11813
This patch add the virtual functions need for the implementation
of TTree over SQL.  In particular this virtualizes the creation
of TBasket(s).

Revision 11813 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 18 12:31:10 2005 UTC (9 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 55907 byte(s)
Diff to previous 11521
From Valeriy Onuchin:

this patch fixes all compilation problems for
ROOT under windows with VC6 compiler.

- The main problem is that VC6 compiler does not recognize
"long long" type in rootcint generated dictionaries,
To fix this, wherever "long long" type was writen in dictionary file it was
replaced with native win32 "long long" type_string "__int64".
Modified files are: cint/src/val2a.c, cint/src/newlink.c, cint/src/Class.cxx

Other changes:
- many  classes contained "list" variables.
  That produced name_clash with  std::list class name.
- many classes contained
 for (int i=0; ..) {..}
 for (int i=0; ..) {..}
 which caused "duplication of initialisation" bug.

- gl/src/CsgOps.cxx had outside declared templated parameter used inside
  internal function.
- TString Atoi, Atof - std namespace was removed.

_ TASimage - custom Streamer was changed. Reading/writing class version
   was added. That allows to keep "future compatibility"/"schema evolution"
   Demo files galaxy.root, gallery.root were rewritten.

- I rolled back changes in TGPicture class which are related to reading
   of XPM files because of problems under win32.

- TASImage::GetMask method was reimplemented.

- libAfterImage.tar.gz - fix all compilation problem under win32 (vc6)

Revision 11521 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 7 13:28:31 2005 UTC (9 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 55911 byte(s)
Diff to previous 11376
From Markus Frank
TTree::Fill returns -1 if an error occurs during Fill

Revision 11376 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Mar 19 16:39:39 2005 UTC (9 years, 10 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 55622 byte(s)
Diff to previous 11281
From Axel:
Implement the possibility to histogram members of a class
from the TBrowser, even in the case where the Tree has been built
in no split mode.

Revision 11281 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 10 17:57:05 2005 UTC (9 years, 10 months ago) by rdm
Original Path: trunk/tree/src/TBranch.cxx
File length: 55017 byte(s)
Diff to previous 11247
From Marek Biskup:
major new PROOF developments:
 - access to PROOF directly via the TChain interface (creating a TDSet
   in the background).
 - access to PROOF based trees via the TTreeViewer
 - fully implemented the TChain/TDSet::Draw() interface.
 - PROOF sessions can now be browsed via the TBrowser

Revision 11247 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 6 08:43:16 2005 UTC (9 years, 10 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 54469 byte(s)
Diff to previous 11095
Replace refernces to TBasket::kNotDecompressed by TBuffer::kNotDecompressed

Revision 11095 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 10 23:02:42 2005 UTC (9 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 54468 byte(s)
Diff to previous 10962
From Philippe:
This patch adds a missing CheckByteCount for Tbranch version 6 through 8.

Revision 10962 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 20 01:10:52 2005 UTC (10 years ago) by rdm
Original Path: trunk/tree/src/TBranch.cxx
File length: 54338 byte(s)
Diff to previous 10657
From Philippe:
This last update should fix all bool issues on MacOS by adding a new class
TLeafO (for bOOL).

Revision 10657 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 1 15:45:27 2004 UTC (10 years, 1 month ago) by rdm
Original Path: trunk/tree/src/TBranch.cxx
File length: 54229 byte(s)
Diff to previous 10613
correction of small typo in comment.

Revision 10613 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 24 14:11:38 2004 UTC (10 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 54232 byte(s)
Diff to previous 10555
Add the following member functions to TBranch and TTree
Int_t TTree::LoadBaskets(Long64_t maxmemory)
{
  // Read in memory all baskets from all branchs up to the limit
  // of maxmemory bytes.
  // if maxmemory is non null and positive SetVaxVirtualSize is called
  // with this value. Default for maxmemory is 2000000000 (2 Gigabytes).
  // The function returns the total number of baskets read into memory
  // if negative an error occured while loading the branches.
  // This method may be called to force branch baskets in memory
  // when random access to branch entries is required.
  // If random access to only a few branches is required, you should
  // call directly TBranch::LoadBaskets.

Int_t TBranch::LoadBaskets()
{
//  Baskets associated to this branch are forced to be in memory
//  You can call TTree::SetMaxVirtualSize(maxmemory) to instruct
//  the system that the total size of the imported baskets do not
//  exceed maxmemory bytes.
//  The function returns the number of baskets that have been put in memory
//  This method may be called to force all baskets of one or more branch
//  in memory when random access to entries in this branch is required.
//  See also TTree::LoadBaskets to load all baskets of all branches in memory.

Revision 10555 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 18 06:13:14 2004 UTC (10 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 52847 byte(s)
Diff to previous 10336
From Philippe:
The crash for iobug.C(1,0) was fixed in a previous patch.

The bad results in iobug.C(1,1) and iobug.C(2,1) were a result of badly
formed files (i.e. the file produce do not contain the correct data!).

This patch resolves the solution by insuring that all the level of base
classes have their own TBranchElement object except when inside a split
collection.

When the base class or any of its own base class has no data member, there
is no branch created (this was already the case).

The TBranchElement corresponding to the base class itself does NOT have a
TLeafElement (but has at least one sub-TBranchElement).  Its fObject points
to the start of the sub-part of the object which correspond to its base
class.

In addition, this patch corrects TBranch::GetSubBranch to give the correct
result even if the hiearchy of branch is more than 2 deep.

This patch also correct GetValueClones and GetValueSTL to add the base class
offset only once.

Revision 10336 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 18 12:32:12 2004 UTC (10 years, 3 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 52849 byte(s)
Diff to previous 9819
Implement new function TTree::ReadFile
Long64_t TTree::ReadFile(const char *filename, const char *branchDescriptor)
{
   // Create or simply read branches from filename
   // if branchDescriptor = "" (default), it is assumed that the Tree descriptor
   //    is given in the first line of the file with a syntax like
   //     A/D:Table[2]/F:Ntracks/I:astring/s
   //  otherwise branchDescriptor must be specified with the above syntax.
   //
   // A TBranch object is created for each variable in the expression.
   // The total number of rows read from the file is returned.

TNtuple::ReadFile has been modified to be consistent with TTree::ReadFile.
New function TLeaf::ReadValue implemented (and in all TLeaf derived classes).

Revision 9819 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Aug 22 01:50:07 2004 UTC (10 years, 5 months ago) by rdm
Original Path: trunk/tree/src/TBranch.cxx
File length: 52644 byte(s)
Diff to previous 9663
updated description of GetFile() and corrected test for remote branch files,
was "://", now ":/" since, e.g. rfio:/path/file.root is a legal url.

Revision 9663 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 3 14:50:51 2004 UTC (10 years, 5 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 52555 byte(s)
Diff to previous 9615
Implement a first version of circular buffers for memory resident Trees.
New data member
   Long64_t  fMaxEntries;  //  Maximum number of entries for the circular buffers
and corresponding function:
   void TTree::SetCircular(Long64_t maxEntries)
where maxEntries is the maximum number of entries to be kept in the buffers.
When the number of entries exceeds this value, the first entries in the Tree
are deleted and the buffers used again.
The implementation minimizes memory operations by swapping basket pointers
and only shifting the data in the new first buffer.

When TTree::Fill reaches fMaxEntries, it calls the new TBranch function:
     virtual void      KeepCircular(Long64_t maxEntries);
In case a branch buffer needs to be recomputed, this function calls
the new function in TBasket
     virtual void    MoveEntries(Int_t dentries);

An example of a script using a circular buffer is shown below

void circular() {
     gROOT->cd(); //make sure that the Tree is memory resident
     TTree *T = new TTree("T","test circular buffers");
     TRandom r;
     Float_t px,py,pz;
     Double_t random;
     UShort_t i;
     T->Branch("px",&px,"px/F");
     T->Branch("py",&py,"px/F");
     T->Branch("pz",&pz,"px/F");
     T->Branch("random",&random,"random/D");
     T->Branch("i",&i,"i/s");
     T->SetCircular(20000);
     for (i = 0; i < 65000; i++) {
        r.Rannor(px,py);
        pz = px*px + py*py;
        random = r.Rndm();
        T->Fill();
     }
     T->Print();
}

Revision 9615 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 29 10:54:55 2004 UTC (10 years, 5 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 51435 byte(s)
Diff to previous 9283

*****************WARNING*****************
With this mega patch, we introduce support for TTree/TChain  with more than
2 billion entries. Several class data members have been changed from
Int_t (or Stat_t) to Long64_t.
==>Trees written with this new version cannot be read with older versions
******************************************

TBranch:
========
 - replace the members with type Int_t or Stat_t by Long64_t
    Long64_t    fEntryNumber;     //  Current entry number (last one filled in this branch)
    Long64_t    fReadEntry;       //! Current entry number when reading
    Long64_t    fEntries;         //  Number of entries
    Long64_t    fTotBytes;        //  Total number of bytes in all leaves before compression
    Long64_t    fZipBytes;        //  Total number of bytes in all leaves after compression
    Long64_t   *fBasketEntry;     //[fMaxBaskets] Table of first entry in eack basket

 - corresponding changes in the member functions
    virtual Int_t     GetEntry(Long64_t entry=0, Int_t getall = 0);
    virtual Int_t     GetEntryExport(Long64_t entry, Int_t getall, TClonesArray *list, Int_t n);
            Int_t     GetEvent(Long64_t entry=0) {return GetEntry(entry);}
            Long64_t *GetBasketEntry() const {return fBasketEntry;}
            Long64_t  GetReadEntry()   const {return fReadEntry;}
            Long64_t  GetTotalSize()   const;
            Long64_t  GetTotBytes()    const {return fTotBytes;}
            Long64_t  GetZipBytes()    const {return fZipBytes;}
            Long64_t  GetEntryNumber() const {return fEntryNumber;}
            Long64_t  GetEntries()     const {return fEntries;}

TBranch::Streamer has been modified to read old files and automatically translate
the old types to the new types.
The new version of Streamer uses the TClass::ReadBuffer/WriteBuffer.

TBranch::Print has been modified to take into account the new data types.

ClassDef version increased to 10.

TBranchClones:
==============
    virtual Int_t    GetEntry(Long64_t entry=0, Int_t getall = 0);

TBranchElement:
===============
            Int_t    GetEntry(Long64_t entry=0, Int_t getall = 0);

TBranchObject:
==============
    virtual Int_t    GetEntry(Long64_t entry=0, Int_t getall = 0);

TChain:
=======
    Long64_t    *fTreeOffset;       //[fTreeOffsetLen]Array of variables

    virtual Int_t     Add(const char *name, Long64_t nentries=kBigNumber);
    virtual Int_t     AddFile(const char *name, Long64_t nentries=kBigNumber);
    virtual Long64_t  Draw(const char *varexp, const TCut &selection, Option_t *option=""
                       ,Long64_t nentries=kBigNumber, Long64_t firstentry=0);
    virtual Long64_t  Draw(const char *varexp, const char *selection, Option_t *option=""
                     ,Long64_t nentries=kBigNumber, Long64_t firstentry=0); // *MENU*
    virtual Long64_t  GetChainEntryNumber(Long64_t entry) const;
    virtual Long64_t  GetEntries() const;
    virtual Int_t     GetEntry(Long64_t entry=0, Int_t getall=0);
            Long64_t  LoadTree(Long64_t entry);
    virtual void      Loop(Option_t *option="",Long64_t nentries=kBigNumber, Long64_t firstentry=0); // *MENU*
    virtual Long64_t  Merge(const char *name);
    virtual Long64_t  Merge(TCollection *list);
    virtual Long64_t  Merge(TFile *file, Int_t basketsize, Option_t *option="");
    virtual Long64_t  Process(const char *filename,Option_t *option="", Long64_t nentries=kBigNumber, Long64_t firstentry=0); // *MENU*
    virtual Long64_t  Process(TSelector *selector,Option_t *option="",  Long64_t nentries=kBigNumber, Long64_t firstentry=0);

ClassDef version changed from 4 to 5

TSelector
=========
   virtual Bool_t      ProcessCut(Long64_t /*entry*/) { return kTRUE; }
   virtual void        ProcessFill(Long64_t /*entry*/) { }
   virtual Bool_t      Process(Long64_t /*entry*/) { return kFALSE; }

TSelectorCint
=============
   virtual Bool_t      ProcessCut(Long64_t entry);
   virtual void        ProcessFill(Long64_t entry);
   virtual Bool_t      Process(Long64_t entry);

TSelectorDraw
=============
    Long64_t       fDraw;           //! Last entry loop number when object was drawn
    Long64_t       fSelectedRows;   //  Number of selected entries
    Long64_t       fOldEstimate;    //  value of Tree fEstimate when selector is called
    Double_t      *fV1;             //![fSelectedRows]Local buffer for variable 1
    Double_t      *fV2;             //![fSelectedRows]Local buffer for variable 2
    Double_t      *fV3;             //![fSelectedRows]Local buffer for variable 3
    Double_t      *fV4;             //![fSelectedRows]Local buffer for variable 4
    Double_t      *fW;              //![fSelectedRows]Local buffer for weights

    virtual Long64_t  GetSelectedRows() const {return fSelectedRows;}
    virtual Bool_t    Process(Long64_t /*entry*/) { return kFALSE; }
    virtual void      ProcessFill(Long64_t entry);
    virtual void      ProcessFillMultiple(Long64_t entry);
    virtual void      ProcessFillObject(Long64_t entry);
    virtual void      SetEstimate(Long64_t n);

TTree
=====
Modified data types
    Long64_t       fEntries;           //  Number of entries
    Long64_t       fTotBytes;          //  Total number of bytes in all branches before compression
    Long64_t       fZipBytes;          //  Total number of bytes in all branches after compression
    Long64_t       fSavedBytes;        //  Number of autosaved bytes
    Long64_t       fMaxEntryLoop;      //  Maximum number of entries to process
    Long64_t       fMaxVirtualSize;    //  Maximum total size of buffers kept in memory
    Long64_t       fAutoSave;          //  Autosave tree when fAutoSave bytes produced
    Long64_t       fEstimate;          //  Number of entries to estimate histogram limits
    Long64_t       fChainOffset;       //! Offset of 1st entry of this Tree in a TChain
    Long64_t       fReadEntry;         //! Number of the entry being processed
    Long64_t       fTotalBuffers;      //! Total number of bytes in branch buffers
    Long64_t       fDebugMin;          //! First entry number to debug
    Long64_t       fDebugMax;          //! Last entry number to debug

New function signatures
    virtual Long64_t     AutoSave(Option_t *option="");
    virtual TTree       *CloneTree(Long64_t nentries=-1, Option_t *option="");
    virtual Long64_t     CopyEntries(TTree *tree, Long64_t nentries=-1);
    virtual TTree       *CopyTree(const char *selection, Option_t *option=""
                          ,Long64_t nentries=1000000000, Long64_t firstentry=0);
    virtual Long64_t     Draw(const char *varexp, const TCut &selection, Option_t *option=""
                          ,Long64_t nentries=1000000000, Long64_t firstentry=0);
    virtual Long64_t     Draw(const char *varexp, const char *selection, Option_t *option=""
                          ,Long64_t nentries=1000000000, Long64_t firstentry=0); // *MENU*
    virtual Long64_t     Fit(const char *funcname ,const char *varexp, const char *selection="",Option_t *option="" ,Option_t *goption=""
                          ,Long64_t nentries=1000000000, Long64_t firstentry=0); // *MENU*
    virtual Long64_t     GetChainEntryNumber(Long64_t entry) const {return entry;}
    virtual Long64_t     GetChainOffset() const { return fChainOffset; }
            Long64_t     GetDebugMax()  const {return fDebugMax;}
            Long64_t     GetDebugMin()  const {return fDebugMin;}
    virtual Long64_t     GetEntries() const   {return fEntries;}
    virtual Long64_t     GetEntriesFast() const   {return fEntries;}
    virtual Long64_t     GetEntriesFriend() const;
    virtual Long64_t     GetEstimate() const { return fEstimate; }
    virtual Int_t        GetEntry(Long64_t entry=0, Int_t getall=0);
            Int_t        GetEvent(Long64_t entry=0, Int_t getall=0) {return GetEntry(entry,getall);}
    virtual Long64_t     GetEntryNumberWithBestIndex(Int_t major, Int_t minor=0) const;
    virtual Long64_t     GetEntryNumberWithIndex(Int_t major, Int_t minor=0) const;
    virtual Long64_t     GetEntryNumber(Long64_t entry) const;
    virtual Long64_t     GetMaxEntryLoop() const {return fMaxEntryLoop;}
    static  Long64_t     GetMaxTreeSize();
    virtual Long64_t     GetMaxVirtualSize() const {return fMaxVirtualSize;}
    virtual Long64_t     GetReadEntry()  const {return fReadEntry;}
    virtual Long64_t     GetReadEvent()  const {return fReadEntry;}
    virtual Long64_t     GetSelectedRows() {return GetPlayer()->GetSelectedRows();}
    virtual Long64_t     GetTotBytes() const {return fTotBytes;}
    virtual Long64_t     GetZipBytes() const {return fZipBytes;}
    virtual Long64_t     LoadTree(Long64_t entry);
    virtual Long64_t     LoadTreeFriend(Long64_t entry, TTree *T);
    virtual Long64_t     Merge(TCollection *list);
    TPrincipal          *Principal(const char *varexp="", const char *selection="", Option_t *option="np"
                                   ,Long64_t nentries=1000000000, Long64_t firstentry=0);
    virtual Long64_t     Process(const char *filename,Option_t *option="", Long64_t nentries=1000000000, Long64_t firstentry=0); // *MENU*
    virtual Long64_t     Process(TSelector *selector, Option_t *option="", Long64_t nentries=1000000000, Long64_t firstentry=0);
    virtual Long64_t     Project(const char *hname, const char *varexp, const char *selection="", Option_t *option=""
                          ,Long64_t nentries=1000000000, Long64_t firstentry=0);
    virtual TSQLResult  *Query(const char *varexp="", const char *selection="", Option_t *option=""
                          ,Long64_t nentries=1000000000, Long64_t firstentry=0);
    virtual Long64_t     Scan(const char *varexp="", const char *selection="", Option_t *option=""
                          ,Long64_t nentries=1000000000, Long64_t firstentry=0); // *MENU*
    virtual void         SetDebug(Int_t level=1, Long64_t min=0, Long64_t max=9999999); // *MENU*
    virtual void         SetEntries(Long64_t n);
    virtual void         SetEstimate(Long64_t nentries=10000);
    virtual void         SetMaxEntryLoop(Long64_t maxev=1000000000) {fMaxEntryLoop = maxev;} // *MENU*
    static  void         SetMaxTreeSize(Long64_t maxsize=1900000000);
    virtual void         SetMaxVirtualSize(Long64_t size=0) {fMaxVirtualSize = size;} // *MENU*
    virtual void         Show(Long64_t entry=-1, Int_t lenmax=20);
    virtual Long64_t     UnbinnedFit(const char *funcname ,const char *varexp, const char *selection="",Option_t *option=""
                          ,Long64_t nentries=1000000000, Long64_t firstentry=0);

TTree::Streamer has been modified to real old files.
TTree::Print has been modified to take into account the new data types.

ClassDef version number incremented to 13.

TVirtualTreePlayer
==================
    virtual TTree         *CopyTree(const char *selection, Option_t *option=""
                            ,Long64_t nentries=1000000000, Long64_t firstentry=0) = 0;
    virtual Long64_t       DrawScript(const char* wrapperPrefix,
                                      const char *macrofilename, const char *cutfilename,
                                      Option_t *option, Long64_t nentries, Long64_t firstentry) = 0;
    virtual Long64_t       DrawSelect(const char *varexp, const char *selection, Option_t *option
                            ,Long64_t nentries, Long64_t firstentry) = 0;
    virtual Long64_t       Fit(const char *formula ,const char *varexp, const char *selection,Option_t *option ,Option_t *goption
                            ,Long64_t nentries, Long64_t firstentry) = 0;
    virtual Long64_t       GetSelectedRows() const = 0;
    virtual TPrincipal    *Principal(const char *varexp="", const char *selection="", Option_t *option="np"
                           ,Long64_t nentries=1000000000, Long64_t firstentry=0) = 0;
    virtual Long64_t       Process(const char *filename,Option_t *option="", Long64_t nentries=1000000000, Long64_t firstentry=0) = 0;
    virtual Long64_t       Process(TSelector *selector,Option_t *option="",  Long64_t nentries=1000000000, Long64_t firstentry=0) = 0;
    virtual Long64_t       Scan(const char *varexp, const char *selection, Option_t *option
                            ,Long64_t nentries, Long64_t firstentry) = 0;
    virtual TSQLResult    *Query(const char *varexp, const char *selection, Option_t *option
                            ,Long64_t nentries, Long64_t firstentry) = 0;
    virtual void           SetEstimate(Long64_t n) = 0;
    virtual Long64_t       UnbinnedFit(const char *formula ,const char *varexp, const char *selection,Option_t *option
                            ,Long64_t nentries, Long64_t firstentry) = 0;

TTreeFormula
============
   TLeaf*      GetLeafWithDatamember(const char* topchoice, const char* nextchice, Long64_t readentry) const;
   Bool_t      BranchHasMethod(TLeaf* leaf, TBranch* branch,
                               const char* method,const char* params,
                               Long64_t readentry) const;

TTreePlayer
===========
    Long64_t       fSelectedRows;    //  Number of selected entries

    virtual TTree    *CopyTree(const char *selection, Option_t *option
                       ,Long64_t nentries, Long64_t firstentry);
    virtual Long64_t  DrawScript(const char* wrapperPrefix,
                                 const char *macrofilename, const char *cutfilename,
                                 Option_t *option, Long64_t nentries, Long64_t firstentry);
    virtual Long64_t  DrawSelect(const char *varexp, const char *selection, Option_t *option
                                 ,Long64_t nentries, Long64_t firstentry);
    virtual Long64_t  Fit(const char *formula ,const char *varexp, const char *selection,Option_t *option ,
                          Option_t *goption ,Long64_t nentries, Long64_t firstentry);
    virtual Long64_t  GetSelectedRows() const {return fSelectedRows;}
    TPrincipal       *Principal(const char *varexp, const char *selection, Option_t *option
                       ,Long64_t nentries, Long64_t firstentry);
    virtual Long64_t  Process(const char *filename,Option_t *option, Long64_t nentries, Long64_t firstentry);
    virtual Long64_t  Process(TSelector *selector,Option_t *option,  Long64_t nentries, Long64_t firstentry);
    virtual Long64_t  Scan(const char *varexp, const char *selection, Option_t *option
                       ,Long64_t nentries, Long64_t firstentry);
    virtual TSQLResult *Query(const char *varexp, const char *selection, Option_t *option
                         ,Long64_t nentries, Long64_t firstentry);
    virtual void      SetEstimate(Long64_t n);
    virtual Long64_t  UnbinnedFit(const char *formula ,const char *varexp, const char *selection,Option_t *option
                       ,Long64_t nentries, Long64_t firstentry);

The generated code by TTreePlayer::MakeCode, MakeClass, MakeProxy
uses Long64_t instead of Int_t

TTreeViewer
===========
    Long64_t      Process(const char* filename, Option_t *option="", Long64_t nentries=1000000000, Long64_t firstentry=0); // *MENU*
    void          SetCurrentRecord(Long64_t entry);

THbookBranch
============
    virtual Int_t    GetEntry(Long64_t entry=0, Int_t getall=0);
    virtual void     SetEntries(Long64_t n) {fEntries=n;}

THbookTree
==========
    virtual Int_t    GetEntry(Long64_t entry=0, Int_t getall=0);
    virtual void     InitBranches(Long64_t entry);
    virtual void     SetEntries(Long64_t n);

TProofDraw
==========
    virtual Bool_t   Process(Long64_t /*entry*/);

TProofPlayer
============
    virtual Long64_t  Process(TDSet *set,
    virtual Long64_t  DrawSelect(TDSet *set, const char *varexp,
    Long64_t          Process(TDSet *set, const char *selector,
    Long64_t          DrawSelect(TDSet *set, const char *varexp,

Revision 9283 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 22 15:36:42 2004 UTC (10 years, 7 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 51845 byte(s)
Diff to previous 9054
From Valeriy Onuchin:
- this patch allows to set draw option while  browsing TFiles/TTrees

Revision 9054 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat May 29 20:36:17 2004 UTC (10 years, 7 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 51812 byte(s)
Diff to previous 8825
In TTree::Print and TBranch::GetTotalSize, take into the special case when all baskets
are in memory when counting the total number of bytes.

Revision 8825 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat May 8 07:08:35 2004 UTC (10 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 51745 byte(s)
Diff to previous 7880
In the TBranch constructors reduce the initial size of fMaxBaskets from 1000 to 10.
The original allocation generated a overhead of about 12 Kbytes per branch.
In case of many Trees with hundreds of branches, the overhead in memory
was non negligible.
The arrays of size fMaxBaskets are automatically reallocated in case
a branch has more baskets than the current allocation.

Revision 7880 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jan 10 10:52:31 2004 UTC (11 years ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 51749 byte(s)
Diff to previous 7858
From Philippe:

This mega patch introduces a new implementation of the STL I/O
which is backward and forward compatible.  In addition this is more
exactly a new implementation or an extension of the container I/O.

We are introducing a new abstract interface:
"TVirtualContainerProxy", which can be implemented to present a
proxy to any collection which the I/O (and TTreeFormula) can use
then transparently.

The TVirtualContainerProxy interface allows to the I/O system to
request some information and to execute some essential function of
the container:
   what kind of object/data does it contain
   does it contain pointers
   how to insert data into the container
   how to retrieve an array of pointer to the elements inside
   how to create a collection object
   how to clear the collection
   how to resize the collection
   how to streamer the collection (if needed)
   how to calculate the sizeof the collection
   how to calculate the number of elements of the collection.

Using those primitives, the I/O and TTreeFormula should be able to
access any collection.   The I/O should also be able to handle the
splitting of collections that can be split (i.e. contains a single
type of object/data).

The current compromise selected between code duplication,
performance of the I/O of TClonesArray and vector of pointers and
the performance of the I/O of other containers, was to have on
function handle all collection as if they were a C-style array of
pointers to data.  This implies for example that the I/O of vector
of object current passes via the construction of temporary array
of pointer.  The cost of this construction is usually ~Qjust~R the
cost of calculating the addresses of the elements and assigning it
to an array element.

Registering a collection proxy will be similar to
     static int dummy = GenerateInitInstance((CollectType*)0x0)-
>AdoptCollectionProxy(new CollectTypeProxy));

Follows a few details on the modifications made to some of the
files and classes.

Bytes.h:
   Work around a problem in the MSVC++ 6.0 optimizer.  This should
not affect other compilers.

String:
   Included the std::string dictionary into G__Base2.cxx, this
insures its presence at all time.
   Added a new file string.cxx holding the streamer for
std::string.

RConfig.h
   Added proper ansi stream configuration for AIX, KCC
   Added template specialization defect for MSVC

TBrowser
   Start adding the ability to browser non TObject classes

TBuffer
   To handle the reading and writing array of objects, added:
     Int_t    CheckByteCount(UInt_t startpos, UInt_t bcnt, const
TClass *clss, const char* classname);
     Int_t    CheckByteCount(UInt_t startpos, UInt_t bcnt, const
char *classname);
     void     ReadFastArray(void  *start , TClass *cl, Int_t n=1,
TMemberStreamer *s=0);
     void     ReadFastArray(void **startp, TClass *cl, Int_t n=1,
Bool_t isPreAlloc=kFALSE, TMemberStreamer *s=0);
     void     WriteFastArray(void  *start,  TClass *cl, Int_t n=1,
TMemberStreamer *s=0);
     Int_t    WriteFastArray(void **startp, TClass *cl, Int_t n=1,
Bool_t isPreAlloc=kFALSE, TMemberStreamer *s=0);

TROOT
   Enhancement to make the access to gROOT not dependent for the
library loading order.  In particular we added:
      ROOT::GetROOT()
   which should be used instead of gROOT.

   Improve support for STL.  In particular, now STL containers do
have a corresponding TClass object


TRealData
   Replace SetStreamer by AdoptStreamer that allow to use not only
a streamer function but also streamer object (allowing streamer
with a state for Foreign classes)

TString:
   Improve streamer performance

TSystem:
   More consistency of the return value of TSystem::CompileMacro

build/unix/makecintdlls.sh
   Stop making the string.dll

config:
   enhance sgicc makefiles

cont:
   fix TBits::operator=
   TClassTable now warns for duplicate only for non stl classes
   TClonesArray fix a typo

gpad:
   Add a new class TInspectObject to enable inspect non TObject
classes
   TRootBrowser : enable inspect non TObject classes

TFormula/TTreeFormula
   To enhance performance switch from using one array fOper which
contained the operation code and its arguments to using 2 arrays
fActions and fActionParams to store respectively the operation and
its parameters.
   A new function Convert is used to convert old version from the
fOper to fActions.  This allows cleaner coding and offer
optimization opportunities.

TTreePlayer
   Start adding support in MakeClass for STL containers.

TRint/TProofServ
   Insure the loading of the string support

Event.cxx
   make sure to avoid memory over-write

stress.cxx
   Add new parameters
      stress <nevent> <style> <subbench> <portion>
   if <subbench> is 1 or higher, print the benchmark results after
each test.  This allows understand
   which test is affect by a performance change.
   portion is a binary field to indicate which test to run.  This
allows to focus on a particular test.

TVirtualCollectionProxy
   Abstract interface used to access any type of containers from
the I/O system and TTreeFormula. See TVectorProxy and
TEmulatedVectorProxy for examples.

TEmulatedVectorProxy
   Implementation of a std::vector proxy to be able to read a
std::vector without any libraries.

TVectorProxy
   Implementation of TVirtualCollectionProxy for a std::vector for
which we have the library.

TStreamerInfo.cxx
   Split in 3 files:  TStreamerInfo.cxx
TStreamerInfoReadBuffer.cxx TStreamerInfoWriteBuffer.cxx

   All the ReadBuffer, ReadBufferClones and the new ReadBufferSTL
(similarly for  WriteBuffer) have been factorized into one
function and 2 short wrappers.  The new main function expect an
array of pointer to the objects (this array is most often of size
one).

   TClonesArray objects pass GetObjectRef(0) to the common
ReadBuffer
   vector<bla*> v pass &(v[0])
   vector<bla> needs to create an intermediary array to hold the
address

   This mechanism is sometimes not optimal (vector<blah>) but
allows extremely flexibly and extension.  Basically, to add
support for a new container type using the StreamerInfo mechanism
(in particular allows splitting), one 'just' need to implement a
TVirtualCollectionProxy, which, in particular, will return an
array of address to the object it contains.  Even std::map can be
handled with this mechanism, since, for I/O purposes, it can be
consider as a container of pairs.

   Add a few optimization, including more caching via a new array
of a new struct (fComp).

   Fixed a problem (re)introduced while implementing the Foreign
class CheckSum.  Doing:
      class Event;
      f = new TFile("Event.root");
   resulted in errors.

TCint
   Add proper support for TClass of STL containers. Fix a memory
leak.
   Add support for load TClass via a typedef.
   Fix a problem with multiple inheritance

TClass
   Fixed a problem (re)introduced while implementing the Foreign
class CheckSum.  Doing:
      class Event;
      f = new TFile("Event.root");
   resulted in errors.
   Add a

TClass/TGenericClassInfo/TDataMember
   Add support for a new interface (TVirtualCollectionProxy)
useable for STL containers or any user defined containers.
   Add support for streamer with are objects (as opposed to free
standing function or methods).  This allows the user a greater
flexibility in writing a streamer.
   Add a few optimizations
   Add CanSplit to answer the question for a whole Class (for
example some collection can not be splitted).

TClassStreamer
   New class to wrap a class wide streamer

ClassStreamerFunc_t
   typedef for a class wide streamer function

TMemberStreamer
   New class to wrap a specific class member streamer

MemberStreamerFunc_t
   typedef for  a specific class member streamer function

RootStreamer
   Macro to specify a free standing streamer object or function
for a class
   For example:
      RootStreamer(string,std_string_streamer);

TStreamerElement:
   A couple of optimization/simplification.
   Add support for the new STL I/O
   Extend the useful

TBranchElement:
   add a connection to the proper TVirtualCollectionProxy
   add support for STL containers (non-split and split mode)

TTree
   Make the function TTree::GetMakeClass NON-virtual for better
efficiency
   Add support for STL containers

TBasket
   Left (in comment) a yet unproved improvement proposed by
Victor.  The preliminary tests were inconclusive performance wise
and it had (seemingly) problem with backward and forward
compatibility.

TBranch
   Performance improvements

metautils
   This is a new package for C++ files shared between rootcint and
meta.
   It contains TClassEdit a class to help determine some property
of a class given its class name (stl, template, etc).

utils
   Introduced a new file RStl.cxx to start separating rootcint in
modules.
   Modified rootcint to support the new STL I/O methods.
   In particular a new class RStl is in charge of doing the
generating of code for STL containers.

Revision 7858 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 7 14:00:14 2004 UTC (11 years ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 51603 byte(s)
Diff to previous 7846
In TBranch::Streamer recompute fMaxBaskets from the real number of baskets in fBaskets.
With this simple optimisation, stress benchmark jumps from 640 ROOTMARKS to 743 on my machine.
This optimisation is important in case of a Tree with many branches and a TChain
with many files.

Revision 7846 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 6 07:30:31 2004 UTC (11 years ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 51512 byte(s)
Diff to previous 7836
Add support for old class versions 6 and 7

Revision 7836 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jan 5 11:22:23 2004 UTC (11 years ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 51490 byte(s)
Diff to previous 7822
Speed optimisation in TBranch::Streamer

Revision 7822 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 30 22:10:41 2003 UTC (11 years ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 51416 byte(s)
Diff to previous 7816
Optimize format in TBranch::Print in case of large files.

Revision 7816 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 30 18:17:56 2003 UTC (11 years ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 51413 byte(s)
Diff to previous 7810
Fix some consistency problem when encoding the branch fBasketSeek array.
Modify a print format in case of files bigger than 2 Gigabytes.

Revision 7810 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 30 13:16:51 2003 UTC (11 years ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 51398 byte(s)
Diff to previous 7786
Mega patch to add support for large files (bigger than 2 GBytes)
----------------------------------------------------------------

  ==========>NEW VERSION 4.00/00 <===========

Because this new version has a considerable number of changes,
and new important additions by Philippe are scheduled for the coming days
we are starting a new major version 4.
  -Support for large files
  -Automatic schema evolution for foreign classes
  -New data type Double32_t

Large files are currently tested only under Linux with gcc3.2.
Support for other systems will be gradually added in the coming days.
By default under Linux, files are created with the option LARGEFILE.
Note that when creating a Tree, the default maximum size for a Tree
is set to 1.9 GBytes. You can change this default value by calling
  TTree::SetMaxTreeSize(Long64_t maxsize)

The implementation of this new feature has required changes in many places.
The files produced by this new version can still be read by old ROOT versions
if their size if smaller than 2 GBytes. And obviously, the new version
can digest old ROOT files.

WARNING: note the following backward incompatibility:
 -TSystem::GetPathInfo has a new signature: (also TUnixSystem, TWinNTSystem, etc)
  old: GetPathInfo(const char *path, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime);
  new: GetPathInfo(const char *path, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime);

 -TFile::SysSeek and TFile::SysStat have a new signature (also TNetFile, TWebFile, etc)
  old:  Int_t    SysSeek(Int_t fd, Long_t offset, Int_t whence);
        Int_t    SysStat(Int_t fd, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime);
  new:  Long64_t SysSeek(Int_t fd, Long64_t offset, Int_t whence);
        Int_t    SysStat(Int_t fd, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime);

 -TTree::SetMaxTreeSize has a new signature:
  old:  void TTree::SetMaxTreeSize(Int_t maxsize)
  new:  void TTree::SetMaxTreeSize(Long64_t maxsize)

  All references to Seek_t have been replaced by Long64_t.

Revision 7786 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 19 13:40:26 2003 UTC (11 years, 1 month ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 49180 byte(s)
Diff to previous 7702
Add new class TLeafL to support Long64_t, ULong64_t data types in a TBranch

Revision 7702 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Dec 8 15:55:24 2003 UTC (11 years, 1 month ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 48834 byte(s)
Diff to previous 7573
The arrays fBasketBytes, fBasketEntry and fBasketSeek must be preset to 0.
Results were OK, but the compression algorithm was not able to compress
the arrays.

Revision 7573 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 12 09:06:11 2003 UTC (11 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 48725 byte(s)
Diff to previous 7572
Implement TTree::Refresh and TBranch::Refresh functions.
Calling TTree::Refresh is useful when a Tree is produced by a writer process
and concuently analyzed by one or more readers.
TTree::Refresh is called by the TTreeViewer when pressing the Refresh button.

Revision 7572 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 12 07:23:08 2003 UTC (11 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 49146 byte(s)
Diff to previous 6825
Protect TChain::GetEntry in case of an empty chain.
Add a comment in the function indicating that 0 bytes are returned
in this case.

Revision 6825 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 4 16:16:35 2003 UTC (11 years, 6 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 47423 byte(s)
Diff to previous 6824
Fix a compiler warning (error on hp-ux)

Revision 6824 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 4 13:27:35 2003 UTC (11 years, 6 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 47429 byte(s)
Diff to previous 6624
From Philippe:
This update remove the need to set the addresses before calling CloneTree or CopyTree.  This is accomplished by
        - making sure that default addresses are created before passing it to the clone.
        - keep a list of cloned trees and inform them when an address change.

Also hard to trace memory errors due to the 'link' between the original and the cloned tree are removed by
making the original reset all the addresses of the cloned tree whenever the original tree/chain is deleted.

Revision 6624 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 15 08:43:49 2003 UTC (11 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 46860 byte(s)
Diff to previous 6512
Modify TBranch::Print in case of branches with all baskets in memory.
Instead of printing "File size = 0" we print "All baskets in memory"

Revision 6512 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 30 16:29:31 2003 UTC (11 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 46511 byte(s)
Diff to previous 6478
From Philippe:
This patch adds the capability to transfer buffer directly from one tree to another
without creating the contained objects or even without uncompressing the buffer
(in the case where there is only one object in the buffer).

This code has been in usage in CDF for at least 1 1/2 year and the code has not been
changed since at least 12 months.

Revision 6478 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 24 19:00:05 2003 UTC (11 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 43040 byte(s)
Diff to previous 6261
From Philippe:
The method TBranch::GetMother was returning the daughter of the top level mother instead of the top level mother.  In
order for GetEntry to properly set the addresses it requires the top level mother to be returned by that functions.

Revision 6261 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 6 21:51:45 2003 UTC (11 years, 10 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 43036 byte(s)
Diff to previous 6257
Fix a problem happening in some rare cases in TBranch::GetMother.
Delete the code in Streamer writing the branch in a separate file.
This is now done in TBranchElement::Streamer.

Revision 6257 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 5 23:40:25 2003 UTC (11 years, 10 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 43383 byte(s)
Diff to previous 6256
restore previous version of TBranch.

Revision 6256 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 5 23:36:18 2003 UTC (11 years, 10 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 43570 byte(s)
Diff to previous 6244
From Philippe:
This simple patch improve the situation as far as private inheritance is concerned.  In particular this allow usages like :
class X : Y, public TObject {};
This also corrects the temporary objects deletion in TClass::BuildRealData which was incorrect for classe inheriting from
TObject only as 2nd or later inheritances.

Revision 6244 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Mar 4 22:24:39 2003 UTC (11 years, 10 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 43382 byte(s)
Diff to previous 6057
Move getter functions GetMother and GetSubBranch from TBranchElement
to the base class TBranch

Revision 6057 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 5 15:07:29 2003 UTC (11 years, 11 months ago) by rdm
Original Path: trunk/tree/src/TBranch.cxx
File length: 42368 byte(s)
Diff to previous 5943
if a branch is a folder use a different icon then when it is not (like for
branch elements).

Revision 5943 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jan 20 08:44:47 2003 UTC (12 years ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 42088 byte(s)
Diff to previous 5918
Add protections in destructors in case the default constructor has been called.
Initialize pointers in some default constructors.

Revision 5918 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 15 18:48:16 2003 UTC (12 years ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 42066 byte(s)
Diff to previous 5717
*** empty log message ***

Revision 5717 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Dec 2 18:50:12 2002 UTC (12 years, 1 month ago) by rdm
Original Path: trunk/tree/src/TBranch.cxx
File length: 42031 byte(s)
Diff to previous 4968
mega patch to remove almost all compiler warnings on MacOS X where the
compiler is by default in pedantic mode (LHCb also like to use this option).
The following issues have been fixed:
- removal of unused arguments
- comparison between signed and unsigned integers
- not calling of base class copy ctor in copy ctor's
To be done, the TGeo classes where we get still many hundred warnings of
the above nature. List forwarded to Andrei.

Revision 4968 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 17 22:06:49 2002 UTC (12 years, 6 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 42006 byte(s)
Diff to previous 4838
Add protections in case of a TTree where SetDirectory(0) has been called.

Revision 4838 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 9 10:23:21 2002 UTC (12 years, 6 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 41941 byte(s)
Diff to previous 4819
In TBranch::GetTotalSize, stream the branch to a temporary buffer
to evaluate the size of the branch and its daughters.
Use the buffersize as the total size.

Revision 4819 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 4 16:47:01 2002 UTC (12 years, 6 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 42402 byte(s)
Diff to previous 4807
Use TStreamerInfo::GetSizeElements instead of TStreamerInfo::GetSize
in TTree::Print and TBranch::Print.

Revision 4807 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 2 14:37:58 2002 UTC (12 years, 6 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 42386 byte(s)
Diff to previous 4647
In TBranch::GetTotalSize, force the computation of the dictionary
for TLeaf and derivates.

Revision 4647 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jun 2 14:05:50 2002 UTC (12 years, 7 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 42307 byte(s)
Diff to previous 4611
Improve computation of TBranch::GetTotalSize taking into account the 3 arrays
fBasketBytes, fBasketEntry, fBasketOffset as well as the size of all leaves headers.

Revision 4611 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 29 21:06:02 2002 UTC (12 years, 7 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 42089 byte(s)
Diff to previous 4381
Fix a problem in the evaluation of the branch and tree size.
The new algorithm takes into account the streamed size of the TTree and TBranch
classes.

Revision 4381 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 19 09:36:11 2002 UTC (12 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 41989 byte(s)
Diff to previous 4317
Add a new function GetTotalSize returning the total size in bytes
of the branch buffers on disk + the current buffer in memory.
Modify TBranch::Print to print the info returned by GetTotalSize

Revision 4317 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Apr 6 14:55:36 2002 UTC (12 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 41484 byte(s)
Diff to previous 4305
Modify the GetEntry functions to return -1 in case an error occurs
when reading one branch basket.

Revision 4305 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 4 07:04:43 2002 UTC (12 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 41452 byte(s)
Diff to previous 4304
Fix a mistake in the previous fix in SetAddress.

Revision 4304 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 4 06:58:37 2002 UTC (12 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 41454 byte(s)
Diff to previous 3974
Do not execute SetAddress if the branch is disabled. This may create memory leaks
when the branch address is set from TChain::LoadTree.

Revision 3974 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 13 15:38:50 2002 UTC (12 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 41413 byte(s)
Diff to previous 3969
In TBasket::GetBasket, print additional information (file name and entry number
in case TBasket::ReadBasketBuffers fails.

Revision 3969 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 13 09:30:42 2002 UTC (12 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 41448 byte(s)
Diff to previous 3850
In TBranch::GetBasket, print the name of the file in case an I/O error occurs.

Revision 3850 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Feb 3 16:15:21 2002 UTC (12 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 41428 byte(s)
Diff to previous 3837
Use the new function TBasket::SetBranch instead of setting the global gBranch.
Add new code in SetFile to apply the new file to all baskets.

Revision 3837 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Feb 2 11:54:34 2002 UTC (12 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 41683 byte(s)
Diff to previous 3737
The key and basket constructors, set the TBuffer parent.

Revision 3737 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 23 08:38:59 2002 UTC (13 years ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 41248 byte(s)
Diff to previous 3465
TBranch::SetBasketSize moved to the implementation file. The function checks
that the specified basket size is greater than fEntryOffsetLen.
The functions SetBasketSize in all derived classes call TBranch::SetBasketSize
to get the same protection.

Revision 3465 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 12 09:48:35 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 40912 byte(s)
Diff to previous 3224
Add more comments in the functions GetEntry, in particular in TTree::GetEntry.

Revision 3224 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 16 02:44:33 2001 UTC (13 years, 2 months ago) by rdm
Original Path: trunk/tree/src/TBranch.cxx
File length: 40865 byte(s)
Diff to previous 3199
use ReAllocChar() and ReAllocInt() to realloc buffers instead of ReAlloc().

Revision 3199 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 9 14:17:33 2001 UTC (13 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 40960 byte(s)
Diff to previous 3064
Modify the TBranch::SetFile functions such that the daughter branches are
aloso diverted to the specified file.

Revision 3064 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 18 13:06:46 2001 UTC (13 years, 3 months ago) by rdm
Original Path: trunk/tree/src/TBranch.cxx
File length: 40620 byte(s)
Diff to previous 3031
when branch file names are not absolute and not an URL and the tree file
name is absolute or an URL then make the branch files relative to the path
of the tree file. In this case one can move the tree + all branch files to
a different location in the file system and still access the branch files.

Revision 3031 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 15 06:59:52 2001 UTC (13 years, 3 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 38513 byte(s)
Diff to previous 3029
Add new member fSplitLevel in TBranch with correspondig getter GetSplitLevel.
Modify the various branch constructors to store the branch splitlevel..
When reading old files, the fSplitLevel is set to 1 if the branch
has subbranches.

Revision 3029 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Oct 14 15:47:55 2001 UTC (13 years, 3 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 38320 byte(s)
Diff to previous 3021
In TBranch::Reset, do not delete and recreate the class arrays for the buffers.
Only reset them.

Revision 3021 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 12 20:37:25 2001 UTC (13 years, 3 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 38522 byte(s)
Diff to previous 2841
From Philippe:
This fixes the problem indirectly reported by Magestro Daniel where
Draw could not access properly the data from a TClonesArray inside
a branch that was created with an explicit dot.

Revision 2841 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 25 07:10:48 2001 UTC (13 years, 4 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 38165 byte(s)
Diff to previous 2556
Print an error message in case of an illegal branch/leaf definition.
The branch/leaf is declared Zombie in their constructors and deleted
by TTree::Branch.

Revision 2556 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 10 16:09:12 2001 UTC (13 years, 6 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 37983 byte(s)
Diff to previous 2268
In GetEntryExport comment the line "if (fReadEntry == entry) return 1"

Revision 2268 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 23 09:54:20 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 37931 byte(s)
Diff to previous 2030
In TBranch::GetEntry remove the optimisation in case the entry to be read
is the same as fReadEntry. This had side-effects in case the user clears his structures
between the two GetEntry.

Revision 2030 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 20 21:21:38 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 37950 byte(s)
Diff to previous 1976
From Philippe:
In tree, now allows to draw complete arrays with a double click in the browser
(before it was attempting draw one out-of-bounds element: array[max_size])

In meta, use SetReadingObject in ReadBuffer before processing the
following cases: kObjectp, kObjectP, kObject, kAny, kStreamer, kStreamLoop.
Also update the function TStreamerInfo::GetStreamerElement, to allow
TTreeFormula to properly cache the offset and type information.

In treeplayer, now correctly handle all datamember and method calls
(plus a little bit of clean-up in some calls) when in split mode.
Non-split(or streamed) mode needs more works.

Revision 1976 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 12 15:04:15 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 37753 byte(s)
Diff to previous 1921
Mods by Philippe in TBranch::FindLeaf to support TBranchElement

Revision 1921 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 9 08:15:41 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 37031 byte(s)
Diff to previous 1871
Implement new function FindLeaf and FindBranch. These functions were previously
defined as static functions in TTreeFormula.

Revision 1871 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 29 11:04:14 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 35025 byte(s)
Diff to previous 1794
In TBranch::Print, do not print the title of the branch in case the name and the title
are identical.

Revision 1794 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 12 07:19:29 2001 UTC (13 years, 10 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 34890 byte(s)
Diff to previous 1575
Add comments to GetEntry to describe the return value when reading the same entry.

Revision 1575 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 9 18:19:56 2001 UTC (13 years, 11 months ago) by rdm
Original Path: trunk/tree/src/TBranch.cxx
File length: 34667 byte(s)
Diff to previous 1568
back out previous change in GetFile(), fix is now in TRFIOFile.

Revision 1568 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 9 14:09:13 2001 UTC (13 years, 11 months ago) by rdm
Original Path: trunk/tree/src/TBranch.cxx
File length: 34700 byte(s)
Diff to previous 1528
after TFile::Open() update the branch's fFileName to the name returned
by file->GetName(). When using RFIO the file name used to open the file
is often not the same as the "real" name stored in the TFile object.

Revision 1528 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Feb 6 10:55:40 2001 UTC (13 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 34686 byte(s)
Diff to previous 1457
Add new functions:
   TBranch::FillLeaves()
   TBranch::ReadLeaves()
These functions are called by TBranch::Fill and TBranch::GetEntry.

Revision 1457 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 24 16:32:24 2001 UTC (14 years ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 34418 byte(s)
Diff to previous 1345
New mods to support automatic array deletion and extension when reading
objects in split mode from a TClonesArray.

Revision 1345 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 11 14:35:11 2001 UTC (14 years ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 34396 byte(s)
Diff to previous 1290
Add a protection in TBranch::GetEntry. When very old Root files are connected,
it may happen that the basket buffers were not yet created.

Revision 1290 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 26 14:22:16 2000 UTC (14 years, 1 month ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 34154 byte(s)
Diff to previous 1263
Changes in the format of TTree::Print. The branch number is now printed.
A new static member TBranch::fgCount counting the number of branches.
New static function TBranch::ResetCount to reset the new  member fgCount.

Revision 1263 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 20 15:45:37 2000 UTC (14 years, 1 month ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 34100 byte(s)
Diff to previous 1205
TBasket::ReadBasketBuffers changed to Int_t from void.
Thanks to this change, TBranch::GetEntry returns 0 if a read error has occured.

Revision 1205 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 13 15:13:57 2000 UTC (14 years, 1 month ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 34172 byte(s)
Diff to previous 985
      W A R N I N G   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     ==================================================================
A very long list of changes in this pre-release of version 3.00.
We have modified the signature of many functions (in particular TObject)
to introduce more constness in the system.
You must change your code if your class derives from TObject and uses
one of the modified functions such as ls, Print, Compare, Hash, etc.
The modified functions in TObject have the following signature:
   virtual TObject    *Clone() const;
   virtual Int_t       Compare(const TObject *obj) const;
   virtual void        Delete(Option_t *option=""); // *MENU*
   virtual void        DrawClass() const; // *MENU*
   virtual void        DrawClone(Option_t *option="") const; // *MENU*
   virtual void        Dump() const; // *MENU*
   virtual TObject    *FindObject(const TObject *obj) const;
   virtual char       *GetObjectInfo(Int_t px, Int_t py) const;
   virtual ULong_t     Hash() const;
   virtual void        Inspect() const; // *MENU*
   virtual Bool_t      IsEqual(const TObject *obj) const;
   virtual void        ls(Option_t *option="") const;
   virtual void        Print(Option_t *option="") const;

A similar operation has been done with classes such as TH1, TVirtualPad,
TTree, etc.

Revision 985 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 21 20:51:23 2000 UTC (14 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 34148 byte(s)
Diff to previous 731
Function Streamer now in the implementation file.
Add code for the new automatic schema evolution algorithm

Revision 731 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 9 13:55:26 2000 UTC (14 years, 3 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 34230 byte(s)
Diff to previous 623
Add comment in TBranch::GetEntry when used with a TChain.

Revision 623 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 11 09:59:27 2000 UTC (14 years, 4 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 33933 byte(s)
Diff to previous 581
Rename fReadingBasket to fReadingObject in TROOT.h
Rename TROOT::ReadingBasket to TROOT::ReadingObject
Rename TROOT::SetReadingBasket to TROOT::SetReadingObject
TROOT::SetReadingObject is now set in TKey::ReadObj
One can test in the default constructors (like TCanvas) if Root is
reading from file or socket.
The TCanvas default constructor has been modified to take advantage
of this change. As a result, the following works:
 root > TCanvas c1

Revision 581 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 6 07:17:49 2000 UTC (14 years, 4 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 33933 byte(s)
Diff to previous 568
Add a protection in case a Tree is not associated with a root file.

Revision 568 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 5 09:21:24 2000 UTC (14 years, 4 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 33908 byte(s)
Diff to previous 363
The following headers and classes have been modified to take into account;
  - the new signature of IsFolder (now const)
  - the new TObject::FindObject
  - the fact that the static functions of TObject have been moved to TROOT.

Revision 363 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 12 16:32:53 2000 UTC (14 years, 6 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 33902 byte(s)
Diff to previous 202
*** empty log message ***

Revision 202 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 14 09:09:26 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 33860 byte(s)
Diff to previous 52
Mods in the Print function to print correctly the total number of uncompressed bytes
in a file or in a branch when the total number of bytes exceeds 2**31

Revision 52 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 30 06:57:43 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/tree/src/TBranch.cxx
File length: 33766 byte(s)
Diff to previous 3
Protection added to TBranch::DropBaskets

Revision 3 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 16 17:00:58 2000 UTC (14 years, 8 months ago) by rdm
Original Path: trunk/tree/src/TBranch.cxx
File length: 33675 byte(s)
Copied from: branches/rdm/tree/src/TBranch.cxx revision 2
Diff to previous 2
This commit was generated by cvs2svn to compensate for changes in r2,
which included commits to RCS files with non-trunk default branches.

Revision 2 - (view) (download) (as text) (annotate) - [select for diffs]
Added Tue May 16 17:00:58 2000 UTC (14 years, 8 months ago) by rdm
Original Path: branches/rdm/tree/src/TBranch.cxx
File length: 33675 byte(s)
Initial import of ROOT into CVS

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