Log of /trunk/core/cont/inc/TClonesArray.h
Parent Directory
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: 4068 byte(s)
Diff to
previous 38515
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
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: 3951 byte(s)
Diff to
previous 33807
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: 3890 byte(s)
Diff to
previous 30124
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
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: 3694 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: 3558 byte(s)
Diff to
previous 20882
move the directories:
base clib cont meta metautils newdelete pcre rint thread unix utils
winnt zip
under the new core meta directory.
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/cont/inc/TClonesArray.h
File length: 3664 byte(s)
Diff to
previous 15134
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
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/cont/inc/TClonesArray.h
File length: 3779 byte(s)
Diff to
previous 15011
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
14063 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Feb 19 21:02:35 2006 UTC (8 years, 11 months ago) by
pcanal
Original Path:
trunk/cont/inc/TClonesArray.h
File length: 3516 byte(s)
Diff to
previous 10521
SetOwner is now a virtual function so that it can be customized.
A TClonesArray is always the owner of its content but it's base
class (TObjArray) is never the direct owner. Hence we need to
disable SetOwner for TClonesArray.
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/inc/TClonesArray.h
File length: 3284 byte(s)
Diff to
previous 1433
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/inc/TClonesArray.h
File length: 3071 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.