diff --git a/CommonTools/RecoAlgos/interface/ClusterStorer.h b/CommonTools/RecoAlgos/interface/ClusterStorer.h index af9ff64161193..6066bbb1c4e1a 100644 --- a/CommonTools/RecoAlgos/interface/ClusterStorer.h +++ b/CommonTools/RecoAlgos/interface/ClusterStorer.h @@ -65,7 +65,7 @@ namespace helper { /// Set the reference of the hit of this record to 'newRef', /// will not modify the ref stored in this object. template - void rekey(const ClusterRefType &newRef) const; + void rekey(const ClusterRefType &newRef); private: ClusterHitRecord() {} /// private => unusable diff --git a/CommonTools/RecoAlgos/src/ClusterStorer.cc b/CommonTools/RecoAlgos/src/ClusterStorer.cc index 887137c6fbd0b..271822db84589 100644 --- a/CommonTools/RecoAlgos/src/ClusterStorer.cc +++ b/CommonTools/RecoAlgos/src/ClusterStorer.cc @@ -105,7 +105,7 @@ namespace helper { edmNew::DetSetVector &dsvToFill, edm::RefProd > &refprod) { std::sort(clusterRecords.begin(), clusterRecords.end()); // this sorts them by detid - typedef typename std::vector >::const_iterator RIT; + typedef typename std::vector >::iterator RIT; RIT it = clusterRecords.begin(), end = clusterRecords.end(); size_t clusters = 0; while (it != end) { @@ -143,7 +143,7 @@ namespace helper { // generic rekey (in practise for pixel only...) template // template for class template // template for member function - void ClusterStorer::ClusterHitRecord::rekey(const ClusterRefType &newRef) const { + void ClusterStorer::ClusterHitRecord::rekey(const ClusterRefType &newRef) { TrackingRecHit &genericHit = (*hits_)[index_]; RecHitType *hit = nullptr; if (genericHit.geographicalId().rawId() == detid_) { // a hit on this det, so it's simple @@ -159,9 +159,7 @@ namespace helper { // RecHitType is not used. template <> template // or template<> to specialise also here? - void ClusterStorer::ClusterHitRecord:: - // rekey(const SiStripRecHit2D::ClusterRef &newRef) const - rekey(const SiStripRecHit2D::ClusterRef &newRef) const { + void ClusterStorer::ClusterHitRecord::rekey(const SiStripRecHit2D::ClusterRef &newRef) { TrackingRecHit &genericHit = (*hits_)[index_]; const std::type_info &hit_type = typeid(genericHit); @@ -187,9 +185,7 @@ namespace helper { // RecHitType is not used. template <> template // or template<> to specialise also here? - void ClusterStorer::ClusterHitRecord:: - // rekey(const VectorHit::ClusterRef &newRef) const - rekey(const VectorHit::ClusterRef &newRef) const { + void ClusterStorer::ClusterHitRecord::rekey(const VectorHit::ClusterRef &newRef) { TrackingRecHit &genericHit = (*hits_)[index_]; const std::type_info &hit_type = typeid(genericHit);