[root] / trunk / io / io / src / TBufferFile.cxx Repository:
ViewVC logotype

Log of /trunk/io/io/src/TBufferFile.cxx

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 49019 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 17:18:33 2013 UTC (21 months, 3 weeks ago) by pcanal
File length: 127381 byte(s)
Diff to previous 48992
Import revision 48931 from the v5-34-00 patch branch:
Add the concept of implicit rules to (centrally) support automatic translation of
STL collection from numeric type to other numeric type or for when the contained
class has some rules.  Currently enabled only when the target is an std::vector.

Implement the transformation from STL container of numeric to any other numeric
type (both in TGenCollectionStreamer and TStreamerInfo[Actions]).

Migrate more of the conversions to TStreamerInfoActions.

Fix the Conversion of a Double32 or Float16 inside a collection of object to another
type (the previous implemetation was not supporting the customization of the factor
nor the number of bits).

Add TBuffer::ReadFastArrayWithNbits and WithFactor for use in the StreamerInfo Actions.

TStreamerInfoActions:

Introduce WithFactorMarker and NoFactorMarker to allow for less code duplicaton when
supporting Float16_t and Double32_t.
Replace the collection-memberwise action from loop over simple operation to using
ReadFastArray (to be compatible with TBufferXML).

Revision 48992 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 28 15:26:26 2013 UTC (21 months, 3 weeks ago) by rdm
File length: 124252 byte(s)
Diff to previous 47681
From Lifeng Sun:
The attached patchset fixes a bunch of typo in the source:
0001-succes-success.patch
0002-preceed-preced.patch
0003-informations-information.patch
0004-childs-children.patch
0005-avaliable-available.patch
0006-writeable-writable.patch
0007-comand-command.patch
0008-unkown-unknown.patch
0009-wierd-weird.patch
0010-wheter-whether.patch
0011-unecessary-unnecessary.patch
0012-splitted-split.patch
0013-registerd-registered.patch
0014-recieve-receive.patch
0015-processsing-processing.patch
0016-ouput-output.patch
0017-mutiple-multiple.patch
0018-lenght-length.patch
0019-interupted-interrupted.patch
0020-independant-independent.patch
0021-inconsistant-inconsistent.patch
0022-expresion-expression.patch
0023-explicitely-explicitly.patch
0024-enviroment-environment.patch
0025-deafult-default.patch
0026-continous-continuous.patch
0027-completly-completely.patch
0028-commited-committed.patch
0029-choosen-chosen.patch
0030-backgroud-background.patch
0031-auxilliary-auxiliary.patch
0032-authentification-authentication.patch
0033-appropiate-appropriate.patch
0034-an-other-another.patch
0035-environement-environment.patch
0036-targetting-targeting.patch
0037-suppported-supported.patch
0038-paramater-parameter.patch

Revision 47681 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 28 17:41:05 2012 UTC (2 years, 1 month ago) by pcanal
File length: 124254 byte(s)
Diff to previous 44609
Protect against deferencing nill pointer

Revision 44609 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 7 21:33:20 2012 UTC (2 years, 7 months ago) by pcanal
File length: 124231 byte(s)
Diff to previous 43925
In TBufferFile::WriteFastArray when the pointer are null, do not request the creation
of a (missing) StreamerInfo when the class is abstract.
This should fix <http://savannah.cern.ch/bugs/?95175>.

Revision 43925 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 24 15:48:18 2012 UTC (2 years, 9 months ago) by pcanal
File length: 124063 byte(s)
Diff to previous 43924
Fix coverity #36062 (dereference null return about TClass::GetClass)

Revision 43924 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 24 15:39:15 2012 UTC (2 years, 9 months ago) by pcanal
File length: 123819 byte(s)
Diff to previous 43518
Fix coverity #36061 (and similar) about null return dereference of GetStreamerInfoCache and GetStreamerInfoList

Revision 43518 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 28 01:04:07 2012 UTC (2 years, 9 months ago) by pcanal
File length: 123786 byte(s)
Diff to previous 43517
Fix for coding convention RS1 and RS2

