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 eflowrec that were required to be
compatible with these changes.


+verbatim+
index: src/cbntaa_cells.cxx
===================================================================
--- src/cbntaa_cells.cxx	(revision 447210)
+++ src/cbntaa_cells.cxx	(working copy)
@@ -263,7 +263,7 @@
 
   for (; feflow != eeflow; feflow++){
 
-    eflowobject* eflow = (*feflow);
+    const eflowobject* eflow = (*feflow);
 
     if (eflow){
 
index: src/cbntaa_eflow.cxx
===================================================================
--- src/cbntaa_eflow.cxx	(revision 447210)
+++ src/cbntaa_eflow.cxx	(working copy)
@@ -173,7 +173,7 @@
   for (; feflow != eeflow ; feflow++)
   {
 
-    eflowobject* eflow = (*feflow);
+    const eflowobject* eflow = (*feflow);
 
     m_et-&gt;push_back(eflow-&gt;et());
     m_eta-&gt;push_back(eflow-&gt;eta());
-verbatim-


i also had these changes to fix warnings about unused/uninitialized variables.

+verbatim+
index: src/eflowquantities.cxx
===================================================================
--- src/eflowquantities.cxx	(revision 447210)
+++ src/eflowquantities.cxx	(working copy)
@@ -117,7 +117,7 @@
   double sumptx = 0;
   double sumpty = 0;
 
-  double etx, ety, etz, e, et;
+  double etx, ety, et;
  
   int nphot = 0;
   int nele = 0;
@@ -135,8 +135,8 @@
       et = eflow-&gt;et();
       etx = et * cos(eflow-&gt;phi());
       ety = et * sin(eflow-&gt;phi());
-      etz = et * sinh(eflow-&gt;eta());
-      e = sqrt(etx * etx + ety * ety + etz * etz);
+      //etz = et * sinh(eflow-&gt;eta());
+      //e = sqrt(etx * etx + ety * ety + etz * etz);
 
       sumet += et;
       sumptx += etx;
index: src/eflowrecoversplitshowers.cxx
===================================================================
--- src/eflowrecoversplitshowers.cxx	(revision 447210)
+++ src/eflowrecoversplitshowers.cxx	(working copy)
@@ -271,7 +271,7 @@
 
   for (; firsteflowobj != lasteflowobj; firsteflowobj++){
 
-    bool annflag = false;
+    //bool annflag = false;
 
     std::vector&lt;eflowcalocluster*&gt; matchedclusters;
 
@@ -467,7 +467,7 @@
 	    sumvar += sigmaeexpect * sigmaeexpect;
 	    
 	    //retrieve information on whether cluster contains additional shower
-	    annflag = facilitator.annflag();
+	    //annflag = facilitator.annflag();
 
 	  }//if have measured perigee for this track
 	  else {
@@ -491,7 +491,7 @@
 	      (*firstclus)-&gt;sete(0.0);
 
 	      orderedcells.eraselist();
-	      annflag = true;
+	      //annflag = true;
 	    }
 	  }//if should annih
 
@@ -580,8 +580,8 @@
 		  
 		  //add vector to vector list
 		  vectorofduplicateclus.push_back(aneflowvec);
-		  std::vector&lt;std::vector&lt;eflowobject*&gt; &gt;::iterator firstvec = vectorofduplicateclus.begin();
-		  std::vector&lt;std::vector&lt;eflowobject*&gt; &gt;::iterator lastvec = vectorofduplicateclus.end();
+		  //std::vector&lt;std::vector&lt;eflowobject*&gt; &gt;::iterator firstvec = vectorofduplicateclus.begin();
+		  //std::vector&lt;std::vector&lt;eflowobject*&gt; &gt;::iterator lastvec = vectorofduplicateclus.end();
 		  
 		  (*firsteflow)-&gt;setisduplicated(true);
 		  (*firsteflowobjb)-&gt;setisduplicated(true);
@@ -595,8 +595,8 @@
 
 		  vectorofduplicateclus[matchindx] = aneflowvec;
 
-		  std::vector&lt;std::vector&lt;eflowobject*&gt; &gt;::iterator firstvec = vectorofduplicateclus.begin();
-		  std::vector&lt;std::vector&lt;eflowobject*&gt; &gt;::iterator lastvec = vectorofduplicateclus.end();
+		  //std::vector&lt;std::vector&lt;eflowobject*&gt; &gt;::iterator firstvec = vectorofduplicateclus.begin();
+		  //std::vector&lt;std::vector&lt;eflowobject*&gt; &gt;::iterator lastvec = vectorofduplicateclus.end();
 
 		}
 	      }
index: src/eflowobjectcreatortool.cxx
===================================================================
--- src/eflowobjectcreatortool.cxx	(revision 447210)
+++ src/eflowobjectcreatortool.cxx	(working copy)
@@ -98,7 +98,7 @@
 
   int itrack = -1;
 
-  int charge;
+  //int charge;
 
   elementlink&lt;rec::trackparticlecontainer&gt; trackelementlink;
 
@@ -106,7 +106,7 @@
 
   for (; it1!=it2; it1++)
     {
-      charge = 0;
+      //charge = 0;
       pt = 0.0;
       d0 = 0.0;
       z0 = 0.0;
index: src/eflowtrack.cxx
===================================================================
--- src/eflowtrack.cxx	(revision 447210)
+++ src/eflowtrack.cxx	(working copy)
@@ -313,7 +313,7 @@
   {
 
     double e = trackpt * cosh(eta);
-    double y[2];
+    double y[2] = {0, 0};
     int ie[2] = {nebins-1, -1};
 
     for (int i = 0; i &lt; nebins; i++) {
@@ -436,7 +436,7 @@
   {
 
     double e = trackpt * cosh(eta);
-    double y[2];
+    double y[2] = {0, 0};
     int ie[2] = {nebins-1, -1};
 
     for (int i = 0; i &lt; nebins; i++)
-verbatim-
