Re: version numbers for classes in ClassDef

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Sep 24 1998 - 18:05:15 MEST


Chris Jillings wrote:
> 
> Hello,
>    We may need to use the version number in ClassDef. We have have a data
> structure that contains classes defined with ClassDef(ClassName,1). I want
> to expand the data in the class but still be able to read the data already
> written.
>    Is there a doc which explain how to do this? The InputOutput.html
> indicates it is possible but doesn't explain how to make both versions
> accessible to the linker.
> 

Hi Chris,
Sorry for this late reply. I am pretty busy these days at FNAL.
Yes, you should use the version_id in the ClassDef macro if you
make changes in your class (adding/deleting members).
You must also modify the Streamer function for your class
by testing on the version_id when you read the object.
See an example in the Root class TAxis at URL:
  http://root.cern.ch/root/html/src/TAxis.cxx.html

Rene Brun



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:38 MET