Log of /trunk/io/io/src/TStreamerInfo.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: 183667 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: 183667 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: 183667 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: 183667 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: 183667 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: 183667 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: 183667 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: 183667 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: 183667 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: 183667 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: 183667 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: 183667 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: 183667 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: 183667 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: 183667 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: 183667 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: 183667 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: 183667 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: 183667 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: 183667 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: 183667 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: 183667 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: 183667 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: 183667 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: 183245 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: 183176 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: 183176 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
48292 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jan 14 18:11:21 2013 UTC (2 years ago) by
pcanal
File length: 183176 byte(s)
Diff to
previous 48267
Import revision 48290 from the v5-34-00 patch branch:
Improve the StreamerInfo comparison to ignore change in STL collection template default paramemter (in particular the lack or presence thereof)
Revision
48267 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jan 11 12:56:43 2013 UTC (2 years ago) by
pcanal
File length: 182607 byte(s)
Diff to
previous 48083
In the new section (r48083) of TStreamerInfo::CompareContent check the dataType of the members, (re)add the equivalency between long and longlong
Revision
48083 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Dec 18 05:19:27 2012 UTC (2 years, 1 month ago) by
pcanal
File length: 182126 byte(s)
Diff to
previous 47991
Improve CompareContent by also comparing the 'data type' index. This helps in the case where cling is actually keeping more typedef information that CINT did
Revision
43993 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Apr 27 16:23:16 2012 UTC (2 years, 8 months ago) by
pcanal
File length: 181096 byte(s)
Diff to
previous 43955
Fix coverity issues
Dereference null return:
32943,32945,36325,36329: TFormLeafInfo::GetLocalValuePointer
33253: TTreeFormula::EvalObject
33763: CloneTree
33258: GetBasket
34034: In DropBuffers (in addition avoid reading the basket when the intend is to drop the content from memory!)
36307: TTree::BuildIndex
36328: DrawCopy
36332: GetStreamerInfoCache
33025: BuildStreamerInfo
42469: Clone
33436: MakeIterator
Dereference after null check.
42470: in ImportStreamerInfo
33138: in TEntryListArray::Enter
Unchecked return value:
32049, 32050: TBranchProxy::Read and Setup
Mixed enums:
32705,32706: TClass::fStreamerType (and also name the enum type).
Revision
43955 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Apr 26 00:10:05 2012 UTC (2 years, 8 months ago) by
pcanal
File length: 181077 byte(s)
Diff to
previous 43515
Fix coverity issues:
Dereference null return:
32806: fElements->Last
33398, 33431, 33432: TObject::Clone
41714,41715,41716: TClass::GetStreamerInfoEmulated
33420: GetConversionStreamerInfo
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: 180214 byte(s)
Diff to
previous 42967
Fix coding convention R.RN7 (Avoid the raw C types 'long', 'unsigned long', 'long double', 'bool', 'long long' and 'unsigned long long'.)
Revision
42967 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Feb 10 22:35:22 2012 UTC (2 years, 11 months ago) by
pcanal
File length: 180210 byte(s)
Diff to
previous 42593
Fix support for emulated class that derived from an abstract class.
This can happen when reading a file containing an ancient
class layout where the derived class is no longer provided in the
compiled code but the abstract base class is still provided.
It also happens when using schema evolution rules on a class derived
from an abstract base class (in which case the system introduce
implicitly an emulated class deriving from the same base classes
as the evolved from class).
To fix the issue, we introduce the TClass::GetStreamerInfoAbstractEmulated
which will return a StreamerInfo representing an emulated version of the
class even if it is loaded. To distinguish the real abstract base class
representation (let's take 'AbstractBase' as an example), the returned
StreamerInfo is attached to a different TClass which has the same name
but is suffixed with @@emulated ('AbstractBase@@emulated' in our example).
Revision
41243 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Oct 6 19:42:12 2011 UTC (3 years, 3 months ago) by
pcanal
File length: 179300 byte(s)
Diff to
previous 41102
Avoid crashing in the case where
a) the class on file inherit from an abstract class
b) the class in memory does no longer inherit from an abstract class
c) the abstract class is still loaded in memory
In this case, it may happen that we do not have the StreamerInfo for
the abstract base class when build the StreamerInfo for the onfile version
of the class.
Revision
41102 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Oct 3 21:42:02 2011 UTC (3 years, 3 months ago) by
pcanal
File length: 179276 byte(s)
Diff to
previous 40872
Undo the synchronization of gFile was invalidating existing user code (even if the code is somewhat).
Use cases includes wanting to retains (and return to) the last file before a function call modifies
gDirectory and/or force return to the top level directory of the last 'current' file no matter what
gDirectory is ....
Make sure to avoid unnecessary warning about missing dictionary for a transient member even if
the member's type is an stl collection (containing object for which we don't have the dictionary).
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: 179230 byte(s)
Diff to
previous 40740
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
40711 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Aug 25 18:41:19 2011 UTC (3 years, 5 months ago) by
pcanal
File length: 178671 byte(s)
Diff to
previous 39063
Correctly calculate the size of an emulated class containing an array of objects (streamerElement type kStreamLoop) on 64 bits platforms.
Update MakeProject to properly handle the case of class which version is zero and to properly initialization array of objects (streamerElement type kStreamLoop).
Revision
39058 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Apr 30 19:07:30 2011 UTC (3 years, 8 months ago) by
pcanal
File length: 178351 byte(s)
Diff to
previous 39012
kOffsetL does not apply to pointers. This fix a problem when 'checking' for valid schema evolution between 2 class version have the same date member: 'AliTPCCalROC* fROC[72]'
Revision
39012 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Apr 21 21:22:45 2011 UTC (3 years, 9 months ago) by
pcanal
File length: 178330 byte(s)
Diff to
previous 38830
Fix support for schema evolution from:
TParameter<Int_t>* MyInt; //-> version 1
to
TParameter<Int_t> MyInt; // version 2
and back. Be more explicitly about the conversion allowed
or not involving objects and pointer to objects.
Revision
38309 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 4 17:14:19 2011 UTC (3 years, 10 months ago) by
pcanal
File length: 171905 byte(s)
Diff to
previous 38307
When double checking whether a checksum difference is sustantial, ignore the std namespace (using the name option for TClassEdit::ShortType: TClassEdit::kDropStd
Revision
38307 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 4 16:28:29 2011 UTC (3 years, 10 months ago) by
pcanal
File length: 171882 byte(s)
Diff to
previous 38209
Use CompareContent also in the case of where the class is versioned byt the 'current' streamerInfo has not yet been built
Revision
38156 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Feb 18 20:18:07 2011 UTC (3 years, 11 months ago) by
pcanal
File length: 171728 byte(s)
Diff to
previous 38126
If the StreamerInfo on file has the same version as the StreamerInfo in memory but the one on file need to be 'not optimized' while the one in memory is not yet built, make sure it will not be optimized
Revision
38126 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Feb 17 21:25:27 2011 UTC (3 years, 11 months ago) by
pcanal
File length: 171682 byte(s)
Diff to
previous 37967
If the StreamerInfo on file is the same version as the StreamerInfo in memory but the one on file need to be 'not optimized' while the one in memory is already optimize, make sure to undo the optimization
Revision
37531 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Dec 10 20:38:06 2010 UTC (4 years, 1 month ago) by
pcanal
File length: 171357 byte(s)
Diff to
previous 36707
Fix several memory leaks (TSchemaRuleSet, TClass, TFolder, stress, TStreamerInfo, TFile, TFree)
Introduce a new preprocessor symbol (R__COMPLETE_MEM_TERMINATION) that allows for
better tracking of memory leak. When ROOT is compiled with this symbols is defined,
globally held objects will be deleted at the time of the process termination.
With this symbol defined, some tests (root.exe -b -l -q ; test/stress ;) run under
'valgrind --leak-check=yes' with no memory leak reports (but still a few still
reacheable blocks). However, this does not yet support (i.e. segfault at termination)
the case where TFunctions are created on the 'CINT' stack (and thus fails roottest) and
some uses of CINT functions for fitting ... and probably also fails on Windows.
Revision
36707 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Nov 16 20:00:58 2010 UTC (4 years, 2 months ago) by
pcanal
File length: 171360 byte(s)
Diff to
previous 36562
Add more 'aliases' to the rootmap entries for the GenVector library
to work around CINT and autoloader deficiency with template default parameter.
Insure that MakeProject generate the dictionary for std::pair instances
explicitly used in STL collections.
Allow the seamless schema evolution from map<a,b> to vector<pair<a,b> >.
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: 166471 byte(s)
Diff to
previous 36032
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
35450 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Sep 20 12:36:11 2010 UTC (4 years, 4 months ago) by
pcanal
File length: 165791 byte(s)
Diff to
previous 35394
Fix Coverity reports
TDatabasePDG.cxx: #11418 getc returns an int
TTree.cxx: #10577 unused variable
TTreeFormula.cxx: #10795,#10796,#13272,#13273,#13274,#14173 strcat -> strncat, strcpy -> strncpy
TTreePlayer.cxx: #10891,#10892,#14169,#14170,#14172 strcpy -> strncpy
TStreamerElement.cxx: #12537,#13200,#13318,#13586,#13587,#13588,#13589,#13590,#13591,#13596,#13597,#13598 strcpy,sprintf -> strncpy,snprintf (or TString)
TStreamerInfo.cxx: #13470,#13787,#13788 strcpy,sprintf -> strncpy,snprintf (or TString)
TBranchProxy.cxx: null pointer dereference.
TBranch.cxx: #10689 null pointer dereference.
loadfile.cxx: #10767,#12387.#12388,#12389,#12521,#12522,#13514,etc.. strcpy,sprintf -> strncpy,snprintf (or TString)
TFileDrawMap.cxx: #10893,#10894,#10895,#13460,#14176,#14177,#14718,#14179 strcpy,sprintf -> strncpy,snprintf (or TString)
TFile.cxx: #13789,#13193,#13450 strcpy,sprintf -> strncpy,snprintf (or TString)
TMethod.cxx: #10802,#13310 strcpy,sprintf -> strncpy,snprintf (or TString)
TClass.cxx: #10814,#13122,#13467,#13468,#13490 strcpy,sprintf -> strncpy,snprintf (or TString)
TDataMember.cxx: #10825,#13241,#13329,#13330,#13584 strcpy,sprintf -> strncpy,snprintf (or TString)
TFormula.cxx: #13263,#13783 sprintf -> snprintf or TString
stlLoader.cxx: #13599 static array -> G__FastAllocString
Revision
35394 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Sep 17 19:40:12 2010 UTC (4 years, 4 months ago) by
pcanal
File length: 165807 byte(s)
Diff to
previous 35314
From Axel:
Fix possible buffer overflow of parent string buffer in
TMemberInspector. Changes signature of ShowMember() function
to no longer require (nor request) the caller to provide
a buffer (of length unknown to the callee) ; this
scratch buffer is now provided by the Inspector object
itself.
Revision
35314 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Sep 16 03:22:09 2010 UTC (4 years, 4 months ago) by
pcanal
File length: 165946 byte(s)
Diff to
previous 35298
Migrate the functionality of TStreamerInfo::TagFile to a new interface TBuffer::TagStreamerInfo
so that TMessage can customize the behavior. TMessage now relies on this new interface
instead of TBuffer::IncrementLevel which had the disadvantage of being called not only
during writing but also during reading (where there is no need to keep track of the StreamerInfo used).
[This change will also allow us to keep the calls to IncrementLevel/DecrementLevel only in the
case the buffer is a TBufferXML]
Fix the implementation of TSocket::RecvStreamerInfos to properly handle the case where there are
abstract classes (when GetStreamerInfo() can not be called on an abstract class until it has
been called for one of the concrete derived classes) and the case of STL containers.
Revision
35298 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Sep 15 12:29:16 2010 UTC (4 years, 4 months ago) by
pcanal
File length: 165632 byte(s)
Diff to
previous 35025
In view of the upcoming patch optimizing TStreamerInfo move
TStreamerInfo::Compile to its new location to simply future svn diffs
and code change tracking.
Add the new #define :
ROOT_COLLECTIONPROXY_VERSION and REFLEX_COLLECTIONPROXY_VERSION
Revision
35025 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Aug 26 11:53:40 2010 UTC (4 years, 4 months ago) by
brun
File length: 170950 byte(s)
Diff to
previous 34628
Fix a bug in TStreamerInfo::GenerateDeclaration when generating the code
for a copy constructor of a class having arrays. The call to memset was not correct.
Revision
34628 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jul 27 22:12:01 2010 UTC (4 years, 5 months ago) by
pcanal
File length: 170950 byte(s)
Diff to
previous 33846
Add proper support for 'type *fArray; //[fN]' when using a 'cached' emulated object or
when renaming a class.
When cloning and renaming a TStreamerInfo, make sure to propagate this name change to
the StreamerElement as needed.
Revision
33114 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Apr 20 19:03:33 2010 UTC (4 years, 9 months ago) by
pcanal
File length: 169565 byte(s)
Diff to
previous 32863
Reduce possible confusions and conflict by always using in TClass and TStreamerInfo
the version of template instance name with ULong64_t and Long64_t rather than [unsigned] long long.
Revision
32863 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Apr 1 15:46:52 2010 UTC (4 years, 9 months ago) by
pcanal
File length: 169387 byte(s)
Diff to
previous 32644
Properly handle the case where a read rule is associate with the 'current' TStreamerInfo
when this TStreamerInfo is used for writing.
This fixes the report 65132 in Savannah.
Revision
32644 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Mar 17 13:58:28 2010 UTC (4 years, 10 months ago) by
pcanal
File length: 169386 byte(s)
Diff to
previous 32586
Add the ability to feed I/O customization rules from a text
file, the following 3 files are checked at start up;
$ROOTSYS/etc/class.rules (or ROOTETCDIR/class.rules)
$HOME/class.rules
./class.rules
Add a short form to the I/O customization rules. The 2 syntaxes are:
Short form:
[type=Read] classname membername [attributes=... ] [version=[...] ] [checksum=[...] ] [oldtype=...] [code={...}]
Long form:
[type=Read] sourceClass=classname [targetclass=newClassname] [ source="type membername; [type2 membername2]" ]
[target="membername3;membername4"] [attributes=... ] [version=...] [checksum=...] [code={...}|functionname]
Add a new element to the rules: attributes
Currently the only 2 attributes supported are 'Owner' and 'NotOwner' which
indicates to whether the data member 'owns' the objects it is pointing to.
Store all the rules defined for all the classes stored in a TFile in the
same list as the StreamerInfo. The rules are stored as a sub list of
TObjString and the list is named 'listOfRules'
TClass: when creating or registering a class we now alway remove the
any part of the class name that is a default template argument of a STL
container. (i.e. the allocator in pair<int,vector<int,allocator> >
which becomes pair<int,vector<int> >)
TList: Improve the performance of RemoveLast by customizing it for TList.
Revision
32586 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 12 14:00:16 2010 UTC (4 years, 10 months ago) by
pcanal
File length: 168559 byte(s)
Diff to
previous 32488
Implement polymorphism for Emulated object (still not supporting polymorphism
of Emulated Object inheriting from compiled class).
This avoids memory leaks when the user data model relies on polymorphism
(and we are not using the library) and avoid splicing if the data is copied.
Details:
TStreamerInfo::New inserts the address of the creating TStreamerInfo into
the object. This address is inserted in each emulated that does not inherit
from an emulated class and is positioned after all the base classes (which
are compiled classes). A derived class will set this value inside each
of its emulated base class.
TStreamerInfo::Destruct and the new method TStreamerInfo::GetActualClass
use this information to detect the TStreamerInfo actually used to create
the object and hence run the proper emulated destructor.
In TFormLeafInfo which an issue where a data member which is an STL
container was not properly found.
Revision
32385 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Feb 19 20:52:54 2010 UTC (4 years, 11 months ago) by
pcanal
File length: 164128 byte(s)
Diff to
previous 32368
In MakeProject, implement proper deletion of the content of stl container of pointer (when they are set to be the owner of those pointers)
Revision
32368 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Feb 18 14:46:38 2010 UTC (4 years, 11 months ago) by
pcanal
File length: 163112 byte(s)
Diff to
previous 32347
Improve memory handling the in the emulated collection proxy, in particular
make it such that an emulated collection of pointers can become owner of its content.
The default, for backward compatibility and to avoid double delete (at the expense
of memory leak), the container of pointers are _still_ not owning their content
__unless__ they are a free standing container (i.e. itself not contained in another
object).
To make a container of pointers become owner of its content do something like:
cl = TClass::GetClass("ObjectVector<LHCb::MCRichDigitSummary>");
if (cl && cl->GetStreamerInfo()) {
TObject *el = cl->GetStreamerInfo()->GetElements()->FindObject("m_vector");
if (el) el->ResetBit(TStreamerElement::kDoNotDelete);
}
For MakeProject, use file->GetStreamerInfoCache() instead of the TClass GetStreamerInfo.
Revision
32347 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Feb 15 22:54:16 2010 UTC (4 years, 11 months ago) by
pcanal
File length: 160988 byte(s)
Diff to
previous 32336
MakeProject now implements a move constructor for each classes. For the implementation, we 'use' the 'copy constructor' until the C++ compilers properly support the official move constructor notation. Implementing a move constructor avoid having to delete and reconstruct resource during a std::vector resize and avoid the double delete induced by using the default copy constructor.
Revision
32336 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Feb 12 15:03:23 2010 UTC (4 years, 11 months ago) by
pcanal
File length: 158044 byte(s)
Diff to
previous 32159
Extend TFile::MakeProject to support genreflex, cases of user's data model where
the 2 distincts pointers point to a single object and more cases where we are
missing the StreamerInfo and need to guess whether the symbol represent an enum,
a class or a namespace.
To use genreflex, call MakeProject with the "genreflex" option, for example:
file->MakeProject(libdir,"*","NEW+genreflex");
To make sure the library created by MakeProject does not double delete an object,
tell the StreamerElement representing one of the pointers pointing to the object
to never delete the object. For example:
TVirtualStreamerInfo *info = (TVirtualStreamerInfo*)file->GetStreamerInfoCache()->FindObject("HepMC::GenVertex");
if (info) {
TObject *el = info->GetElements()->FindObject("m_event");
if (el) el->SetBit(TStreamerElement::kDoNotDelete);
}
Note that MakeProject only uses the list of StreamerInfo internal to the TFile (as opposed
to the global list of StreamerInfo used by the regular I/O operations) and thus the change
must be done on the StreamerInfo in file->GetStreamerInfoCache().
To make sure that the class emulation layer of ROOT does not double delete an object,
tell the StreamerElement representing one of the pointers pointing to the object
to never delete the object. For example:
TClass *clGenVertex = TClass::GetClass("HepMC::GenVertex");
if (clGenVertex) {
TObject *el = clGenVertex->GetStreamerInfo()->GetElements()->FindObject("m_event");
if (el) el->SetBit(TStreamerElement::kDoNotDelete);
}
Details:
TClass:
Correct the order in which the RealData is created for emulated class (base class must be last).
TBaseClass:
Improve stability in case where the base is reloaded (by using TClassRef instead of TClass*)
MakeProject:
Improve support for classes that are used (as scope or as template parameter) but do not have
a StreamerInfo in the file (because no object of that type is saved) by passing around the
list of extras streamerinfos while hold the artificial temporary StreamerInfo we create for
those classes.
Use the bit TStreamerElement::kDoNotDelete to decide whether to delete a sub object held
in a pointer data member or not.
In TMakeProject::UpdateAssociativeToVector correctly handle the case where the type
is actually a nested type of a template class instance. Also now this functions
stips the default template parameter from STL containers. It adds std:: in front
of the name of STL classes if needed.
Add support for genreflex in MakeProject. With the option "genreflex", MakeProject
produce the additional file dirnameSelection.xml and populate the file
dirnameProjectInstances.h. In MAKEP, genreflex is called instead of rootcint.
In MakeProject, fixed a double delete of the StreamerInfos.
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: 156956 byte(s)
Diff to
previous 31898
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
30905 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Oct 28 16:51:47 2009 UTC (5 years, 2 months ago) by
pcanal
File length: 154227 byte(s)
Diff to
previous 30758
Add the ability to 'Dump' object for which we only have a StreamerInfo.
Add TVirtualStreamerInfo::CallShowMembers which is now call by TClass::CallShowMembers as needed.
Revision
30693 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Oct 12 20:00:06 2009 UTC (5 years, 3 months ago) by
pcanal
File length: 148780 byte(s)
Diff to
previous 30692
Make data members of type '[unsigned ]long' and of type '[unsigned ]long long' to be equivalent as far as the StreamerInfo checker is concerned
Revision
29361 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jul 6 22:10:36 2009 UTC (5 years, 6 months ago) by
pcanal
File length: 147340 byte(s)
Diff to
previous 29360
Insure that the TTreeCloner (fast merging) is able to also copy 'uninitialized' TStreamerInfo describing abstract classes (This fixed savannah report #52856)
Revision
29360 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jul 6 21:10:23 2009 UTC (5 years, 6 months ago) by
pcanal
File length: 147038 byte(s)
Diff to
previous 29334
In TMakeProject:
Add option 'nocompilation' to allow for the generation of MAKEP without running it.
Now look for any 'empty class' and enums that are listed as template arguments before starting
to generate the header files (Allowing for better and more predictable converage, including
detecting the 'implied' namespaces and/or classes and insuring they are properly declared.)
Replace the associative container (map<x,y>, set<z>) respectively by (vector<pair<x,y>> and
vector<z>) when x is an objet not only when their are the top level type (i.e. what
we had before) but also when they are part of template parameters (of other containers).
Replace multiple specializations of class template with a single generic implementation when
their are all empty (hence reducing initialization order issues, in particular when the
template parameter is a nested class inside another class).
These allow running MakeProject on the latest CMS event model.
Revision
29272 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jun 30 19:24:06 2009 UTC (5 years, 6 months ago) by
pcanal
File length: 145682 byte(s)
Diff to
previous 29225
Since we can not distinguish (in the TStreamerInfo) the case where
the class layout was versioned to 1 or was un-versioned, we update the
rule matching mechanism so that a rule assigned to version '1' will
apply both to any unversioned class layout and to a class layout which
version number was set to '1'.
This resolves the issue described at http://root.cern.ch/phpBB2/viewtopic.php?t=8749
Revision
28610 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed May 13 16:21:06 2009 UTC (5 years, 8 months ago) by
pcanal
File length: 145895 byte(s)
Diff to
previous 28603
TStreamerInfo: Avoid forgetting that a member is missing even if the 'main' streamerinfo is 'only' emulated.
TBranchElement: Extend the fix in revision 28502 to also work if Set[Branch]Address is called.
Revision
27177 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Jan 18 03:38:13 2009 UTC (6 years ago) by
pcanal
File length: 140841 byte(s)
Diff to
previous 26641
Extend the checks done in case of a StreamerInfo checksum mismatch to
avoid spurrious failures (for example because of the various possible
type names for STL containers) and to report details on the nature of
the mismatch: explicit list missing base classese, missing data members
or the actual differences in type or comments.
For example:
Warning in <TStreamerInfo::CompareContent>: The following data member of the on-file layout version 2 of class 'Tdata' differs from the in-memory layout version 2:
double mydouble; //
vs
double mydouble_two; //
Warning in <TStreamerInfo::CompareContent>: The following data member of the in-memory layout version 2 of class 'Tdata' is missing from the on-file layout version 2:
int more; //
Warning in <TStreamerInfo::CompareContent>: The following data member of the in-memory layout version 2 of class 'Tdata' is missing from the on-file layout version 2:
int three; //
Revision
26641 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Dec 4 05:30:28 2008 UTC (6 years, 1 month ago) by
pcanal
File length: 133625 byte(s)
Diff to
previous 26606
Avoid creating a TStreamerInfo for an abstract class in ForceWriteInfo which is called during a TTree Branch creation ... In the case where we have a pointer to an abstract class, most time we do not yet have an object of the derived class to properly create the TStreamerInfo of the abstract class ... this effectively delays the creation until the first time one of the derived object is actually written
Revision
26606 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Dec 2 20:36:09 2008 UTC (6 years, 1 month ago) by
pcanal
File length: 133242 byte(s)
Diff to
previous 26140
Following Igor Smirnov analysis fix several memory leaks, add checks for null pointer dereference, fix or add copy constructor and assignment operator when applicable, make the copy constructor and assignment operator private when the objects are not intended to be copiable.
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: 133946 byte(s)
Diff to
previous 25128
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
25128 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Aug 12 17:59:19 2008 UTC (6 years, 5 months ago) by
pcanal
File length: 126184 byte(s)
Diff to
previous 24875
From Matevz:
* TCollection:
Replace Print() methods
virtual void Print(Option_t *wildcard="") const;
virtual void Print(Option_t *wildcard, Option_t *option) const;
with --------------------------------------------------
virtual void Print(Option_t *option="") const;
virtual void Print(Option_t *option, Int_t recurse) const;
virtual void Print(Option_t *option, const char* wildcard,
Int_t recurse=1) const;
virtual void Print(Option_t *option, TPRegexp& regexp,
Int_t recurse=1) const;
Introduce three new protected methods used to print out collection details.
These are called from the Print() methods and make overriding of what
is printed for a collection / entries easier.
virtual void PrintCollectionHeader(Option_t* option) const;
virtual const char* GetCollectionEntryName(TObject* entry) const;
virtual void PrintCollectionEntry(TObject* entry, Option_t* option,
Int_t recurse) const;
* TMap:
Remove two overloaded Print() methods, implement protected
PrintCollectionEntry() instead.
* TQCommand, TQUndoManager, TQConnection, TQConnectionList
Remove overriden Print() methods. If needed, override
PrintCollectionHeader() or PrintCollectionEntry() instead.
* TAlienJobStatusList
Remove Print(), implement PrintCollectionEntry() instead.
* TAlienResult
Remove overloaded Print(wildcard, option) which no longer exists.
* test/tcollprint.cxx
New file - demonstrates behaviour of Print() methods for TList and TMap.
Revision
24120 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jun 3 19:24:20 2008 UTC (6 years, 7 months ago) by
brun
File length: 126827 byte(s)
Diff to
previous 23833
Fix a problem in TStreamerInfo::GenerateInclude when generating the code for
classes with pointers like in:
AliESDtrackCuts.h: TH1F* fhNClustersITS[2]; //->
AliESDtrackCuts.h: TH1F* fhNClustersTPC[2]; //->
In this case the code for the constructor and destructor must explictly delete the objects and set the arrays to 0.
Revision
23833 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue May 13 18:10:39 2008 UTC (6 years, 8 months ago) by
pcanal
File length: 126401 byte(s)
Diff to
previous 23808
In MakeProject, make sure that nested class that are
used _only_ as a class template parameter are properly
declared (needed for ATLAS' AOD.pool.root).
Revision
23002 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Apr 7 09:52:26 2008 UTC (6 years, 9 months ago) by
pcanal
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 126027 byte(s)
Diff to
previous 22996
When reading more than one TStreamerInfo for the same versioned
class, we now use the highest possible class version as the current
version of the class. Practically, we update the class version
when reading new (higher versioned) StreamerInfo until the Class
is actually used (i.e. TClass::GetClassVersion is call directly
or indirectly).
In particular, if a file has several StreamerInfos for the same
versioned class, we will use the highest version number as the
'current' class version (as opposed to the lowest until now).
Revision
22996 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Apr 6 23:13:35 2008 UTC (6 years, 9 months ago) by
pcanal
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 125869 byte(s)
Diff to
previous 22953
For backward compatibility TStreamerInfo::BuildCheck compares the checksum of
the on-file StreamerInfo not only to the current value of the class checksum
but also to the checksum calculated using the older algorithms.
This patch extends this test to also be done when comparing 2 on-file StreamerInfo.
This is implemented via a new function TStreamerInfo::GetCheckSum(UInt_t) which
re-implement the TClass::GetCheckSum algorithms using the TStreamerElements
instead of the RealData information. [Note that due to slight different in
class naming convention, the 2 methods are not completely interchangeable].
This removes spurrious warning message when loading 2 older files which
were written with 2 different version of the TClass CheckSum algorithm
(and the in-memory class's version is greater than both TStreamerInfos'
class version).
Revision
22358 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Feb 26 23:08:07 2008 UTC (6 years, 10 months ago) by
pcanal
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 121252 byte(s)
Diff to
previous 22276
From Paul and Philippe:
Correct the logic that is avoiding the storing of TStreamerInfo for std::string
and the STL collection in ForceWriteInfo. Now ForceWriteInfo always ignore the
request when the TStreamerInfo itself is for string or STL container.
The previous implementation was only ignoring the request for the TStreamerElement
that were string or STL container.
In addition, the previous implementation was overzealous and was inadvertently
ignoring the request for TStreamerElement pointing at any class containing the
STL container names AND any class which had :: in them. In particular this
meant that slow CloneTree was (fataly) missing the copy of the TStreamerInfo
for class that are part of the TTree but had only a base and no member or in
some cases where it had only object data members.
Revision
21862 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Jan 26 09:48:18 2008 UTC (6 years, 11 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 120646 byte(s)
Diff to
previous 21744
From Lukasz Janyst:
* TStreamerInfo: TPointerCollection adapter class and access methods
added to enable handling collections of pointers with existing
Read|WriteBuffer code
* TCollectionProxy: check if the proxy was initialized when
calling HasPointers
Revision
21744 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jan 16 20:47:20 2008 UTC (7 years ago) by
pcanal
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 120071 byte(s)
Diff to
previous 21735
Correct the schema evolution from a map<A,B> to a
(non map, non multimap) collection of pair<A,B>
(i.e vector<pair<A,B> >) when it is held by value
in an object (as opposed to by pointer).
Conversion from vector<pair<A<B> > to map<A,B> is
now explicitly disabled (i.e. the vector will not be read).
Conversion for a map<A,B>* to a vector<pair<A,B> >* is
now explicitly disabled (i.e. the map will not be read).
TFile::MakeProject has been updated to generate the
needed dictionary for the pair.
Revision
21735 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jan 16 16:54:22 2008 UTC (7 years ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 118002 byte(s)
Diff to
previous 21620
from Bertrand and Axel:
* fix MakeProject build (also, but not only on windows):
- replace $Opt by opt / debug (whatever the ROOT build is),
- include dict in generated source instead of having to deal with two dources = two object files (which is not really supported by the ACLiC-like build commands)
* Always write out a class version higher thn what we are trying to reproduce. E.g. in case of members of type enum (which are generated as members of type int), the checksum equality check will fail, and a complaint ("increase the class version!") will be printed otherwise.
Revision
21601 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jan 9 04:34:29 2008 UTC (7 years ago) by
pcanal
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 117899 byte(s)
Diff to
previous 21397
Extend TFile::MakeProject to support namespaces, nested classes
and templates.
2 new files are generated in the user directory (dirname):
dirnameProjectHeaders.h
dirnameProjectSource.cxx
the linkdef file is renamed dirnameLinkDef.h
Each non-nested class is generated in its own header file
with a name that is the fully qualified name of the class
after all the special characters "<>,:" are replaced by underscored.
For example for pair<edm::Vertex,int> the file name is
pair_edm__Vertex_int_.h
In the generated classes, map, multimap when the first template parameter is a class
are replaced by a vector of pair. set and multiset when the tempalte parameter
is a class are replaced by a vector. This is required since we do not have the
code needed to order and/or compare the object of the classes.
[The required schema evolution from map to vector of pair is not yet functional]
The new class TMakeProject contains a set of helper functions.
Revision
21353 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Dec 13 07:11:49 2007 UTC (7 years, 1 month ago) by
pcanal
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 110714 byte(s)
Diff to
previous 20882
NOTICE:
This version introduces support for transitioning classes
from the mode where no class version is specified
(and the checksum is always used for lookup) and a mode
where the user specifies an explicit version number for
the class (Allow for simplier, clearer data model evolution).
The class version can be specified in 3 different ways:
a) Use rootcint and add a ClassDef macro in the class declaration:
class MyClass {
...
ClassDef(MyClass,10);
};
b) Use rootcint and add a RootClassVersion macro in the class source file:
RootClassVersion(MyClass,10);
c) Use genreflex and specify a ClassVersion property in the selection.xml :
<class name="MyClass" ClassVersion="10"/>
Those 3 solutions set the class version of MyClass's TClass object
to 10.
IMPORTANT:
In order to avoid a clash between this class version (and any future
class versions) and the class versions given by default to the
non-versioned layout of the class, you MUST set this class version to
a number that is greater than the number of distinct non-versioned layout.
Otherwise you may see warning messages like:
Warning in <TStreamerInfo::BuildCheck>:
The class MyClass transitioned from not having a specified class version
to having a specified class version (the current class version is 2).
However too many different non-versioned layouts of the class have been
loaded so far. This prevent the proper reading of objects written with
the class layout version 3, in particular from the file:
myclass3.root.
Addition Details:
When loading a file containing a non-versioned layout of a class, this
layout is assigned the next 'free' number in the list of StreamerInfo.
In particular this means that if many files with non-versioned layout
of the class are loaded before the loading of a library containing a
versioned class layout, the slot reserved for this version layout may
already be occupied and you will get the following error message:
The class MyClass transitioned from not having a specified class version
to having a specified class version (the current class version is 2).
However too many different non-versioned layouts of the class have
already been loaded so far. To work around this problem you can
load fewer 'old' file in the same ROOT session or load the C++ library
describing the class MyClass before opening the files or increase the version
number of the class for example ClassDef(MyClass,3).
Do not try to write objects with the current class definition,
the files might not be readable.
Also if many files with non-versioned layout of the class are read
before a file with a versioned layout (and this number is too low), you
may get the following error message:
Warning in <TStreamerInfo::BuildCheck>:
The class MyClass transitioned from not having a specified class version
to having a specified class version (the current class version is 2).
However too many different non-versioned layouts of the class have been
loaded so far. This prevent the proper reading of objects written with
the class layout version 3, in particular from the file:
myclass3.root.
Additional note:
For classes with no specified version (i.e. Foreign classes), the current
TStreamerInfo is stored at index -1 in the list of StreamerInfo and the
class version (gROOT->GetClass("MyClass")->GetClassVersion()) is set to -1.
Revision
20854 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Nov 16 22:34:15 2007 UTC (7 years, 2 months ago) by
pcanal
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 107009 byte(s)
Diff to
previous 20173
* Correct the schema evolution to and from any numerical type involvind on one
end or the other any variation of Float16_t and Double32_t.
* Add the annotation (aka the comment part with [xyz]) of C style arrays,
Float16_t and Double32_t to the checksum calculation.
* Allow the checksum of existing class with a ClassDef to match with and
without the annotation taken in consideration. This allows for reading
older file (hence with desufficient checksum) to be read without any warning
message. However this also means that if the classes on this older file are
different _only_ by the annotation, it will not be noted.
* Prevent the fact that any consecutive Double32_t, independently of their
annotation are 'compiled' together and thus only the annotation of the first
one are used (incorrectly). To support backward compatibility with files
written with this bug, the version number of TStreamerInfo has been
increased to 6. The compilation is still done the same way for 'old'
TStreamerInfo (TStreamerInfo version 5 or less). However if the
Double32_t are changed to Float16_t, since the compilation is turned off
because of the schema evolution, the 'wrong' annotation might be used for
those old files. [This should be rare]
* Corrected the fact that due to an off by one lookup, the number of
TStreamerInfo for a class was actually limited to 13.
Revision
17784 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Feb 8 15:09:08 2007 UTC (7 years, 11 months ago) by
pcanal
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 103633 byte(s)
Diff to
previous 17745
Now that we delay the creation of the generic collection proxy, the typeinfo
is ambiguous to look up the TClass (for container of Double32_t), so we now
need to use the TClass pointer (which is straightforward since we now have
it when we create the collection proxy object).
Also add code to allow the schema evolution from a container of double to
the _same_ container of Double32_t and vice et versa.
Revision
16219 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Sep 8 06:56:24 2006 UTC (8 years, 4 months ago) by
pcanal
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 103840 byte(s)
Diff to
previous 16086
From Paul:
o TStreamerInfo::Compile() does not create an entry in the
TStreamerinfo::fElem array for a TObject base class of a
class that has had TClass::IgnoreTObjectStreamer() called
on it. So when TTree::Bronch() is creating subbranches
for a split class which inherits from TObject but is
skipping the TObject base class, we must be careful not
to consume an id number (fElem array index) for it.
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/io/src/TStreamerInfo.cxx
File length: 99181 byte(s)
Diff to
previous 14971
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
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/io/src/TStreamerInfo.cxx
File length: 97984 byte(s)
Diff to
previous 14332
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
14332 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Mar 20 21:35:47 2006 UTC (8 years, 10 months ago) by
pcanal
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 97987 byte(s)
Diff to
previous 14083
Add a new bit (kIgnoreTObjectStreamer) which is still BIT(13) for
backward compatibility.
Add a new method Clear which support the option "built". This allows
the un-doing of the Build method (used when loading a library __after__
the creation of an emulated class).
BuildCheck now issues a warning the first time it sees a file
which contains a StreamerInfo which does not match a StreamerInfo
for the same version which is already in memory.
See the test 'warning' in roottest/root/meta/evolution for a sample
of the possible warning scenarii.
Add support for a StreamerInfo in slot '-1' in the case of Foreign
for which the 'current' StreamerInfo is requested after a file
has been read-in (In which case, the TClass version will be -1,
the file StreamerInfo version will be 1, and the in-memory/current
StreamerInfo version will be -1.
Revision
13949 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jan 30 09:01:12 2006 UTC (8 years, 11 months ago) by
rdm
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 90541 byte(s)
Diff to
previous 13255
TStreamerInfo was including TFile.h, TROOT.h and TClonesArray.h iso of
forward declaring them. This caused massif recompilation if e.g.
TFile.h was changed. Correct some sources that did not include
TFile.h because it was coming via TStreamerInfo.h.
Revision
12991 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Oct 20 19:24:04 2005 UTC (9 years, 3 months ago) by
pcanal
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 90363 byte(s)
Diff to
previous 12601
From Paul Russo:
We extend the support for pointers to varying length arrays
of objects to include the cases:
1) Objects whose classes do not have a ClassDef macro, but do
have dictionaries loaded (no default Streamer, but we do have
TStreamerInfo).
2) Objects of classes with custom Streamer functions.
3) Reading an object from a file when we do not have the
dictionary loaded for the object's class, and then writing
that object out to a file again (emulated objects). This
allows us to copy trees without have to have the class
dictionaries loaded.
Note that we still do not support the case of STL objects.
There is a problem with the old implementation and the current
implementation in that memory is leaked in the case of reading
a varying length array of pointers to objects. The memory for
the objects read on the previous read is leaked because the code
is written in such a way that we have already overwritten the
length of the old variable array with the length of the new one
before we get to the place where we must iterate through the
array and free the old objects. The code must be changed to
take note of the old value of the varying length when the new
value is read, so that it may be used later to free the old
set of objects.
Revision
12176 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jun 23 18:19:26 2005 UTC (9 years, 7 months ago) by
pcanal
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 90372 byte(s)
Diff to
previous 12005
From Markus,
When rebuilding the TStreamerInfo store in a file, variable size
array of char (char* xyz; //[index]) where mistaken for a character string.
This patch fixes the problem by adding (and using) TStreamerElement::HasCounter
Revision
11464 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Mar 31 17:52:25 2005 UTC (9 years, 9 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 90498 byte(s)
Diff to
previous 11086
From Philippe:
TStreamerInfo::PrintValue
lookup the TStreamerElement only when needed
add printing of array of fBits (need in MakeClass mode)
TBranchElement::PrintValue
In MakeClass mode, print the char as unsigned char instead
of as strings.
Revision
10958 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jan 19 18:30:58 2005 UTC (10 years ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 90210 byte(s)
Diff to
previous 10898
From Philippe:
This patch implement support for bool of various in memory size. They are
always written using only 1 bytes. This solves problem on MacOS where
sizeof(bool)==4 instead of 1.
Note that there should still be a problem with the old-style splitted branch
(tested in Event.old.split.root.
A fix for this will come later on.
Revision
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/io/src/TStreamerInfo.cxx
File length: 89585 byte(s)
Diff to
previous 10869
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
10555 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Nov 18 06:13:14 2004 UTC (10 years, 2 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 88714 byte(s)
Diff to
previous 10554
From Philippe:
The crash for iobug.C(1,0) was fixed in a previous patch.
The bad results in iobug.C(1,1) and iobug.C(2,1) were a result of badly
formed files (i.e. the file produce do not contain the correct data!).
This patch resolves the solution by insuring that all the level of base
classes have their own TBranchElement object except when inside a split
collection.
When the base class or any of its own base class has no data member, there
is no branch created (this was already the case).
The TBranchElement corresponding to the base class itself does NOT have a
TLeafElement (but has at least one sub-TBranchElement). Its fObject points
to the start of the sub-part of the object which correspond to its base
class.
In addition, this patch corrects TBranch::GetSubBranch to give the correct
result even if the hiearchy of branch is more than 2 deep.
This patch also correct GetValueClones and GetValueSTL to add the base class
offset only once.
Revision
10549 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Nov 17 17:56:53 2004 UTC (10 years, 2 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 88965 byte(s)
Diff to
previous 10545
From Philippe,
This patch implements the schema evolution to and from selected containers.
The following cases are currently implemented:
TClonesArray object -> STL object containing the same type
TClonesArray pointer -> STL pointer containing the same type
STL object -> STL object containing the same type
STL pointer -> STL pointer containing the same type
STL split branches -> TClonesArray
In addition this patch implement the ability to have schema evolution
between various version of a foreign class when the library is not present.
This patch also support in in TTree::Draw for the schema evolution of simple
type stored in a non-split branch.
Revision
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/io/src/TStreamerInfo.cxx
File length: 88940 byte(s)
Diff to
previous 10512
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
10512 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Nov 10 06:26:51 2004 UTC (10 years, 2 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 84554 byte(s)
Diff to
previous 10350
From Philippe:
Add support for automatic schema evolution when a namespace is added to a class.I think the simpliest way to implement this type of conversion is to
- Add the TStreamerInfo from the old TClass into the new TClass
- Update the TStreamerElement to tell them use the new Class.
I implemented this is in the included patch and I tested it in
roottest/root/io/evolution
Note that (for now) this automatic schema evolution is enabled if and only
if
- the old TStreamerInfo of class T refers to class A
- the current TStreamerInfo of class T refer to class B
- A is NOT loaded (i.e. does not have a CINT dictionary)
- A does not have any scope in its name
- B has the same name as A but is prefixed by a namespace
- B does NOT have a TStreamerInfo for the class versions that A has.
For example A is MyClass and B is MyNamespace::MyClass
Revision
10350 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Oct 19 11:00:09 2004 UTC (10 years, 3 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 80545 byte(s)
Diff to
previous 9860
From Philippe:
implements MemberWise streaming for collection with a
TVirtualCollectionProxy and whose content is splittable (i.e. guaranteed
homogeneous).
In this first implementation, objectwise streaming is still the default.
To activate memberwise streaming, call the static function
TStreamerInfo::SetStreamMemberWise(kTRUE);
Revision
9803 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 20 21:02:10 2004 UTC (10 years, 5 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 78852 byte(s)
Diff to
previous 9661
From Philippe:
This patch is an important step toward the implementation of the member-wise
saving of stl containers.
Mainly, the code does not require anymore the collection proxy to be able
to provide a C-style array of pointer to its content. This avoid the
problems of having to iterate twice through some collection and/or to have to
keep in memory a version of this array. Concretely this also mean that the
I/O routine will now be able to recurse through stl containers.
Technically, this is done by templating TStreamerInfo::ReadBuffer and
TStreamerInfo::WriteBufferAux (as well as the ReadBufferSkip And
ReadBufferConv) so that you can use it directly with a char** or
with a TVirtualCollection (to which we added an operator [] and
removed the method GetPtrArray).
In addition, we added 2 new method to TVirtualCollectionProxy:
PushProxy and PopProxy that will allow to keep some state on
where we are in the iteration for a collection when we recurse.
(This is required for a reasonable implementation of the
TVirtualCollection for std::list).
Also (in an unrelated fix) we update TTreePlayer::Scan to
properly display the columns when they are more expressions
in the request than leaves in the tree.
Revision
9661 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Aug 3 05:25:03 2004 UTC (10 years, 5 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 98735 byte(s)
Diff to
previous 9289
From Philippe:
This patch add to TTreeFormula (and to TStreamerInfo::GetValue)
the ability to read the content of a data member defined as
Int_t *arr[3]; //[n]
The data was properly wrote and read back from disk. However
TTreeFormula (and StreamerInfo::GetValue) where ignoring the
size of the array of pointers.
+ a fix to the printout of TTree::Scan (for Long64_t)
Revision
8813 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri May 7 09:11:03 2004 UTC (10 years, 8 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 96822 byte(s)
Diff to
previous 8191
Add new function:
TStreamerElement* TStreamerInfo::GetStreamerElementReal(Int_t i, Int_t j) const
{
// if i is the index in the compressed array fElems and
// ise the corresponding serial number in the uncompressed array fElements
// the function returns the TStreamerElement corresponding to "ise+j"
// in fElements.
// This function is typically called from Tbuffer, TXmlBuffer
In TStreamerInfo::ReadBuffer and TStreamerInfo::WriteBuffer add a call
to the new function TBuffer::StreamerElementNumber.
Revision
8191 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Feb 13 07:12:57 2004 UTC (10 years, 11 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 95897 byte(s)
Diff to
previous 8115
From Philippe:
This patch repairs several issues dealing with loading a library
and a corresponding root file when they define/contain stl containers.
TROOT.cxx:
The dictionary loading has a recursive behavior which implies
that some entry are actually loaded several time (mostly harmless
but hard to prevent). This leads to a case where the const char*
is modified during the loading of the dictionary.
TClass.h and TClasss.cxx:
Add the following convenience static functions:
TClass::GetClass equivalent to gROOT->GetClass
TClass::GetDict equivalent to TClassTable::GetDict
Fix a problem where the TClass object stored in the current
class TStreamerInfo were not refreshed when the TClass object
was replace. The fix is to insure that the current TClass is
in the listOfClasses when the replacement might happen
TTree.cxx and TStreamerInfo.cxx
If an stl container is a base class, it ends up with a
TStreamerInfo on the file. However TStreamerInfo for stl
containers are not always built. Anyway the StreamerInfo
is not used. So it should not be on the file (fix in TTree).
However for backward compatibility we now handle the case in
BuildCheck.
Revision
8098 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Jan 31 08:59:09 2004 UTC (10 years, 11 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 95555 byte(s)
Diff to
previous 8091
Reintroduce Philippe's patch, now corrected for several machines.
stress, bench and DrawTest.sh runs correctly.
Still problem in running DrawTest.sh on SGI (cc,gcc,kcc). Likely due
to an alignement problem with the handling of the new type Double32_t
Revision
8087 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jan 29 23:08:16 2004 UTC (10 years, 11 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 95554 byte(s)
Diff to
previous 8056
From Philippe:
This patch should resolve completely the issue discovered by Minos (related to
typename being typedefs). It also repairs the I/O for fixed size array of
TObject.
TString:
add constructor and operator= taking a std::string argument
TROOT:
GetClass now properly resolve templateClass<typedef>.
Previously the typedef resolution was restricted to the full name.
TClassTable:
Look for an existing TClass directly in TROOT::fListOfClasses to
avoid the potential loading behavior of TROOT::GetClass
TCint::UpdateClassInfo
Also look for possible alias name in the list of TClass objects.
In particular, depending on the load order of libraries and file,
the Emulated class for container<int> might be container<Int_t> or
vce et versa.
TClass::Init
When we have a templated class, also look for existing Emulated
class which may have a different name.
TStreamerElement/TStreamerInfo
Use the name with resolved typedef in the TStreamerElement.
Also repair the I/O for fixed size array of TObjects.
TClassEdit:
Add a utility to resolve the typedefs inside a typename.
This resolution has 2 modes. One where it resolved all
typedefs which should be used to compare 2 typename and
establish equality. A second where it resolved all
typedefs __except__ for the ROOT integral type typedefs,
this version is used to create the typename that will be
save on file. This is necessary to avoid the replacement
of (for example) Long64_t by its platform dependent version.
Revision
8056 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jan 27 19:52:48 2004 UTC (10 years, 11 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 95001 byte(s)
Diff to
previous 7997
From Philippe:
This patches improves the consistency of the naming convention for the TClass
of STL containers. Previous, std::vector<float>, vector<float>, etc. could be
considered as 2 different entities by part of the ROOT code. This rationalizes these
cases. It should fix all reported related bugs.
Revision
7921 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jan 16 16:27:36 2004 UTC (11 years ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 94974 byte(s)
Diff to
previous 7892
From Philippe:
TBuffer.cxx : use checksum only if the class version
is set to the default (1) and the class does not have a
Streamer method (IsForeign()==true)
TFormula.cxx: fix a typo
TClass.cxx: add comment to explicitly the mean of the bits use
by TClass::Property
TStreamerInfo.cxx: fix problem in the conversion from Double32_t,
use newType in GetValue. Fix a recursion problem in TStreamerInfo::Build.
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/io/src/TStreamerInfo.cxx
File length: 93868 byte(s)
Diff to
previous 7835
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
7804 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Dec 26 18:38:21 2003 UTC (11 years, 1 month ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 200850 byte(s)
Diff to
previous 7801
Implement a new data type Double32_t (in Rtypes.h).
In memory a Double32_t is like a Double_t (8 bytes).
When written to a file, the type is converted to a Float 4 bytes.
The newdata type is accepted as a simple variable, as a fixed length array
or a variable length array, like:
Double32_t fPt:
Double32_t fVertex[3];
Int_t fNtracks;
Double32_t *fPx; //[fNtracks]
The new data type is supported in all I/O modes (TKey or TTree)
The automatic schema evolution algorithm accepts this new type.
For example a class in a file containing a Double_t data member
can be read by a new class where the member is now of type Double32_t
and vice-versa.
Revision
7801 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Dec 25 17:51:38 2003 UTC (11 years, 1 month ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 192583 byte(s)
Diff to
previous 7597
In TStreamerInfo::BuildCheck recompute the fClassVersion and the pointer to the
TStreamerInfo object corresponding to the current class checksum.
In case of a foreign class, do not print the Warning in case the current class
checksum and the checksum in the TStreamerInfo differ. Instead recompute
the correct class version using the checksum parameter.
Revision
7597 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Nov 14 11:11:21 2003 UTC (11 years, 2 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 191921 byte(s)
Diff to
previous 7446
TTree::Show has a new optional argument (Int_t lenmax=20).
This argument is used to limitate the number of array elements
to be printed in case of variable length arrays, or the
number of objects in a TClonesArray. (previous default was 10
for integer elements and 5 for float elements.
This change has required the following other mods:
-The previously unused argument of TBranchElement::PrintValue
is now the argument lenmax (as given by TTree::Show).
-TStreamerInfo::PrintValue has a new optional argument lenmax
-TStreamerInfo::PrintValueClones has a new optional argument lenmax
-PrintValue and PrintValueClones have a new logic to limitate
the number of printed elements (via macros PrintCR and PrintCCR).
Revision
7154 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Aug 25 22:37:39 2003 UTC (11 years, 5 months ago) by
rdm
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 190256 byte(s)
Diff to
previous 7092
From Philippe:
Update TStreamerInfo::New to properly initialize pointers and array of objects.
Update BuildIndex to elegantly fail if the given index do not produces exactly
one value per entry.
Update TTreeFormula to properly handle the case of a TClonesArray inside a
TClonesArray when the former is a top branch and not split.
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/io/src/TStreamerInfo.cxx
File length: 188615 byte(s)
Diff to
previous 6657
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
6657 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue May 27 00:39:04 2003 UTC (11 years, 8 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 188544 byte(s)
Diff to
previous 6647
Implement TStreamerSTL::SetStreamer function that redefines
TStreamerElement::SetStreamer. In the STL case, fType is set
to TStreamerInfo::kSTreamer.
Remove special case kStreamer+kOffsetL in TStreamerInfo::ReadBuffer
and WriteBuffer.
Revision
6511 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Apr 30 16:22:52 2003 UTC (11 years, 8 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 188544 byte(s)
Diff to
previous 6468
From Philippe:
If the user creates a dictionary for one of its STL containers, it can happen that
a TClass is created. However for now there is no corresponding StreamerInfo.
This patch avoids even attempting to write it.
Revision
6468 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Apr 18 16:42:31 2003 UTC (11 years, 9 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 188048 byte(s)
Diff to
previous 6453
From Philippe:
In TBranchElement::SetAddress we have something like:
TClass *clm = gROOT->GetClass(GetClassName());
Int_t *offsets = clm->GetStreamerInfo()->GetOffsets();
...
if (mOffset > 0) fOffset = mOffset -offsets[fID];
However, if the class has been modified so that the order of the data member in the "live" class is different from
the version that was used to write the file, the fID does NOT point to the index of the needed datamember in the new
StreamerInfo. We have to retrieve it by name instead (hence the patch).
Revision
6421 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Apr 11 11:48:11 2003 UTC (11 years, 9 months ago) by
rdm
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 186019 byte(s)
Diff to
previous 6405
Big (unsigned) long long support patch. Following provided:
- basic typedefs in Rtypes.h: Long64_t and ULong64_t
- basic Long64 I/O support in TBuffer
- automatic Long64 I/O support in TStreamerInfo
- Long64 byteswap in Bytes.h
- Long64 type handling in classes like TDataMember, TDataType, TCint,
TROOT, etc
- Removal of obsolete Long64_t typedefs in many PROOF classes
No changes for non-Long64 data types (no backward incompatibilies).
I/O tested for Long64 basic type, and static and dynamic arrays using
handcoded streamers, rootcint generated streamers and automatic StreamerInfo
streamers.
Revision
6254 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Mar 5 23:31:07 2003 UTC (11 years, 10 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 176553 byte(s)
Diff to
previous 6225
In method TStreamerInfo::ForceWriteInfo, add a second optional argument
Bool_t force=kFALSE.
When the argument is set to kTRUE, ForceWriteInfo will loop on all
classes referenced by this class, calling in turn the ForceWriteInfo.
This logic was necessary to force the TStreamerInfo object to be written
in the file even when the class has no data members.
Revision
6218 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Feb 28 20:26:51 2003 UTC (11 years, 10 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 176382 byte(s)
Diff to
previous 6214
From Philippe:
Before this patch doing the following in cint
{
class Event;
new TFile("test.root");
}
resulted in the erroneous message:
The StreamerInfo of class Event read from file test.root
has the same version (=1) as the active class but a different checksum.
You should update the version to ClassDef(Event,2).
Do not try to write objects with the current class definition,
the files will not be readable.
This patch fixes this problem. It also initialize some forgotten data members.
It also introduce TClass::kIsEmulation, a new bit set for all 'fake classes'
(or emulated classes).
Revision
6096 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Feb 11 18:22:25 2003 UTC (11 years, 11 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 174484 byte(s)
Diff to
previous 6061
Implement new functions;
Int_t ReadBufferSkip(TBuffer &b, char *pointer, Int_t i, Int_t kase, TStreamerElement *aElement);
Int_t ReadBufferConv(TBuffer &b, char *pointer, Int_t i, Int_t kase, TStreamerElement *aElement);
Int_t ReadBufferClonesSkip(TBuffer &b, TClonesArray *clones, Int_t nc, Int_t i, Int_t kase, TStreamerElement *aElement);
Int_t ReadBufferClonesConv(TBuffer &b, TClonesArray *clones, Int_t nc, Int_t i, Int_t kase, Int_t eoffset, TStreamerElement *aElement);
Move in these new functions, the code previously in ReadBuffer/ReadbufferClones
for skiping or converting members.
Implement the conversion code for TClonesArray.
Revision
5949 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jan 21 13:51:20 2003 UTC (12 years ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 162465 byte(s)
Diff to
previous 5867
In TStreamerInfo::BuildCheck, always scan the list of TStreamerElement if
a TStreamerInfo with the same class version already exists. If the TStreamerElement
titles are different, set the old title to the new title.
This change is required to cope with complex cases when the old TStreamerInfo
was built from a Tree in no split mode and the new TStreamerInfo from a Tree
in split mode. In this case, a class with a TClonesArray may have the class name
contained in the TClonesArray missing in the TStreamerElement title.
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/io/src/TStreamerInfo.cxx
File length: 161197 byte(s)
Diff to
previous 5665
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
5642 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Nov 22 18:57:07 2002 UTC (12 years, 2 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 161295 byte(s)
Diff to
previous 5523
From Victor:
In TDataMember.h new method which returns true type name,
not a typedef one.
==========================================================
const char *GetTrueTypeName() const;
Its implementation in TDataMember.cxx
//______________________________________________________________________________
const char *TDataMember::GetTrueTypeName() const
{
// Get true, non typedef, type description of data member, e,g.: "int*" not "Int_t*".
return fInfo->Type()->TrueName();
}
In file TStreamerInfo.cxx
=========================
old code :
if (dm->IsSTLContainer()) {
TStreamerSTL *stl = new TStreamerSTL(dm->GetName(),dm->GetTitle(),offset,dm->GetFullTypeName(),dm->IsaPointer());
replaced by:
if (dm->IsSTLContainer()) {
TStreamerSTL *stl = new TStreamerSTL(dm->GetName(),dm->GetTitle(),offset,dm->GetTrueTypeName(),dm->IsaPointer());
Revision
5523 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Nov 1 19:12:10 2002 UTC (12 years, 2 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 161295 byte(s)
Diff to
previous 5355
From Philippe:
This patch adds the ability to save objects of classes using multiple
inheritance (directly or indirectly) as part of other objects.
(Previously multiple inheritance was only supported for top level objects).
In TBuffer.h, TBuffer.cxx:
TBuffer::WriteObject( const void *actualObjStart, TClass *actualClass);
has been made protected. It is replaced by
WriteObjectAny(const void *obj, TClass *ptrClass);
which has a slightly different semantic (for multiple inheriting classes).
The value of 'obj' in expected to be a value that can be legally stored
in a pointer to an object of the type described by 'ptrClass'. I.e:
MyClass *ptr;
....
b.WriteObjectAny(ptr,gROOT->GetClass(typeid(MyClass)));
We introduced:
void *ReadObjectAny(const TClass* cast);
which returns a value suitable to be stored in a pointer to an object of
the type described by 'cast'. I.e, a typical usage is:
MyClass *ptr = (MyClass*)b.ReadObjectAny(MyClass::Class());
The existing function
TObject *TBuffer::ReadObject(const TClass *clReq)
now ignores its parameter and returns the address where the object read
actually start. It should be noted that if the object is of a class
which derives from TObject but not as a first inheritance, this value is
NOT a valid TObject*. We recommend using ReadObjectAny instead.
In TKey.cxx, I reverted the comments to properly describe how to deal with
top level object which inherits from TObject but not as a first inheritance
(can not use dynamic_cast).
In TGenericInfo.h, TGenericInfo.cxx, rootcint.cxx and TClass.cxx, we moved
to always use an IsA wrapper function instead of using the interpreter for
TObjects.
TClass.cxx has been modified to optimize a few function now called many
times.
TStreamerInfo.cxx and TStreamerElement.cxx has been modified to use the
new TBuffer function and to properly read/write multiple inheriting objects.
Revision
5355 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Sep 27 18:06:19 2002 UTC (12 years, 3 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 160361 byte(s)
Diff to
previous 5177
This patch from Philippe adds support for I/O of the following types of data members:
MyClass myArr[3];
MyClass *myArrFix[3];
The following is NOT supported yet:
MyClass **myArrVar; //[index]
This is already supported for TObject classes via a streamer generated by rootcint.
Revision
5177 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 23 08:53:00 2002 UTC (12 years, 5 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 159856 byte(s)
Diff to
previous 5102
Fix a problem in TStreamerInfo::WriteBuffer and WriteBufferClones
when saving fBits for a referenced object. In case the REf is copied
from an old file to a new file, the pid from the old file must be saved
and not the pid from the current session.
This problem was visible when calling TChain::Merge in particular.
Revision
5102 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 9 19:26:26 2002 UTC (12 years, 5 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 159552 byte(s)
Diff to
previous 5069
This patch insures that TStreamerInfo always uses a TStreamerSTL for STL containers even if the user has
produced a dictionary for the STL container.
This patch also add support for array of pointers to variable size arrays.
Int_t fZones; // Total number of zones
Float_t* fEffLow[50]; //[fZones] Table for low-pt cut bkg=0
Note that, for lack of better syntax, all the variable size array have the same size in the same instance.
Philippe.
Revision
4663 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jun 4 17:50:04 2002 UTC (12 years, 7 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 157198 byte(s)
Diff to
previous 4626
Add an optional parameter to TClass::GetCheckSum.
This optional parameter is used by TStreamerInfo::BuildCheck in case
a discrepancy is found between the current class and the class in the file.
When the parameter is set to 1, the data members of type enum are ignored in the
computation of the class checksum. This is to cope with a change in CINT that
correctly reports now the data member to be an enum.
Revision
4555 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu May 16 16:47:53 2002 UTC (12 years, 8 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 156959 byte(s)
Diff to
previous 4498
In TStreamerInfo::GenerateHeaderFile fix a side-effect of the new ClassDef/ClassImp.
In the new version of TClass, the header file name contains the full path,
eg for TClonesArray, DeclarationFilename is now "cont/inc/TClonesArray.h", where
before it was only "TClonesArray.h"
Revision
4498 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu May 9 20:22:01 2002 UTC (12 years, 8 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 156786 byte(s)
Diff to
previous 4460
New attempt to introduce the new additions (Philippe) to the I/O system
as well as as the new version of ClassDef/ClassImp.
With the additions to the I/O, it is now possible to generate
a dictionary for classes not instrumented with ClassDef.
Revision
4446 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri May 3 14:30:43 2002 UTC (12 years, 8 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 156786 byte(s)
Diff to
previous 4432
Introduce a long patch by Philippe. With this patch, ROOT I/O
should be able to support foreign not-ROOT instrumented classes.
More information will come later.
This patch is tentatively put in the CVS head to facilitate
testing on all platforms.
Revision
4282 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Apr 1 17:19:13 2002 UTC (12 years, 9 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 136775 byte(s)
Diff to
previous 4255
Several changes in the handling of TRef to support the following use case:
An array of objects is written to a file but the TRefs
referencing these objects are not written to the file.
In a next session, these objects are read in memory
and new TRefs point to these objects and are written
to a separate file. In a third session both files
are connected.
To get this scenario working, one must use a dummy TRef
set to all objects that can be referenced in the next session.
Revision
4155 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 8 08:09:11 2002 UTC (12 years, 10 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 136191 byte(s)
Diff to
previous 4090
iPatch from Philippe that (re)enables saving and reading C-style arrays of object.
The 4 cases added are
array of pointers to object inheriting from TObject
array objects inheriting from TObject
array of pointers to object not inheriting from TObject but with ClassDef
array objects not inheriting from TObject but with ClassDef
Note that the 1st 2 cases are also implemented for inside a TClonesArray while
the last 2 cases are NOT ... this will be done when we upgrade the ClassDef/ClassImp
facility....
A small update to TTreeFormula for those cases (more is needed).
Revision
4090 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Feb 25 11:20:26 2002 UTC (12 years, 11 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 131088 byte(s)
Diff to
previous 3911
Following a good suggestion from Mathieu de Naurois, make ROOT I/O thread-safe.
Do not use anymore the static global members fgFile and fgElement.
To replace fgFile, two member functions BuildFake and ForceWriteInfo
have a new argument:
void BuildFake(TFile *file);
void ForceWriteInfo(TFile *file);
fgElement is replaced in all functions by a local variable aElement.
However, in ReadBuffer and ReadBufferClones, the static member fgElement
is still set to aElement. fgElement is used by TRef::Streamer in read mode.
TRef should be changed to also be thread safe.
Revision
3752 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jan 25 09:25:52 2002 UTC (13 years ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 131230 byte(s)
Diff to
previous 3728
In TStreamerInfo::Build add support for base classes that are STL containers.
The following example is now OK:
class MyClassList : public TObject, public list<MyClass> {
Note that the declaration;
class MyClassList : public list<MyClass>, public TObject {
will not work. TObject or a class deriving from TObject must be declared first.
The reason is that one cast cast an object MyClasslist to a TObject.
Revision
3728 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jan 21 16:31:43 2002 UTC (13 years ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 131393 byte(s)
Diff to
previous 3710
Do not call anymore IgnoreTObjectStreamer for TVector3.
Many users want to put TVector3 or TLorentzVector in TRef/TRefArray.
The old behaviour may be obtained by explicitly calling
TVector3::Class()->IgnoreTObjectStreamer();
TLorentzVector::Class()->IgnoreTObjectStreamer();
Revision
3414 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Dec 7 09:27:43 2001 UTC (13 years, 1 month ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 130486 byte(s)
Diff to
previous 3375
Improve support for a pointer to a fix length array of objects.
In the previous versions, this case was marked as kStreamer (type=500)
and used the code generated by rootcint. Reading required access
to the code in the original dictionary.
In the new version, this case is marked as kObjectP (type=64).
It does not require the code in the dictionary file.
Revision
3339 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Nov 30 16:58:59 2001 UTC (13 years, 1 month ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 130301 byte(s)
Diff to
previous 3300
Implement an option in TStreamerInfo::Build when processing char*
Assuming a class Event with the following members:
Int_t fNvertex; //Number of vertices in Event
char *fTracksInVertex; //[fNvertex] number of tracks for each vertex
char *fEventName; // a string
ROOT I/O will assume that fEventname is terminated by a null character and that the
member contains a string.
fTracksInVertex will be processed like Int_t*, Float_t* with a number of elements
in the array indicated in the comment field.
fTracksInVertex may contain one or more 0s.
Revision
3277 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Nov 22 15:05:21 2001 UTC (13 years, 2 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 129343 byte(s)
Diff to
previous 3268
Add support for char* in all the Read/write/Print/Get functions.
A new type kCharStar introduced in the enum of data types.
With this upgrade, ROOT I/O supports directly native C++ type char*
in a class. The member of type char* can also be specified in a class
member of a TClonesArray.
Revision
3268 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Nov 21 17:59:10 2001 UTC (13 years, 2 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 126145 byte(s)
Diff to
previous 3259
Add a new static member fgElement in TStreamerInfo.
This element is set by the Read and WriteBuffer functions instead
of the local variable 'element" in the loop on data members.
A new static function GetCurrentElement returns fgElement.
This function is used by the new code in TStreamerElement and TRef,
TRefArray implementing the action on demand when a reference
to an object is found (more on this point later).
Revision
3039 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Oct 16 09:12:06 2001 UTC (13 years, 3 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 128059 byte(s)
Diff to
previous 3028
In ReadBuffer and ReadBufferClones, one must read the version number
when a class is a fake class.
Also added some protections in case the fake class and the original class
have non-matching Streamers. This was the case for example of TVector3
where the version count is not written.
Revision
2699 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 17 07:49:13 2001 UTC (13 years, 5 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 125083 byte(s)
Diff to
previous 2681
Add a new static member fgCanDelete with the corresponding getter/setter
CanDelete and SetCanDelete.
// When this option is activated (default), ReadBuffer automatically
// delete objects when a data member is a pointer to an object.
// If your constructor is not presetting pointers to 0, you must
// call this static function TStreamerInfo::SetCanDelete(kFALSE);
Revision
2671 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Aug 13 09:15:04 2001 UTC (13 years, 5 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 123706 byte(s)
Diff to
previous 2642
In ReadBuffer and ReadBufferClones, delete the TObject* in case of kObjectP.
The delete is via pointer->Delete() and not delete pointer to take into account
the case of possible TCollection. This may have some side effects in case
a user destructor doest not preset to 0 the pointer.
Revision
2642 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Aug 7 06:45:02 2001 UTC (13 years, 5 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 123500 byte(s)
Diff to
previous 2559
This patch (Philippe) allows TTreeFormula to properly handle objects inside
an object stored in a TClonesArray. For example in Event, if Track
contains a point to an Histogram fH, now you can do
T->Draw("fTracks.fH.GetMean()");
Revision
2559 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jul 10 19:58:45 2001 UTC (13 years, 6 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 123043 byte(s)
Diff to
previous 2550
Small correction in the algorithm forcing the alignment on word boundaries.
Do not align basic types, only objects and pointers. Aligning basic types had a side effect
for TClonesArray where an implicit assumption is made that members may be contiguous.
With this fix, DrawTest works on Alpha.
Revision
2550 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jul 9 21:41:11 2001 UTC (13 years, 6 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 122969 byte(s)
Diff to
previous 2502
When running in Fake class mode, always align data members to a word boundary
to avoid mis-aligned access (eg on Alpha) when computing addresses of members
that are pointers.
Modify TStreamerInfo::ComputeSize. The class size is taken as the offset of
the last member + the last member size.
This new algorithm is faster and also takes into account the word alignment
of data members.
Revision
2328 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu May 31 08:52:26 2001 UTC (13 years, 7 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 122343 byte(s)
Diff to
previous 2280
Add a new static data member fgFile with its corresponding getter/setter.
fgFile plays the role of gFile, but does not require that a call to TDirectory::cd
be done. STreamerInfo::SetCurrentFile is called by TFile or TDirectory
when gFile is modified. It is also called by TTree::Fill to support the case
when a Tree is filled but the current directory is not the one where the tree
has been built.
Revision
2273 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu May 24 16:29:45 2001 UTC (13 years, 8 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 122013 byte(s)
Diff to
previous 2243
Add a new argument in the functions:
GetValueClones
PrintValueClones
ReadBufferClones
WriteBufferClones
The new argument is the offset of the element in the class in case
the member is more than one level deep.
This change is necessary to support complex classes in TClonesArray.
The above functions have been substantially reorganized to take into account
this new argument.
Implement additional functionality in PrintValueClones to support classes
with multiple levels of composition.
Revision
2243 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun May 20 13:50:54 2001 UTC (13 years, 8 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 122696 byte(s)
Diff to
previous 2238
When TStreamerInfo::Compile is called, the information of
TStreamerInfo::Optimize flag is kept in the bit kCannotOptimize.
When the TstreamerInfo is again compiled in a different program,
The optimization is disabled if this bit is set.
Revision
2204 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue May 15 07:51:45 2001 UTC (13 years, 8 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 120283 byte(s)
Diff to
previous 2170
In TStreamerInfo::ReadBufferClones implement the same logic already implemented
in ReadBuffer for the case kAny and the TArray classes.
With this change, one can read a class in a TClonesArray containing a TArray member
and without the class library.
Revision
2170 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri May 11 08:28:36 2001 UTC (13 years, 8 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 118042 byte(s)
Diff to
previous 2144
Add special case in TStreamerInfo::ReadBuffer when reading classes not
derived from TObject (kAny case) and when the class library is missing.
Add special case in kAny when reading back TArray classes. The TArray
Streamers are not compatible with ReadBuffer (no byte count).
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/io/src/TStreamerInfo.cxx
File length: 113423 byte(s)
Diff to
previous 2020
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
2009 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Apr 19 13:09:31 2001 UTC (13 years, 9 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 112559 byte(s)
Diff to
previous 2006
In TStreamerInfo::ReadBuffer for kAny case, use CLass::ReadBuffer in case pstreamer is null.
This change allows to read an object containing another class not derived from TObject
even in case of a missing class. When this happens the data members of the missing class
are still read at the right place and can be read from TTree::Draw.
Revision
1994 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Apr 18 06:11:06 2001 UTC (13 years, 9 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 112363 byte(s)
Diff to
previous 1991
th this patch from Philippe one can access a datamember within a branch.
For example with a split tree of Event, one can now do:
TFile *Event = TFile::Open("Event.new.root")
T->Draw("event.fH.fNcells")
T->Draw("event.fH.GetNbinsX()")
with both the old style and the new style. It is currently
limited to one level, i.e., you still can not do:
T->Draw("event.fH.fAxis.fXmin")
Revision
1984 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Apr 13 12:35:35 2001 UTC (13 years, 9 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 111206 byte(s)
Diff to
previous 1980
In TStreamerInfo::WriteBuffer when writing case TObject* with option "->"
if the pointer is null, create an object of the class via the default
constructor, sets its Zombie bit and call Streamer.
In TStreamerInfo::ReadBuffer when reading TObject* with option "->"
if the object read has its Zombie bit set, delete the Zombie object and
sets the pointer to null.
When gDebug > 0, issue a Waning in both cases above.
Revision
1916 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Apr 9 08:04:55 2001 UTC (13 years, 9 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 110794 byte(s)
Diff to
previous 1785
New member functions:
CanOptimize: static function to turn on/off members optimization in function Compile.
ComputeSize computing the sizeof the class if the class is available or the sum
of the size of the data members otherwise.
GetSize: returning what was computed by ComputeSize
GetValue: returning the value of a member for a given object
GetValueClones: same as GetValue but for a class in a TClonesArray
PrintValue: printing the value of a member for a given object
PrintValueClones: same as PrintValue but for a class in a TClonesArray.
Revision
1699 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Feb 26 07:15:28 2001 UTC (13 years, 11 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 81255 byte(s)
Diff to
previous 1693
Implement a more efficient logic in TStreamerInfo""WriteBufferClones
and ReadBufferClones when processing base classes in case of multiple inheritance.
This has required an extension of TStreamerbase (new member fBaseVersion)
Revision
1510 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Feb 2 11:16:48 2001 UTC (13 years, 11 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 78812 byte(s)
Diff to
previous 1485
Add new function TStreamerInfo::TagFile. This function is called instead
of the explicit lines modify the TFile class index.
Additional protections introduced to detect cases of bad TStreamerInfo objects
read from a file.
Revision
1439 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Jan 20 21:29:03 2001 UTC (14 years ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 77133 byte(s)
Diff to
previous 1413
Error messages from TStreamerInfo::Build are more verbose and more precise.
A new function TStreamerInfi::ForceWriteIndo:
//This function is called when streaming a class that contains
// a null pointer. In this case, the TStreamerInfo for the class
// with the null pointer must be written to the file and also all the
// TStreamerInfo of all the classes referenced by the class.
In functions ReadBuffer and WriteBuffer, replace the inline code
to stream base classes by a call to the specialized functions
TStreamerbase::ReadBuffer and WriteBuffer.
Revision
1227 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Dec 15 18:10:27 2000 UTC (14 years, 1 month ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 75121 byte(s)
Diff to
previous 1205
Add logic to correctly rebuild the StreamerInfo in the following situation:
1- a Root file is open, but the shared lib with the corresponding classes is not yet loaded
2- the shared lib with the classes is loaded.
When this case happens, the old dummy TClass is deleted and its previous StreamerInfo
structures are moved to the new and valid class.
TROOT::GetClass modified to force teh call to the dictionary builder when the above case
happens.
Revision
1205 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Dec 13 15:13:57 2000 UTC (14 years, 1 month ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 75048 byte(s)
Diff to
previous 1181
W A R N I N G !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
==================================================================
A very long list of changes in this pre-release of version 3.00.
We have modified the signature of many functions (in particular TObject)
to introduce more constness in the system.
You must change your code if your class derives from TObject and uses
one of the modified functions such as ls, Print, Compare, Hash, etc.
The modified functions in TObject have the following signature:
virtual TObject *Clone() const;
virtual Int_t Compare(const TObject *obj) const;
virtual void Delete(Option_t *option=""); // *MENU*
virtual void DrawClass() const; // *MENU*
virtual void DrawClone(Option_t *option="") const; // *MENU*
virtual void Dump() const; // *MENU*
virtual TObject *FindObject(const TObject *obj) const;
virtual char *GetObjectInfo(Int_t px, Int_t py) const;
virtual ULong_t Hash() const;
virtual void Inspect() const; // *MENU*
virtual Bool_t IsEqual(const TObject *obj) const;
virtual void ls(Option_t *option="") const;
virtual void Print(Option_t *option="") const;
A similar operation has been done with classes such as TH1, TVirtualPad,
TTree, etc.
Revision
1091 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Nov 28 09:07:21 2000 UTC (14 years, 1 month ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 73094 byte(s)
Diff to
previous 1068
The big enum previousli in TStreamerElement has been split in two parts.
One part is left in the public part of TStreamerElement.
The second part is moved to the public part of TStreamerInfo.
TStreamerElement.cxx changed accordingly to specify the TStreamerInfo:: prefix
Revision
1024 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Nov 22 20:57:27 2000 UTC (14 years, 2 months ago) by
brun
Original Path:
trunk/io/src/TStreamerInfo.cxx
File length: 73512 byte(s)
Diff to
previous 1015
New version of rootcint generating the R__Inspect calls for members of type object.
With this new information, the computation of the member offset is machine
independent.
Corresponding changes introduced in TClass, TRealData, TStreamerInfo.
Protections added to TTree to skip this new TRealData.
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.