hi -

it has long been that the methods that dereference a const
datavector&lt;t&gt; (operator[], etc), return a `const t*',
even though the value_type is `t*'.

however, datavector&lt;t&gt;::const_iterator has been inconsistent with this,
in that dereferencing the iterator returns a `t*'.

we are trying to change this feature of datavector::const_iterator, so that
dereferencing it will also return a `const t*', consistent with
datavector.  we hope this will help catch instances where
data objects are unintentionally modified.

these changes are in datamodel-00-23-21.
unfortunately, this requires some changes in client packages.

here are the changes in jetmomenttools that were required to be
compatible with these changes.


+verbatim+
index: src/jetvtxtrackhelper.cxx
===================================================================
--- src/jetvtxtrackhelper.cxx	(revision 447210)
+++ src/jetvtxtrackhelper.cxx	(working copy)
@@ -168,7 +168,7 @@
   for (rec::trackparticlecontainer::const_iterator tracksiter(m_trkcontinsg-&gt;begin());
        tracksiter != m_trkcontinsg-&gt;end(); tracksiter++ ) {
 
-    rec::trackparticle * trk = *tracksiter;     
+    const rec::trackparticle * trk = *tracksiter;     
     if (!this-&gt;passtrackorigincuts(trk)) continue;
     if (!this-&gt;passtrackkinematiccuts(trk)) continue;
     //ath_msg(debug) &lt;&lt; &quot;selected trk ===&quot; &lt;&lt; trk-&gt;eta() &lt;&lt;&quot;,&quot;&lt;&lt; trk-&gt;phi() &lt;&lt;endreq;
index: src/jetftrackcorrectiontool.cxx
===================================================================
--- src/jetftrackcorrectiontool.cxx	(revision 447210)
+++ src/jetftrackcorrectiontool.cxx	(working copy)
@@ -168,7 +168,7 @@
     }
 
 
-    jet* jet = *jetiter;
+    const jet* jet = *jetiter;
 
     if(mycorrection &gt; 0.2 &amp;&amp; mycorrection&lt;2.){      
 
-verbatim-


i also have these changes to fix warnings about unused variables:


+verbatim+
index: src/jeteccentricitytool.cxx
===================================================================
--- src/jeteccentricitytool.cxx	(revision 447210)
+++ src/jeteccentricitytool.cxx	(working copy)
@@ -136,14 +136,14 @@
   // figure out which line is the max and which is the min
   float varmax = var1;
   float varmin = var2;
-  float thetamax = theta;
-  float thetamin = thetaprime;
+  //float thetamax = theta;
+  //float thetamin = thetaprime;
 
   if(varmax &lt; varmin) {
     varmax = var2;
     varmin = var1;
-    thetamax = thetaprime;
-    thetamin = theta;
+    //thetamax = thetaprime;
+    //thetamin = theta;
   }
 
   // clean up
-verbatim-
