[ROOT] automatic schema evolution

From: Heather Kelly (heather@lheapop.gsfc.nasa.gov)
Date: Mon Aug 05 2002 - 22:21:07 MEST


Hi,

I am using ROOT 3.02.07 on Windows 2000.

I have a set of ROOT classes, where one class has been updated - where one 
data member was removed and another one added - and the version incremented.
My LinkDef file looks like:
>#ifdef __CINT__
>
>#pragma link off all globals;
>#pragma link off all classes;
>#pragma link off all functions;
>
>#pragma link C++ class VolumeIdentifier+;
>#pragma link C++ class McParticle+;
>#pragma link C++ class McPositionHit+;
>#pragma link C++ class McIntegratingHit+;
>#pragma link C++ class McEvent+;
>
>#endif
So I am using the "new" Streamer system, and used it all along - starting 
with the original version of these classes.

I have an older ROOT file, written with the first version of the classes, 
and I want to be able to read that file using the new version of the shared 
library - which contains the updated version of one class.  However, when I 
do so, using TTree::GetEvent, I receive the following error and warning 
messages:
Error in <TBuffer::CheckByteCount>: object of class McPositionHit read too 
few bytes
Warning in <TBuffer::CheckByteCount>: McPositionHit::Streamer() not in sync 
with data on file, fix Streamer()

I was hoping that upon reading, when it was found that the file contained 
version 1 of McPositionHit, and the library contained version 3, that the 
description of the class in the input file would be used to retrieve the 
data.  Am I doing something wrong?  Or am I just confused?  Must I 
regenerate the original class library using MakeProject on the old file in 
order to read this file without problems?

Thanks,
Heather



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:03 MET