Linear Collider Forum

Home » Software Tools » LCIO » schema evolution with LCGenericObject
Re: schema evolution with LCGenericObject [message #1794 is a reply to message #1792] Sat, 11 July 2009 10:28 Go to previous messageGo to previous message
Messages: 125
Registered: July 2005
Location: CERN
Hello Antonio,

we did the same thing some time ago in MarlinTPC, we increased the number of ints from 4 to 5. The new function which accesses the new int just checks if there are 4 or 5 ints and returns 0 if there are only 4:

 int ADCChannelMapping::getReadoutGroup() const {
  // This implementation should be backward compatible to the version
  // without readoutGroup, so the generic object might only contain 4 integers.
  // Return moduleGroup = 0 in this case.

 if ( _myObj->getNInt() >=5)
    return _myObj->getIntVal( 4 ) ;
    return 0;

If you have svn and a graphical diff tool like kdiff3 installed you can see the changes in revision 1480 by issuing
svn diff -c1480 --diff-cmd kdiff3 svn://

If you want to see the change from LCFixedObject to LCGenericObject have a look at the changes in revision 1479, where we extended from 3 to 4 ints.



Martin Killenberg

Read Message
Read Message
Read Message yes.gif
Read Message
Read Message
Previous Topic:LCWriter error when inputfile and outpufile only differ in "_" changed to "."
Next Topic:Segmentation violation when copying ParticleIDs of ReconstructedParticle
Goto Forum:

Current Time: Mon Dec 9 07:19:16 Pacific Standard Time 2019
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.1.
Copyright ©2001-2010 FUDforum Bulletin Board Software