[ROOT] StreamerInfo::BuildCheck Warning

From: Ed Oltman (eoltman@imago.com)
Date: Fri May 09 2003 - 17:00:54 MEST


Hello,

I have a root based DLL that I use to write root files - several
objects are written, including a CLasHeader object as a member of
another object. When I use this EXACT SAME DLL to read the root
file I wrote, I get the following warning.

Warning in <TStreamerInfo::BuildCheck>:
        The StreamerInfo of class CLasHeader read from file
v:\Leap\HitData\R03067.rhit
        has the same version (=4) as the active class but a different
checksum.
        You should update the version to ClassDef(CLasHeader,5).
        Do not try to write objects with the current class definition,
        the files will not be readable.

I'm puzzled - I use the same class definitions to
read and write, but when I read I'm told I should'nt use it to
write.  Please advice, Thanks.


Ed Oltman

Here's a bunch of Details:

I am using win32 version of root v3.05/3 on Win2k - binaries from cern. I
have a dll (VC 6.0) which contains all of my classes - I built it w/ likdef
containing the line:

#pragma link C++ class CLasHeader-;

where CLasHeader, derived from TObject,  contains

#if !defined(__CINT__)  || defined(__MAKECINT__)
	ClassDef(CLasHeader,4)
#endif

in the class definition and the Streamer is

void CLasHeader::Streamer(TBuffer &R__b)
{
   // Stream an object of class CLasHeader.

   if (R__b.IsReading()) {
      CLasHeader::Class()->ReadBuffer(R__b, this);
   } else {
      CLasHeader::Class()->WriteBuffer(R__b, this);
   }
}

Here's my interaction with root when I try to read the file:

C:\Release 6.04.73\CompiledRoot>root
 the current keyboard layout is 437
  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   3.05/03     11 March 2003   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

Compiled for win32.

CINT/ROOT C/C++ Interpreter version 5.15.78, Mar 3 2003
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] .L analysis.dll
root [1] TFile *f = new TFile("v:\\Leap\\HitData\\R03067.rhit")



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:11 MET