Revision 43517 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Mar 27 21:54:05 2012 UTC (2 years, 9 months ago) by pcanal
File length: 123839 byte(s)
Diff to previous 40872
Fix coding conventions RN9 (Non-static data members begin with 'f' followed by a capital letter; methods begin with a capital letter.);

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: 123375 byte(s)
Diff to previous 39548
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 39548 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 2 21:16:27 2011 UTC (3 years, 7 months ago) by pcanal
File length: 123124 byte(s)
Diff to previous 39136
Add the function TBuffer::AutoExpand to centralize the automatic 
buffer extension policy.  This enable the ability to tweak it later
(for example instead of always doubling the size, increasing by
only at most 2Mb or take hints from the number of entries already
in a TBasket).

Revision 39136 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 6 19:57:46 2011 UTC (3 years, 8 months ago) by pcanal
File length: 123531 byte(s)
Diff to previous 39134
Extend 39134 to the old streaming code

Revision 39134 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 6 19:19:17 2011 UTC (3 years, 8 months ago) by pcanal
File length: 123525 byte(s)
Diff to previous 38860
Avoid the error messages similar to:
  Error in <TBufferFile::ReadVersion>: Could not find the StreamerInfo with a checksum of -849380031 for the class "NeverWritten" in memberwise.root.
which is spurrious when it is issued when unstreaming a memberwised streamed collection which is always empty (Introduce TBuffer::ReadVersionForMemberWise
for this purpose).

Revision 38860 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 15 09:34:18 2011 UTC (3 years, 9 months ago) by pcanal
File length: 120332 byte(s)
Diff to previous 37929
Minor tweak to error message layout

Revision 37929 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Feb 1 18:26:53 2011 UTC (3 years, 11 months ago) by pcanal
File length: 120332 byte(s)
Diff to previous 36061
Fix the reading of empty collection of object when reading without the library.
a) Make sure that ReadVersion does read the checksum value even if there is no TClass
   object to look into, allowing the TBuffer cursor to advance correctly.
b) Make sure that if we request a list of member wise streaming action for the
   contain class, we get a proper 'empty' sequence (rather than a null pointer).

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: 119929 byte(s)
Diff to previous 35314
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 35314 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 16 03:22:09 2010 UTC (4 years, 4 months ago) by pcanal
File length: 112326 byte(s)
Diff to previous 34227
Migrate the functionality of TStreamerInfo::TagFile to a new interface TBuffer::TagStreamerInfo
so that TMessage can customize the behavior.  TMessage now relies on this new interface
instead of TBuffer::IncrementLevel which had the disadvantage of being called not only
during writing but also during reading (where there is no need to keep track of the StreamerInfo used).
[This change will also allow us to keep the calls to IncrementLevel/DecrementLevel only in the
case the buffer is a TBufferXML]
 
Fix the implementation of TSocket::RecvStreamerInfos to properly handle the case where there are
abstract classes (when GetStreamerInfo() can not be called on an abstract class until it has
been called for one of the concrete derived classes) and the case of STL containers.

Revision 34227 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 30 12:09:39 2010 UTC (4 years, 6 months ago) by brun
File length: 111546 byte(s)
Diff to previous 32586
Fix format in Warning and Error statements

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: 111546 byte(s)
Diff to previous 32525
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 32525 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 10 13:56:16 2010 UTC (4 years, 10 months ago) by pcanal
File length: 111537 byte(s)
Diff to previous 32159
Fix clang warning

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: 111529 byte(s)
Diff to previous 31699
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 31699 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 8 21:49:22 2009 UTC (5 years, 1 month ago) by pcanal
File length: 111670 byte(s)
Diff to previous 29789
Fix the Savannah report #57423.
Avoid using the 'current' StreamerInfo to read an older streamerInfo that is missing (in case
of corrupted files).

Revision 29789 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 14 22:48:11 2009 UTC (5 years, 5 months ago) by pcanal
File length: 109679 byte(s)
Diff to previous 29636
Improves I/O operations by 8% (of the total cpu required to read a non compressed, non split TTree).
(This + the enabling of a bswap on x86_64 saves 2% of the complete stress -b 30).

Revision 29636 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 30 14:50:00 2009 UTC (5 years, 5 months ago) by rdm
File length: 109276 byte(s)
Diff to previous 29402
fix gcc-3.4 compiler warnings. This compiler does not like it when Long64_t's
are cast to pointers on 32-bit machines without first being cast to Long_t
(gcc 4.x does not complain about this).

Revision 29402 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 9 05:03:45 2009 UTC (5 years, 6 months ago) by pcanal
File length: 109220 byte(s)
Diff to previous 28845
When checking to avoid out of bound read, do not over-estimate the amount of space need by array's of Float16 or Double32 on disk

Revision 28845 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 8 13:53:44 2009 UTC (5 years, 7 months ago) by rdm
File length: 109220 byte(s)
Diff to previous 27863
changes needed to be able to compile with Solaris CC5 and stlport4 STL
library. Backward compatible with old CC5 STL and other platforms.

Revision 27863 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 18 09:36:53 2009 UTC (5 years, 10 months ago) by rdm
File length: 109200 byte(s)
Diff to previous 27845
white space.

Revision 27845 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Mar 17 15:23:30 2009 UTC (5 years, 10 months ago) by pcanal
File length: 109245 byte(s)
Diff to previous 27747
Improve constness.
In constructor, do not 'tweak' the buffer size in read mode.
In SetBuffer, never expand the buffer in read mode.

Revision 27747 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Mar 10 12:30:50 2009 UTC (5 years, 10 months ago) by pcanal
File length: 109344 byte(s)
Diff to previous 27683
Handle the case where the user is passing too small of buffer (we need at least kMinimalSize (128 bits)

Revision 27683 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Mar 3 20:15:49 2009 UTC (5 years, 10 months ago) by pcanal
File length: 110388 byte(s)
Diff to previous 27157
Allow user to provide a custom reallocator when the TBuffer is being passed
memory.  If the TBuffer does not own the memory __and__ no custom memory
reallocator has been set, a Fatal error will be issued:

Fatal in <TBufferFile::Expand>: Failed to expand the data buffer because TBuffer does not own it and no custom memory reallocator was provided.

This fixes the savannah issues 47611 and 39120

Revision 27157 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jan 15 14:05:12 2009 UTC (6 years ago) by brun
File length: 109948 byte(s)
Diff to previous 25450
From Axel:
Replace all references to Text_t by char, still keeping the definition in Rtypes.h

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: 109956 byte(s)
Diff to previous 24469
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 24469 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 23 01:11:35 2008 UTC (6 years, 7 months ago) by rdm
File length: 105651 byte(s)
Diff to previous 24219
correction in comments.

Revision 24219 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 11 15:39:45 2008 UTC (6 years, 7 months ago) by brun
File length: 105650 byte(s)
Diff to previous 23954
-implement the new function TBufferFile::ForceWriteInfo. It simply calls
the existing TStreamerInfo::ForceWriteInfo function
-the new function ForceWriteInfoClones is similar to the old ForceWriteInfo
except that it calls TBufferFile::ForceWriteInfo instead of TStreamerInfo::ForceWriteInfo

Revision 23954 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 21 16:49:24 2008 UTC (6 years, 8 months ago) by brun
File length: 105392 byte(s)
Diff to previous 23934
Remove tthe function GetInfoStack.
Rename the protected function WriteObject with 2 arguments to WriteObjectClass to avoid
a compiler complaint about a hidden function when implementing a new function TMessage::WriteObject.
-This line, and those below, will be ignored--

M    io/io/src/TBufferFile.cxx
M    io/io/inc/TBufferFile.h

Revision 23934 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 20 15:11:45 2008 UTC (6 years, 8 months ago) by brun
File length: 105749 byte(s)
Diff to previous 23216
Add a new getter
TStreamerInfo *TBufferFile::GetInfoStack(Int_t number) const
   //return the TStreamerInfo at position number in the InfoStack
   //return 0 if the number requested is outside the stack

This new function will be used in a coming version of TSocket supporting
schema evolution by sending TStreamerInfo objects together with the message object.

Revision 23216 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 14 16:42:20 2008 UTC (6 years, 9 months ago) by pcanal
File length: 105367 byte(s)
Diff to previous 23122
From Paul:
Slight doc update.

Revision 23122 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 10 14:56:30 2008 UTC (6 years, 9 months ago) by rdm
File length: 105117 byte(s)
Copied from: trunk/io/src/TBufferFile.cxx revision 23121
Diff to previous 23046
move the following directories into "io":

castor, chrip, dcache, gfal, io, rfio, sql, xml

Revision 23046 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 8 11:05:05 2008 UTC (6 years, 9 months ago) by pcanal
Original Path: trunk/io/src/TBufferFile.cxx
File length: 105117 byte(s)
Diff to previous 22873
Avoid mistaking a Foreign class for which the StreamerInfo? has not yet been built for a class coming from a ROOT file written by ROOT v2 or less. In particular this could lead to a unwanted call to TStreamerInfo?::BuildEmulated in the case where the object is being read from a TBuffer not attached to a TFile (TMessage for example) and lead to a Fatal error.

Revision 22873 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 27 20:07:01 2008 UTC (6 years, 9 months ago) by pcanal
Original Path: trunk/io/src/TBufferFile.cxx
File length: 105078 byte(s)
Diff to previous 22527
Correct the value print by debug message

Revision 22527 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 7 16:37:03 2008 UTC (6 years, 10 months ago) by rdm
Original Path: trunk/io/src/TBufferFile.cxx
File length: 105025 byte(s)
Diff to previous 21744
more gcc 4.3 warning fixes. Remains only some warning in Cint, Reflex
and xrootd.

Revision 21744 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 16 20:47:20 2008 UTC (7 years ago) by pcanal
Original Path: trunk/io/src/TBufferFile.cxx
File length: 105016 byte(s)
Diff to previous 21601
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 21601 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 9 04:34:29 2008 UTC (7 years ago) by pcanal
Original Path: trunk/io/src/TBufferFile.cxx
File length: 105008 byte(s)
Diff to previous 21388
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 21388 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Dec 15 16:47:23 2007 UTC (7 years, 1 month ago) by pcanal
Original Path: trunk/io/src/TBufferFile.cxx
File length: 104932 byte(s)
Diff to previous 21381
When reading, do not delete the object being pointed to by a pointer when the call to ReadObjectAny returns the object.  This happens when a user class has a pointer that is initialized by the default constructor to the address of another object (read from the same buffer) but it is not marked as transient.

Revision 21381 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 14 17:43:41 2007 UTC (7 years, 1 month ago) by pcanal
Original Path: trunk/io/src/TBufferFile.cxx
File length: 104537 byte(s)
Diff to previous 20882
Update ReadClassBuffer(TClass *cl, void *pointer, Int_t version, UInt_t start, UInt_t count) to properly handle the new foreign class version numbering scheme (i.e. -1 is now a legal version number)

Revision 20882 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 19 11:31:26 2007 UTC (7 years, 2 months ago) by rdm
Original Path: trunk/io/src/TBufferFile.cxx
File length: 104536 byte(s)
Diff to previous 20417
Set property svn:eol-style LF on all source and Makefiles. This should avoid
problems with Win32 line endings ending up in the repository. All MS tools
support LF eols fine.

Revision 20417 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 19 15:29:54 2007 UTC (7 years, 3 months ago) by brun
Original Path: trunk/io/src/TBufferFile.cxx
File length: 104536 byte(s)
Diff to previous 20402
Fix a comment

Revision 20402 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 18 17:48:51 2007 UTC (7 years, 3 months ago) by brun
Original Path: trunk/io/src/TBufferFile.cxx
File length: 104537 byte(s)
Diff to previous 20376
Fix an error introduced in the previous patch assumed to fix a compilation problem with icc.

Revision 20376 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 16 16:21:57 2007 UTC (7 years, 3 months ago) by rdm
Original Path: trunk/io/src/TBufferFile.cxx
File length: 104495 byte(s)
Diff to previous 20355
white space.

Revision 20355 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 15 16:44:46 2007 UTC (7 years, 3 months ago) by brun
Original Path: trunk/io/src/TBufferFile.cxx
File length: 104442 byte(s)
Diff to previous 20299
Remove compiler warnings in functions riteDouble32 and WriteFloat16.

Revision 20299 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 10 19:12:50 2007 UTC (7 years, 3 months ago) by brun
Original Path: trunk/io/src/TBufferFile.cxx
File length: 104434 byte(s)
Diff to previous 20293
Fix bad conversions issues and do not accept cases with nbits>=15
when the Double32_t mode like [0,0,nbits] is specified.

Revision 20293 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 10 15:12:26 2007 UTC (7 years, 3 months ago) by brun
Original Path: trunk/io/src/TBufferFile.cxx
File length: 104441 byte(s)
Diff to previous 20233
Add a few more comments to  the description of Double32 and Float16 in
TBufferFile::WriteFloat16 and TBufferFile::WriteDouble32.

Revision 20233 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 5 15:32:34 2007 UTC (7 years, 3 months ago) by brun
Original Path: trunk/io/src/TBufferFile.cxx
File length: 103772 byte(s)
Diff to previous 20192
Fix a bug in TBufferFile::WriteFastArrayDouble affecting Double32_t arrays

Revision 20192 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 3 14:19:39 2007 UTC (7 years, 3 months ago) by brun
Original Path: trunk/io/src/TBufferFile.cxx
File length: 103772 byte(s)
Diff to previous 20182
In all Float16 functions assume a default value of 12 bits for the truncated mantissa.
When reading from a file GetRange may not be called, hence the protection.

Revision 20182 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 2 16:08:08 2007 UTC (7 years, 3 months ago) by brun
Original Path: trunk/io/src/TBufferFile.cxx
File length: 103656 byte(s)
Diff to previous 20170
More changes for Float16_t

Revision 20170 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 2 09:02:20 2007 UTC (7 years, 3 months ago) by brun
Original Path: trunk/io/src/TBufferFile.cxx
File length: 104650 byte(s)
Diff to previous 20158
First batch of changes to support the new data type Float16_t.
For more info about Float16_t see TBufferFile::WriteFloat16.

Revision 20158 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 1 15:53:18 2007 UTC (7 years, 3 months ago) by brun
Original Path: trunk/io/src/TBufferFile.cxx
File length: 94293 byte(s)
Diff to previous 20156
Add a few more comments in the doc of TBufferFile::WriteDouble32

Revision 20156 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 1 15:28:49 2007 UTC (7 years, 3 months ago) by brun
Original Path: trunk/io/src/TBufferFile.cxx
File length: 94158 byte(s)
Diff to previous 20154
Add support for the new feature [0,0,nbits] also in the functions processing arrays
like TBufferFile::WriteFastArrayDouble32 and TBufferFile::ReadFastArrayDouble32.

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/io/src/TBufferFile.cxx
File length: 92166 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 19826 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:56:11 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/io/src/TBufferFile.cxx
File length: 89637 byte(s)
Diff to previous 19825
imported svn:keywords Id property

Revision 19825 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:49:10 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/io/src/TBufferFile.cxx
File length: 89691 byte(s)
Diff to previous 18872
remove :$ from tag line

Revision 18872 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 23 22:12:29 2007 UTC (7 years, 8 months ago) by pcanal
Original Path: trunk/io/src/TBufferFile.cxx
File length: 89701 byte(s)
Diff to previous 18502
restore schema evolution for the content of unsplit TClonesArray (broken since 5.15/02)

Revision 18502 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 17 08:05:39 2007 UTC (7 years, 9 months ago) by brun
Original Path: trunk/io/src/TBufferFile.cxx
File length: 89677 byte(s)
Diff to previous 18308
add a missing protection in TBufferFile::ReadVersion in case the buffer has no parent.

Revision 18308 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 16 19:56:03 2007 UTC (7 years, 10 months ago) by pcanal
Original Path: trunk/io/src/TBufferFile.cxx
File length: 89418 byte(s)
Diff to previous 17844
Make sure we are not using a slot number rendered obsolete by an
increase of the size of the TExMap (this can be induced by a call
the class to WriteClass).
This prevents the error message:
   'Error in <TExMap::Expand>: slot 25085 not empty (should never happen)
seen by Minos and STAR.
(The only side effect was a possible increase of the data on file due to object
duplication).

Revision 17844 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Feb 10 04:10:11 2007 UTC (7 years, 11 months ago) by pcanal
Original Path: trunk/io/src/TBufferFile.cxx
File length: 89066 byte(s)
Diff to previous 17819
Add missing protection in WriteProcessID when there is no file

Revision 17819 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 9 10:16:07 2007 UTC (7 years, 11 months ago) by rdm
Original Path: trunk/io/src/TBufferFile.cxx
File length: 89043 byte(s)
Diff to previous 17812
correct cvs ident line (base/cont/meta -> io).

Revision 17812 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 9 08:37:21 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/io/src/TBufferFile.cxx
File length: 89044 byte(s)
Diff to previous 17755
Remove the last references to TStreamerInfo in base directory and fix
all the consequences.

Revision 17755 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 7 15:41:06 2007 UTC (7 years, 11 months ago) by rdm
Original Path: trunk/io/src/TBufferFile.cxx
File length: 89015 byte(s)
Diff to previous 17706
Change past tense in "had no public..." warning message to "has no public...".
Some additional whitespace corrections.

Revision 17706 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Feb 5 18:08:45 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/io/src/TBufferFile.cxx
File length: 89333 byte(s)
Diff to previous 17567
-Implement the new following functions in TBuffer
   // Utilities for TClass
   virtual   Int_t    ReadClassEmulated(TClass *cl, void *object) = 0;
   virtual   Int_t    ReadClassBuffer(TClass *cl, void *pointer) = 0;
   virtual   Int_t    ReadClassBuffer(TClass *cl, void *pointer, Int_t version, UInt_t start, UInt_t count) = 0;
   virtual   Int_t    WriteClassBuffer(TClass *cl, void *pointer) = 0;

Revision 17567 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jan 29 15:53:35 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/io/src/TBufferFile.cxx
File length: 83250 byte(s)
Diff to previous 17537
-Replace calls to gROOT->GetClass by TClass::GetClass
-Remove unused references to TROOT.h

Revision 17537 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jan 28 18:27:18 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/io/src/TBufferFile.cxx
File length: 83267 byte(s)
Diff to previous 17445
-Implement the changes required by the new version of TBuffer.
-Add the following new functions that are required to complete the separation
of base and cont from the I/O sub-system. Some of these functions were
implemented (temporarily) in the now obsolete class TVirtualIO/TFileIO.
   // Special basic ROOT objects and collections
   virtual   TProcessID *GetLastProcessID(TRefTable *reftable) const = 0;
   virtual   UInt_t      GetTRefExecId() = 0;
   virtual   TProcessID *ReadProcessID(UShort_t pidf) = 0;
   virtual   UShort_t    WriteProcessID(TProcessID *pid) = 0;

   // Utilities for TClonesArray
   virtual   void     ForceWriteInfo(TClonesArray *a) = 0;
   virtual   Int_t    ReadClones (TClonesArray *a, Int_t nobjects) = 0;
   virtual   Int_t    WriteClones(TClonesArray *a, Int_t nobjects) = 0;

Revision 17445 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 23 06:10:39 2007 UTC (8 years ago) by brun
Original Path: trunk/io/src/TBufferFile.cxx
File length: 79321 byte(s)
Diff to previous 17408
Implement new function
  virtual Int_t TBuffer::GetVersionOwner() const
It returns the version number of the buffer owner. In case of TBufferFile,
it returns the file version number.

This new function is introduced to further reduce the dependencies on the I/O system.

Revision 17408 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jan 20 09:46:36 2007 UTC (8 years ago) by brun
Original Path: trunk/io/src/TBufferFile.cxx
File length: 79046 byte(s)
Diff to previous 17402
Remove printf statements from ReadString and WriteString.
These two functions are used by TMessage.

Revision 17402 - (view) (download) (as text) (annotate) - [select for diffs]
Added Fri Jan 19 16:48:00 2007 UTC (8 years ago) by brun
Original Path: trunk/io/src/TBufferFile.cxx
File length: 79250 byte(s)
CVs been changed into a pure abstract interface.
The concrete implementation is in the new class TBufferFile.
All classes previously deriving from TBuffer derive now from TBufferFile, ie

  TBuffer  <- TBufferFile  <- TMessage
                           <- TBufferXML
                           <- TBufferSQL
                           <- TBufferSQL2

Because there are several problems with C++ operators overloading,
The I/O operators are defined in TBuffer. These are inline functions
calling C++ virtual functions defined in TBuffer and overloaded
by TBufferFile and all other derived classes when necessary.

The previous implementation of TBuffer.h included <vector> and Bytes.h.
The two include statements have been moved to TBufferFile.h. As a result the
compilation of the ROOT system is now slightly faster and a big bonus
is that changes in TBufferFile or Bytes.h will affect only TBufferFile
and will not force the recompilation of the entire system.
This change has some side-effects. If you assumed that include <vector>
was done by TBuffer.h, you may have to specify this include directly
in your class. This was the case for a few ROOT classes.


 : ----------------------------------------------------------------------

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.

  Diffs between and
  Type of Diff should be a

Sort log by:

Subversion Admin
ViewVC Help
Powered by ViewVC 1.0.9