Re: [ROOT] Automatic Scheme Eveolution

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Mar 05 2002 - 04:56:48 MET


Hi Thomas,

Clarification. The text in the documentation that you are quoting refers
to the process of moving from old Root versions to the version 3.
If you had always been using the option "+" in LinkDef.h, things should be
totally automatic and schema evolution is supported by default.
As soon as version 3 is used with option "+", Root I/O will be able to
read evolutive versions of your classes automatically.

Rene Brun


On Mon, 4 Mar 2002, Thomas Bretz wrote:

> Hi rooters,
> 
> in the dox I found:
> 
> 
> from: http://root.cern.ch/root/SchemaEvolution.html
> ------------------------
> How to use the new system
> 
> We will distinguish the following cases: 
> 
>     Case A: You have your own Streamer function in your class
> implementation 
> [...]
>     Case B: You use the automatic streamer in the dictionary file. 
>         Move the old Streamer from the file generated by rootcint to
> your class implementation file, then modified the Streamer
>         function as in case A above. 
>         Increment your class version id in ClassDef by 1, eg.
> ClassDef(MyClass, 2) 
>         Add option "-" in the pragma line of LinkDef. 
>     Case C: You use the automatic streamer in the dictionary file and
> you 
> already use the option "+" in the LinkDef file. If the old
>     automatic Streamer does not contain any statement using the
> functions ReadArray, ReadStaticArray, WriteArray,
>     WriteStaticArray you have nothing to do, except running rootcint
> again to regenerate the new form of the Streamer function,
>     otherwise proceed like for case B. 
> -------------------------
> 
> In our case we have classes with some basic data types (Float_t, Int_t,
> etc.) and some fixed size arrays (Float_t[16], ...) without an own
> streamer. Someone made a test (with root 3.02/06) and found out: that if
> we compile a writing version of the program and a reading one, both
> versions once with auto scheme evolution enabled ('+' added in the
> LinkDef file) and without it: both readers can read both files without
> any further changes. Does this work by chance or did I missunderstood
> the stetement above.
> 
> Best regards,
> Thomas.
> 



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