Log of /trunk/tree/tree/inc/TBranchElement.h
Parent Directory
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: 13410 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: 12726 byte(s)
Diff to
previous 39611
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
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: 12693 byte(s)
Diff to
previous 38757
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
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: 11411 byte(s)
Diff to
previous 36061
Significant improvement of the performance of SetBranchAddress/SetAddress (by a factor 3 to 10 depending on the length/complexity of the classname ).
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: 11273 byte(s)
Diff to
previous 34969
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
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: 10585 byte(s)
Diff to
previous 33097
Replace the ReadLeaves virtual function by a fReadLeaves pointer to member function,
this allows the customization of the ReadLeaves function at run-time depending on the
underlying user class layout in TBranchElement. This removes many if statements whose
'answer' is known at initialization time. [ReadLeavesMakeClass and ReadLeavesCollection
still need further decomposition]
Introduce TBranch::Set/GetMakeClass to independently set each branch in MakeClass mode
and to have a good place to switch the ReadLeaves function appropriately (to and from
the MakeClass mode (also known as the decomposed object mode)). This can also be
used to reset the mode of some branch with a MakeClass/MakeSelector file.
Revision
33097 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Apr 19 21:47:55 2010 UTC (4 years, 9 months ago) by
pcanal
File length: 9791 byte(s)
Diff to
previous 31170
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
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: 9749 byte(s)
Diff to
previous 25450
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
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: 9661 byte(s)
Diff to
previous 23230
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
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: 8974 byte(s)
Diff to
previous 22902
Introduce a way to create branch using directly
an object:
MyClass object;
TBranch *branch = tree->Branch(branchname, &object, bufsize, splitlevel)
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/inc/TBranchElement.h
File length: 7880 byte(s)
Diff to
previous 17201
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
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/inc/TBranchElement.h
File length: 7754 byte(s)
Diff to
previous 15813
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
15784 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jul 13 05:19:19 2006 UTC (8 years, 6 months ago) by
pcanal
Original Path:
trunk/tree/inc/TBranchElement.h
File length: 7851 byte(s)
Diff to
previous 15134
From Paul Russo:
o (fBranchPointer), (fBranchTypes)
Removed, no longer used.
o (BuildTitle), (SetBranchCount), (SetBranchCount2),
(Unroll), (ValidateAddress)
Convert to private member functions, they are
implementation-only functions and should not be
part of the public interface.
o (Branch) Removed, unused junk code.
o (CheckBranchID) Removed, no longer used.
o (ReleaseObject) Added, implementation-only function used
by SetAddress() and ResetAddress().
o (GetAddress) Added override so that we may catch the
case where the user changed the object pointer without
notifying us with SetAddress().
o (GetBranchOffset) Added so we can see full internals of
the result of SetAddress().
o (GetDataMemberOffset), (GetDataMemberOffsetEx)
Removed, implementation-only member functions which
are no longer used.
o (GetInfo) Made const.
o (GetObject) Made not inline so that we can make sure
that the user did not change the object pointer without
notifying us.
o (IsObjectOwner) Added so that we can tell if the branch
element owns the allocated object or not (if the element
does then the user should not delete the object).
o (Notify) Use SetAddress() to change fAddress to zero
so that any allocated object may be released.
o (ResetDeleteObject) Added so that cloned trees have a
way of making themselves not the owner of the object
allocated by SetAddress().
o (SetAutoDelete) Removed, we don't implement it anymore
since our implementation just called the TBranch
implementation so we can just inherit it without
overriding it.
o (SetClassName), (SetParentName) Removed, users should
not be allowed to change these data members, because
they have complicated semantics tied to other class
data members which would have to be changed to match
and we should not allow the user to put us into an
invalid state.
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/inc/TBranchElement.h
File length: 7492 byte(s)
Diff to
previous 15010
From Federico Carminati:
"I have implemented all copy and equal operators needed to silence all
warnings in AliRoot, as requested. I have implemented shallow copies as
would do the default operators synthetized by the compiler.
Most operators are protected. If users complain, you just have to move
them into the public area, but class derivation is of course supported.
It has been a terrible job, I have modified 278 files, but the changes
are backward compabile, and this goes a long way to permitting user to
use the effc++ flag with root headers."
Revision
14336 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Mar 20 21:43:44 2006 UTC (8 years, 10 months ago) by
pcanal
Original Path:
trunk/tree/inc/TBranchElement.h
File length: 7398 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/inc/TBranchElement.h
File length: 7414 byte(s)
Diff to
previous 13806
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
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/inc/TBranchElement.h
File length: 7535 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
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/inc/TBranchElement.h
File length: 6046 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
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/inc/TBranchElement.h
File length: 6148 byte(s)
Diff to
previous 10456
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
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/inc/TBranchElement.h
File length: 6145 byte(s)
Diff to
previous 10331
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
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/inc/TBranchElement.h
File length: 6078 byte(s)
Diff to
previous 9615
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
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/inc/TBranchElement.h
File length: 5936 byte(s)
Diff to
previous 8343
*****************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
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/inc/TBranchElement.h
File length: 5933 byte(s)
Diff to
previous 7880
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
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/inc/TBranchElement.h
File length: 5879 byte(s)
Diff to
previous 7802
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
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/inc/TBranchElement.h
File length: 5577 byte(s)
Diff to
previous 6824
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
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/inc/TBranchElement.h
File length: 5468 byte(s)
Diff to
previous 6749
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
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/inc/TBranchElement.h
File length: 5431 byte(s)
Diff to
previous 6394
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
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/inc/TBranchElement.h
File length: 5430 byte(s)
Diff to
previous 6244
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
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/inc/TBranchElement.h
File length: 5459 byte(s)
Diff to
previous 4836
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
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/inc/TBranchElement.h
File length: 5341 byte(s)
Diff to
previous 3560
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
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/inc/TBranchElement.h
File length: 4868 byte(s)
Diff to
previous 2331
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
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/inc/TBranchElement.h
File length: 4792 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/inc/TBranchElement.h
File length: 4792 byte(s)
Diff to
previous 2176
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
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/inc/TBranchElement.h
File length: 4741 byte(s)
Diff to
previous 2134
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
2134 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon May 7 12:37:38 2001 UTC (13 years, 8 months ago) by
brun
Original Path:
trunk/tree/inc/TBranchElement.h
File length: 4501 byte(s)
Diff to
previous 2101
Add new functions
TBranchElement::IsBranchFolder
and
TBranchElement::setBranchFolder
When a branch is created from an existing TFolder structure, the bit is set
to distinguish this type of branch such that the folder structure can be rebuilt.
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/inc/TBranchElement.h
File length: 4150 byte(s)
Diff to
previous 1996
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
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/inc/TBranchElement.h
File length: 4017 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
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/inc/TBranchElement.h
File length: 3038 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.
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.