Re: [ROOT] automatic schema evolution of stl maps

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Mar 11 2003 - 15:59:04 MET


Hi Susan,

The current Automatic Schema Evolution algorithm does not recognize the
internals of STL collections. The I/O for STL is based on code generated
by rootcint.
We are working now on an extension of the support for STL that will use
the dictionary information instead of the explit code generation.
This new algorithm should be able to convert basic types in STL collections.

Rene Brun

Susan Kasahara wrote:
> 
> Hi roottalk,
> A class in our reconstruction libraries recently underwent
> a transition such that one of its data members:
> 
>   mutable map<Int_t,Float_t> fTime[2];  // data member in version 2
> 
> became:
> 
>   mutable map<Int_t,Double_t> fTime[2];  // data member in version 3
> 
> To support this transition, the class version number was changed
> from 2 to 3.  Automatic schema evolution is used for this
> class (using the '+' after the class pragma statement in LinkDef.h)
> and always has been.
>   What we've discovered is that automatic schema evolution
> doesn't seem to work in this case.  When the new class
> attempts to read objects of the old class version,
> ROOT's TStreamerInfo complains:
> 
>   Cannot convert CandTrack::fTime from type:map<Int_t,Float_t> to type:map<Int_t,Double_t>, skip element
> 
> Should automatic schema evolution should support this transition and
> are there plans to introduce support for this in root?  If not, do you
> recommend making use of a customized streamer to transition this
> data member?
>   For the above test I used the cvs version of root from 2 weeks ago,
> and gcc 3.2 on rh linux.
> Thanks for your help,
> -Sue



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