Log of /trunk/core/cont/src/TRefArray.cxx
Parent Directory
Revision
49050 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:57:43 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49049
Import revision 49009 from the v5-34-00 patch branch:
Implement the implicit rule for matching pair (based on being able to convert their content
Revision
49049 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:57:22 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49048
Import revision 49008 from the v5-34-00 patch branch:
std::pair also have implicit rules, so always craete a SchemaRuleSet
Revision
49046 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:56:15 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49045
Import revision 49005 from the v5-34-00 patch branch:
When switching STL collection proxy we also need to update fSTLtype
Revision
49045 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:55:53 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49044
Import revision 49004 from the v5-34-00 patch branch:
Fix conversion to from any type of numerical collection to associative type of numerical collection
Revision
49044 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:55:32 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49043
Import revision 49003 from the v5-34-00 patch branch:
Allow the implicit conversion from any type of numerical STL collection to any other type of numerical STL collection (e.g. vector<int> to list<float>)
Revision
49043 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:55:11 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49042
Import revision 49002 from the v5-34-00 patch branch:
Fix conversion to from any type of numerical collection to any type of numerical collection
Revision
49042 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:54:49 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49041
Import revision 49001 from the v5-34-00 patch branch:
Implement convertion to any type of numeric STL in the collection streamer
Revision
49041 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:54:29 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49040
Import revision 49000 from the v5-34-00 patch branch:
Remove use of data member fOnFileClass as much as possible (improve thread safety). Improve const-correctness
Revision
49040 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:53:59 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49039
Import revision 48999 from the v5-34-00 patch branch:
In SetBranchAddress, use the result of CheckBranchAddressType to decide whether to actually use the address or not. This avoid mis-using the user's pointer (but also might make invalid/awkward code fails). To prevent the check (and hence for the use a pointer no matter what), the user needs to cast the pointer to a void*.
Revision
49039 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:53:37 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49038
Import revision 48998 from the v5-34-00 patch branch:
Properly handle the evolution of an STL container containing a class with contains sub-object (don't claim the subobject also changed type)
Revision
49037 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:52:52 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49036
Import revision 48996 from the v5-34-00 patch branch:
In the MakeClass reading code when failing over to using the StreamerInfo, switch to using the action sequence
Revision
49036 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:52:30 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49035
Import revision 48995 from the v5-34-00 patch branch:
Compile the code for the conversion actions for generic collection
Revision
49032 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:50:54 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49031
Import revision 48986 from the v5-34-00 patch branch:
Extend the output of TTree::Print(debugInfo) to include the action sequence information (and add support for the sub option 'func' that also prints the function's (mangled) name
Revision
49031 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:50:32 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49030
Import revision 48984 from the v5-34-00 patch branch:
When printing a TActionSequence also print (on linux/macos) the symbol of the function that will be executed (when the option 'func') is passed.
Revision
49030 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:50:08 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49029
Import revision 48983 from the v5-34-00 patch branch:
In TTree::CheckBranchAddressType properly recognize and record that the user has requested a (valid) translation from one STL container to the other
Revision
49029 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:49:46 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49028
Import revision 48982 from the v5-34-00 patch branch:
Add support for implicit conversion of stl collection (when they require schema evolution)
Revision
49028 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:49:24 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49027
Import revision 48981 from the v5-34-00 patch branch:
In GetConversionStreamerInfo, make sure that we find always find at least one StreamerInfo for an stl collection
Revision
49027 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:49:02 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49026
Import revision 48980 from the v5-34-00 patch branch:
A TClassRef must be changed by operator= even if its ClassPtr has not yet been initialized!
Revision
49026 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:48:39 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49025
Import revision 48963 from the v5-34-00 patch branch:
Record the consumption of a function arguments and closing paranthesis to avoid adding them a second time later on
Revision
49025 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:48:19 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49024
Import revision 48959 from the v5-34-00 patch branch:
Fix the spacing error introduce by last minutes code reformating ...
Revision
49024 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:47:57 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49023
Import revision 48954 from the v5-34-00 patch branch:
Be more specific in the error message when not knowing what the type passed to SetBranchAddress
Revision
49021 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:46:42 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49020
Import revision 48944 from the v5-34-00 patch branch:
In TTree::SetBranchAddress, properly reset the TargetClass when the address is changed (back) to the original type.
Issue an error message if the class type of the argument to TTree::SetBranchAddress can not be determined (missing dictionary but having only a typeid).
Revision
49020 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:46:19 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49019
Import revision 48943 from the v5-34-00 patch branch:
Improve performance of reading a branch with an std::list<int> by 25%
by migrating to using the StreamerInfoAction and by implementing
the access to iterator (creation, copy, increment, delete) via
template function (rather than reallying on the slow mechanism
using 'At' (and its use of the fEnv) ...)
Revision
49019 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:18:33 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49018
Import revision 48931 from the v5-34-00 patch branch:
Add the concept of implicit rules to (centrally) support automatic translation of
STL collection from numeric type to other numeric type or for when the contained
class has some rules. Currently enabled only when the target is an std::vector.
Implement the transformation from STL container of numeric to any other numeric
type (both in TGenCollectionStreamer and TStreamerInfo[Actions]).
Migrate more of the conversions to TStreamerInfoActions.
Fix the Conversion of a Double32 or Float16 inside a collection of object to another
type (the previous implemetation was not supporting the customization of the factor
nor the number of bits).
Add TBuffer::ReadFastArrayWithNbits and WithFactor for use in the StreamerInfo Actions.
TStreamerInfoActions:
Introduce WithFactorMarker and NoFactorMarker to allow for less code duplicaton when
supporting Float16_t and Double32_t.
Replace the collection-memberwise action from loop over simple operation to using
ReadFastArray (to be compatible with TBufferXML).
Revision
49018 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:17:38 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49017
Import revision 48922 from the v5-34-00 patch branch:
Remove inadvertent match between 2 unrelated STL collection containing objects
Revision
49017 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:17:11 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49016
Import revision 48921 from the v5-34-00 patch branch:
Improve performace of reading a vector of non-class type by 25% (i.e. std::vector<int>).
The code to apply the same improvement to other container type is in place but is not
enabled yet as the 'better' solution avoid creating a temporary array to read in the
value via Read[Fast]Array, however the avoid the call to Read[Fast]Array breaks
the XML streaming (which uses Read[Fast]Array to insert the <Array> tag around the
element). See for example VectorLooper::ReadCollectionBool ...
Revision
49015 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Mar 31 17:16:15 2013 UTC (21 months, 3 weeks ago) by
pcanal
File length: 29929 byte(s)
Diff to
previous 49014
Import revision 48911 from the v5-34-00 patch branch:
Add the Action function for trivial conversion.
Refactor the creation of the ConfiguredAction for collection (using 3 classes with function templates) that are used in the unique generator functions. This reduces code duplication.
Revision
48798 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 1 21:04:47 2013 UTC (22 months, 3 weeks ago) by
pcanal
File length: 29939 byte(s)
Diff to
previous 43515
Import revision 48797 from the v5-34-00 patch branch:
Avoid silent failure when reaching the maximum amount of TRef. When a
TProcessID is full (has seen 16777215 objects), we switch to new one TProcessID
(maximum 65535 including the TProcessIDs read from file). TRefArray can not
switch to new TProcessID if they already contain objects.
Some of the new warning/errors:
Warning in <TRefArray::AddAtAndExpand>: The ProcessID for the 0x5f83819e8 has been switched to ProcessID4/6c89f37e-8259-11e2-9717-166ee183beef:4
Error in <TRefArray::AddAtAndExpand>: The object at %p can not be registered in the process the TRefArray points to (pid = ProcessID4/6c89f37e-8259-11e2-9717-166ee183beef) because the ProcessID has too many objects and the TRefArray already contains other objecs.
Warning in <TProcessID::AddProcessID>: Maximum number of TProcessID (65535) is almost reached (one left). TRef will stop being functional when the limit is reached.
....
Fatal in <TProcessID::AddProcessID>: Maximum number of TProcessID (65535) has been reached. TRef are not longer functional.
Revision
43515 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Mar 27 21:15:53 2012 UTC (2 years, 9 months ago) by
pcanal
File length: 28378 byte(s)
Diff to
previous 40584
Fix coding convention R.RN7 (Avoid the raw C types 'long', 'unsigned long', 'long double', 'bool', 'long long' and 'unsigned long long'.)
Revision
40584 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Aug 14 02:56:29 2011 UTC (3 years, 5 months ago) by
pcanal
File length: 28374 byte(s)
Diff to
previous 34226
Apply to TRefArray::operator[] and TRefArray::At the same protection as in revision 5761 for TRef::GetObject
to protect against the case where fPID points to
a deleted processID using the new function TProcessID::IsValid.
In TProcessID::Cleanup, set fgPIDs to zero to avoid using the array after its deletion;
use this information in TProcessID::IsValid.
This fixes the issues 84017 an 84018 in Savannah.
Revision
32645 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Mar 17 14:03:13 2010 UTC (4 years, 10 months ago) by
rdm
File length: 28107 byte(s)
Diff to
previous 32643
Two fixes:
- Due to an error in TRefArray::Streamer, it is not possible to correctly
stream a TRefArray which has a lowerbound != 0. Fixes issue 64467
- Fix a memory leak in the TRefArray::operator=(), Fixes issue 64452.
Revision
23198 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Apr 14 09:23:08 2008 UTC (6 years, 9 months ago) by
rdm
File length: 27904 byte(s)
Diff to
previous 23060
From Anar and me:
The background is the following. While working on the PROOF code I found
that enumerating TList is an inconvenient and a long operation, I had to
write the same code all over the place and make duplications. I tried
to use STD algorithms with it, namely std::for_each, and failed.
I therefore decided to enable std::for_each algorithm for ROOT
Containers/Iterators by making as few as possible changes, without rewriting
iterators at all. Now with only two simple lines of code one is able to
iterate through a container:
TIter iter(&list);
for_each(iter.Begin(), TIter::End(), SEnumFunctor());
or
for_each(iter.Begin(), inter_end, SEnumFunctor());
where iter_end could be an iterator to a middle of the container.
After I had changed Iterators so that they could be used with std::for_each,
I decided to go further and did some more changes. As a result,
- I have updated CINT implementation of some algorithms (they look now
more or less better in terms of the standard),
- TList and TObjArray can be now used with std::for_each, std::find_if,
std::count_if (probably with some more algorithms. I've listed here
only what has been *checked* by me). Other containers will be supported
in a next patch.
- A test program has been added: $ROOTSYS/test/stressIterators.cxx
- A tutorial macro has been added: $ROOTSYS/tutorials/cont/TListAndSTL.C
Patch has been verified on Linux, MacOS X, Solaris 10 i386 and Windows.
Revision
23059 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Apr 8 22:02:41 2008 UTC (6 years, 9 months ago) by
pcanal
File length: 26626 byte(s)
Diff to
previous 22961
The array elements can be retrieved with:
TObject *obj = array.At(i);
By default the TRefArray 'points' to the current process and can only
receive object that have been created in this process.
To point the TRefArray to a different process do:
TRefArray array( processId );
For example, if 'obj' is an instance that was created in the different
process and you do:
TRefArray array( TProcessID::GetProcessWithUID( obj ) );
Then
array.Add(obj);
is correct (obj comes from the process the array is pointed to
while
TObject *nobj = new TObject;
array.Add(nobj);
is incorrect since 'nobj' was created in a different process than the
one the array is pointed to. In thi case you will see error message:
Error in <TRefArray::AddAtAndExpand>: The object at 0x... is not registered in the process the TRefArray point to (pid = ProcessID../....)
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: 23325 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
17508 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jan 25 11:50:54 2007 UTC (8 years ago) by
brun
Original Path:
trunk/cont/src/TRefArray.cxx
File length: 23359 byte(s)
Diff to
previous 16519
CVSnclusion of TFile.h has been removed.
-TRefArray::Streamer makes use of the new functions in TVirtualIO
With these changes TRefArray is now independent of the I/O sub-system.
: ----------------------------------------------------------------------
Revision
14054 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Feb 17 05:16:38 2006 UTC (8 years, 11 months ago) by
pcanal
Original Path:
trunk/cont/src/TRefArray.cxx
File length: 22882 byte(s)
Diff to
previous 13987
From Axel:
---
Add support for auto-loading of TRefs from multiple TProcessIDs:
TRefTable now stores 2d arrays of branch numbers to load [PID][UID] (via
FillBuffer). The PID index <-> TProcessID-GUID mapping is stored via
TRefTable::Streamer (i.e. once per TTree). Lookup is cached. This change
is both backward and forward compatible, both concerning the interface
and .root files. Only exception is TRefTable::fParentIDs, which is now
only streamed via FillBuffer / ReadBuffer, not as a member of TRefTable.
Minor side-notes:
* Speed-up in TRef::GetObject de-referencing (only once call to
TProcessID::GetObjectWithID).
* No re-reading of a branch if it was already read for an event (if
TBranchRef's fReadEntry == branch-to-autoload's fReadEntry then don't
call GetEntry on it).
* Added getter for TProcessID::fgPIDs->Size()
* updated doc for TRef, TRefTable, TBranchRef, to reflect the current
status of auto-loading.
---
The only change that's breaking backward compatibility (as mentioned
above) is the clear split between per-entry and global streaming of the
TRefTable: there is no use in storing the fParentIDs[][] array (and
fN[]) as part of the TTree members - it should only be stored as part of
the TTree entry. So I've marked them as //!; they're made persistent in
TRefTable::FillBuffer.
The member TRefTable::fSize is only around to suppress a warning in the
schema evolution algorithm (it was a counter before, and the schema
evolution algo is unhappy about fSize missing in the new class
definition, nor does it appreciate fSize being marked as //!). This is
ugly, but I prefer it over a custom streamer.
The patch should fix the following issues:
* autoloading doesn't work because TRefs were created by different
processes,
* changed objects magically overwritten in memory due to re-loading of
referenced objects
Revision
11431 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Mar 26 07:02:14 2005 UTC (9 years, 10 months ago) by
brun
Original Path:
trunk/cont/src/TRefArray.cxx
File length: 22916 byte(s)
Diff to
previous 10520
From Philippe:
Fix for a problem reported by Reiner Hauser
I have a root file with a TBranchRef in it, to support
autoloading objects referenced via a TRef. This seems to work
fine with a single TRef in an object, but not the references
in a TRefArray.
Revision
5717 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Dec 2 18:50:12 2002 UTC (12 years, 1 month ago) by
rdm
Original Path:
trunk/cont/src/TRefArray.cxx
File length: 22383 byte(s)
Diff to
previous 5160
mega patch to remove almost all compiler warnings on MacOS X where the
compiler is by default in pedantic mode (LHCb also like to use this option).
The following issues have been fixed:
- removal of unused arguments
- comparison between signed and unsigned integers
- not calling of base class copy ctor in copy ctor's
To be done, the TGeo classes where we get still many hundred warnings of
the above nature. List forwarded to Andrei.
Revision
5160 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Aug 20 15:17:36 2002 UTC (12 years, 5 months ago) by
brun
Original Path:
trunk/cont/src/TRefArray.cxx
File length: 22408 byte(s)
Diff to
previous 5022
Implement a default constructor with no arguments. This constructor
does not allocate the internal array of UUIDs.
The other constructor (previous default constructor) has only one optional
argument.
Modify logic in TRefArray::Init to not call new if fSize is null.
Revision
3351 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Dec 2 15:20:07 2001 UTC (13 years, 1 month ago) by
brun
Original Path:
trunk/cont/src/TRefArray.cxx
File length: 20680 byte(s)
Diff to
previous 3298
Many changes/simplification of the TRef classes using the new functions
from TProcessID.
With this new version, it is possible to write a TRef to a new file
without writing the referenced object.
Implement assignement operator TRef& operator=(cont TRef &ref).
Revision
2965 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Added
Wed Oct 3 19:55:27 2001 UTC (13 years, 3 months ago) by
brun
Original Path:
trunk/cont/src/TRefArray.cxx
File length: 20515 byte(s)
First version of TRefArray (not yet fully operational). Mainly to test portability of code.
For more details on TRefArray, see comments in TRefArray.cxx.
The TRefArray is expected to play an important role in ROOT I/O and Trees.
The main advantage of TRefArray (see also TRef class) is to allow arrays
of references to TObjects in different I/O transactions without writing
the referenced objects each time.
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.