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


+verbatim+
index: src/vkalvrtsec.cxx
===================================================================
--- src/vkalvrtsec.cxx	(revision 447210)
+++ src/vkalvrtsec.cxx	(working copy)
@@ -615,7 +615,7 @@
     heplorentzvector   momentum,momlam,momjp;
     long int           charge;
     double             chi2;
-    std::vector&lt;rec::trackparticle*&gt;  selectedtrackparts; selectedtrackparts.clear();
+    std::vector&lt;const rec::trackparticle*&gt;  selectedtrackparts;
     
 
 //--------------------------------------------------------
-verbatim-


i also fixed a number of warnings about unused variables:


+verbatim+
index: src/pvrtfit.cxx
===================================================================
--- src/pvrtfit.cxx	(revision 447210)
+++ src/pvrtfit.cxx	(working copy)
@@ -35,7 +35,7 @@
       std::vector&lt;double&gt; chi2pertrk;
       std::vector&lt; std::vector&lt;double&gt; &gt; trkatvrt; 
       std::vector&lt;double&gt;  impv, impe;
-      double  chi2 = 0.; int outlier=1, i=0; double prevzcov=1.e10;
+      double  chi2 = 0.; int outlier=1, i=0; //double prevzcov=1.e10;
 //
 // start of fit
 //
@@ -87,7 +87,7 @@
            if(selector==1)removeentryinlist(listparticles,outlier);
            if(selector==2)removeentryinlist(listtracks,outlier);
 	 }
-         prevzcov=errormatrix[5];
+         //prevzcov=errormatrix[5];
       }
 
 //--
@@ -157,13 +157,13 @@
     double pt, ptsum=0., zsum=0., pxsum=0., pysum=0., zsum2=0., zsumw=0.;
     double controlvariablecur, zestimation;
     double ptang1[4],ptang2[4];
-    int counter,counterold;
+    int counter;//,counterold;
     std::vector&lt;double&gt; ptselarr;
     controlvariable =-100000;
     zestimation     =-100000.;
 
     step = 2.*sigmazbeam/nmesh;
-    counterold=0;
+    //counterold=0;
     for ( i=-nmesh; i&lt; nmesh-1; i++){
         lowlim=i*step; highlim=lowlim+2.*step;
         ptsum=0.;
@@ -216,7 +216,7 @@
 	   /*zestimation   = zsum/counter;*/
 	   zestimation   = zsumw/ptsum;
 	   zerr = disp;
-	   counterold=counter;
+	   //counterold=counter;
 	}
     }
     
@@ -241,7 +241,7 @@
           hep3vector beamposition(m_beampositionx,m_beampositiony,0.);
        }
        std::vector&lt;double&gt; impact,imperror;
-       double sig;
+       //double sig;
 //
        ztrk.clear();pttrk.clear();pxtrk.clear();pytrk.clear(); phitrk.clear();
        for (i_ntrk = listtracks.begin(); i_ntrk &lt; listtracks.end(); ++i_ntrk) {
@@ -258,7 +258,7 @@
 	  if( m_beampositionx == 0. &amp;&amp; m_beampositiony == 0.) {
 	    ztrk.push_back(vectperig[1]);
           } else {
-	    sig=m_fitsvc-&gt;vkalgetimpact((*i_ntrk),m_beamcnst,1,impact,imperror);
+	    /*sig=*/m_fitsvc-&gt;vkalgetimpact((*i_ntrk),m_beamcnst,1,impact,imperror);
 	    ztrk.push_back(impact[1]);
 	  }
        }
@@ -278,7 +278,7 @@
           hep3vector beamposition(m_beampositionx,m_beampositiony,0.);
        }
        std::vector&lt;double&gt; impact,imperror;
