[ROOT] automatic schema evolution of stl maps

From: Susan Kasahara (schubert@physics.umn.edu)
Date: Tue Mar 11 2003 - 05:10:40 MET


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