Log of /trunk/io/io/inc/TStreamerInfo.h
Parent Directory
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: 17208 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: 17178 byte(s)
Diff to
previous 38460
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
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: 16460 byte(s)
Diff to
previous 35394
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
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: 16659 byte(s)
Diff to
previous 34628
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
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: 16673 byte(s)
Diff to
previous 33173
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
33173 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Apr 24 21:35:39 2010 UTC (4 years, 9 months ago) by
pcanal
File length: 16611 byte(s)
Diff to
previous 32586
In the case of a data member which is a pointer to a STL container, eg:
std::container<Data> *fDataObjects;
and which is stored member-wise,
add support for the schema evolution of the class 'Data'.
This requires a change in the on file format used to store this type
of data members (i.e. by adding inline the version number of the class
'Data').
To read file containing this construct and written with this revision
using an older version of ROOT you will need the following patches:
For v5.22/00, you will need http://root.cern.ch/viewvc?view=rev&revision=33174
or v5.22/00k
For v5.26/00, you will need http://root.cern.ch/viewvc?view=rev&revision=33176
or v5.26/00c
Additionally, we no longer allow the member wise streaming of a class which
has a custom streamer nor of any data members marked with //||
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: 16611 byte(s)
Diff to
previous 32336
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
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: 16159 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: 16105 byte(s)
Diff to
previous 30905
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: 16418 byte(s)
Diff to
previous 28024
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
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: 16191 byte(s)
Diff to
previous 26606
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
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: 16083 byte(s)
Diff to
previous 26073
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: 15341 byte(s)
Diff to
previous 23122
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
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/inc/TStreamerInfo.h
File length: 14345 byte(s)
Diff to
previous 22940
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
22940 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Apr 2 11:00:49 2008 UTC (6 years, 9 months ago) by
pcanal
Original Path:
trunk/io/inc/TStreamerInfo.h
File length: 14290 byte(s)
Diff to
previous 21917
Insure that the TStreamerInfo a contained class that is to written memberwise
is _not_ optimized.
Repair a few place where TStreamerInfo was wasting some space when the
streamed collection was empty. Increase TStreamerInfo version to 7 to
distinguish the old and new cases.
Rename TCollectionProxyInfo::Environ::delete_temp to use_temp to clarify code/semantic
and fix its use to properly manage the life time of the temporary used (necessary in
the case of memberwise streaming (in non-split mode)).
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/inc/TStreamerInfo.h
File length: 13653 byte(s)
Diff to
previous 21601
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
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/inc/TStreamerInfo.h
File length: 12721 byte(s)
Diff to
previous 21353
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/inc/TStreamerInfo.h
File length: 12519 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/inc/TStreamerInfo.h
File length: 12348 byte(s)
Diff to
previous 20375
* 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/inc/TStreamerInfo.h
File length: 12391 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
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/inc/TStreamerInfo.h
File length: 12411 byte(s)
Diff to
previous 14332
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
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/inc/TStreamerInfo.h
File length: 12176 byte(s)
Diff to
previous 14029
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/inc/TStreamerInfo.h
File length: 11716 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
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/inc/TStreamerInfo.h
File length: 11896 byte(s)
Diff to
previous 10429
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
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/inc/TStreamerInfo.h
File length: 11826 byte(s)
Diff to
previous 10235
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
9825 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Aug 23 16:05:43 2004 UTC (10 years, 5 months ago) by
brun
Original Path:
trunk/io/inc/TStreamerInfo.h
File length: 11683 byte(s)
Diff to
previous 9803
From Philippe:
This patch work around the fact that some compiler (MS6 and alpha) does
not properly handle templated member function. This result in non optimal
run-time performance on those platforms. Also work around the difficulty
with stl container for void* with CINT on MS7)
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/inc/TStreamerInfo.h
File length: 10278 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/inc/TStreamerInfo.h
File length: 10169 byte(s)
Diff to
previous 9290
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
9290 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jun 22 18:47:17 2004 UTC (10 years, 7 months ago) by
brun
Original Path:
trunk/io/inc/TStreamerInfo.h
File length: 10158 byte(s)
Diff to
previous 9157
From Philippe:
TXmlBuffer.cxx:
Update IncrementLevel and DecrementLevel to call their TBuffer
counter-part.
TStreamerInfo.h:
Increase the class version to allow backward compatibility test
(STL containers of pointer to a class not inheriting from TObject
but with a ClassDef.)
TXmlBuffer.cxx TStreamerInfo.cxx
formatting updates
rootcint.cxx TROOT.cxx
Made sure that the version number of a STL continer's TClass is
always the same as TStreamerInfo's class version.
Fix a backward compatibility problem with STL containers of
pointer to a class not inheriting from TObject but with a ClassDef.
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/inc/TStreamerInfo.h
File length: 10091 byte(s)
Diff to
previous 8779
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
8779 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue May 4 15:57:24 2004 UTC (10 years, 8 months ago) by
brun
Original Path:
trunk/io/inc/TStreamerInfo.h
File length: 10020 byte(s)
Diff to
previous 8056
Implement the following setter functions required by the coming XML package:
void TStreamerInfo::SetCheckSum(UInt_t checksum);
void TStreamerElement::SetTypeName(const char *name);
void TStreamerbase::SetBaseVersion(Int_t v);
void TStreamerBasicPointer::SetCountVersion(Int_t count);
void TStreamerBasicPointer::SetCountName(const char *name);
void TStreamerBasicPointer::SetCountClass(const char *clname);
void TStreamerLoop::SetCountVersion(Int_t count);
void TStreamerLoop::SetCountName(const char *name);
void TStreamerLoop::SetCountClass(const char *clname);
void TStreamerSTL::SetSTLtype(Int_t t);
void TStreamerSTL::SetCtype(Int_t t);
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/inc/TStreamerInfo.h
File length: 9944 byte(s)
Diff to
previous 7880
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
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/inc/TStreamerInfo.h
File length: 9932 byte(s)
Diff to
previous 7830
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/inc/TStreamerInfo.h
File length: 7089 byte(s)
Diff to
previous 7597
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
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/inc/TStreamerInfo.h
File length: 7052 byte(s)
Diff to
previous 7283
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
7283 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Sep 15 20:30:35 2003 UTC (11 years, 4 months ago) by
brun
Original Path:
trunk/io/inc/TStreamerInfo.h
File length: 7014 byte(s)
Diff to
previous 7268
From Phhilippe:
Fix a case where the main TStreamerInfo was present but not built/compiled. I added to TStreamerInfo and
TStremearInfo::GetElementCounter what was needed to detect the case and handle it properly.
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/inc/TStreamerInfo.h
File length: 6883 byte(s)
Diff to
previous 6421
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/inc/TStreamerInfo.h
File length: 6830 byte(s)
Diff to
previous 6254
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/inc/TStreamerInfo.h
File length: 6781 byte(s)
Diff to
previous 6096
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
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/inc/TStreamerInfo.h
File length: 6760 byte(s)
Diff to
previous 4818
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
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/inc/TStreamerInfo.h
File length: 6188 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/inc/TStreamerInfo.h
File length: 6188 byte(s)
Diff to
previous 4090
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
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/inc/TStreamerInfo.h
File length: 6149 byte(s)
Diff to
previous 3277
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
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/inc/TStreamerInfo.h
File length: 6272 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/inc/TStreamerInfo.h
File length: 6258 byte(s)
Diff to
previous 2949
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
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/inc/TStreamerInfo.h
File length: 6122 byte(s)
Diff to
previous 2334
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
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/inc/TStreamerInfo.h
File length: 5986 byte(s)
Diff to
previous 2273
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/inc/TStreamerInfo.h
File length: 5796 byte(s)
Diff to
previous 2247
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
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/inc/TStreamerInfo.h
File length: 5602 byte(s)
Diff to
previous 1994
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
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/inc/TStreamerInfo.h
File length: 5588 byte(s)
Diff to
previous 1980
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
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/inc/TStreamerInfo.h
File length: 5506 byte(s)
Diff to
previous 1647
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
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/inc/TStreamerInfo.h
File length: 4934 byte(s)
Diff to
previous 1484
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
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/inc/TStreamerInfo.h
File length: 4167 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/inc/TStreamerInfo.h
File length: 4071 byte(s)
Diff to
previous 1015
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
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.