-       double sig;
+       //double sig;
 //
        ztrk.clear();pttrk.clear();pxtrk.clear();pytrk.clear(); phitrk.clear(); 
        for (i_ntrk = listtracks.begin(); i_ntrk &lt; listtracks.end(); ++i_ntrk) {
@@ -295,7 +295,7 @@
 	  if( m_beampositionx == 0. &amp;&amp; m_beampositiony == 0.) {
 	    ztrk.push_back(vectperig[1]);
           } else {
-	    sig=m_fitsvc-&gt;vkalgetimpact((*i_ntrk),m_beamcnst,1,impact,imperror);
+	    /*sig=*/m_fitsvc-&gt;vkalgetimpact((*i_ntrk),m_beamcnst,1,impact,imperror);
 	    ztrk.push_back(impact[1]);
 	  }
        }
index: src/vkalvrtprimcpp.cxx
===================================================================
--- src/vkalvrtprimcpp.cxx	(revision 447210)
+++ src/vkalvrtprimcpp.cxx	(working copy)
@@ -208,7 +208,7 @@
     const trk::measuredperigee* m_mper=null;
     hepvector vectperig;
     const trk::fitquality*  trkqual=0;
-    double impactsignif=0.;
+    //double impactsignif=0.;
     std::vector&lt;double&gt; impact,impacterror;
 
 
@@ -248,9 +248,9 @@
             delete testsum;
           }
 //---------------------------------------------------------	
