Log of /trunk/core/meta/src/TStreamerElement.cxx
Parent Directory
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: 65965 byte(s)
Diff to
previous 40711
Fix coding convention R.RN7 (Avoid the raw C types 'long', 'unsigned long', 'long double', 'bool', 'long long' and 'unsigned long long'.)
Revision
40711 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Aug 25 18:41:19 2011 UTC (3 years, 4 months ago) by
pcanal
File length: 65965 byte(s)
Diff to
previous 40083
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
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: 65943 byte(s)
Diff to
previous 38460
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
36543 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Nov 8 17:51:01 2010 UTC (4 years, 2 months ago) by
pcanal
File length: 65317 byte(s)
Diff to
previous 36308
Improve performance of streaming base classes which have a ClassDef macro
by recording a pointer to a wrapper to the Streamer function
rather than going through CINT. This is also used to improved the performance
of Streaming non-TObject class with a ClassDef (also skipping the use of
CINT in this case).
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: 65444 byte(s)
Diff to
previous 34994
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
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: 65374 byte(s)
Diff to
previous 32915
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
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: 63991 byte(s)
Diff to
previous 32385
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
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: 63942 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: 63855 byte(s)
Diff to
previous 31565
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
31565 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Dec 4 18:44:27 2009 UTC (5 years, 1 month ago) by
pcanal
File length: 63288 byte(s)
Diff to
previous 31560
Avoid core dumping even if we encounter an STL container which known only by its typedefed name (but do not known what the typedef points to)
Revision
31298 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Nov 18 21:06:12 2009 UTC (5 years, 2 months ago) by
pcanal
File length: 62658 byte(s)
Diff to
previous 28776
From Axel and Philippe:
When streaming a base class without StreamerNVirtual() use an external
streamer if it was set. Fixes Savannah #59093.
Revision
28578 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue May 12 16:11:12 2009 UTC (5 years, 8 months ago) by
rdm
File length: 61122 byte(s)
Diff to
previous 28449
fix warnings from Ubuntu 9:
core/meta/src/TStreamerElement.cxx:285: warning: format not a string literal and no format arguments
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: 61011 byte(s)
Diff to
previous 25450
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: 60992 byte(s)
Diff to
previous 24222
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
24077 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat May 31 19:39:09 2008 UTC (6 years, 7 months ago) by
brun
File length: 59642 byte(s)
Diff to
previous 22961
Extend the TInterpreter class to support the CINT API used so far by ROOT.
The concrete implementation of the class is in TCint.
The new functions are essentially interfaces to the existing CINT C++ classes
like G__ClassInfo, G__CallFunc, G__DataMemberInfo, G__MethodInfo, G__TypeInfo
and G__TypedefInfo. Most of these functions will call the Reflex interface
once the CINT/Reflex interface will be available later this year.
All direct calls to CINT are replaced by calls like gCint->ClassInfo_xxx where gCint
points to the TCint implementation.
The existing calls to TCint via gInterpreter are kept because on Windows
gInterpreter does not call directly TCint, but instead call TWin32InterpreterProxy
that in turns call TCint.
On Linux and Mac, gInterpreter and gCint are equivalent.
Once the transformation using gCint will be completed, it will be possible
to specify at startup time which version of CINT (CINT or CINT7) by loading
dynamically TCint or TCint7.--This line, and those below, will be ignored--
M core/meta/src/TStreamerElement.cxx
M core/meta/src/TCint.cxx
M core/meta/src/TGlobal.cxx
M core/meta/src/TBaseClass.cxx
M core/meta/src/TDataMember.cxx
M core/meta/src/TInterpreter.cxx
M core/meta/src/TClass.cxx
M core/meta/src/TMethodArg.cxx
M core/meta/src/TDataType.cxx
M core/meta/src/TMethodCall.cxx
M core/meta/src/TIsAProxy.cxx
M core/meta/src/TMethod.cxx
M core/meta/src/TFunction.cxx
M core/meta/inc/TClass.h
M core/meta/inc/TDictionary.h
M core/meta/inc/TMethodArg.h
M core/meta/inc/TDataType.h
M core/meta/inc/TMethodCall.h
M core/meta/inc/TMethod.h
M core/meta/inc/TFunction.h
M core/meta/inc/TCint.h
M core/meta/inc/TGlobal.h
M core/meta/inc/TBaseClass.h
M core/meta/inc/TDataMember.h
M core/meta/inc/TInterpreter.h
M core/thread/src/TThread.cxx
M core/base/src/TVirtualFitter.cxx
M core/base/src/TStorage.cxx
M core/base/src/TQConnection.cxx
M core/base/src/TROOT.cxx
M core/base/src/TSystem.cxx
M core/base/src/TQObject.cxx
M core/rint/src/TRint.cxx
M core/rint/src/TTabCom.cxx
M math/foam/src/TFoam.cxx
M math/minuit2/src/TFitterMinuit.cxx
M math/mathcore/src/FunctorCint.cxx
M math/minuit/src/TMinuit.cxx
M tree/tree/src/TTree.cxx
M tree/tree/src/TSelectorCint.cxx
M tree/tree/src/TSelector.cxx
M tree/tree/inc/TSelectorCint.h
M roofit/roofitcore/src/RooGenCategory.cxx
M roofit/roofitcore/src/RooWorkspace.cxx
M hist/hist/src/TF1.cxx
M gui/guibuilder/src/TGuiBldDragManager.cxx
M net/alien/inc/TAlienSystem.h
Revision
22961 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Apr 3 13:32:57 2008 UTC (6 years, 9 months ago) by
rdm
File length: 59711 byte(s)
Diff to
previous 21744
move the directories:
base clib cont meta metautils newdelete pcre rint thread unix utils
winnt zip
under the new core meta directory.
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/meta/src/TStreamerElement.cxx
File length: 59711 byte(s)
Diff to
previous 21725
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
20154 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Oct 1 14:20:05 2007 UTC (7 years, 3 months ago) by
brun
Original Path:
trunk/meta/src/TStreamerElement.cxx
File length: 56747 byte(s)
Diff to
previous 19826
Extend the functionality of Double32_t as explained below:
// The range specifier has the general format: [xmin,xmax] or [xmin,xmax,nbits]
// [0,1]
// [-10,100];
// [-pi,pi], [-pi/2,pi/4],[-2pi,2*pi]
// [-10,100,16]
// [0,0,8]
// if nbits is not specified, or nbits <2 or nbits>32 it is set to 32
// if (xmin==0 and xmax==0 and nbits <=16) the double word will be converted
// to a float and its mantissa truncated to nbits significative bits.
//
// IMPORTANT NOTE
// --------------
// Lets assume an original variable double x:
// When using the format [0,0,8] (ie range not specified) you get the best
// relative precision when storing and reading back the truncated x, say xt.
// The variance of (x-xt)/x will be better than when specifying a range
// for the same number of bits. However the precision relative to the
// range (x-xt)/(xmax-xmin) will be worst, and vice-versa.
// The format [0,0,8] is also interesting when the range of x is infinite
// or unknown.
Revision
17732 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Feb 6 15:39:37 2007 UTC (7 years, 11 months ago) by
brun
Original Path:
trunk/meta/src/TStreamerElement.cxx
File length: 56513 byte(s)
Diff to
previous 17711
In the Streamer functions replace the lines like
TPad::Class()->ReadBuffer(b, this, v, R__s, R__c);
TPad::Class()->WriteBuffer(b,this);
by
b.ReadClassBuffer(TPad::Class(), this, v, R__s, R__c);
b.WriteClassBuffer(TPad::Class(),this);
Revision
17306 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jan 12 16:03:17 2007 UTC (8 years ago) by
brun
Original Path:
trunk/meta/src/TStreamerElement.cxx
File length: 56155 byte(s)
Diff to
previous 16450
TMath::Abs, TMath::Min, TMath::Max, TMath::Sign, TMath::Range
These functions are unfortunately not defined in a standard way in std::
This include is referenced by a new version of TMath.h.
As a result, TMath.h is back compatible with the previous version.
TMathBase.h is used in place of TMath.h in all the classes
that will go into the future miniCore library.
TMath.h and the TMath implementation will go into a new math sub-directory.
TString.h uses TMathBase.h instead of TMath.h.
As a result, it was necessary to include "TMath.h" in some classes
assuming that TMath was included via TString and using other functions
than the ones defined in TMathBase.h
----------------------------------------------------------------------
Revision
16450 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Oct 5 17:38:05 2006 UTC (8 years, 3 months ago) by
pcanal
Original Path:
trunk/meta/src/TStreamerElement.cxx
File length: 56136 byte(s)
Diff to
previous 14190
Change 2 error/warning message from using print to using the ErrorHandler.
Replace the message 'UNKNOW type, sopen=' with a more explicit message
and issue only when it is revelant (i,e. not when reading in emulated
mode and the stl container containing the requested type is always
empty)
Revision
13318 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Nov 23 04:47:30 2005 UTC (9 years, 2 months ago) by
pcanal
Original Path:
trunk/meta/src/TStreamerElement.cxx
File length: 54443 byte(s)
Diff to
previous 13258
(Re)enable the proper reading in emulated mode of files created with
ROOT 3.10 or older with object containing C style arrays of basic types.
The issue was the handling of the value of fSize for TStreamerBasicType(s).
fSize's value and its use was inconsistent until ROOT 4. It now properly
always contains the full size of the element. To support older files
we need to adjust the value of fSize appropriately.
Revision
11644 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Apr 21 06:24:47 2005 UTC (9 years, 9 months ago) by
brun
Original Path:
trunk/meta/src/TStreamerElement.cxx
File length: 52960 byte(s)
Diff to
previous 11626
The new data members "fXmin, fXmax, fFactor" are changed to transient members.
In TStreamerElement::Streamer the function GetRange is called to recompute
the range from the comments field if the bit kHasRange (new enum) is set.
This change makes the ROOT files written by this new version of ROOT readable
without any warning messages by older versions of ROOT.
Revision
11606 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Apr 18 10:54:58 2005 UTC (9 years, 9 months ago) by
brun
Original Path:
trunk/meta/src/TStreamerElement.cxx
File length: 52751 byte(s)
Diff to
previous 11273
Extend the functionality of the Double32_t data type (see below)
This extension supports higher precision than just a 32 bit float
and it also allows better compression when the range and number of bits
are specified.
New functions in TBuffer
void TBuffer::ReadDouble32 (Double_t *d, TStreamerElement *ele)
void TBuffer::WriteDouble32 (Double_t *d, TStreamerElement *ele)
The following functions of TBuffer have new signatures;
Int_t TBuffer::ReadArrayDouble32(Double_t *&d, TStreamerElement *ele)
Int_t TBuffer::ReadStaticArrayDouble32(Double_t *d, TStreamerElement *ele)
void TBuffer::ReadFastArrayDouble32(Double_t *d, Int_t n, TStreamerElement *ele)
void TBuffer::WriteArrayDouble32(const Double_t *d, Int_t n, TStreamerElement *ele)
void TBuffer::WriteFastArrayDouble32(const Double_t *d, Int_t n, TStreamerElement *ele)
The following data members have been added to TStreamerElement;
Double_t fXmin; //Minimum of data member if a range is specified [xmin,xmax,nbits]
Double_t fXmax; //Maximum of data member if a range is specified [xmin,xmax,nbits]
Double_t fFactor; //Conversion factor if a range is specified fFactor = (1<<nbits/(xmax-xmin)
The static function GetRange has been added to TStreamerElement.cxx.
This function analyzes the range specifier given in the data member
comments field.
The following cases are supported for streaming a Double32_t type
depending on the range declaration in the comment field of the data member:
A- Double32_t fNormal;
B- Double32_t fTemperature; //[0,100]
C- Double32_t fCharge; //[-1,1,2]
D- Double32_t fVertex[3]; //[-30,30,10]
E Int_t fNsp;
Double32_t* fPointValue; //[fNsp][0,3]
In case A fNormal is converted from a Double_t to a Float_t
In case B fTemperature is converted to a 32 bit unsigned integer
In case C fCharge is converted to a 2 bits unsigned integer
In case D the array elements of fVertex are converted to an unsigned 10 bits integer
In case E the fNsp elements of array fPointvalue are converted to an unsigned 32 bit integer
Note that the range specifier must follow the dimension specifier.
the case B has more precision (9 to 10 significative digits than case A (6 to 7 digits).
The range specifier has the general format: [xmin,xmax] or [xmin,xmax,nbits]
[0,1]
[-10,100];
[-pi,pi], [-pi/2,pi/4],[-2pi,2*pi]
[-10,100,16]
if nbits is not specified, or nbits <2 or nbits>32 it is set to 32
TStreamerInfo has been modified to take into account the new facility
when streaming a Double32_t. It calls the new TBuffer functions ReadDouble32
and WriteDouble32 instead of the previous inline code.
Note that the files TEmulatedCollectionProxy.cxx and TGenCollectionStreamer.cxx
must still be modified to pass correctly the TStreamerElement object
to the Double32 conversion routines (for Philippe).
Note also that the class TXMLBuffer must still be changed to support
the Double32_t data type (for Sergei).
The test program Event has been modified to illustrate several combinations
of the range specifier.
The test program stress2 has been changed to take into account the slight
increase in the file size due to the new members in TStreamerElement.
Revision
11041 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Feb 5 07:27:13 2005 UTC (9 years, 11 months ago) by
brun
Original Path:
trunk/meta/src/TStreamerElement.cxx
File length: 49594 byte(s)
Diff to
previous 10990
From Philippe:
TStreamerElement::fSize is set to the actual size of the element. Since it
already takes into account the number of element of the array (if any),
there is no need to remultiply (and this leads to very large number if the
array is large!). This can be a problem only in the case of emulated
classes.
Revision
10970 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jan 20 16:39:31 2005 UTC (10 years ago) by
rdm
Original Path:
trunk/meta/src/TStreamerElement.cxx
File length: 49587 byte(s)
Diff to
previous 10898
From Philippe:
This patch should solve intermittent problem seen on windows and MacOs when
reloading libraries.
TClass::ReplaceWith is looping over the GetListOfClasses using an iterator.
In order to avoid problems, we need to insure that the iterator is not
invalided by insuring that the hash list is not modified during the looping.
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/meta/src/TStreamerElement.cxx
File length: 49258 byte(s)
Diff to
previous 10549
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
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/meta/src/TStreamerElement.cxx
File length: 49703 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/meta/src/TStreamerElement.cxx
File length: 49703 byte(s)
Diff to
previous 9147
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
9147 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jun 9 06:10:21 2004 UTC (10 years, 7 months ago) by
brun
Original Path:
trunk/meta/src/TStreamerElement.cxx
File length: 49617 byte(s)
Diff to
previous 8098
From Philippe:
This patches implements splitting of TClonesArray and vectors which are embedded in a base class (as opposed to pointed to).
Also more of the 'CanSplit' decision making has been move into TClass (where it belongs).
In TTree::Merge and MergeLists, add more cleanup of the addresses
being set to reduce the side-effects.
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/meta/src/TStreamerElement.cxx
File length: 50481 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/meta/src/TStreamerElement.cxx
File length: 50481 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/meta/src/TStreamerElement.cxx
File length: 50183 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/meta/src/TStreamerElement.cxx
File length: 50171 byte(s)
Diff to
previous 7622
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
7622 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Nov 20 17:25:54 2003 UTC (11 years, 2 months ago) by
brun
Original Path:
trunk/meta/src/TStreamerElement.cxx
File length: 46316 byte(s)
Diff to
previous 7268
Patch from Philippe that prevent the splitting of TCollection objects. TClonesArray are allowed to be split except when they are embedded inside an object which in embedded inside an already split object (they are case
where it would be technically possible to split it properly but it is not implemented yet)
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/meta/src/TStreamerElement.cxx
File length: 45126 byte(s)
Diff to
previous 5221
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
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/meta/src/TStreamerElement.cxx
File length: 43933 byte(s)
Diff to
previous 4768
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
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/meta/src/TStreamerElement.cxx
File length: 43392 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/meta/src/TStreamerElement.cxx
File length: 43392 byte(s)
Diff to
previous 4092
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
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/meta/src/TStreamerElement.cxx
File length: 40269 byte(s)
Diff to
previous 3299
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
3299 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Nov 28 14:56:38 2001 UTC (13 years, 1 month ago) by
brun
Original Path:
trunk/meta/src/TStreamerElement.cxx
File length: 39965 byte(s)
Diff to
previous 3283
New function TStreamerElement returning the execid corresponding to an element
of type TRef having the keyword EXEC: in the data member field.
The result execid is saved in the fUniqueID of the TStreamerElement such that
it can be retrived quickly when used in TRef::Streamer.
Note that the name (with no bkanks) following the keywork "EXEC:" is used
to execute an action on demand when dereferencing a TRef.
For more explanations on Action on Demand, see the numerous comments in TRef.
Revision
3283 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Nov 22 18:10:01 2001 UTC (13 years, 2 months ago) by
brun
Original Path:
trunk/meta/src/TStreamerElement.cxx
File length: 40383 byte(s)
Diff to
previous 3035
Important addition to the dictionary to support action on demand with TRef
and TRefArray. In this first implementation, only TRef is supported.
The description of this "Action on Demand" also called lazy instantiation
will be provided later in the TRef and TRefArray classes.
Revision
2266 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed May 23 09:48:26 2001 UTC (13 years, 8 months ago) by
brun
Original Path:
trunk/meta/src/TStreamerElement.cxx
File length: 38329 byte(s)
Diff to
previous 2247
Add a new function Update in TStreamerElement and TStreamerBase.
This function is called by the TClass constructor when switching
from a fake class to the real class. Internal pointers to the fake class are
updated to point to the new class.
Revision
2066 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Apr 24 14:27:51 2001 UTC (13 years, 9 months ago) by
brun
Original Path:
trunk/meta/src/TStreamerElement.cxx
File length: 37026 byte(s)
Diff to
previous 1915
Add new function GetTypeNameBasic.
This new function returns the basic type name known to CINT in case
the type is not one of the basic types registered to the ROOT GetListOfTypes.
This function is used by TFile::MakeProject and TStreamerInfo::GenerateHeaderFile.
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/meta/src/TStreamerElement.cxx
File length: 22634 byte(s)
Diff to
previous 1108
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/meta/src/TStreamerElement.cxx
File length: 22599 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.