Log of /trunk/core/cont/src/TClonesArray.cxx
Parent Directory
Revision
49271 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Apr 18 18:11:00 2013 UTC (21 months ago) by
pcanal
File length: 40219 byte(s)
Diff to
previous 49093
Import revision 49270 from the v5-34-00 patch branch:
In TClonesArray::Delete use TClass::Destruct if the contained class is emulated
Revision
47726 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Nov 30 13:47:50 2012 UTC (2 years, 1 month ago) by
axel
File length: 39745 byte(s)
Diff to
previous 45192
TClonesArray needs to reset kNotDeleted in fBits of object it contains.
Simplify that dramatically by making TClonesArray a friend of TObject.
Of course that's not nice - but still much better than penalizing TClonesArray at runtime, and this is a valid statement as TClonesArray actually does mess with TObject's internals, and rightfully so.
This fixes the two thread safety issues with TClonesArray (as long as TClassGetClass(containeeClass) was called) in one go.
Revision
42332 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Nov 30 18:45:32 2011 UTC (3 years, 1 month ago) by
axel
File length: 39916 byte(s)
Diff to
previous 40830
Fix off-by-one error in zeroing out slots between n and previous fLast; only fill up to fLast not fSize (what for? we know only slots up to fLast were filled).
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: 39911 byte(s)
Diff to
previous 40606
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
40606 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Aug 16 12:28:12 2011 UTC (3 years, 5 months ago) by
rdm
File length: 39826 byte(s)
Diff to
previous 40583
From Matthew Strait:
The attached patch repairs some spelling and grammar problems in
TClonesArray.cxx. It also rejustifies the text at the top for easier
reading. Some sentences are reworded a bit, but no change in meaning
is intended.
Revision
40562 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Aug 11 16:05:17 2011 UTC (3 years, 5 months ago) by
pcanal
File length: 39552 byte(s)
Diff to
previous 40402
From ideas provided by Mike Marino, introduce TClonesArray::ConstructedAt which
always returns an already constructed object. If the slot is being used for the
first time, it calls the default constructor otherwise it returns the object as
is (unless a string is passed as the 2nd argument to the function in which case,
it also calls Clear(second_argument) on the object).
This allows replace code like:
for (int i = 0; i < ev->Ntracks; i++) {
new(a[i]) TTrack(x,y,z,...);
...
...
}
...
a.Delete(); // or a.Clear("C")
with the simpler and more efficient:
for (int i = 0; i < ev->Ntracks; i++) {
TTrack *track = (TTrack*)a.ConstructedAt(i);
track->Set(x,y,z,....);
...
...
}
...
a.Clear();
even in case where the TTrack class allocates memory.
Revision
40402 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jul 29 22:29:08 2011 UTC (3 years, 5 months ago) by
pcanal
File length: 35603 byte(s)
Diff to
previous 38667
Issue an error and make the TClonesArray if the class associated with the TClonesArray does not have the TObject class as its left most base class (i.e. the correct TObject* value is the same as the start of the memory allocated for the object) which has always been an implicit required
Revision
38515 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 18 16:57:21 2011 UTC (3 years, 10 months ago) by
rdm
File length: 35406 byte(s)
Diff to
previous 37360
From Tobias and Mohammad:
added a new AbsorbObjects() which absorbs a range from one clones array
to another and re-indexes the old one.
Revision
33807 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jun 10 07:23:32 2010 UTC (4 years, 7 months ago) by
brun
File length: 30936 byte(s)
Diff to
previous 33350
From Jason Detwiler:
I put together several functions useful for me in the context of event building.
I have an event structure containing several TClonesArrays, and during event
building I have the need to merge events and sort their data. So I developed the
following two functions to deal with the events' TClonesArrays during those
procedures:
void TClonesArray::AbsorbObjects(TClonesArray* tc)
//Directly move the object pointers from tc to "this" without cloning (copying).
// "this" takes over ownership of all of tc's object pointers. tc is left empty
//upon return. I preferred this to copying / cloning from one TClonesArray to
//the other in order to save the copying time.
void TClonesArray::MultiSort(Int_t nTCs, TClonesArray** tcs, Int_t upto = kMaxInt)
// Sort multiple TClonesArrays simultaneously with "this".
These new functions make use of a new function in TSeqCollection:
void TClonesArray::QSort(TObject *a, Int_t nBs, TObject **b, Int_t first, Int_t last)
//Utility function for MultiSort
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: 28090 byte(s)
Diff to
previous 30137
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
27600 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Feb 25 08:17:22 2009 UTC (5 years, 10 months ago) by
brun
File length: 27390 byte(s)
Diff to
previous 26962
From Matthew Strait:
* Fix spelling and grammar errors
* Fold long lines so they don't spill off the right side
* Add spaces for readability
* Standardize notation and style within sections.
Revision
26962 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Dec 16 16:07:39 2008 UTC (6 years, 1 month ago) by
rdm
File length: 27387 byte(s)
Diff to
previous 25079
Fix two issues:
- make sure the status of the TBuffer::kCannotHandleMemberWiseStreaming bit
is part of the buffer, so that when reading the object the right
mode is used, independent of the writing method (e.g. written via
TMessage, received and stored to a file and then later read via
TBufferFile)
- make classv[256] in Streamer() dynamic (who does still have class
names < 256 ;-) ).
Revision
23348 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Apr 21 09:22:15 2008 UTC (6 years, 9 months ago) by
brun
File length: 27337 byte(s)
Diff to
previous 22961
Add new member functions
void SetClass(const char *classname,Int_t size=1000);
void SetClass(const TClass *cl,Int_t size=1000);
Set class is now called from the two TClonesArray constructors.
The new functions are useful when a TClonesArray is a member of another class and the decision
about the class to be put in the array can only be taken
after the construction of the parent class.
Revision
22961 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Apr 3 13:32:57 2008 UTC (6 years, 9 months ago) by
rdm
File length: 26733 byte(s)
Diff to
previous 21231
move the directories:
base clib cont meta metautils newdelete pcre rint thread unix utils
winnt zip
under the new core meta directory.
Revision
17561 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jan 29 15:10:49 2007 UTC (7 years, 11 months ago) by
brun
Original Path:
trunk/cont/src/TClonesArray.cxx
File length: 26795 byte(s)
Diff to
previous 17550
-Add include "TROOT.h" in all implementation files that were assuming
that TROOT was included via TClass.h
-In TClass.h:
--Remove the include of TROOT.h
--add the following static member
static IdMap_t *fgIdMap; //Map from typeid to TClass pointer
--add the following functions:
static void AddClass(TClass *cl);
static void RemoveClass(TClass *cl);
--Replace the inline definitions of GetClass functions by
template <typename T> TClass* GetClass( T** /* dummy */) { return GetClass((T*)0); }
template <typename T> TClass* GetClass(const T** /* dummy */) { return GetClass((T*)0); }
-In TClass.cxx:
--Instead of forwarding the calls to gROOT->GetClass, move the code
originally in TROOT in the TClass::GetClass functions
--Move class TMapTypeToTClass from TROOT to TClass.
Revision
17412 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Jan 20 19:29:35 2007 UTC (8 years ago) by
brun
Original Path:
trunk/cont/src/TClonesArray.cxx
File length: 26749 byte(s)
Diff to
previous 17315
-Remove Varargs.h from TString.h and TObject.h and add this include
in the few files that need it.
-Move the following enums from TBuffer.h to TBufferFile.h
enum { kMapSize = 503 };
enum { kStreamedMemberWise = BIT(14) }; //added to version number to know if a collection has been stored member-wise
enum { kNotDecompressed = BIT(15) }; //indicates a weird buffer, used by TBasket
enum { kCannotHandleMemberWiseStreaming = BIT(17), //if set TClonesArray should not use memeber wise streaming
kTextBasedStreaming = BIT(18) }; // indicates if buffer used for XML/SQL object streaming
Revision
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/cont/src/TClonesArray.cxx
File length: 25300 byte(s)
Diff to
previous 14063
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
11311 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 11 21:48:39 2005 UTC (9 years, 10 months ago) by
brun
Original Path:
trunk/cont/src/TClonesArray.cxx
File length: 23866 byte(s)
Diff to
previous 10541
From Philippe:
This patch update TClonesArray::Streamer so that it properly clear the
(potential) unused part of fCont. Without this fix, the value of
TClonesArray::GetEntries returns by a series of TClonesArray object stored
non-split in a TTree, will be equal to the max size of the TClonesArray so
far (instead of the current size)!.
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/cont/src/TClonesArray.cxx
File length: 23757 byte(s)
Diff to
previous 10178
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
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/cont/src/TClonesArray.cxx
File length: 23358 byte(s)
Diff to
previous 6723
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
6461 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Apr 17 08:38:04 2003 UTC (11 years, 9 months ago) by
brun
Original Path:
trunk/cont/src/TClonesArray.cxx
File length: 23343 byte(s)
Diff to
previous 6419
Add the following comment in the TClonesArray constructors:
// The second argument s indicates an approximate number of objects
// that will be entered in the array. If more than s objects are entered,
// the array will be automatically expanded.
Revision
5159 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Aug 20 15:13:31 2002 UTC (12 years, 5 months ago) by
brun
Original Path:
trunk/cont/src/TClonesArray.cxx
File length: 22333 byte(s)
Diff to
previous 5109
Add a new option in TClonesArray::Clear.
// Clear the clones array. Only use this routine when your objects don't
// allocate memory since it will not call the object dtors.
// However, if the class in the TClonesArray implements the function Clear(Option_t *option)
// and if option = 'C' the function Clear is called for all active objects
// in the array. In the function Clear, one can delete objects or dynamic
// arrays allocated in the class constructor. This procedure is much faster
// than calling TClonesArray::Delete.
Revision
5109 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Aug 10 11:56:17 2002 UTC (12 years, 5 months ago) by
rdm
Original Path:
trunk/cont/src/TClonesArray.cxx
File length: 21788 byte(s)
Diff to
previous 5082
instead of ::operator new() call TStorage::ObjectAlloc() since it will
add the space to the heap counter used for IsOnHeap(). Now all objects
allocated via the clonesarray will have correctly the kIsOnHeap bit set.
Correct some comments in TObjArray.
Revision
3343 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Dec 1 09:13:47 2001 UTC (13 years, 1 month ago) by
brun
Original Path:
trunk/cont/src/TClonesArray.cxx
File length: 19941 byte(s)
Diff to
previous 3182
Important change in TClonesArray::Streamer.
Make sure TStreamerInfo is not optimized, otherwise it will not be
possible to support schema evolution in read mode.
In case the StreamerInfo has already been computed and optimized,
one must disable the option BypassStreamer.
Files containing TClonesArray written with split=0 could not be read
in case the class in the TClonesArray had been changed.
Revision
3080 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Oct 22 08:46:49 2001 UTC (13 years, 3 months ago) by
brun
Original Path:
trunk/cont/src/TClonesArray.cxx
File length: 19468 byte(s)
Diff to
previous 3061
IN TClonesArray::Streamer, save the class version of the class in the array.
To be backward compatible, the following format is used: classname;classversion.
At read time, the class version is set to 0 if the string does not contain a semicolon.
Revision
2657 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 10 10:03:12 2001 UTC (13 years, 5 months ago) by
brun
Original Path:
trunk/cont/src/TClonesArray.cxx
File length: 19119 byte(s)
Diff to
previous 2274
Add more documentation to TClonesArray::BypassStreamer.
// When the kBypassStreamer bit is set, the automatically
// generated Streamer can call directly TClass::WriteBuffer.
// Bypassing the Streamer improves the performance when writing/reading
// the objects in the TClonesArray. However there is a drawback:
// When a TClonesArray is written with split=0 bypassing the Streamer,
// the StreamerInfo of the class in the array being optimized,
// one cannot use later the TClonesArray with split>0. For example,
// there is a problem with the following scenario:
// 1- a class Foo has a TClonesArray of Bar objects
// 2- the Foo object is written with split=0 to Tree T1.
// In this case the StreamerInfo for the class Bar is created
// in optimized mode in such a way that data members of the same type
// are written as an array improving the I/O performance.
// 3- in a new program, T1 is read and a new Tree T2 is created
// with the object Foo in split>1
// 4- When the T2 branch is created, the StreamerInfo for the class Bar
// is created with no optimization (mandatory for the split mode).
// The optimized Bar StreamerInfo is going to be used to read
// the TClonesArray in T1. The result will be Bar objects with
// data member values not in the right sequence.
// The solution to this problem is to call BypassStreamer(kFALSE)
// for the TClonesArray. In this case, the normal Bar::Streamer function
// will be called. The BAR::Streamer function works OK independently
// if the Bar StreamerInfo had been generated in optimized mode or not.
Revision
2267 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed May 23 09:52:11 2001 UTC (13 years, 8 months ago) by
brun
Original Path:
trunk/cont/src/TClonesArray.cxx
File length: 17628 byte(s)
Diff to
previous 2156
Modify TClonesArray::Streamer to accept the case when a fake class has been
replaced by a real class. In this case, the pointer fClass must be updated
to point to the real class. The previous code was returning an error
in case fClass was not equal to the class being read. The error message
has been removed.
Revision
1642 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Feb 21 07:36:36 2001 UTC (13 years, 11 months ago) by
brun
Original Path:
trunk/cont/src/TClonesArray.cxx
File length: 16715 byte(s)
Diff to
previous 1630
New functions TClonesArray::BypassStreamer and TClonesArray::CanBypassStreamer.
By default, the kBypassStreamer bit is set in the TClonesArray constructor.
When this bit is set, TClonesArray::Streamer does not call the class Streamer function,
but use a more efficient code.
Addition in function Streamer to call ForceWriteInfo for the class referenced by
the TClonesArray. This change was necessary to read empty TClonesArray.
Revision
612 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Sep 8 16:11:03 2000 UTC (14 years, 4 months ago) by
rdm
Original Path:
trunk/cont/src/TClonesArray.cxx
File length: 15171 byte(s)
Diff to
previous 3
introduced the concept of ownership for all collections. By calling
TCollection::SetOwner() a collection becomes the owner of its elements.
In those cases the dtor and Clear() method will delete the items and not
just free the container space. Also all collections now make their
TObject part persistent (so the TObject bits are saved). Version numbers
were properly increased.
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.