-          impactsignif = m_fitsvc-&gt;vkalgetimpact((*i_ntrk), m_beamcnst, 1, impact, impacterror);
-	  double impacta0=vectperig[0];double impactz=vectperig[1];   // temporary
-	  impacta0=impact[0]; impactz=impact[1];   
+          /*impactsignif =*/ m_fitsvc-&gt;vkalgetimpact((*i_ntrk), m_beamcnst, 1, impact, impacterror);
+	  double impacta0=vectperig[0];//double impactz=vectperig[1];   // temporary
+	  impacta0=impact[0]; //impactz=impact[1];   
 
           sc = cuttrk( vectperig[4] , vectperig[3] , impacta0 , 
 		       trkqual-&gt;chisquared() / trkqual-&gt;numberdof(),
@@ -312,9 +312,9 @@
               //sharedhits  = (long int) testsum-&gt;get(trk::numberofpixelsharedhits);
               //sctshared    = (long int) testsum-&gt;get(trk::numberofsctsharedhits);
               sharedhits     = (long int) testsum-&gt;get(trk::numberofblayersharedhits);
-              impactsignif = m_fitsvc-&gt;vkalgetimpact((*i_nprt), m_beamcnst, 1, impact, impacterror);
-	      double impacta0=vectperig[0];double impactz=vectperig[1];   // temporary
-	      impacta0=impact[0]; impactz=impact[1];   
+              /*impactsignif =*/ m_fitsvc-&gt;vkalgetimpact((*i_nprt), m_beamcnst, 1, impact, impacterror);
+	      double impacta0=vectperig[0];//double impactz=vectperig[1];   // temporary
+	      impacta0=impact[0]; //impactz=impact[1];   
 //   log &lt;&lt; msg::debug &lt;&lt; &quot; track impact=&quot;&lt;&lt;impacta0&lt;&lt;&quot;, &quot;&lt;&lt;impactz&lt;&lt;&quot;, &quot;&lt;&lt;impactsignif&lt;&lt;endreq;
 //   log &lt;&lt; msg::debug &lt;&lt; &quot; track hits p=&quot;&lt;&lt;pixelhits&lt;&lt;&quot;, s=&quot;&lt;&lt;scthits&lt;&lt;&quot;, bl=&quot;&lt;&lt;blayhits&lt;&lt;
 //                        &quot;, sh p,s,bl=&quot;&lt;&lt;pixelshared&lt;&lt;&quot;, &quot;&lt;&lt;sctshared&lt;&lt;&quot;, &quot;&lt;&lt;blshared&lt;&lt;endreq;
index: src/vkalvrtsec.cxx
===================================================================
--- src/vkalvrtsec.cxx	(revision 447210)
+++ src/vkalvrtsec.cxx	(working copy)
@@ -195,8 +195,8 @@
     long int ntracks = (int) (selectedtrktracks.size());
 
 
-    int istrktrk=0;
-    if( selectedtrktracks.size() &gt; 0) istrktrk=1;
+    //int istrktrk=0;
+    //if( selectedtrktracks.size() &gt; 0) istrktrk=1;
     int i,j;
     std::vector&lt;const trk::track*&gt;  listtrktracks;
     std::vector&lt;const trk::track*&gt;  listlambda;
@@ -435,7 +435,7 @@
     const trk::measuredperigee* m_mper;
     datavector&lt;const trk::trackparameters&gt;::const_iterator i_apar;
 
-    double a0vert,zvert,phivert,cotthvert,ptinvvert,chi2;
+    double a0vert/*,zvert,phivert,cotthvert*/,ptinvvert,chi2;
 
     const datavector&lt;const trk::trackparameters&gt;* alltrkpar = itrk-&gt;trackparameters();
     const trk::fitquality* trkqual   = itrk-&gt;fitquality();
@@ -452,9 +452,9 @@
     hepvector vectperig = m_mper-&gt;parameters(); 
 //
     a0vert    =(double) vectperig[0];
-    zvert     =(double) vectperig[1];
-    phivert   =(double) vectperig[2];
-    cotthvert =(double) 1./tan(vectperig[3]);
+    //zvert     =(double) vectperig[1];
+    //phivert   =(double) vectperig[2];
+    //cotthvert =(double) 1./tan(vectperig[3]);
     ptinvvert =(double) vectperig[4]/sin(vectperig[3]);
 //------------------------------------------------------
 // 	std::cout&lt;&lt;&quot; trck=&quot;&lt;&lt;a0vert&lt;&lt;&quot;, &quot;&lt;&lt;ptinvvert&lt;&lt;'\n';
@@ -467,7 +467,7 @@
   statuscode vkalvrtsec::selgoodtrk(const rec::trackparticle* itrk )
   {
     const trk::measuredperigee* m_mper;
-    double a0vert,zvert,phivert,cotthvert,ptinvvert;
+    double a0vert/*,zvert,phivert,cotthvert*/,ptinvvert;
 
 // no chi2 in trackparticle
 //    const trk::fitquality* trkqual   = itrk-&gt;fitquality();
@@ -480,9 +480,9 @@
     hepvector vectperig = m_mper-&gt;parameters(); 
 //
     a0vert    =(double) vectperig[0];
-    zvert     =(double) vectperig[1];
-    phivert   =(double) vectperig[2];
-    cotthvert =(double) 1./tan(vectperig[3]);
+    //zvert     =(double) vectperig[1];
+    //phivert   =(double) vectperig[2];
+    //cotthvert =(double) 1./tan(vectperig[3]);
     ptinvvert =(double) vectperig[4]/sin(vectperig[3]);
 //------------------------------------------------------
 // 	std::cout&lt;&lt;&quot; part=&quot;&lt;&lt;a0vert&lt;&lt;&quot;, &quot;&lt;&lt;ptinvvert&lt;&lt;'\n';
@@ -547,10 +547,10 @@
   statuscode vkalvrtsec::selmclam( double vrtjpsi[3], double vrtmcprm[3] )
   {
      msgstream log( messageservice(), name() );
-     bool m_g4truthexists = false , m_geneventexists = false , m_g3truthexists = false;
-     if (m_sgsvc-&gt;contains&lt;mceventcollection&gt;(&quot;&quot;)) m_g3truthexists=true;
-     if (m_sgsvc-&gt;contains&lt;mceventcollection&gt;(&quot;g4truth&quot;)) m_g4truthexists=true;
-     if (m_sgsvc-&gt;contains&lt;mceventcollection&gt;(&quot;gen_event&quot;)) m_geneventexists=true;
+     //bool m_g4truthexists = false , m_geneventexists = false , m_g3truthexists = false;
+     //if (m_sgsvc-&gt;contains&lt;mceventcollection&gt;(&quot;&quot;)) m_g3truthexists=true;
+     //if (m_sgsvc-&gt;contains&lt;mceventcollection&gt;(&quot;g4truth&quot;)) m_g4truthexists=true;
+     //if (m_sgsvc-&gt;contains&lt;mceventcollection&gt;(&quot;gen_event&quot;)) m_geneventexists=true;
 
      vrtmcprm[0]=-1000000.;
      const mceventcollection*  partoncoll;
-verbatim-
