Log of /trunk/tree/tree/src/TBranch.cxx
Parent Directory
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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.