Re: [ROOT] trouble with ClassDef(0) on a pure abstract class

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Mar 26 2004 - 13:11:13 MET


Hi Robert,

This problem was introduced in version 4 when I added support for schema
evolution for foreign classes (non-ROOT instrumented classes). In case an object
with a version 0 is found, we read the class checksum to find out automatically
the best TStreamerInfo version. However, the checksum should only be read
for foreign classes and not classes with version=0 and having a ClassDef.
The fix is now in CVS.

Rene Brun

Robert Hatcher wrote:
> 
> Hi,
>   I've got a problem with the new v4 I/O reading some particular
> classes we have. Specifically I've attempted this under v4-00-0{2|3},
> and not that it matters but FermiLinux {9.0|7.3}, gcc 3.{3|2}.1.
> 
> The basic problem is that we had some classes, say, DataBlock1 and DataBlock2
> that derive from DataBlockBase and PureAbstractInterface.  All classes
> are explicitly instrumented with ClassDef and listed in the LinkDef.h
> with a "+". DataBlockBase derives from TObject. But PureAbstractInterface
> does not and has ClassDef version=0; the PureAbstractInterface class
> doesn't have any data -- it is just interface.  The problem is when
> reading back files written under v3-05-07 and v4-00-0{2|3} I get:
> 
> $ root -b -q read_test.C
> [...]
> Error in <TBuffer::CheckByteCount>: object of class PureAbstractInterface read too many bytes: 6 instead of 2
> Warning in <TBuffer::CheckByteCount>: PureAbstractInterface::Streamer() not in sync with data on file, fix Streamer()
> Error in <TBuffer::CheckByteCount>: object of class PureAbstractInterface read too many bytes: 6 instead of 2
> Warning in <TBuffer::CheckByteCount>: PureAbstractInterface::Streamer() not in sync with data on file, fix Streamer()
> [...]
> 
> The data seems to come back in okay, but these messages occur for every
> such object read in.  How do I make them go away.
> 
> Example code/scripts/files are in the attached tar file.
> 
> Thanks,
> -robert
> 
> Robert W. Hatcher   | rhatcher@fnal.gov   630-840-3102
> FNAL CD/EXP (MINOS) | MS 220, PO Box 500, Batavia IL 60510
> 
>   --------------------------------------------------------------------------------
>                    Name: badio.tar.gz
>    badio.tar.gz    Type: Unix Tape Archive (application/x-tar)
>                Encoding: BASE64



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET