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

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

Parent Directory Parent Directory


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

Revision 49245 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 15 19:58:24 2013 UTC (21 months, 1 week ago) by pcanal
File length: 212472 byte(s)
Diff to previous 49054
Import revision 49244 from the v5-34-00 patch branch:
In InitializeOffsets, remove the collection branch name in all cases of collection splitting

Revision 49054 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 1 13:16:49 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 212556 byte(s)
Diff to previous 49052
Fix coverity warnings

Revision 49052 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:58:27 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 212568 byte(s)
Diff to previous 49051
Import revision 49012 from the v5-34-00 patch branch:
Add missing protection

Revision 49051 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:58:05 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 212524 byte(s)
Diff to previous 49047
Import revision 49011 from the v5-34-00 patch branch:
Propagate renaming to nested objects

Revision 49047 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:56:37 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 211895 byte(s)
Diff to previous 49046
Import revision 49006 from the v5-34-00 patch branch:
Fix typo

Revision 49046 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:56:15 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 211895 byte(s)
Diff to previous 49039
Import revision 49005 from the v5-34-00 patch branch:
When switching STL collection proxy we also need to update fSTLtype

Revision 49039 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:53:37 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 211926 byte(s)
Diff to previous 49037
Import revision 48998 from the v5-34-00 patch branch:
Properly handle the evolution of an STL container containing a class with contains sub-object (don't claim the subobject also changed type)

Revision 49037 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:52:52 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 211778 byte(s)
Diff to previous 49032
Import revision 48996 from the v5-34-00 patch branch:
In the MakeClass reading code when failing over to using the StreamerInfo, switch to using the action sequence

Revision 49032 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:50:54 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 211579 byte(s)
Diff to previous 49029
Import revision 48986 from the v5-34-00 patch branch:
Extend the output of TTree::Print(debugInfo) to include the action sequence information (and add support for the sub option 'func' that also prints the function's (mangled) name

Revision 49029 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:49:46 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 211251 byte(s)
Diff to previous 49014
Import revision 48982 from the v5-34-00 patch branch:
Add support for implicit conversion of stl collection (when they require schema evolution)

Revision 49014 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:15:47 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 209151 byte(s)
Diff to previous 46322
Import revision 48910 from the v5-34-00 patch branch:
Add Note of missing implementation

Revision 46322 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 4 20:52:35 2012 UTC (2 years, 3 months ago) by pcanal
File length: 208960 byte(s)
Diff to previous 46089
In the case where the content of STL collection has one of its member removed, avoid mistakenly trying to read if SetAddress is called more than once on that branch

Revision 46089 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 20 17:18:56 2012 UTC (2 years, 4 months ago) by pcanal
File length: 208694 byte(s)
Diff to previous 43993
Migrate away from using CINT's RootFlag and remove the interface from TInterpreter

Revision 43993 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 27 16:23:16 2012 UTC (2 years, 8 months ago) by pcanal
File length: 208706 byte(s)
Diff to previous 43518
Fix coverity issues
Dereference null return:
32943,32945,36325,36329: TFormLeafInfo::GetLocalValuePointer
33253: TTreeFormula::EvalObject
33763: CloneTree
33258: GetBasket
34034: In DropBuffers (in addition avoid reading the basket when the intend is to drop the content from memory!)
36307: TTree::BuildIndex
36328: DrawCopy
36332: GetStreamerInfoCache
33025: BuildStreamerInfo
42469: Clone
33436: MakeIterator
Dereference after null check.
42470: in ImportStreamerInfo
33138: in TEntryListArray::Enter
Unchecked return value:
32049, 32050: TBranchProxy::Read and Setup
Mixed enums:
32705,32706: TClass::fStreamerType (and also name the enum type).

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: 208697 byte(s)
Diff to previous 43336
Fix for coding convention RS1 and RS2

Revision 43336 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 12 18:58:37 2012 UTC (2 years, 10 months ago) by pcanal
File length: 208600 byte(s)
Diff to previous 42967
Alternative spelling for trying to quiet down coverity #35472

Revision 42967 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 10 22:35:22 2012 UTC (2 years, 11 months ago) by pcanal
File length: 208597 byte(s)
Diff to previous 41697
Fix support for emulated class that derived from an abstract class.
This can happen when reading a file containing an ancient
class layout where the derived class is no longer provided in the
compiled code but the abstract base class is still provided.

It also happens when using schema evolution rules on a class derived
from an abstract base class (in which case the system introduce 
implicitly an emulated class deriving from the same base classes
as the evolved from class).

To fix the issue, we introduce the TClass::GetStreamerInfoAbstractEmulated
which will return a StreamerInfo representing an emulated version of the
class even if it is loaded.   To distinguish the real abstract base class
representation (let's take 'AbstractBase' as an example), the returned
StreamerInfo is attached to a different TClass which has the same name
but is suffixed with @@emulated ('AbstractBase@@emulated' in our example).

Revision 41697 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 1 21:03:41 2011 UTC (3 years, 2 months ago) by pcanal
File length: 207087 byte(s)
Diff to previous 41686
Fix medium impact coverity reports

Revision 41686 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 1 16:41:10 2011 UTC (3 years, 2 months ago) by pcanal
File length: 206985 byte(s)
Diff to previous 41521
Fix Drawing a top level object (usually TBits).  See http://root.cern.ch/phpBB3/viewtopic.php?t=13629

Revision 41521 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 20 22:30:29 2011 UTC (3 years, 3 months ago) by pcanal
File length: 206938 byte(s)
Diff to previous 41520
Set the virtual array size to 1, in all cases where the branch is not part of a collection

Revision 41520 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 20 17:10:04 2011 UTC (3 years, 3 months ago) by pcanal
File length: 206870 byte(s)
Diff to previous 41318
Properly propagate the size of an array used/cached as part of the artificial elements. In TVirtualArray distinguish size and capacity

Revision 41318 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 11 08:48:03 2011 UTC (3 years, 3 months ago) by pcanal
File length: 206866 byte(s)
Diff to previous 41244
Fix Coverity issues:

TTreePlayer.cxx: another instance of 34037 Dereference null return value
TBranchElement.cxx: 2nd attempt for 34040,34042 Dereference null return (stat) 
TTabCom.cxx: another instance of 34168 Explicit null dereferenced

Revision 41244 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 6 19:42:35 2011 UTC (3 years, 3 months ago) by pcanal
File length: 206850 byte(s)
Diff to previous 41038
Fix Coverity issues:

TBranchSTL: cov 34339 Resource leak (false positive)
TTableDescriptor.cxx: cov 34219,34220 explicit null dereference
TSQLStructure.cxx: cov 34204,34205,34206 Explicit null dereferenced 
TTabCom.cxx: cov 34168 Explicit null dereferenced 
TClassRef.cxx: cove 34165 Explicit null dereferenced (false positive but still confusing coding).
TBufferXML.cxx: 34070 Explicit null dereferenced
TFriendProxyDescriptor.cxx: cov 34066 Uninitialized scalar field
TTreeCloner.cxx: cov 34034057 Dereference null return (stat) 63 Uninitialized scalar field 
TParallelCoordEditor.cxx: 34051,34059,34060,34061 Dereference null return value
TParallelCoord.cxx: 34050,34056, 34057 Dereference null return (stat) 
TBranchProxy.h: 34048 Dereference null return value 
TBranchProxy.cxx: 34043,34044,34045 Dereference null return value
TTree.cxx: 34039 Dereference null return value
TTreePlayer.cxx: 34037 Dereference null return value 
TLeafC.cxx: 34036 Dereference null return value

Revision 41038 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 28 05:48:17 2011 UTC (3 years, 3 months ago) by pcanal
File length: 206610 byte(s)
Diff to previous 41027
Fix cov 30393: dereference before null check

Revision 41027 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 27 14:10:16 2011 UTC (3 years, 3 months ago) by pcanal
File length: 206580 byte(s)
Diff to previous 41024
In revision 40830, we reduce the number of calls to ValidateAddress which check
if the users has deleting (and/or just zero-ed out) the underlying pointer/object.
In the case of a simple split top-level object, however, this meant that there was
no longer any call to ValidateAddress (because there is no ReadLeaves being called
for this type of branch/node).
This patch re-add it.  Thanks to Federico and Alice for reporting this problem.

Revision 41024 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 27 13:26:26 2011 UTC (3 years, 3 months ago) by pcanal
File length: 206471 byte(s)
Diff to previous 41015
Avoid leaking the inner object in a container like vector<vector<MyClass*> >
and vector<vector<MyClass*> *>.  We need to call the 'special' version of
Clear in all cases where a collection contains directly (this case was the only one supported by the old code)
or indirectly pointers.

See <http://root.cern.ch/phpBB3/viewtopic.php?t=13474>

Revision 41015 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 27 07:29:59 2011 UTC (3 years, 3 months ago) by pcanal
File length: 205171 byte(s)
Diff to previous 40872
Fix gcc 4.6.1 warning  variable ‘added’ set but not used

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: 205278 byte(s)
Diff to previous 40830
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 40830 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 7 16:58:28 2011 UTC (3 years, 4 months ago) by pcanal
File length: 194410 byte(s)
Diff to previous 40080
Improve performance of TTree::GetEntry.  With this changes the 'overhead'
compare to protobuf goes from 48% to 24%. (This does not include the
cost of the file opening which can be comparatively large for small
files.  For the example from Samvel the cost TFile::Open is 8% of the cost
of 100000 calls to TTree::GetEntry)

TClonesArray: update ExpandCreateFast to also reset the non-used slots
so that calling Clear (which does too much) is no longer necessary
when using ExpandCreateFast.

TObjectArray: Add GetObjectRef() to speed up get the beginning address
of the underlying array.

TBranchElement: Use R__likely, R__unlikely in a few places.  Unroll
SetupAddresses (because it almost always return without doing any work).
Removed a few redundant if(xxx!=0).  Add notes hinting at other possible
improvements.

Revision 40080 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 29 15:11:52 2011 UTC (3 years, 6 months ago) by pcanal
File length: 193143 byte(s)
Diff to previous 40077
Add missing protection (addition to 40077)

Revision 40077 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 29 13:37:13 2011 UTC (3 years, 6 months ago) by pcanal
File length: 192966 byte(s)
Diff to previous 39786
Prevent the use of non-existent memory when reading in an object that is part of an STL collection and which used to contains an embedded object (and this data member has been removed)

Revision 39786 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 17 04:20:39 2011 UTC (3 years, 7 months ago) by pcanal
File length: 192711 byte(s)
Diff to previous 39696
Properly recognize a TClonesArray data member even if the requested type was a typedef (to TClonesArray) that is in a namespace (for example edm::Event::ContaierType)

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: 192744 byte(s)
Diff to previous 39694
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 39694 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 13 21:10:32 2011 UTC (3 years, 7 months ago) by pcanal
File length: 192735 byte(s)
Diff to previous 39611
Update TBranchElement::Unroll to no longer split a base class
that can not be split (i.e. respect the information returned
by TStreamerElement::CannotSplit (and thus TClass::CanSplit).

Add the ability to explicitly forbid (or allow) the splitting of a class
(TClass::SetSplit) so that user can inforce the use of a
custom streamer in all possible split cases.

This disabling is currently _not_ done automatically for
backward compatibility reasons and because
  a) Without TClass::SetCanSplit there was no way to 
     force the splitting (short of setting the split level lower)
  b) Some classes still requires a custom streamer solely to
     read older data files (for example for file written before
     the advent of StreamerInfo) and are such not necessary to 
     be used when writting (and schema evolution rules can not
     yet be used in this case).

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: 192621 byte(s)
Diff to previous 38854
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 38854 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 14 18:03:34 2011 UTC (3 years, 9 months ago) by pcanal
File length: 192170 byte(s)
Diff to previous 38757
In TBranchRef distinguish between the entry we need (now called RequestedEntry) and the
entry we have read (fReadEntry) so that we can avoid re-reading the same entry too many
times.

Revision 38757 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 7 04:22:58 2011 UTC (3 years, 9 months ago) by pcanal
File length: 192165 byte(s)
Diff to previous 38405
Improve performance of SetAddress when the branch has a clonesArray

Revision 38405 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 14 20:52:46 2011 UTC (3 years, 10 months ago) by pcanal
File length: 192257 byte(s)
Diff to previous 38393
Fix issue raised by -Wconversion

Revision 38393 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 11 21:53:52 2011 UTC (3 years, 10 months ago) by pcanal
File length: 192242 byte(s)
Diff to previous 38261
Fix the case of a split collection which contains a class with one
data member which is an instance of a class with more than one base 
class some of which are not split (for example if one the base class
is std::vector<int>).

Revision 38261 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Mar 1 17:34:25 2011 UTC (3 years, 10 months ago) by pcanal
File length: 192223 byte(s)
Diff to previous 38190
Fix the issue with TTree::Draw, SetMakeClass and collection seen in http://root.cern.ch/phpBB3/viewtopic.php?t=12237

Revision 38190 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Feb 22 21:59:37 2011 UTC (3 years, 11 months ago) by rdm
File length: 192094 byte(s)
Diff to previous 38061
put TBranchElement::ValidateAddress() inline in header.

Revision 38061 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Feb 13 21:29:08 2011 UTC (3 years, 11 months ago) by pcanal
File length: 193533 byte(s)
Diff to previous 38059
Avoid problem on some platform with inlining a public function defined in the .cxx file

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: 193104 byte(s)
Diff to previous 37420
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: 191554 byte(s)
Diff to previous 37210
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 37210 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Dec 2 22:56:23 2010 UTC (4 years, 1 month ago) by pcanal
File length: 191374 byte(s)
Diff to previous 37149
Avoid creating phantom branches for the artificial and the repeat elements (i.e. avoid creating a branch for a transient member with a schema evolution rule)

Revision 37149 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 1 14:11:45 2010 UTC (4 years, 1 month ago) by pcanal
File length: 191209 byte(s)
Diff to previous 37127
Remove some of the protection introduced in r37127 until we can resolve some unexpected consequences (roottest failing)

Revision 37127 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 30 21:23:22 2010 UTC (4 years, 1 month ago) by pcanal
File length: 191200 byte(s)
Diff to previous 36169
Add protection in case where one call CloneTree with a class for which a data member has been removed (and hence (for now) the branch for the 'removed member' is an incorrect state

Revision 36169 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 7 16:06:18 2010 UTC (4 years, 3 months ago) by pcanal
File length: 190909 byte(s)
Diff to previous 36168
Fix Coverity reports 21804 through 21812 (null returns)

Revision 36168 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 7 16:05:41 2010 UTC (4 years, 3 months ago) by pcanal
File length: 190734 byte(s)
Diff to previous 36061
Since we consider the base class as part of the main object and split it with the same level of the derived part, do not change the splitlevel value when calling Unroll for base class .. this has the side effect of properly insuring the de-optimization of the base class streamer info and thus fixes the problem reported at https://savannah.cern.ch/bugs/?73467

Revision 36061 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 4 16:05:51 2010 UTC (4 years, 3 months ago) by pcanal
File length: 190736 byte(s)
Diff to previous 36031
Introduce an optimized infrastructure for reading objects using a StreamerInfo.

Rather than driving the streaming using a switch statement inside TStreamerInfo::ReadBuffer,
the streaming is now driven using a simple loop over a sequence of configured StreamerInfo actions.

This improves run-time performance by allowing a dramatic reduction in function calls and code
branches at the expense of some code duplication.


There are 3 versions of this loop implemented in TBufferFile and overloaded in TBufferXML and TBufferSQL:

1. virtual Int_t ReadSequence(const TStreamerInfoActions::TActionSequence &sequence, void *object);      
2. virtual Int_t ReadSequenceVecPtr(const TStreamerInfoActions::TActionSequence &sequence, void *start_collection, void *end_collection);      
3. virtual Int_t ReadSequence(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.

TBufferXML and TBufferSQL overload the loops to introduce extra code to help the buffer keep track of which streamer
element is being streamed (this functionality is not used by TBufferFile.)

A TStreamerInfoActions::TActionSequence is an ordered sequence of configured actions.   

A configured action has both an action which is a free standing function and a configuration object deriving 
from TStreamerInfoActions::TConfiguration. The configuration contains information that is specific to the action
but varies from use to use, including the offset from the beginning of the object that needs to be updated.   
Other examples of configuration include the number of bits requested for storing a Double32_t or its factor and minimum.   


When the sequence is intended for a collection, the sequence also has a configuration object deriving
from TStreamerInfoActions::TLoopConfiguration which contains for example the size of the element of
a vector or the pointers to the iterators functions (see below).


Each TStreamerInfo has 2 reading sequences, one for object-wise reading (GetReadObjectWiseActions)
and one for member-wise reading (GetReadMemberWiseActions) which is used when streaming a TClonesArray
of a vector of pointer to the type of objects described by the TClass.


Each collection proxy has at least one reading sequences, one for the reading each version of the
contained class layout.


Each case of the TStreamerInfo::ReadBuffer switch statement is replaced by 4 new action functions,
one for the object wise reading, one for the member wise reading for TClonesArray and vector of pointers,
one for the member wise reading for a vector of object and one for all other collections.


Each collection (proxy) needs to provide 5 new free standing functions:

   // Set of functions to iterate easily throught the collection
   static const Int_t fgIteratorArenaSize = 16; // greater than sizeof(void*) + sizeof(UInt_t)

   typedef void (*CreateIterators_t)(void *collection, void **begin_arena, void **end_arena);
   virtual CreateIterators_t GetFunctionCreateIterators(Bool_t read = kTRUE) = 0; 
   // begin_arena and end_arena should contain the location of a memory arena of size fgIteratorSize. 
   // If the collection iterator are of that size or less, the iterators will be constructed in place in those location (new with placement)
   // Otherwise the iterators will be allocated via a regular new and their address returned by modifying the value of begin_arena and end_arena.
   
   typedef void* (*CopyIterator_t)(void *dest, const void *source);
   virtual CopyIterator_t GetFunctionCopyIterator(Bool_t read = kTRUE) = 0;
   // Copy the iterator source, into dest.   dest should contain the location of a memory arena of size fgIteratorSize.
   // If the collection iterator is of that size or less, the iterator will be constructed in place in this location (new with placement)
   // Otherwise the iterator will be allocated via a regular new and its address returned by modifying the value of dest.
   
   typedef void* (*Next_t)(void *iter, const void *end);
   virtual Next_t GetFunctionNext(Bool_t read = kTRUE) = 0;
   // iter and end should be pointers to respectively an iterator to be incremented and the result of collection.end()
   // If the iterator has not reached the end of the collection, 'Next' increment the iterator 'iter' and return 0 if 
   // the iterator reached the end.
   // If the end was not reached, 'Next' returns the address of the content pointed to by the iterator before the 
   // incrementation ; if the collection contains pointers, 'Next' will return the value of the pointer.
   
   typedef void (*DeleteIterator_t)(void *iter);
   typedef void (*DeleteTwoIterators_t)(void *begin, void *end);

   virtual DeleteIterator_t GetFunctionDeleteIterator(Bool_t read = kTRUE) = 0;
   virtual DeleteTwoIterators_t GetFunctionDeleteTwoIterators(Bool_t read = kTRUE) = 0;
   // If the size of the iterator is greater than fgIteratorArenaSize, call delete on the addresses,
   // Otherwise just call the iterator's destructor.
 
This functions are currently only 'emulated' using the old infrastructure for the collections other than vector ; they
will later one be provided by the dictionaries.

Revision 36031 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 1 17:26:38 2010 UTC (4 years, 3 months ago) by pcanal
File length: 183862 byte(s)
Diff to previous 35374
Add documentation explaining why cov 11483 is a false positive (complaining about deadcode but confused about the loop)

Revision 35374 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 17 13:36:26 2010 UTC (4 years, 4 months ago) by brun
File length: 183708 byte(s)
Diff to previous 35079
Fix a null_return. coverity CID 11070

Revision 35079 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 30 17:00:45 2010 UTC (4 years, 4 months ago) by pcanal
File length: 183700 byte(s)
Diff to previous 35009
Call SetReadLeavesPtr in two forgot places (affecting Alice when reading a TTree that was just created)

Revision 35009 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Aug 25 12:51:20 2010 UTC (4 years, 5 months ago) by pcanal
File length: 183630 byte(s)
Diff to previous 34975
minor cleanup

Revision 34975 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Aug 25 04:10:25 2010 UTC (4 years, 5 months ago) by pcanal
File length: 183657 byte(s)
Diff to previous 34974
a few code doc clarification

Revision 34974 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 24 19:47:42 2010 UTC (4 years, 5 months ago) by pcanal
File length: 185477 byte(s)
Diff to previous 34971
Fix warning

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: 185479 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: 185475 byte(s)
Diff to previous 34739
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 34739 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 6 01:26:08 2010 UTC (4 years, 5 months ago) by pcanal
File length: 177089 byte(s)
Diff to previous 34664
Introduce and use TTree::kSplitCollectionOfPointers to better specify the special number (100) to be added to the split level

Revision 34664 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 29 19:42:38 2010 UTC (4 years, 5 months ago) by pcanal
File length: 176699 byte(s)
Diff to previous 34286
add support for variable size array of object in a TTree (when the owner of the array is split)

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: 176056 byte(s)
Diff to previous 34215
fix format errors related to TString::Form(), TString::Format(), Form()
and Printf().

Revision 34215 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 30 09:53:57 2010 UTC (4 years, 6 months ago) by brun
File length: 176238 byte(s)
Diff to previous 33847
Fix format in Error 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: 176229 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: 176213 byte(s)
Diff to previous 32943
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 32943 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 12 12:05:11 2010 UTC (4 years, 9 months ago) by pcanal
File length: 175624 byte(s)
Diff to previous 32930
More precise implementation of revision 32860 so that it does not interfer with the MakeClass case.
( Add missing protection in the case we have an embedded object in a split branch which has been 'removed' from the current schema )

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: 175623 byte(s)
Diff to previous 32860
Prefer the use of InheritsFrom(TClass*) over InheritsFrom(const char*) as long as 
it does not increase the library dependencies.

Revision 32860 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 31 20:00:50 2010 UTC (4 years, 9 months ago) by pcanal
File length: 175609 byte(s)
Diff to previous 32368
Add missing protection in the case we have an embedded object in a split branch which has been 'removed' from the current schema

Revision 32368 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 18 14:46:38 2010 UTC (4 years, 11 months ago) by pcanal
File length: 175398 byte(s)
Diff to previous 32159
Improve memory handling the in the emulated collection proxy, in particular
make it such that an emulated collection of pointers can become owner of its content.

The default, for backward compatibility and to avoid double delete (at the expense
of memory leak), the container of pointers are _still_ not owning their content
__unless__ they are a free standing container (i.e. itself not contained in another
object).

To make a container of pointers become owner of its content do something like:

      cl = TClass::GetClass("ObjectVector<LHCb::MCRichDigitSummary>");
      if (cl && cl->GetStreamerInfo()) {
         TObject *el = cl->GetStreamerInfo()->GetElements()->FindObject("m_vector");
         if (el) el->ResetBit(TStreamerElement::kDoNotDelete);
      }

For MakeProject, use file->GetStreamerInfoCache() instead of the TClass GetStreamerInfo.

Revision 32159 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 29 17:17:09 2010 UTC (4 years, 11 months ago) by pcanal
File length: 175264 byte(s)
Diff to previous 31605
Improve thread safety and performance of TStreamerInfo creation and use.
Remove a spurrious error message when in MemberWise streaming mode (see r30751 and r30527)
Insure that the StreamerInfo using in MemberWise streaming in not optimized (previously this was checked/done only for the 'current' StreamerInfo).
Reduce (dramatically) the number of times a StreamerInfo is recompiled.
Add TVirtualStreamerInfo::IsCompiled (to replace use of GetOffset()!=0)

Implementation details:
Remove internal use of TVirtualStreamerInfo::Optimize(kFALSE), replace
by explicit setting of kCannotOptimize.
Remove virtually (and make inline) 3 time critical functions.

Revision 31605 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Dec 7 19:50:39 2009 UTC (5 years, 1 month ago) by pcanal
File length: 175619 byte(s)
Diff to previous 31396
Fix 'reverse_inull' errors found by coverity

Revision 31396 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 23 19:45:11 2009 UTC (5 years, 2 months ago) by brun
File length: 175581 byte(s)
Diff to previous 31345
From Philippe:
Even if the data member is not present in the target class, assign fID to the new value
to avoid any confusion.

Revision 31345 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 20 17:24:27 2009 UTC (5 years, 2 months ago) by pcanal
File length: 175129 byte(s)
Diff to previous 31252
Fix comment

Revision 31252 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 17 20:12:32 2009 UTC (5 years, 2 months ago) by pcanal
File length: 175128 byte(s)
Diff to previous 31242
Properly recover the hierarchy of branch when the top level branch has a trailing dot
and the intermediary branch is TBranchSTL.

Correct the lookup of the CollectionProxy when the sub-branches of a TBranchSTL are
not split (Fixes Savannah #59011).

Expose the sub-branches of a TBranchSTL when calling TTree::Print (by implementing
TBranchSTL::Print()).

Revision 31242 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 17 17:11:20 2009 UTC (5 years, 2 months ago) by pcanal
File length: 174385 byte(s)
Diff to previous 31205
Correct the 'title' of the branch when splitting a vector of pointers

Revision 31205 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 16 16:42:45 2009 UTC (5 years, 2 months ago) by pcanal
File length: 174377 byte(s)
Diff to previous 31170
Reset kAddressSet when needed (i.e. in ResetAddress !)

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: 174351 byte(s)
Diff to previous 31113
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 31113 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 12 10:07:15 2009 UTC (5 years, 2 months ago) by brun
File length: 174146 byte(s)
Diff to previous 30180
Optimisation in TBranchElement::ReadLeaves

Revision 30180 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 15 18:39:04 2009 UTC (5 years, 4 months ago) by pcanal
File length: 173982 byte(s)
Diff to previous 29599
Avoid associated the artificial StreamerElements with a 'skipped' branch

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: 173637 byte(s)
Diff to previous 29475
The default length fEntryOffset can now  be set via TTree::SetDefaultEntryOffsetLen which can be optionially applied to the  existing branches.

Revision 29475 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 15 16:37:12 2009 UTC (5 years, 6 months ago) by pcanal
File length: 173593 byte(s)
Diff to previous 29388
better handling of missing data member in a collection in a split tree

Revision 29388 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 7 16:54:42 2009 UTC (5 years, 6 months ago) by pcanal
File length: 173409 byte(s)
Diff to previous 28776
Fix the case involving nested classes inside an STL container,
when a data member is deleted from a class in the middle and root did not
properly recognize this when reading old data, and overwrites part
of the structure being read.

For example, suppose we have this:


   struct C  { int x; };
   struct B  { C b1;   C b2; };
   struct A  { std::vector<B> aa; };


and then write an A to a tree.  We then remove the `b2' member.
When reading an old file, the contents of `b1' will be written
with the old `b2'!

Revision 28776 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 2 15:16:39 2009 UTC (5 years, 7 months ago) by pcanal
File length: 173629 byte(s)
Diff to previous 28610
Add support for std::bitset in ROOT I/O

Revision 28610 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 13 16:21:06 2009 UTC (5 years, 8 months ago) by pcanal
File length: 173641 byte(s)
Diff to previous 28502
TStreamerInfo: Avoid forgetting that a member is missing even if the 'main' streamerinfo is 'only' emulated.
TBranchElement: Extend the fix in revision 28502 to also work if Set[Branch]Address is called.

Revision 28502 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 8 15:41:45 2009 UTC (5 years, 8 months ago) by pcanal
File length: 173035 byte(s)
Diff to previous 28357
Avoid reading 'removed' members into never never land (the major symptom was in the case of an std::vector of object that was remove from an object that is split.  In this case reading the file was resulting in an infinite loop at the first atttempt at reading the branch holding the 'removed vector')

Revision 28357 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Apr 25 13:06:20 2009 UTC (5 years, 9 months ago) by pcanal
File length: 172879 byte(s)
Diff to previous 28091
In TBranchElement::Reset, also reset fBranchID to match the reseting of the
TRefTable done in TBranchRef::Reset.

This fixes the issue #42068 in savannah

Revision 28091 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 3 10:50:42 2009 UTC (5 years, 9 months ago) by pcanal
File length: 172860 byte(s)
Diff to previous 28090
re-add unfortunately remove statement (fix revision 28090)

Revision 28090 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 3 10:43:06 2009 UTC (5 years, 9 months ago) by pcanal
File length: 172798 byte(s)
Diff to previous 27936
Prevent the use of MapObject for a 'sub branch' containing a vector of simple type (this is an addition to revision 26430)
Also do not use MapObject for string/TString branches.

Revision 27936 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 26 09:39:16 2009 UTC (5 years, 10 months ago) by pcanal
File length: 172542 byte(s)
Diff to previous 27219
Fix problem running the dme rules when the last branch is 'missing'

Revision 27219 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 22 23:34:19 2009 UTC (6 years ago) by pcanal
File length: 172447 byte(s)
Diff to previous 26430
Force the TStreamerInfo used by a split branch to be non-optimized

Revision 26430 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 24 19:31:30 2008 UTC (6 years, 2 months ago) by pcanal
File length: 172379 byte(s)
Diff to previous 26141
Do not use MapObject for a collection of simple types

Revision 26141 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 11 14:47:49 2008 UTC (6 years, 2 months ago) by pcanal
File length: 171486 byte(s)
Diff to previous 25657
Add support for top level object that do not inherit from TObject _AND_ have a custom streamer (like std::string and TString);  Their TBranchElement has fType==-1 (i.e. new value)

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: 170355 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: 170354 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: 170288 byte(s)
Diff to previous 25572
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 25572 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Sep 27 07:03:25 2008 UTC (6 years, 3 months ago) by pcanal
File length: 169604 byte(s)
Diff to previous 25473
Fix tree->Draw("s1.value"); when the top level branch does not have a trailing dot
(and hence the real branch name is only 'value').

TTreeFormula was properly parsing the string and finding the correct branch, however
it was recorded only the end branch name as the result of the parse (i.e. in the 
above case, just 'value') and hence UpdateFormulaLeaves was not restoring the leaf
correctly (and hence EvalInstance returned 0s).
To solve the issue we now record the 'full pathname' of the branch (i.e. including
the omitted top level branch names) and we upgrade TTree::FindBranch and
TBranchElement::FindBranch to be able to handle those path.

Fix TTree::Scan("*") to properly requested the distinct leaf even if the branch
name are ambiguous (previously it would repetively print the first match).

Revision 25473 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 19 16:28:54 2008 UTC (6 years, 4 months ago) by pcanal
File length: 169341 byte(s)
Diff to previous 25455
Fix Wshadow warnings

Revision 25455 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 19 04:52:34 2008 UTC (6 years, 4 months ago) by pcanal
File length: 169269 byte(s)
Diff to previous 25450
Re-add build of StreamerInfo when retrieve via a checksum (inadvertently removed in revision 25210 (datamodelevolution branch).  Also no longer update fClassVersion in the case of Foreign class so that we can re-init fInfo if the user is passing us a class that require (another) conversion

Revision 25450 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 18 21:13:42 2008 UTC (6 years, 4 months ago) by pcanal
File length: 168758 byte(s)
Diff to previous 25369
Import the code from the branch dev/datamodelevolution revision 25436

This implements the infrastructure for the new Data Model Evolution Scheme.

This Data Model Evolution is brought to your courtesy of BNL/STAR/ATLAS/Fermi/Cern

Current Capabilities:
  Assign values to transient data members
  Rename classes
  Rename data members
  Change the shape of the data structures or convert one class structure to another
  Change the meaning of data members
  Ability to access the TBuffer directly when needed
  Ensure that the objects in collections are handled in the same way as the ones stored separately
  Supported in object-wise, member-wise and split modes.

Coming soon:
  Make things operational also in bare ROOT mode
  Ability to transform data before writing
  Support for changing the class type of nested object in a split branch
  Support for access to onfile version of nested objects from within the parent rule

LinkDef rule syntax:
  Setting a transient member:

#pragma read sourceClass="ACache" targetClass="ACache" source="" version="[1-]" target="zcalc" \
   code="{ zcalc = false; }"

  Setting a new member from 2 removed members

#pragma read sourceClass="ACache" targetClass="ACache" source="int x; int y; char c"  version="[8]" target="z" \
   code="{ z = onfile.x*1000 + onfile.y*10; }"

   Renaming a class

#pragma read sourceClass="ACache" version="[8]" targetClass="Axis" \
   source="int x; int y;"  target="z" \
   code="{ z = onfile.x*1000 + onfile.y*
#pragma read sourceClass="ACache" version="[9]" targetClass="Axis";

Selection XML syntax

  <read  sourceClass="ACache" targetClass="ACache" source="" version="[1-]" target="zcalc">
  <![CDATA[
   { zcalc = false; }
  ]]></read>


Revision 25369 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 5 14:14:58 2008 UTC (6 years, 4 months ago) by pcanal
File length: 160333 byte(s)
Diff to previous 25129
add a couple of protection against null pointer

Revision 25129 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 12 19:20:30 2008 UTC (6 years, 5 months ago) by pcanal
File length: 160327 byte(s)
Diff to previous 25121
completely initialize fBasketSeek in the case of a top level stl collection

Revision 25121 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 12 02:38:01 2008 UTC (6 years, 5 months ago) by pcanal
File length: 160279 byte(s)
Diff to previous 24900
Avoid fAddress vs fObject and class check when we are in MakeClass mode

Revision 24900 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 21 16:25:27 2008 UTC (6 years, 6 months ago) by pcanal
File length: 160253 byte(s)
Diff to previous 24635
In TBranchElement::GetValue, only load the BranchCount is needed (and hence avoid a spurrious clones->Clear

Revision 24635 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 3 11:58:26 2008 UTC (6 years, 6 months ago) by pcanal
File length: 160024 byte(s)
Diff to previous 24454
restore support for IsAutoDelete in a TBranchElement (IsAutoDelete is an explicit request by the user to have the object deleted/newed each time GetEntry is called)

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: 159635 byte(s)
Diff to previous 24233
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 24233 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 12 09:17:54 2008 UTC (6 years, 7 months ago) by brun
File length: 160009 byte(s)
Diff to previous 24221
From Lukasz:
Fix a problem when splitting a vector<T*>

Revision 24221 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 11 15:40:07 2008 UTC (6 years, 7 months ago) by brun
File length: 160008 byte(s)
Diff to previous 24206
-call TBuffer::ForceWriteInfo instead of TStreamerInfo::ForceWriteInfo

Revision 24206 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 10 19:25:03 2008 UTC (6 years, 7 months ago) by pcanal
File length: 160406 byte(s)
Diff to previous 24198
Correct the value of fNleaves in default constructor

Revision 24198 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 10 12:53:18 2008 UTC (6 years, 7 months ago) by brun
File length: 160406 byte(s)
Diff to previous 24034
From Anna:
a fix for TFFTRealComplex::GetPointComplex(Int_t *,...) function, for the case of transforms of more than 2 dimensions. The real index in the internal 1-d flat array is now computed correctly, taking into account that only ~half of entries are stored because of Hermitian symmetry. And thanks to Christophe Yeche for pointing it out.

Revision 24034 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 27 17:50:11 2008 UTC (6 years, 7 months ago) by pcanal
File length: 160359 byte(s)
Diff to previous 24016
Insure that kBranchAny or kBranchObject is set even if the file was
created by a version of ROOT older than 5-18-00c and the top level
branch is not split.

Revision 24016 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 26 13:42:04 2008 UTC (6 years, 8 months ago) by brun
File length: 160038 byte(s)
Diff to previous 23779
Remove #include <Api.h>

Revision 23779 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 9 10:24:13 2008 UTC (6 years, 8 months ago) by pcanal
File length: 160055 byte(s)
Diff to previous 23640
Correct the reading and writing of Double32 and Float16 in MakeClass mode

Revision 23640 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 2 17:58:15 2008 UTC (6 years, 8 months ago) by pcanal
File length: 159476 byte(s)
Diff to previous 23554
do not register a branch object when the datamember its remember is missing from the current class layout

Revision 23554 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 25 13:47:10 2008 UTC (6 years, 9 months ago) by pcanal
File length: 159321 byte(s)
Diff to previous 23230
Fix for -Wshadow

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: 159404 byte(s)
Diff to previous 23224
Introduce a way to create branch using directly
an object:
  MyClass object;
  TBranch *branch = tree->Branch(branchname, &object, bufsize, splitlevel)

Revision 23224 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 15 08:04:26 2008 UTC (6 years, 9 months ago) by pcanal
File length: 159078 byte(s)
Diff to previous 23219
From Paul:

Clarify the ownership rules of user objects in a TTree.
This clarification (and the improved auto-add-to-directory behavior
of the TH1*) allows for the TTree to now delete the memory that
its has allocated and whose ownsership was _not_ transfer back 
to the user (this is happens any time the user give the TTree
the address of a pointer):

   // For a top-level branch the meaning of addr is as follows:
   //
   // If addr is zero, then we allocate a branch object
   // internally and the branch is the owner of the allocated
   // object, not the caller.  However the caller may obtain
   // a pointer to the branch object with GetObject().
   //
   // Example:
   //
   //    branch->SetAddress(0);
   //    Event* event = branch->GetObject();
   //    ... Do some work.
   //
   // If addr is not zero, but the pointer addr points at is
   // zero, then we allocate a branch object and set the passed
   // pointer to point at the allocated object.  The caller
   // owns the allocated object and is responsible for deleting
   // it when it is no longer needed.
   //
   // Example:
   //
   //    Event* event = 0;
   //    branch->SetAddress(&event);
   //    ... Do some work.
   //    delete event;
   //    event = 0;
   //
   // If addr is not zero and the pointer addr points at is
   // also not zero, then the caller has allocated a branch
   // object and is asking us to use it.  The caller owns it
   // and must delete it when it is no longer needed.
   //
   // Example:
   //
   //    Event* event = new Event();
   //    branch->SetAddress(&event);
   //    ... Do some work.
   //    delete event;
   //    event = 0;
   //
   // These rules affect users of TTree::Branch(),
   // TTree::SetBranchAddress(), and TChain::SetBranchAddress()
   // as well because those routines call this one.
   //
   // An example of a tree with branches with objects allocated
   // and owned by us:
   //
   //    TFile* f1 = new TFile("myfile_original.root");
   //    TTree* t1 = (TTree*) f->Get("MyTree");
   //    TFile* f2 = new TFile("myfile_copy.root", "recreate");
   //    TTree* t2 = t1->Clone(0);
   //    for (Int_t i = 0; i < 10; ++i) {
   //       t1->GetEntry(i);
   //       t2->Fill();
   //    }
   //    t2->Write()
   //    delete f2;
   //    f2 = 0;
   //    delete f1;
   //    f1 = 0;
   //    
   // An example of a branch with an object allocated by us,
   // but owned by the caller:
   // 
   //    TFile* f = new TFile("myfile.root", "recreate");
   //    TTree* t = new TTree("t", "A test tree.")
   //    Event* event = 0;
   //    TBranchElement* br = t->Branch("event.", &event);
   //    for (Int_t i = 0; i < 10; ++i) {
   //       ... Fill event with meaningful data in some way.
   //       t->Fill();
   //    }
   //    t->Write();
   //    delete event;
   //    event = 0;
   //    delete f;
   //    f = 0;
   //
   // Notice that the only difference between this example
   // and the following example is that the event pointer
   // is zero when the branch is created.
   //
   // An example of a branch with an object allocated and
   // owned by the caller:
   // 
   //    TFile* f = new TFile("myfile.root", "recreate");
   //    TTree* t = new TTree("t", "A test tree.")
   //    Event* event = new Event();
   //    TBranchElement* br = t->Branch("event.", &event);
   //    for (Int_t i = 0; i < 10; ++i) {
   //       ... Fill event with meaningful data in some way.
   //       t->Fill();
   //    }
   //    t->Write();
   //    delete event;
   //    event = 0;
   //    delete f;
   //    f = 0;
   //

Revision 23219 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 14 19:32:53 2008 UTC (6 years, 9 months ago) by pcanal
File length: 160582 byte(s)
Diff to previous 23218
add missing \! in if statement (fix to r23218)

Revision 23218 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 14 17:04:49 2008 UTC (6 years, 9 months ago) by pcanal
File length: 160581 byte(s)
Diff to previous 22902
From Paul:
Enhance documentation.

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: 156881 byte(s)
Diff to previous 22882
move tree, treeplayer and treeviewer under tree meta directory.

Revision 22882 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 28 12:01:58 2008 UTC (6 years, 9 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 156881 byte(s)
Diff to previous 22805
Remove the calls to MapObject introduce in revision 21384 when 
are unnecessary hence restoring lost performance in case where
the TTree contains many simple type (double, int, etc.)

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/TBranchElement.cxx
File length: 157114 byte(s)
Diff to previous 22359
Remove unnecessary change of the current ROOT directory
and reduce the span of those that are still compulsory
(hence aiding threadsafety)

Revision 22359 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Feb 26 23:15:01 2008 UTC (6 years, 10 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 157139 byte(s)
Diff to previous 21861
In TBranchElement::Streamer when writing, call ForceWriteInfo
not only for the TStreamerInfo directly concerning this branch
but also (in the case of the top level branch of a split TClonesArray
or a split STL container) call ForceWriteInfo for the class of
the value.

This omission meant that slow CloneTree was (fataly) missing in 
some cases the copy of the TStreamerInfo for class that are part 
part of the TTree but had only a base and no member or in 
some cases where it had only object data members.

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/TBranchElement.cxx
File length: 155250 byte(s)
Diff to previous 21659
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 21659 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jan 13 00:25:28 2008 UTC (7 years ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 149776 byte(s)
Diff to previous 21384
Remove a few TBasket creations that are no longer needed (this was a memory leak

Revision 21384 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 14 21:18:11 2007 UTC (7 years, 1 month ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 150392 byte(s)
Diff to previous 21353
Register the obj adresss in the buffer's map even if the object does not inherit from TObject

Revision 21353 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Dec 13 07:11:49 2007 UTC (7 years, 1 month ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 150230 byte(s)
Diff to previous 21321
NOTICE:

This version introduces support for transitioning classes 
from the mode where no class version is specified 
(and the checksum is always used for lookup) and a mode
where the user specifies an explicit version number for
the class (Allow for simplier, clearer data model evolution).

The class version can be specified in 3 different ways:

  a) Use rootcint and add a ClassDef macro in the class declaration:
	class MyClass {
           ...
           ClassDef(MyClass,10);
       };

  b) Use rootcint and add a RootClassVersion macro in the class source file:
	RootClassVersion(MyClass,10);

  c) Use genreflex and specify a ClassVersion property in the selection.xml :
       <class name="MyClass" ClassVersion="10"/>

Those 3 solutions set the class version of MyClass's TClass object 
to 10.

IMPORTANT:

In order to avoid a clash between this class version (and any future
class versions) and the class versions given by default to the 
non-versioned layout of the class, you MUST set this class version to
a number that is greater than the number of distinct non-versioned layout.
Otherwise you may see warning messages like:

Warning in <TStreamerInfo::BuildCheck>: 
   The class MyClass transitioned from not having a specified class version
   to having a specified class version (the current class version is 2).
   However too many different non-versioned layouts of the class have been
   loaded so far.  This prevent the proper reading of objects written with
   the class layout version 3, in particular from the file:
   myclass3.root.

Addition Details:

When loading a file containing a non-versioned layout of a class, this
layout is assigned the next 'free' number in the list of StreamerInfo.
In particular this means that if many files with non-versioned layout
of the class are loaded before the loading of a library containing a 
versioned class layout, the slot reserved for this version layout may 
already be occupied and you will get the following error message:

   The class MyClass transitioned from not having a specified class version
   to having a specified class version (the current class version is 2).
   However too many different non-versioned layouts of the class have
   already been loaded so far.  To work around this problem you can
   load fewer 'old' file in the same ROOT session or load the C++ library
   describing the class MyClass before opening the files or increase the version
   number of the class for example ClassDef(MyClass,3).
   Do not try to write objects with the current class definition,
   the files might not be readable.

Also if many files with non-versioned layout of the class are read
before a file with a versioned layout (and this number is too low), you
may get the following error message:

Warning in <TStreamerInfo::BuildCheck>: 
   The class MyClass transitioned from not having a specified class version
   to having a specified class version (the current class version is 2).
   However too many different non-versioned layouts of the class have been
   loaded so far.  This prevent the proper reading of objects written with
   the class layout version 3, in particular from the file:
   myclass3.root.

Additional note:
  For classes with no specified version (i.e. Foreign classes), the current
  TStreamerInfo is stored at index -1 in the list of StreamerInfo and the
  class version (gROOT->GetClass("MyClass")->GetClassVersion()) is set to -1.

Revision 21321 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 11 12:04:26 2007 UTC (7 years, 1 month ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 150022 byte(s)
Diff to previous 20882
Fix a bug in TBranchElement::GetTypeName.
The returned type should be fStreamerType%20 and not fStreamerType%21

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/TBranchElement.cxx
File length: 150022 byte(s)
Diff to previous 20191
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 20191 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 3 14:18:09 2007 UTC (7 years, 3 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 150022 byte(s)
Diff to previous 20173
Change the test of TVirtualStreamerInfo::kBool for TVirtualStreamerInfo::kFloat16.
Make symmetric the processing of Float16 and Double32.

Revision 20173 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 2 11:52:49 2007 UTC (7 years, 3 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 149451 byte(s)
Diff to previous 19826
Second batch of changes to support the new type Float16_t.

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/TBranchElement.cxx
File length: 149177 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/TBranchElement.cxx
File length: 149237 byte(s)
Diff to previous 18667
remove :$ from tag line

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/TBranchElement.cxx
File length: 149247 byte(s)
Diff to previous 18562
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 18562 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 23 17:34:14 2007 UTC (7 years, 9 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 149438 byte(s)
Diff to previous 18471
Improve the FindBranch and FindLeaf so that TTreeFormula finds an existing branch even in the presence of base classes (The consequence is that it was using the top level branch instead of the lower level branch.  See https://savannah.cern.ch/bugs/?25675

Revision 18471 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 3 16:10:23 2007 UTC (7 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 145908 byte(s)
Diff to previous 18403
Fix coding conventions

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/TBranchElement.cxx
File length: 145907 byte(s)
Diff to previous 18209
Cache the branch mother and direct parent to improve performance

Revision 18209 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 8 23:29:01 2007 UTC (7 years, 10 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 141785 byte(s)
Diff to previous 17826
From Paul:
Modify TRefTable, TBranchRef, and TBranchElement so that the small
integer which is assigned to identify a TBranchElement by TRefTable
is cached so that we need to find it only once, instead of at every
call to TBranchElement::GetEntry() or TBranchElement::Fill().

Revision 17826 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 9 13:47:09 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 141667 byte(s)
Diff to previous 17825
I committed the wrong version of DScott's changes.

Revision 17825 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 9 13:20:53 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 141673 byte(s)
Diff to previous 17731
From Scott Snyder:
Fix for a problem reported by ATLAS at http://savannah.cern.ch/bugs/?23567

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/TBranchElement.cxx
File length: 141303 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/TBranchElement.cxx
File length: 141295 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/TBranchElement.cxx
File length: 140613 byte(s)
Diff to previous 17579
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 17579 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 30 11:24:32 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 140659 byte(s)
Diff to previous 17522
-Replace calls to gROOT->GetClass by TClass::GetClass
-Remove unused references to TROOT.h

Revision 17522 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 25 22:53:05 2007 UTC (7 years, 11 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 140660 byte(s)
Diff to previous 17306
When the master tree of a tree 'clone' relationship is deleted, we need
to reset the address of the branches of the clone ... however we need to
reset the address only for the cloned branches.  In particular this means
that calling ResetBranchAddresses on the clone tree is over-zealous (it
reset branches that may have been added by the user after the cloning).
Also in the reseting of the branch depends (because of TNtuple and TNtupleD)
not only of the type of the branch object but also on the type of the TTree.
(See TNtuple::ResetBranchAddress(TBranch*) for the explanation why).

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/TBranchElement.cxx
File length: 140634 byte(s)
Diff to previous 17122
   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 17122 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 8 17:33:28 2006 UTC (8 years, 1 month ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 140613 byte(s)
Diff to previous 16495
From Scott Snyder:
To facilitate the developement of support for 'data model' evolution,
make more method protected (instead of private) and make InitializeOffsets
and InitInfo virtual.

Revision 16495 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 9 17:13:35 2006 UTC (8 years, 3 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 140491 byte(s)
Diff to previous 16247
From Philippe:
Insure we properly detect that the TStreamerElement
is for a base class even in the case of an std::string.

Revision 16247 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 13 07:14:20 2006 UTC (8 years, 4 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 140540 byte(s)
Diff to previous 16036
Fix a problem introduce in version 1.208 of this file.
The fBranchCount was sometimes not properly set, resulting
in crashes when trying to read the branch in MakeClass mode.
This patch fixes the original problem and add a work around
the issues for the file produced incorrectly.

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/TBranchElement.cxx
File length: 139479 byte(s)
Diff to previous 15955
remove any artifical limitation in branch names

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/TBranchElement.cxx
File length: 139739 byte(s)
Diff to previous 15849
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/TBranchElement.cxx
File length: 139541 byte(s)
Diff to previous 15837
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 15837 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 20 21:52:56 2006 UTC (8 years, 6 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 141332 byte(s)
Diff to previous 15813
Temporarily disable address checkis at destruction time until we sort
out the interface/documentation issues related the TTree ownership of
the objects (See ReleaseObject)

Revision 15813 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 14 20:51:08 2006 UTC (8 years, 6 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 141174 byte(s)
Diff to previous 15799
fix coding rule violations

Revision 15799 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 13 17:49:41 2006 UTC (8 years, 6 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 141166 byte(s)
Diff to previous 15796
In TBranchElement::ValidateAddress only disable the warning.  The address update is still required

Revision 15796 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 13 07:33:27 2006 UTC (8 years, 6 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 141183 byte(s)
Diff to previous 15785
disable the new object cleanup until we introduce a missing user interface

Revision 15785 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 13 05:19:52 2006 UTC (8 years, 6 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 140970 byte(s)
Diff to previous 15778
From Paul Russo:
     o (Constructor) Initialize all data members.

     o (Constructor), (InitializeOffsets), (SetAddress), (Unroll)

       Extensive additions to internal documentation.

     o (Constructor), (Unroll)

       Reorganized to interact through function parameters only.

     o (Destructor) Delete any object allocated by SetAddress(),
       which fixes the emulated class memory leak.

     o (Branch) Removed, unused junk code.

     o (CheckBranchID) Removed, no longer used.

     o (Fill)

       Check to make sure the user did not change the object
       pointer on us.

       Change usage of fAddress to check for an allocated
       object to use fObject instead.

       Do not corrupt the i/o byte count after an
       i/o error occurs.

     o (FillLeaves) Check to see if the user changed the
       object pointer.

     o (FillLeaves) Changed STL top-level branch logic so that
       the proxy helper which was used to get the size of the
       container is destroyed before the i/o begins, this helps
       reduce the number of stacked proxy helpers.

     o (GetAddress) New member function.  Override base class
       function so that we may catch the case where the user
       changed the object pointer without using SetAddress()
       to notify us.

     o (GetDataMemberOffset), (GetDataMemberOffsetEx)

       Removed,  implementation-only member functions which
       are no longer used.

     o (GetInfo) Made const and reorganized for clarity.

     o (GetEntry) Check to see if the user changed the object
       pointer.  Do proper error checking for container master
       branch i/o and terminal branch i/o, and do not corrupt
       the byte count on error, and exit with the error code
       on error.

     o (GetValue) Check to see if the user changed the address.

     o (InitializeOffsets) Rewritten using a much simpler and
       easier to understand algorithm.

     o (PrintValue) Check to see if the user changed the address.

     o Correct usage of fInfo to GetInfo() to support schema
       evolution in many places.

     o (ReleaseObject) New implementation-only member function.
       Used by ResetAddress() and SetAddress() to delete any
       objects which were allocated by a call to SetAddress().

     o (ResetAddress) Check if user changed the address on
       us and to release memory allocated by SetAddress().

     o (ResetDeleteObject) New member function.  Gives cloned
       trees a way of making themselves not the owner of the
       allocated object.

     o (SetAddress) Substantially rewritten, greatly extended
       documentation.

     o (SetAutoDelete) Removed, we can inherit it from TBranch.

     o (SetBranchCount) Issues warning messages on error
       conditions.

     o (SetupAddresses) Check to see if the user changed the
       object pointer.

     o (Streamer) Make sure to reset the object ownership bit
       on reading, right after a read we don't own anything.

     o (Unroll) Reorganized, extensively documented.

     o (ValidateAddress) New member function.  Checks to see
       if the user changed the object pointer without calling
       SetAddress(), and if so, calls SetAddress() for him.

Revision 15778 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 12 19:09:34 2006 UTC (8 years, 6 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 110918 byte(s)
Diff to previous 15591
Do not attempt to split a TClonesArray within a TClonesArray even if it
is in one of the base classes of the contained type.

Revision 15591 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 28 10:03:14 2006 UTC (8 years, 6 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 110775 byte(s)
Diff to previous 15299
From Markus Frank:
Implementation of a generic mechanism used to access
properties of objects linked using object references.
A proxy mechanism is used, which uses overloaded abstract
interfaces for concrete reference implementations.

Revision 15299 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 1 22:28:07 2006 UTC (8 years, 7 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 110709 byte(s)
Diff to previous 15168
avoid unitialized memory read

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/TBranchElement.cxx
File length: 110646 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/TBranchElement.cxx
File length: 110540 byte(s)
Diff to previous 15047
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 15047 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 15 11:01:14 2006 UTC (8 years, 8 months ago) by rdm
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 108706 byte(s)
Diff to previous 15024
coding conventions (put methods after data members, after Fed's changes).

Revision 15024 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat May 13 19:21:52 2006 UTC (8 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 108772 byte(s)
Diff to previous 14745
Fix coding conventions violations

Revision 14745 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 19 08:22:26 2006 UTC (8 years, 9 months ago) by rdm
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 108689 byte(s)
Diff to previous 14336
Change the TError.h macros:
Assert   ->  R__ASSERT
Check    ->  R__CHECK
Change the TCollection.h macro:
ForEach  ->  R__FOR_EACH
This to avoid potential problems due too trivial macro names.
The old macros will be removed in the next release. Currently
they will print out warning messages with the advice to move
to the new macro names.

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/TBranchElement.cxx
File length: 108860 byte(s)
Diff to previous 14148
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 14148 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 2 07:45:47 2006 UTC (8 years, 10 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 108881 byte(s)
Diff to previous 14138
Resolve an issue in SetAddress (introduced in r1.186) where it was
applying a correction (kept in fParentOffset) even if the address
was being directly passed (for example by CopyAddress instead of
indrectly by a parent branch's SetAddress)

Revision 14138 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 1 15:43:29 2006 UTC (8 years, 10 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 109121 byte(s)
Diff to previous 14087
From Paul Russo:
Correct the case of improper tree i/o when a data member name
of a base class is the same as the top-level branch name (as reported
by Nick West).

Revision 14087 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 22 23:28:27 2006 UTC (8 years, 11 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 107293 byte(s)
Diff to previous 13460
Insure that all TBranchElement have a TLeafElement (except when they
represent a base class).  This is required by TTree::Draw

Revision 13460 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 2 18:49:44 2005 UTC (9 years, 1 month ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 106928 byte(s)
Diff to previous 13357
make sure the branch ref is set also for non split branches

Revision 13357 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 25 05:39:33 2005 UTC (9 years, 2 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 106927 byte(s)
Diff to previous 13332
Fix a problem in TBranch::SetAddress when we are dealing with a
TClonesArray containing an object containing an object inheriting
from a non-virtual base class and from TObject.  Without this patch
the address of the basic type data members of the base class it not
calculated properly.

Revision 13332 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 24 05:09:59 2005 UTC (9 years, 2 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 106525 byte(s)
Diff to previous 13207
Fix an additional problem with the case (in a TTree) of a base
class containing a complex sub-object (discovered by Sue Kasahara).

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/TBranchElement.cxx
File length: 106342 byte(s)
Diff to previous 13008
Update the spacing and documentation to match the coding rule

Revision 13008 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 24 18:20:32 2005 UTC (9 years, 3 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 105251 byte(s)
Diff to previous 12970
Fix an issue in TBranchElement::SetAddress (and auxiliary methods)
when encountering a sub-object of a base class of an object contained
inside another object which is stored in a split branch.
(I.e. The base class is stored at least under level of branches
as opposed to being just under the main branch).

Revision 12970 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 17 14:20:05 2005 UTC (9 years, 3 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 104307 byte(s)
Diff to previous 12946
initialize member

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/TBranchElement.cxx
File length: 104286 byte(s)
Diff to previous 12872
Simplify the logic with circular trees.
Keep only one buffer per branch.
Remove the unnecessary TBranchElement::KeepCircular

Revision 12872 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 29 15:10:51 2005 UTC (9 years, 3 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 104700 byte(s)
Diff to previous 12806
extend the support for split variable size C style array with a split collection to Long64 and Bool_t

Revision 12806 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 22 07:17:33 2005 UTC (9 years, 4 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 104701 byte(s)
Diff to previous 12715
Implement circular buffers in TBranchElement.

Revision 12715 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 13 14:35:01 2005 UTC (9 years, 4 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 104283 byte(s)
Diff to previous 12548
From Jeroen Hegeman:
Last week I got really stuck looking at memory addresses and missing
fBits when I got some help from Paul Russo. We found out that the
core of the problem is pretty simple.
In TStreamerBuffer::WriteBufferAux there is a bit of code that writes
the fBits and if the object is referenced it also writes the pidf.


The problem is that no offset table is generated for this 'fBits' branch so
reading this branch will result in corruption. (You write variable-
size things and always read fixed-size things.)

The solution is to force (in TBranchElement's constructor) to support a
variable size in the case of fBits (case kBits).

Revision 12548 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 29 10:57:28 2005 UTC (9 years, 4 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 103895 byte(s)
Diff to previous 12392
Changes to make the rulechecker happy in directory tree.

Revision 12392 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 27 15:32:16 2005 UTC (9 years, 5 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 103883 byte(s)
Diff to previous 12320
In MakeClass mode, there is no need for memory allocation of the split STL container (they are map onto fix length array\!)

Revision 12320 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 15 21:35:45 2005 UTC (9 years, 6 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 104494 byte(s)
Diff to previous 12081
Fix a problem with some embedded objects in a base class when in a branch of a TTree which is not prefixed by the top level branch.  This problem was introduce by one of the recent update

Revision 12081 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 20 14:09:15 2005 UTC (9 years, 7 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 103711 byte(s)
Diff to previous 12039
From Markus.

Restrict the lookup of the base class data member
names to the cases where we know that it is part
of a base class.

Revision 12039 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 13 21:55:22 2005 UTC (9 years, 7 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 103758 byte(s)
Diff to previous 12034
In CheckBranchID lookup the current ID in the list of effective on file TStreamerElement (GetElems) instead of the full list (GetElements)

Revision 12034 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 13 16:48:19 2005 UTC (9 years, 7 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 103739 byte(s)
Diff to previous 12007
Speed up the last patch of SetAddress

Revision 12007 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 9 19:44:48 2005 UTC (9 years, 7 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 103246 byte(s)
Diff to previous 12006
From Markus,
This patch corrects the offset calculation done in SetAddress in the
case of a split class which both inherits from a specific class 'A' and
contain an object of the same class 'A'  (Thanks to Pere for reporting the
case)

Revision 12006 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 9 18:20:02 2005 UTC (9 years, 7 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 103122 byte(s)
Diff to previous 11999
Various performance improvements.

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/TBranchElement.cxx
File length: 103129 byte(s)
Diff to previous 11848
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 11848 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 23 16:58:00 2005 UTC (9 years, 8 months ago) by pcanal
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 102260 byte(s)
Diff to previous 11590
Form Markus:

Check consistency between TStreamerInfo and branch ID after a possible
schema change. Branch id may be need to be updated after data member
rearrangement.

Revision 11590 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 14 21:30:11 2005 UTC (9 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 101019 byte(s)
Diff to previous 11521
From Philippe,
Replace previous poorly written code like
         nextTree = (TTree*)nextFriend->GetTree();
by a more modern and readable style
         nextTree = const_cast<TTree*>(nextFriend->GetTree());
::)

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/TBranchElement.cxx
File length: 101021 byte(s)
Diff to previous 11464
From Markus Frank
TTree::Fill returns -1 if an error occurs during Fill

Revision 11464 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 31 17:52:25 2005 UTC (9 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 100196 byte(s)
Diff to previous 11457
From Philippe:
TStreamerInfo::PrintValue
        lookup the TStreamerElement only when needed
        add printing of array of fBits (need in MakeClass mode)
TBranchElement::PrintValue
        In MakeClass mode, print the char as unsigned char instead
of as strings.

Revision 11457 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 30 21:09:19 2005 UTC (9 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 99837 byte(s)
Diff to previous 11376
From Philippe:
TBranch::fOffset stores permanently the offset of the data member in the
object.
When the branch is reloaded without the library, this offset might be
incorrect.
We introduce SetupAddresses (called by GetEntry and TTreeFormula) which
insures
the offset are correctly set.

In case of a fixed size char array nested inside a collection, the indexing
was inconsistent (It is drawn as a string but one of the inner mechanism was
still using the fixed size to calculate the index)

In case of string (like char* or char array) was within a collection,
the TFormLeafInfo 'chain' was incorrectly set (it was not using the
fact the branch has the address of the collection instead of the
addresses of the container of the collection).

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/TBranchElement.cxx
File length: 99567 byte(s)
Diff to previous 10958
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 10958 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 19 18:30:58 2005 UTC (10 years ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 100891 byte(s)
Diff to previous 10917
From Philippe:
This patch implement support for bool of various in memory size.  They are
always written using only 1 bytes.  This solves problem on MacOS where
sizeof(bool)==4 instead of 1.

Note that there should still be a problem with the old-style splitted branch
(tested in Event.old.split.root.
A fix for this will come later on.

Revision 10917 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 13 20:07:46 2005 UTC (10 years ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 100458 byte(s)
Diff to previous 10898
From Philippe:
TBranchElement: Insure that fSTLtype is always positive (was preventing the
reading of sets and maps in some case of split mode).
TTree, TTreePlayer: fix to TTree::Draw documentation
TTreeFormula: insures that TTree::Draw properly reads strings within a
collection

Revision 10898 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 12 07:50:03 2005 UTC (10 years ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 100446 byte(s)
Diff to previous 10861
From Philippe:
A) Support for top level STL Containers.  You can now do
   list<int> *ptr = new list<int>;
   tree->Branch("mystl","list<int>",&ptr);

B) Autodetection of the pointer type passed to the branch constructor.
So you can now do:
   list<int> *ptr = new list<int>;
   tree->Branch("mystl",&ptr);

C) Check of the type of the pointer type passed to the branch constructor.
So that you now get an error:
   list<int> *ptr = new list<int>;
   tree->Branch("mystl","list<float>",&ptr);

Error in <TTree::Branch>: The class requested (list<float>) for the branch
"mystl" is different from the type of the pointer passed (list<int>)

D) TTree's SetBranchAddress now also check its input address (unless the
user explicitly specify (char*) or (void*).

Test/Event and the tree tutorials have been updated to take advantage of the
new syntax.

Revision 10861 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jan 3 21:58:52 2005 UTC (10 years ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 99664 byte(s)
Diff to previous 10578
From Philippe:
This patch insures that splittable nested STL containers which are nested
inside another splitted STL container are NOT split (We currently only
support for one level of splitting for nested containers).

Revision 10578 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 19 20:08:58 2004 UTC (10 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 99634 byte(s)
Diff to previous 10570
From Philippe:
This patch should re-add the ability of supressing transient data member and
the ability to browsing sub-branches (like fTracks).

Revision 10570 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 19 11:39:24 2004 UTC (10 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 99550 byte(s)
Diff to previous 10555
Disable new logic introduced by Axel in TBranchElement::Browse for hiding
non persistent members. This had a ude side effect of not browsing
TClonesArray or collections.

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/TBranchElement.cxx
File length: 99492 byte(s)
Diff to previous 10549
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 10549 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 17 17:56:53 2004 UTC (10 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 98458 byte(s)
Diff to previous 10545
From Philippe,

This patch implements the schema evolution to and from selected containers.
The following cases are currently implemented:

  TClonesArray object -> STL object containing the same type
  TClonesArray pointer -> STL pointer containing the same type
  STL object -> STL object containing the same type
  STL pointer -> STL pointer containing the same type

  STL split branches -> TClonesArray

In addition this patch implement the ability to have schema evolution
between various version of a foreign class when the library is not present.

This patch also support in in TTree::Draw for the schema evolution of simple
type stored in a non-split branch.

Revision 10545 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 17 08:46:43 2004 UTC (10 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 92399 byte(s)
Diff to previous 10541
Undo changes from Philippe.
The new version was not able to read previous ROOT files, eg files
containing TGeo objects.

Revision 10541 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 17 06:02:52 2004 UTC (10 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 98458 byte(s)
Diff to previous 10488
From Philippe:
This patch implements the schema evolution to and from selected containers.
The following cases are currently implemented:

  TClonesArray object -> STL object containing the same type
  TClonesArray pointer -> STL pointer containing the same type
  STL object -> STL object containing the same type
  STL pointer -> STL pointer containing the same type

  STL split branches -> TClonesArray

In addition this patch implement the ability to have schema evolution
between various version of a foreign class when the library is not present.

This patch also support in in TTree::Draw for the schema evolution of simple
type stored in a non-split branch.

Revision 10488 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 5 17:01:58 2004 UTC (10 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 92399 byte(s)
Diff to previous 10456
From Axel Naumann
TBranchElement now hides non-persistent data members but shows the
corresponding member methods.

Revision 10456 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 2 21:51:10 2004 UTC (10 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 90813 byte(s)
Diff to previous 10452
From Markus Frank:
I have produced an updated version of the Proxies, rootcint and
Tbranchelement:
- Avoid compilation errors on VC++6 (AIX still has to be seen),
  but probably the problems there are similar.
- Fix the errors reported by Philippe:
>   TFile *_file0 = TFile::Open("mksm.root");
>   mk->Draw("iem.mt","","",2,22);

>       cd roottest/root/io/newstl
>       root.exe -b -l 4-01-03/vector.root
>       root [] stltree->GetEntry(0);
>       root [] stltree->GetEntry(1);
> Or
>       cd roottest/root/treeformula/parse
>       root.exe -b -l runBoolOrder.C

  There is a bit a nasty side effect:
  sets and maps maybe split, but all members are
  read at once. This however should not affect
  the persistent schema and can be subject of
  further investigations.

I compiled the stuff on VC6, VC7 and gcc323.
- bench executed on all three
- roottest/root/io/newstl executed on WIN32/VC7.

  Note: bench and newstl are supposed to __FAIL__
  on VC6 due to the lousy map implementation with
  static storage.

Revision 10452 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 2 16:24:42 2004 UTC (10 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 88037 byte(s)
Diff to previous 10431
Several fixes in TBranchElement.
 -in GetEntry remove the special code for STL Allocating the buffers
 -move part of this code in ReadLeaves
 -in the constructor, do not split STL collections that are
  associative containers (this will be implemented later)

Revision 10431 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 29 18:03:11 2004 UTC (10 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 88808 byte(s)
Diff to previous 10333
from Markus Frank (main work) + Philippe & Rene
Add support for all STL collections, including collections
of collections.
TTree has been extended to support split mode for most STL
collections.
The test program bench.cxx/TBench.cxx has been extended to test
STL collections of objects or pointers.

Revision 10333 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Oct 17 20:59:58 2004 UTC (10 years, 3 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 87884 byte(s)
Diff to previous 10331
From Axel Naumann,
Fix a problem when navigating between multiple level of objects
when browsing class functions.

Revision 10331 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Oct 17 11:55:47 2004 UTC (10 years, 3 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 87343 byte(s)
Diff to previous 10267
From Axel Naumann:
I've written a small patch + one extra class that allows the TBrowser to
browse simple member methods (called "browsable" methods: public, not
pure virtual, const, no args without default value, return type not
void, and none of those Impl/DeclFile/IsA/... methods). Here's what I did:

When TBranchElement::Browse is called,
TBranchElement::GetBrowsableMethods creates a list of browsable methods,
containing an object of type TMethodBrowsable for each browsable TMethod
of the current BranchElement's object (or its clone) and all of its base
classes. This list is needed for deleting these objects when the
TBranchElement ceases to be. All these objects are added to the TBrowser
in TBranchElement::Browse. TMethodBrowsable implements Browse, and calls
TBranchElement::GetTree()->Draw(branchname.methodname).

If a method returns a class object (or a pointer to one) which is known
to ROOT, fReturnClass is set. If that method is browsed, it expands to a
folder, giving access to the returned class's methods.

I added icon for methods - a leaf with a red exclamation mark (as in
"execute!") for methods not returning a class, and a folder with an
exclamation mark for methods returning a class. You are more than
welcome to change them, obviously! :-]

I've put the class TMethodBrowsable into its own source/header file
(instead of adding them to TBranchElement), as it's really only needed
by TBranchElement.cxx, and I wanted to minimize how often the code needs
to be parsed. These two new files are in tree/; dunno whether that's a
good place.

I've tested it on the D0 tmb_trees; works well for them.

Revision 10267 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 8 15:19:37 2004 UTC (10 years, 3 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 86319 byte(s)
Diff to previous 10239
From Philippe:
This patch removes TVirtualCollectionProxy::SetProxy.  A new nested class
(TVirtualCollectionProxy::TPushPop) is introduced to help replace SetProxy
and insure that each push is followed by a pop.

Revision 10239 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 7 08:19:31 2004 UTC (10 years, 3 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 86154 byte(s)
Diff to previous 10184
In TBranchElement::Unroll do not split a TClonesArray when it is inside
another TClonesArray itself being in a class being a composite member of a class.

Revision 10184 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 29 10:56:53 2004 UTC (10 years, 3 months ago) by rdm
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 86107 byte(s)
Diff to previous 10156
remove <TAB> char.

Revision 10156 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 23 07:18:05 2004 UTC (10 years, 4 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 86043 byte(s)
Diff to previous 10107
In TBranchElement::GetEntry set the current TRefTable in case of a TBranchRef

Revision 10107 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 20 16:44:01 2004 UTC (10 years, 4 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 86001 byte(s)
Diff to previous 9831
From Philippe
fix the reading of the TObject data member fBits
within a split TClonesArray when the TTree is in MakeClass mode.

Revision 9831 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 24 10:41:58 2004 UTC (10 years, 5 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 85566 byte(s)
Diff to previous 9803
Improve the functionality of the TRefTable.
The new algorithm
  -does not require a pointer to the TRefTable in TFile.
  -can automatically load the branch of a Tree when calling TRef::GetObject
  -works when writing/reading multiple Trees in parallel

Revision 9803 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 20 21:02:10 2004 UTC (10 years, 5 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 85408 byte(s)
Diff to previous 9802
From Philippe:
This patch is an important step toward the implementation of the member-wise
saving of stl containers.

Mainly, the code does not require anymore the collection proxy to be able
to provide a C-style array of pointer to its content.  This avoid the
problems of having to iterate twice through some collection and/or to have to
keep in memory a version of this array.  Concretely this also mean that the
I/O routine will now be able to recurse through stl containers.

Technically, this is done by templating TStreamerInfo::ReadBuffer and
TStreamerInfo::WriteBufferAux (as well as the ReadBufferSkip And
ReadBufferConv) so that you can use it directly with a char** or
with a TVirtualCollection (to which we added an operator [] and
removed the method GetPtrArray).

In addition, we added 2 new method to TVirtualCollectionProxy:
PushProxy and PopProxy that will allow to keep some state on
where we are in the iteration for a collection when we recurse.
(This is required for a reasonable implementation of the
TVirtualCollection for std::list).

Also (in an unrelated fix) we update TTreePlayer::Scan to
properly display the columns when they are more expressions
in the request than leaves in the tree.

Revision 9802 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 20 14:59:50 2004 UTC (10 years, 5 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 85330 byte(s)
Diff to previous 9615
Add a new data member
   TBranchRef *fBranchRef
and the corresponding function:
TBranch *TTree::BranchRef()
    // Build the optional branch supporting the TRefTable
    // This branch will keep all the information to find the branches
    // containing referenced objects
    //
    // at each Tree::Fill, the branch numbers containing the
    // referenced objects are saved to the TBranchRef basket
    // When the Tree header is saved (via TTree::Write), the branch
    // is saved keeping the information with the pointers to the branches
    // having referenced objects.

TTree::Fill is modified to:
  -call fBranchRef->Clear   before filling the branches
  -call fBranchRef->Fill once all the branches have been filled.

TTree::Print is modified to also call
  fBranchRef->Print

TBranchElement::Fill is modified to call fBranchRef->SetParent
when the parent Tree has a TBranchRef.
eVS: ----------------------------------------------------------------------

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/TBranchElement.cxx
File length: 85085 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/TBranchElement.cxx
File length: 85071 byte(s)
Diff to previous 9158
From Valeriy Onuchin:
- this patch allows to set draw option while  browsing TFiles/TTrees

Revision 9158 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 9 21:51:36 2004 UTC (10 years, 7 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 85038 byte(s)
Diff to previous 9147
From Philippe:
This patch removes an obsolete comment.

Revision 9147 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 9 06:10:21 2004 UTC (10 years, 7 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 85150 byte(s)
Diff to previous 8429
From Philippe:
This patches implements splitting of TClonesArray and vectors which are embedded in a base class (as opposed to pointed to).

Also more of the 'CanSplit' decision making has been move into TClass (where it belongs).

In TTree::Merge and MergeLists, add more cleanup of the addresses
being set to reduce the side-effects.

Revision 8429 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 18 07:10:58 2004 UTC (10 years, 10 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 83988 byte(s)
Diff to previous 8351
From Markus Frank and Philippe:
Replace direct use of fCollProxy by GetCollectionProxy
added calls in SetAddress to insure that fCollProxy is initialized
if fObject is initialized.

Revision 8351 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Mar 9 17:08:35 2004 UTC (10 years, 10 months ago) by rdm
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 83808 byte(s)
Diff to previous 8350
fix small typo in comment and error message.

Revision 8350 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Mar 9 16:51:55 2004 UTC (10 years, 10 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 84202 byte(s)
Diff to previous 8343
From Philippe:
This patch extend the previous test to negative value (in addition to
large value) of the index.
It also adds the protection in the MakeClass case.

Revision 8343 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Mar 9 08:16:27 2004 UTC (10 years, 10 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 83729 byte(s)
Diff to previous 8222
From Philippe:
In the previous implementation in the case where the user set the pointer
(used by SetBranchAddress) pointing to a TClonesArray to zero after
constructing the branch that is split, NOTHING was saved in the main branch
(where the size of the collection is supposed to go).

In this new version, we insert the value zero that when reading back,
it is considered as an empty collection.

In addition we updated the read mechanism so that it detects case where
the value read for the index is greater than the maximum.
When this is the case, we check  whether we are in the case where
nothing has been saved in which case we set the length to 0 (instead of
the random value used in the previous implementation) and rewind the
buffer appropriately.
If we are not in this known case, we issue an error message and set the
length to 0 and we do NOT rewind the buffer.

Revision 8222 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 18 07:28:02 2004 UTC (10 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 81235 byte(s)
Diff to previous 8180
From Philippe:
This patch implements TTree::Draw for vector.  The current convention is the same
as for TClonesArray, namely after dereferencing a collection, the right hand of
the expression is request for the content and not for the container.

TBranchElement.cxx
        Make sure that a non-split branch containing an stl container contain
one leaf.

TVirtualCollectionProxy, TEmulatedVectorProxy, TVectorProxy
        Add the ability to retrieve the data type when it is a numerical type

TVectorProxy
        Fix some problem in the addressing caching mechanism

TClass.h
        Correct the ROOT::GetClass templates to properly return the TClass
object in case when the parameter is a pointer to pointer (or more).

TClassEdit.cxx:
        Avoid thinking that vector<xxx>::iterator is an stl container!

TTreeFormula.cxx
        Add support for stl container (actually ANY container which a
know TVirtualCollectionProxy).  Added TFormLeafInfoCollection and
TFormLeafInfoNumerical (non struct, non class container content).

Revision 8180 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 11 08:20:07 2004 UTC (10 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 80961 byte(s)
Diff to previous 7968
Several protections added to protect the code when processing a Tree
writing with old versions of ROOT when the StreamerInfo record was not written
to the file.

Revision 7968 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 22 06:32:01 2004 UTC (11 years ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 80908 byte(s)
Diff to previous 7966
Mod by Philippe and Maarten to support Long64_t in TBranchElement::GetTypeName

Revision 7966 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 21 23:14:00 2004 UTC (11 years ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 80718 byte(s)
Diff to previous 7880
From Philippe:
This patch add support for Double32_t in MakeClass (by making TBranchElement::GetTypeName) correct.

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/TBranchElement.cxx
File length: 80708 byte(s)
Diff to previous 7810
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 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/TBranchElement.cxx
File length: 73730 byte(s)
Diff to previous 7805
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 7805 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 26 22:06:40 2003 UTC (11 years, 1 month ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 73726 byte(s)
Diff to previous 7802
Changes to support
 -Long64 and ULong64_t
 -Double32_t

Revision 7802 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Dec 25 17:55:20 2003 UTC (11 years, 1 month ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 72636 byte(s)
Diff to previous 7702
Add a new member fCheckSum and corresponding getter GetCheckSum.
Classversion incremented to version 8.
In TBranchElement::GetInfo, use the fCheckSum member to find the right
TStreamerInfo object in TClass.
With this change and the previous changes in TBuffer, TClass and TStreamerInfo,
automatic schema evolution is supported for foreign classes written in a TTree
or as classes written as a TKey.

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/TBranchElement.cxx
File length: 72127 byte(s)
Diff to previous 7622
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 7622 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 20 17:25:54 2003 UTC (11 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 71995 byte(s)
Diff to previous 7597
Patch from Philippe that prevent the splitting of TCollection objects.  TClonesArray are allowed to be split except when they are embedded inside an object which in embedded inside an already split object (they are case
where it would be technically possible to split it properly but it is not implemented yet)

Revision 7597 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 14 11:11:21 2003 UTC (11 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 71802 byte(s)
Diff to previous 7563
TTree::Show has a new optional argument (Int_t lenmax=20).
This argument is used to limitate the number of array elements
to be printed in case of variable length arrays, or the
number of objects in a TClonesArray. (previous default was 10
for integer elements and 5 for float elements.

This change has required the following other mods:
 -The previously unused argument of TBranchElement::PrintValue
  is now the argument lenmax (as given by TTree::Show).
 -TStreamerInfo::PrintValue has a new optional argument lenmax
 -TStreamerInfo::PrintValueClones has a new optional argument lenmax
 -PrintValue and PrintValueClones have a new logic to limitate
  the number of printed elements (via macros PrintCR and PrintCCR).

Revision 7563 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 10 17:43:31 2003 UTC (11 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 71768 byte(s)
Diff to previous 7516
Add a protection in TBranchElement constructor in case a TClonesArray
with a null pointer.

Revision 7516 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 4 06:40:48 2003 UTC (11 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 71738 byte(s)
Diff to previous 7028
From Philippe:
This patch fixes TBranchElement::SetAddress for the case of a vector embedded in an object embedded in an
object which is inherited from.

Revision 7028 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 4 17:33:21 2003 UTC (11 years, 5 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 71605 byte(s)
Diff to previous 6992
From Philippe:
This patch resolves an issue where the code thought there was a missing branch in the branch hiearchy because the
actual parent class inherited from the branch's class instead of being equal to it.

Revision 6992 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 23 12:25:42 2003 UTC (11 years, 6 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 71573 byte(s)
Diff to previous 6824
From Philippe
Fix for a problem reported by Hamlet:
While messing with TTrees, I've run into the following error:

Error in <TBranchElement::GetDataMemberOffset>: obsolete call with
(PhotonsList,Clusters)

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/TBranchElement.cxx
File length: 70832 byte(s)
Diff to previous 6775
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 6775 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 25 07:16:22 2003 UTC (11 years, 7 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 70527 byte(s)
Diff to previous 6765
Fix by Victor:

TStreamerInfo::GetElems() returns array of pointers to TStreamerElements
TBranchElement::GetID() returns index in this array.
It is OK.

But in files TTreeFormula.cxx and TBranchElement.cxx this index is used for the list
provided by TStreamerInfo::GetElements()

Generally these lists are different, but often the same.
In our case these lists are different because of TClass::IgnoreTObjectStreamer() method used

In GetElements() TObject element exists but
in GetElems()      NOT.

Revision 6765 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 23 20:23:44 2003 UTC (11 years, 7 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 70541 byte(s)
Diff to previous 6749
Fix a compiler warning on alpha/cxx with an assert statement.

Revision 6749 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jun 21 06:07:47 2003 UTC (11 years, 7 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 70536 byte(s)
Diff to previous 6671
From Philippe:
The following patch solves aproblem reported by Otto Schaile in tutorial clonesA_Event.C
by modifying TBranchElement::SetAddress so that it properly increments the object
or offset when the branch hierarchy does not contain a branch for the (sub)object itself
and leaves the object or offset
alone if the branch hiearchy does contain a branch for the (sub)object itself.

Revision 6671 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 2 10:25:22 2003 UTC (11 years, 7 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 63458 byte(s)
Diff to previous 6558
In TBranchElement::GetEntry do not set the branch address in case
the branch address is not yet set and the branch has been disabled.

Revision 6558 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 7 08:33:45 2003 UTC (11 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 63403 byte(s)
Diff to previous 6468
Add protection in TClonesArray::Unroll (thanks Victor) in case
of a TClonesArray pointer inside another TClonesArray.
In this case fBranchPointer may be null. We cannot split the nested
TClonesArray in this case.

Revision 6468 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 18 16:42:31 2003 UTC (11 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 63290 byte(s)
Diff to previous 6415
From Philippe:
In TBranchElement::SetAddress we have something like:

     TClass *clm = gROOT->GetClass(GetClassName());
     Int_t *offsets = clm->GetStreamerInfo()->GetOffsets();
     ...
        if (mOffset > 0) fOffset = mOffset -offsets[fID];

However, if the class has been modified so that the order of the data member in the "live" class is different from
the version that was used to write the file, the fID does NOT point to the index of the needed datamember in the new
StreamerInfo.  We have to retrieve it by name instead (hence the patch).

Revision 6415 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 10 12:58:34 2003 UTC (11 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 63121 byte(s)
Diff to previous 6394
Protection added in TBranchElememnt::Streamer in case a Tree has been read
from a file, then written again to the same file without any I/O
in between. In this case the TStreamerInfo of the referenced classes
is not available. (thanks to Peter Hristov for showing a simple case).

Revision 6394 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Apr 6 22:03:05 2003 UTC (11 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 63110 byte(s)
Diff to previous 6386
Add new function;
 Int_t TBranchElement::GetDataMemberOffset(TClass *cl, const char *name)
returning the offset of member name in class cl, one of its base class or class by composition.
TBranchElement::SetAddress uses this new function.

Revision 6386 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 4 14:58:14 2003 UTC (11 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 63175 byte(s)
Diff to previous 6262
Several corrections to support complex cases of inheritance and composition.
A new tutorial "otto.C" has been developed to test this complex situation.

Revision 6262 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 6 21:53:46 2003 UTC (11 years, 10 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 61586 byte(s)
Diff to previous 6255
In TBranchElement::Streamer, add logic to write the TBranch object in
the file where the branch is diverted in addition to the file
containing the Tree header. This logic was in TBranch before.

Revision 6255 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 5 23:33:29 2003 UTC (11 years, 10 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 61152 byte(s)
Diff to previous 6244
Implement a custom Streamer for TBranchElement and TBranchObject.
The custom Streamer is required for two reasons:
 - to call ForceWriteInfo for all classes referenced by the class in the branch
 - to avoid a recursivity problem when the branch is diverted to a separate file.

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/TBranchElement.cxx
File length: 60145 byte(s)
Diff to previous 6168
Move getter functions GetMother and GetSubBranch from TBranchElement
to the base class TBranch

Revision 6168 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Feb 22 13:27:44 2003 UTC (11 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 61227 byte(s)
Diff to previous 6152
Add several protections in case the TStreamerInfo is missing for a branch.
Test if the TClonesArray is Zombie in case of branch being a member
of a TClonesArray.

Revision 6152 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 20 14:09:45 2003 UTC (11 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 60953 byte(s)
Diff to previous 5717
In TBranchElement::setAddress, create the TClonesArray in case
of a top level branch being a TClonesArray and a null pointer.

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/TBranchElement.cxx
File length: 60898 byte(s)
Diff to previous 5704
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 5704 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 29 14:48:27 2002 UTC (12 years, 1 month ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 60893 byte(s)
Diff to previous 5697
New version of SetBranchAddress supporting the split of TClonesArray
when the pointer is in a sub-class.
Also added support for the case when the top level branch is forced with a "."
as the last branch name character.

Revision 5697 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 28 21:16:56 2002 UTC (12 years, 1 month ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 60444 byte(s)
Diff to previous 5673
Modify TBranchElement::FillLeaves to support the case when a Tree
is in FakeClass mode.
For example, if a new Tree is created via CloneTree in a Loop
function of a class generated by MakeClass, one has to rebuild
the new Tree in a way compatible with a future reading using
the shared library or not.

Revision 5673 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 26 23:53:55 2002 UTC (12 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 58827 byte(s)
Diff to previous 5670
New simplification of TBranchElement::SetAddress and a bug fix

Revision 5670 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 26 17:35:18 2002 UTC (12 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 59439 byte(s)
Diff to previous 5661
In Unroll function, remove the limitation that a TClonesArray cannot be split
when the pointer is in a base class. However, there are still changes
required in the browse functions to get this feature operational.

one change from Dave Morrison to escape the slash character.

Revision 5661 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 25 20:15:55 2002 UTC (12 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 59364 byte(s)
Diff to previous 5644
One more fix in case of nested inheritance with the same class used
in the base class and by composition.

Revision 5644 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Nov 24 14:02:00 2002 UTC (12 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 59196 byte(s)
Diff to previous 5576
Simplify TBranchElement::SetAddress by using the new function
 TClass::GetDataMemberOffset
This new function works for normal classes and fake classes for any
combination of inheritance and composition.

Revision 5576 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 13 17:32:06 2002 UTC (12 years, 2 months ago) by rdm
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 60403 byte(s)
Diff to previous 5436
add special icons for TBranchElements that are folders as opposed to leaves.
This is done by overriding TObject::GetIconName() which returns a different
name for a branch folder than for a branch leave. In the mime types file
this icon name is specified with the corresponding icons.

Revision 5436 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 18 16:32:39 2002 UTC (12 years, 3 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 60107 byte(s)
Diff to previous 5417
Protection introduced in TBranchElement::SetAddress in case of fake classes.

Revision 5417 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 11 06:54:35 2002 UTC (12 years, 3 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 59891 byte(s)
Diff to previous 5380
Fix a problem in TBranchElement::SetAddress in case of an object
with a level of inheritance greater than 3 and when data members are simple types
following classes at the same level (thanks Susan Kasahara for reporting
an example).
The new function has been simplified, taking advantage of the work already
done by TClass::BuildRealData.

Revision 5380 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 2 22:13:03 2002 UTC (12 years, 3 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 60465 byte(s)
Diff to previous 4997
Modify the logic in TTree::SetBranchAddress to support 4 or more levels
of direct inheritance.

Revision 4997 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 19 22:52:49 2002 UTC (12 years, 6 months ago) by rdm
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 60402 byte(s)
Diff to previous 4881
TBranchElement: when in MakeClass mode correctly read empty variable
length array stored inside a TClonesArray.

TTreeFormula: properly deal with empty variable length arrays stored
inside a TClonesArray when in split mode (it still does not work when
NOT split).

-- Philippe

Revision 4881 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 11 19:46:18 2002 UTC (12 years, 6 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 60480 byte(s)
Diff to previous 4395
From Philippe:
This small patch add protections against null pointer in the marginal case where a use would give a&#8216; fake
class&#8217; as a parameter to a TClonesArray or Branch.

Revision 4395 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 22 19:02:33 2002 UTC (12 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 60201 byte(s)
Diff to previous 4367
From Philippe,
This patches updates TTree::Draw and the TBrowser to be able to handle
hiearchy of branches.

Revision 4367 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Apr 14 14:38:39 2002 UTC (12 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 59267 byte(s)
Diff to previous 4356
Add the 3 following Branch functions in TBranchElement.
    virtual Int_t    Branch(const char *folder, Int_t bufsize=32000, Int_t splitlevel=99);
    virtual TBranch *Branch(const char *name, void *address, const char *leaflist, Int_t bufsize=32000);
    virtual TBranch *Branch(const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=99);

With these new functions a true branch hierarchy can be created.

Revision 4356 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 12 19:19:53 2002 UTC (12 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 50649 byte(s)
Diff to previous 4317
From Philippe:
The files produced by MakeClass/MakeSelector were incorrect if the tree
is containing a TClonesArray which contains a variable length array.  This
fix correct the situation.

Also is included is a short documentation of the TTreeFormula special functions.

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/TBranchElement.cxx
File length: 47697 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/TBranchElement.cxx
File length: 47599 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/TBranchElement.cxx
File length: 47601 byte(s)
Diff to previous 4206
Do not execute SetAddress if the branch is disabled. This may create memory leaks
when the branch address is set from TChain::LoadTree.

Revision 4206 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 20 10:45:25 2002 UTC (12 years, 10 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 47556 byte(s)
Diff to previous 4086
Protections added in case of classes derived from TBranchElement.

Revision 4086 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Feb 25 08:53:03 2002 UTC (12 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 47528 byte(s)
Diff to previous 3876
Modify TBranchElement::UnRoll to not split a TClonesArray when the parent
branch is already split.

Revision 3876 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Feb 5 17:04:23 2002 UTC (12 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 47466 byte(s)
Diff to previous 3737
From Philippe:
This fix ensures that when receiving a 'name' with a duplicated
branch name in it, TTree::Draw wont crash.
Also fix TBrowser to properly draw the correct leaf even if the
branch name was copied inside the leaf names.

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/TBranchElement.cxx
File length: 47193 byte(s)
Diff to previous 3693
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 3693 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 18 09:50:59 2002 UTC (13 years ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 47179 byte(s)
Diff to previous 3687
Protect the constructor against too small buffer sizes.
The buffer size is set internally to the minimum of
 buffersize and 1000+buffersize

Revision 3687 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 16 18:12:25 2002 UTC (13 years ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 47147 byte(s)
Diff to previous 3656
Modify the TBranchElement constructor in case of a TClonesArray.
The TClonesArray branch counter does not need an fEntryOffset in its basket.
The new function Tbasket::deleteEntryOffset is called in this case.
This makes the buffer for the TClonesArray counter much shorter.
It was a non negligible overhead in case of very small objects
in the array.

Revision 3656 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jan 13 07:43:03 2002 UTC (13 years ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 47033 byte(s)
Diff to previous 3560
Fix by Philippe in TBranchElement::Browse
The problem was that there was 2 main branches starting with the
name fTracks.  The solution was to force TBranchElement::Browse
to use its own fully qualified name.

Revision 3560 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 2 21:46:53 2002 UTC (13 years ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 46633 byte(s)
Diff to previous 3491
add new function:
    void    *GetValuePointer() const;
This function redefines TLeaf::GetValuePointer. It is used
to return a pointer to a string element.

Revision 3491 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 18 14:01:47 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 45085 byte(s)
Diff to previous 3479
Fix a bug in the TBranchElement constructor in case of a TClonesArray.
The class version for TClonesArray was erroneously set to 1 instead of the current
version of the class TClonesArray.
As a result, when reading a Tree with branches having TClonesArray, the StreamerInfo
for TClonesArray itself was rebuilt each time the branch was rebuilt.
When reading more than 2500 Trees from the same file (or TChain),
the index of classes was overwritten and TFile::Close was crashing when
writing the class index to the file.

Revision 3479 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 14 20:29:16 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 44948 byte(s)
Diff to previous 3465
Fix from Philippe. fNdata was not always initialized in TBranchElement.
The consequence was that the code generated by TTree::MakeClass could be wrong
when declaring leaves dimensions.

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/TBranchElement.cxx
File length: 44911 byte(s)
Diff to previous 3373
Add more comments in the functions GetEntry, in particular in TTree::GetEntry.

Revision 3373 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Dec 3 13:32:53 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 44863 byte(s)
Diff to previous 3337
Implement support for TClonesArray in split mode when the TClonesArray
is inside a derived class from the class specified to the TBranchElement
constructor.

Revision 3337 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 30 14:15:14 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 44315 byte(s)
Diff to previous 3279
Fix a problem in TBranchElement::SetAddress in case of split mode for a
class hierarchy where embedded classes have data members with the same name.

Revision 3279 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 22 15:08:37 2001 UTC (13 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 44223 byte(s)
Diff to previous 3250
Modify the constructor to process the new data type "char*" (type=kCharStar=7)
introduced in TStreamerInfo.

Revision 3250 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 19 21:09:39 2001 UTC (13 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 44173 byte(s)
Diff to previous 3148
In TBranchElement::SetAddress, force a call to BuildRealData and GetStreamerInfo
for the class in the TClonesArray, just in case this class derives from an abstract class.

Revision 3148 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Nov 1 11:46:51 2001 UTC (13 years, 2 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 44095 byte(s)
Diff to previous 3036
In the TBranchElement constructor, always compute fEntryOffsetLen when
fStreamerType <= 0. In some cases, top level branches did not have
fEntryOffsetlen computed. As a result, the pointer to an entry could be wrong.

Revision 3036 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 15 16:04:20 2001 UTC (13 years, 3 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 44095 byte(s)
Diff to previous 3031
In TBranchElement::UnRoll add support for members that cannot be split.
Members that cannot be split are the ones marked with the comment "||"
as the first characters in the data member comment field or special classes
such as TRef and the TArray classes.

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/TBranchElement.cxx
File length: 44073 byte(s)
Diff to previous 3030
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 3030 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Oct 14 15:48:57 2001 UTC (13 years, 3 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 43969 byte(s)
Diff to previous 3004
In FillLeaves and ReadLeaves, do not call MapObject for fType >2.
In Reset, initialize fInfo.

Revision 3004 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 9 07:52:45 2001 UTC (13 years, 3 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 43843 byte(s)
Diff to previous 2952
In TBranchElement::UnRoll, support case of a class in a TClonesArray
deriving from an abstract class.

Revision 2952 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 2 16:56:31 2001 UTC (13 years, 3 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 43792 byte(s)
Diff to previous 2842
Add the new type 15 in the list of types

Revision 2842 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 25 07:58:15 2001 UTC (13 years, 4 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 43719 byte(s)
Diff to previous 2741
In TBranchElement::GetInfo, use fClassVersion to retrieve the correct StreamerInfo
corresponding to the class version with which the branch was created.
This fix is required in particular in case of the top level branch of a Tree.

Revision 2741 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 24 16:45:42 2001 UTC (13 years, 5 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 43706 byte(s)
Diff to previous 2740
Forgot to delete a printf statement.

Revision 2740 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 24 16:43:01 2001 UTC (13 years, 5 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 43758 byte(s)
Diff to previous 2684
Fix a bug in TBranchElement constructor. When a branch is in split=1 and
the fStreamerType=0 (case of a base class), the array fEntryOffset must be created
because the base class may have variable length structures.
The consequence of this bug was events corrupted in the buffer.

Thanks to Christian Holm Christensen for reporting a real life example.

Revision 2684 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Aug 15 11:09:13 2001 UTC (13 years, 5 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 43684 byte(s)
Diff to previous 2683
Forgot to edit a printf statement.

Revision 2683 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Aug 15 11:06:55 2001 UTC (13 years, 5 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 43712 byte(s)
Diff to previous 2658
Several changes in SetAddress in case one runs with code generated by TTree::MakeClass.
Set bit kDeleteObject when fClassInfo=0 and a new object is created.

Revision 2658 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 10 10:07:19 2001 UTC (13 years, 5 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 42902 byte(s)
Diff to previous 2656
When the StreamerInfo is forced in non-optimzed mode during the creation of a branch,
one must restore the previous optimization status once the branch is created.
Instead of restoring with the flag kTRUE, the previous optimization status is restored.

Revision 2656 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 9 10:13:40 2001 UTC (13 years, 5 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 42805 byte(s)
Diff to previous 2625
Modify TBranchElement::SetAddress to take into account cases such as:
  class test : public TLorentzVector
whent splitlevel > 2

Revision 2625 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 2 15:28:23 2001 UTC (13 years, 5 months ago) by rdm
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 42918 byte(s)
Diff to previous 2596
change by Philippe to handle embedded TClonesArray objects (pointers to
TClonesArrays were already supported).

Revision 2596 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 19 10:41:17 2001 UTC (13 years, 6 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 42570 byte(s)
Diff to previous 2587
In TBranchElement::GetEntry, one must always read the branch holding the TClonesArray counter.
In case one reads twice the same branch, the user may have cleared the TClonesArray
between the two calls.

Revision 2587 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 17 10:29:45 2001 UTC (13 years, 6 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 42001 byte(s)
Diff to previous 2520
Replace last unused argument of TBranchElement by the argument btype.
This argument is set when Unrolling a class and is used by the TBranchElement
constructor to build or not the array fEntryOffset.
This array does not need to be built in case one branch contains only basic types.
This may save a considerable space on disk for simple Tree configurations.

Revision 2520 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 4 10:40:53 2001 UTC (13 years, 6 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 41823 byte(s)
Diff to previous 2512
Modify SetAddress in case of a TClonesArray branch and the specified address is null.

Revision 2512 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 3 15:38:08 2001 UTC (13 years, 6 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 41383 byte(s)
Diff to previous 2511
Add support for case when more than one branch cannot be split at the same level of hierarchy.

Revision 2511 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 3 11:07:12 2001 UTC (13 years, 6 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 41203 byte(s)
Diff to previous 2501
Modify TBranchElement::Unroll to recover in case a branch cannot be split.
A new branch is created in non-split mode.
This situation may happen when a class inside a class derives from an abstract
base class (eg all TArray classes).

Revision 2501 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 2 08:16:17 2001 UTC (13 years, 6 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 41015 byte(s)
Diff to previous 2412
Several mods in TBranchElement::SetAddress to support complex cases with more than
3 levels of hierarchy.
In particular, classes containing other classes like TLorentzVector are now
supported, including for classes in TClonesArray.

Revision 2412 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 14 21:52:58 2001 UTC (13 years, 7 months ago) by rdm
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 39683 byte(s)
Diff to previous 2331
small correction in error message.

Revision 2331 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 31 08:56:32 2001 UTC (13 years, 7 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 39920 byte(s)
Diff to previous 2299
Several mods by Philippe to support variable length arrays in TClonesArray
in the query processor.

Revision 2299 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 28 06:27:48 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 39752 byte(s)
Diff to previous 2289
Protection added in the constructor in some cases when the function is built
from Folders with empty levels.

Revision 2289 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 25 09:45:27 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 39734 byte(s)
Diff to previous 2277
In function GetEntry force a call to TStreamerInfo::BuildOld if the branch
address is null and the StreamerInfo had been alraedy compiled.

Revision 2277 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 24 16:37:43 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 39675 byte(s)
Diff to previous 2270
Several mods to take into account the additional argument in the
TStreamerInfo functions WriteBufferClones, ReadBufferClones, etc.

Add support in TBranchElement::SetAddress for classes in TClonesArray
with multiple levels of composition.

Revision 2270 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 23 16:12:51 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 38728 byte(s)
Diff to previous 2259
Reorganize the logic around the processing of TClonesArray supporting additional
cases.
Set the bit kBranchObject in case a data member is a kTObject, kObject or kAny.
New function BuildTitle.
TBranchElement has still several restrictions regarding the type of classes
in a TClonesArray. Hope to improve this part before the release in June.

Revision 2259 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 21 14:03:19 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 38170 byte(s)
Diff to previous 2252
In TBranchElement::Unroll force a call to TTree::BuildStreamerInfo
instead of calling simply TClass::GetStreamerInfo.
BuildStreamerInfo takes into account classes with multiple level of
inheritance in case of a TClonesArray.

Revision 2252 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 21 11:10:59 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 38162 byte(s)
Diff to previous 2245
Add support for top level branches to use the Streamer function.
By default the new branch style does not use the Streamer function.
In case the user has a custom Streamer, he can force a call to Streamer
by specifying splitlevel=-1 in TTree::Branch or call directly TTree::BranchOld.

Revision 2245 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun May 20 13:56:07 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 38175 byte(s)
Diff to previous 2229
Disable optimization of TStreamerInfo only when necessary.

Revision 2229 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 17 10:58:03 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 38466 byte(s)
Diff to previous 2216
Pointer fBranchCount2 was not initialized in the constructor with a TClonesArray.

Revision 2216 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 16 07:41:10 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 38444 byte(s)
Diff to previous 2213
In GetValue remove an unreachable statement

Revision 2213 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 16 06:44:53 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 38493 byte(s)
Diff to previous 2210
Fix by Philippe in the TBranchElement constructor to set the branch/leaf title
to follow the convention expected by TTreeFormula in case of arrays.

Revision 2210 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 15 17:09:02 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 38504 byte(s)
Diff to previous 2205
Fix a cast problem with strstr (Solaris only).

Revision 2205 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 15 07:53:17 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 38497 byte(s)
Diff to previous 2181
In case of multi-dimensional arrays in the class of a TClonesArray,
set the title for the branch and the leaf to be of the form
   fCovar[fTracks_][3][4]

Revision 2181 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 11 20:42:50 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 38331 byte(s)
Diff to previous 2176
Modify TBranchElement::Fill to increment fEntries in case of a top
level branch that is not a TClonesArray..

Revision 2176 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 11 17:06:59 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 38293 byte(s)
Diff to previous 2101
Add a new member fBranchCount2.
This new member points to the secondary branchcount
in case a TClonesArray element has itself a branchcount.
Example in Event class with TClonesArray fTracks of Track objects.
if the Track object has two members
   Int_t    fNpoint;
   Float_t *fPoints;  //[fNpoint]
In this case the TBranchElement fTracks.fPoints has
 -its primary branchcount pointing to the branch fTracks
 -its secondary branchcount pointing to fTracks.fNpoint
In TBranchElement::GetValue, the branches holding the primary and secondary
branchcount must be read before reading the branch itself.
TTreeFormula must still be adapted (Philippe) to take into account this case.

Revision 2101 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 30 15:08:51 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 36893 byte(s)
Diff to previous 2095
TBranchElement now inline function.
Bypass one call to TBranch::GetEntry by cally simply TBranchElement::GetNdata
in TTreeFormula::GetNdata.

Revision 2095 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Apr 28 11:43:49 2001 UTC (13 years, 8 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 37390 byte(s)
Diff to previous 2077
Simply TBranchElement::GetNdata. New version returns only fNdata since fNdata
is computed by a previous call to GetEntry.

Revision 2077 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 25 15:46:44 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 37310 byte(s)
Diff to previous 2075
Move TBranchElement::GetNdata from inline to the implementation file.
In case of a branchcount GetNdata calls the branchcount GetNdata.

Revision 2075 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 25 14:05:52 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 36893 byte(s)
Diff to previous 2073
Some changes in ReadLeaves and GetValue in case of fStreamerType=6 (array
of basic types with an index [n])

Revision 2073 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 24 15:05:30 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 36720 byte(s)
Diff to previous 2068
Remove a forgotten printf

Revision 2068 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 24 14:30:21 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 36768 byte(s)
Diff to previous 2055
Set name and title for branches and leaves to follow the old branch/leaf naming convention.
Add protections in the Fill function in case one attempts to Fill a branch
and no branch address is set.

Revision 2055 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 23 14:03:04 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 36433 byte(s)
Diff to previous 2037
Many changes to support the special case of code generated by TTree::MakeClass.
In particular, the functions GetValue, PrintValue and ReadLeaves support two cases:
 -case MakeClass. Care must be taken to access the data and store the data
                 in the way expected by the code of MakeClass. This was quite tricky
                 to implement for TClonesArray and pointers to basic types of
                 variable length.
 - normal case

The function SetAddress has been modified to take into account the addressing
mechanism of MakeClass.

New function TBranchElement::GetTypename returning the type name of the element
in the branch.

Normalize branch names and titles, leaf names and titles to be coherent
with the other type of branches.

Revision 2037 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Apr 21 12:08:06 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 30945 byte(s)
Diff to previous 2035
The branch bit kBranchObject is set in the constructors when
the branch is a TObject*. When this bit is set, the functions FillLeaves
and ReadLeaves will enter this object into the buffer MapObject
in case this object is in turn pointed by its sub objects.

Revision 2035 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Apr 21 08:56:19 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 30729 byte(s)
Diff to previous 2030
Modify FillLeaves and ReadLeaves for cases witg fID < 0.
For the top branches call TBuffer::MapObject with the pointer to the top level
object in the branch in case subobjects point to this top level object.
Note that in this case, the branch can be split.

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/TBranchElement.cxx
File length: 30631 byte(s)
Diff to previous 2019
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 2019 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 20 09:15:13 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 30428 byte(s)
Diff to previous 2013
Mods in SetAddress to avoid recomputing addresses if not necessary.
Add a special case for a missing class having a TClonesArray.
SetAddress is now able to automatically instatiate the TClonesArray
even when "->" is not specified in the comment field.

Revision 2013 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 19 16:46:45 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 30373 byte(s)
Diff to previous 2007
In TBranchElement::ReadLeaves, fNdata must be set to 1 for fTypes<= 2.

Revision 2007 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 19 08:39:56 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 30362 byte(s)
Diff to previous 1999
Cleanup TBranchElement::Printvalue

Revision 1999 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 18 10:23:45 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 30412 byte(s)
Diff to previous 1996
Cleanup several functions removing debug printout

Revision 1996 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 18 06:29:15 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 30728 byte(s)
Diff to previous 1988
Add a new member fClonesName containing the name of the class when a branch
has a TClonesArray.
The member fObject points directly to the object in the branch.

Revision 1988 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 16 19:16:21 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 30444 byte(s)
Diff to previous 1980
Add a new data member fObject to TBranchElement.
The convention is to store:
 - the address of the pointer in fAddress when fID < 0
 - the pointer to the object in fObject for all cases.
This solves the problem of objects created and deleted during the Fill loop.

Revision 1980 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 12 19:17:28 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 30172 byte(s)
Diff to previous 1977
Mods by Philippe to process TClonesArray elements from TTree::Draw

Revision 1977 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 12 15:06:19 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 30061 byte(s)
Diff to previous 1974
Use the conevention already used to set the TLeaf title in the old TBranch classes.
Instead of a leaf title like: fVertex[3][fTracks_] use fVertex[fTracks_]

Revision 1974 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 12 13:27:40 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 29531 byte(s)
Diff to previous 1951
Set pointer fBranchCount in the constructor operating on TClonesArray.

Revision 1951 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 10 16:36:36 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 29505 byte(s)
Diff to previous 1918
Comment a printf statement.

Revision 1918 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 9 08:10:18 2001 UTC (13 years, 9 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 29503 byte(s)
Diff to previous 1794
Many changes to make this class operational in Trees, in particular with TTree::Draw.

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/TBranchElement.cxx
File length: 19466 byte(s)
Diff to previous 1556
Add comments to GetEntry to describe the return value when reading the same entry.

Revision 1556 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 8 11:51:10 2001 UTC (13 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 19243 byte(s)
Diff to previous 1537
Add test to detect if a branch can be split or not.

Revision 1537 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 7 08:31:36 2001 UTC (13 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 19106 byte(s)
Diff to previous 1530
Fix a problem with a cast (Solaris CC5 complaining)

Revision 1530 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Feb 6 11:02:00 2001 UTC (13 years, 11 months ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 19100 byte(s)
Diff to previous 1464
 Split mode now operational for a TBranchElement.
Still a lot of work to be done before releasing the new facility.
In particular, one must be able to click on a leaf with the browser
or use the TreeViewer without the original class.

Revision 1464 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 25 15:02:29 2001 UTC (14 years ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 14906 byte(s)
Diff to previous 1417
Add new function TBranchElement::Unroll

Revision 1417 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 18 09:45:31 2001 UTC (14 years ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 12818 byte(s)
Diff to previous 1403
Modify logic to compute branch addresses to support multi-level split modes.

Revision 1403 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 17 08:28:19 2001 UTC (14 years ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 11245 byte(s)
Diff to previous 1398
Protections when the number of classes require an expansion of gROOT->GetListOfStreamerInfo()

Revision 1398 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 16 17:22:27 2001 UTC (14 years ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 11273 byte(s)
Diff to previous 1394
Remove unused variable in SetAddress

Revision 1394 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 16 16:24:39 2001 UTC (14 years ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 11332 byte(s)
Diff to previous 1375
These new classes implementing the new Tree split mode are now operational
for Write and Read. Base class not yet splitted.

Revision 1375 - (view) (download) (as text) (annotate) - [select for diffs]
Added Mon Jan 15 07:25:59 2001 UTC (14 years ago) by brun
Original Path: trunk/tree/src/TBranchElement.cxx
File length: 10731 byte(s)
Add two new classes TBranchElement and TLeafElement to support the new
Tree split mode based on TStreamerInfo.

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