Re: ClassDef version

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Jul 01 1999 - 14:47:24 MEST


Olivier Meplan wrote:
> 
> Hi rooters!
> 
> I have a question about increasing the id of ClassDef ; I add members to
> a existing class
> but I want to be able to read older objects of this class. I understood
> that I have to modify the streamer function to take that into account in
> the Dictonary file. I have done that and all seems to work but is there
> a way to do that automatically (because in the make file I use, the
> dictonary file is automatically generated without the modification
> if(R__v>1){...}?
> Thanks a lot
> Olivier Meplan

Hi Olivier,
By definition, this process cannot be automatized.
You should follow the following steps:
  - Increase class version in ClassDef
  - Take a copy of your old Streamer in the dictionary and add this
    function in your class implementation.
  - Modify your Linkdef.h file to add the symbol "-" after the class
name
    This instructs rootcint to not generate the Streamer function.
  - run rootcint with the new Linkdef.

For more info, see URL:

   http://root.cern.ch/root/RootCintMan.html

Rene Brun



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