diff --git a/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_SR1.cxx b/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_SR1.cxx index 276139525a6ff9a1b598e8d419746c50c87233e8..e0802e2245413f4bc4c374dfe88538c35e4296ed 100644 --- a/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_SR1.cxx +++ b/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_SR1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // @@ -516,7 +516,7 @@ void TRT_FillCablingData_SR1::defineTables() std::vector<uint32_t>::iterator it = (m_phi_to_source[my_phi]).begin(); while ( (it != (m_phi_to_source[my_phi]).end()) && (srcId != *it) ) - it++; + ++it; if ( it == m_phi_to_source[my_phi].end() ) { @@ -540,7 +540,7 @@ void TRT_FillCablingData_SR1::defineTables() #endif // NOTDEF GlobalCableMap::iterator pos; - for ( pos=m_CableMap.begin(); pos != m_CableMap.end(); pos++ ) + for ( pos=m_CableMap.begin(); pos != m_CableMap.end(); ++pos ) { std::vector< GlobalCableMap_t *> GCM; @@ -550,7 +550,7 @@ void TRT_FillCablingData_SR1::defineTables() int ConnectorCount=-1; std::vector< GlobalCableMap_t *>::iterator it; - for ( it=GCM.begin(); it != GCM.end(); it++ ) + for ( it=GCM.begin(); it != GCM.end(); ++it ) { ConnectorCount++; @@ -766,7 +766,7 @@ void TRT_FillCablingData_SR1::defineCollID() ATH_MSG_INFO( "In defineCollID()" ); GlobalCableMap::iterator pos; - for ( pos=m_CableMap.begin(); pos != m_CableMap.end(); pos++ ) + for ( pos=m_CableMap.begin(); pos != m_CableMap.end(); ++pos ) { std::vector<IdentifierHash> * vectID = new std::vector<IdentifierHash>(); fillCollID( pos->first, *vectID); @@ -838,7 +838,7 @@ std::vector<IdentifierHash> & ids) (my_map->FEid == "3FL2") || (my_map->FEid == "3FS") ) rings |= 4; - it++; + ++it; if ( it != GCM.end() ) { @@ -949,7 +949,7 @@ std::vector<IdentifierHash> & ids) return; } - it++; + ++it; if ( it != GCM.end() ) { @@ -1019,7 +1019,7 @@ std::vector<uint32_t> TRT_FillCablingData_SR1::getRobID(Identifier id) eformat::helper::SourceIdentifier sid( *it1 ); v.push_back(sid.code()); - it1++; + ++it1; } return v; diff --git a/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_SR1_ECC.cxx b/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_SR1_ECC.cxx index d1bcb65d2920a0de488ac4437ca1f813cd9b1b6a..e7f73973ba008b31579b97800d985f709640cb18 100644 --- a/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_SR1_ECC.cxx +++ b/InnerDetector/InDetDetDescr/TRT_Cabling/src/TRT_FillCablingData_SR1_ECC.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // @@ -622,7 +622,7 @@ void TRT_FillCablingData_SR1_ECC::defineTables() std::vector<uint32_t>::iterator it = (m_phi_to_source[my_phi]).begin(); while ( (it != (m_phi_to_source[my_phi]).end()) && (srcId != *it) ) - it++; + ++it; if ( it == m_phi_to_source[my_phi].end() ) { @@ -646,7 +646,7 @@ void TRT_FillCablingData_SR1_ECC::defineTables() #endif // NOTDEF GlobalCableMap::iterator pos; - for ( pos=m_CableMap.begin(); pos != m_CableMap.end(); pos++ ) + for ( pos=m_CableMap.begin(); pos != m_CableMap.end(); ++pos ) { std::vector< GlobalCableMap_t *> GCM; @@ -656,7 +656,7 @@ void TRT_FillCablingData_SR1_ECC::defineTables() int ConnectorCount=-1; std::vector< GlobalCableMap_t *>::iterator it; - for ( it=GCM.begin(); it != GCM.end(); it++ ) + for ( it=GCM.begin(); it != GCM.end(); ++it ) { ConnectorCount++; @@ -882,7 +882,7 @@ void TRT_FillCablingData_SR1_ECC::defineCollID() ATH_MSG_INFO( "In defineCollID()" ); GlobalCableMap::iterator pos; - for ( pos=m_CableMap.begin(); pos != m_CableMap.end(); pos++ ) + for ( pos=m_CableMap.begin(); pos != m_CableMap.end(); ++pos ) { std::vector<IdentifierHash> * vectID = new std::vector<IdentifierHash>(); fillCollID( pos->first, *vectID); @@ -954,7 +954,7 @@ std::vector<IdentifierHash> & ids) (my_map->FEid == "3FL2") || (my_map->FEid == "3FS") ) rings |= 4; - it++; + ++it; if ( it != GCM.end() ) { @@ -1065,7 +1065,7 @@ std::vector<IdentifierHash> & ids) return; } - it++; + ++it; if ( it != GCM.end() ) { @@ -1135,7 +1135,7 @@ std::vector<uint32_t> TRT_FillCablingData_SR1_ECC::getRobID(Identifier id) eformat::helper::SourceIdentifier sid( *it1 ); v.push_back(sid.code()); - it1++; + ++it1; } return v; diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetCompetingRIOsOnTrack/CompetingPixelClustersOnTrackCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetCompetingRIOsOnTrack/CompetingPixelClustersOnTrackCnv_p1.cxx index 07a86d81008ba6c02f5f4aea0607c51836f6bc3b..955d745ecad47b4c13c959bf8395db442ab79038 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetCompetingRIOsOnTrack/CompetingPixelClustersOnTrackCnv_p1.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetCompetingRIOsOnTrack/CompetingPixelClustersOnTrackCnv_p1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ //----------------------------------------------------------------------------- @@ -19,15 +19,11 @@ CompetingPixelClustersOnTrackCnv_p1::persToTrans( const InDet::CompetingPixelClu InDet::CompetingPixelClustersOnTrack *transObj, MsgStream &log ) { - - std::vector< TPObjRef >::const_iterator it = persObj->m_containedChildRots.begin(), - itE = persObj->m_containedChildRots.end(); - auto containedChildRots = new std::vector< const InDet::PixelClusterOnTrack * >; - for (; it!=itE;it++) { + for (const TPObjRef& ref : persObj->m_containedChildRots) { ITPConverterFor<Trk::MeasurementBase> *rotCnv = 0; - const InDet::PixelClusterOnTrack* mcot = dynamic_cast<const InDet::PixelClusterOnTrack*>(createTransFromPStore(&rotCnv, *it, log)); + const InDet::PixelClusterOnTrack* mcot = dynamic_cast<const InDet::PixelClusterOnTrack*>(createTransFromPStore(&rotCnv, ref, log)); containedChildRots->push_back( mcot ); } diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrackCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrackCnv_p1.cxx index eef3a18654177b49d30be7044403513f009b7288..3e650c1de0bc18304178365626c8861d7d8c5c79 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrackCnv_p1.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetCompetingRIOsOnTrack/CompetingSCT_ClustersOnTrackCnv_p1.cxx @@ -13,15 +13,11 @@ CompetingSCT_ClustersOnTrackCnv_p1::persToTrans( const InDet::CompetingSCT_Clust InDet::CompetingSCT_ClustersOnTrack *transObj, MsgStream &log ) { - - std::vector< TPObjRef >::const_iterator it = persObj->m_containedChildRots.begin(), - itE = persObj->m_containedChildRots.end(); - std::vector< const InDet::SCT_ClusterOnTrack * > containedChildRots; - - for (; it!=itE;it++) { + + for (const TPObjRef& ref : persObj->m_containedChildRots) { ITPConverterFor<Trk::MeasurementBase> *rotCnv = 0; - const InDet::SCT_ClusterOnTrack* mcot = dynamic_cast<const InDet::SCT_ClusterOnTrack*>(createTransFromPStore(&rotCnv, *it, log)); + const InDet::SCT_ClusterOnTrack* mcot = dynamic_cast<const InDet::SCT_ClusterOnTrack*>(createTransFromPStore(&rotCnv, ref, log)); containedChildRots.push_back( mcot ); } diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetCompetingRIOsOnTrack/CompetingTRT_DriftCirclesOnTrackCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetCompetingRIOsOnTrack/CompetingTRT_DriftCirclesOnTrackCnv_p1.cxx index 622446b219e8ba66e941d98632c82f6397785416..e914ad54f9bc0de248d9665f9dcfc00190a269e3 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetCompetingRIOsOnTrack/CompetingTRT_DriftCirclesOnTrackCnv_p1.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetCompetingRIOsOnTrack/CompetingTRT_DriftCirclesOnTrackCnv_p1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ //----------------------------------------------------------------------------- @@ -21,15 +21,11 @@ CompetingTRT_DriftCirclesOnTrackCnv_p1::persToTrans( const InDet::CompetingTRT_D InDet::CompetingTRT_DriftCirclesOnTrack *transObj, MsgStream &log ) { - - std::vector< TPObjRef >::const_iterator it = persObj->m_containedChildRots.begin(), - itE = persObj->m_containedChildRots.end(); - auto containedChildRots = new std::vector< const InDet::TRT_DriftCircleOnTrack * >; - for (; it!=itE;it++) { + for (const TPObjRef& ref : persObj->m_containedChildRots) { ITPConverterFor<Trk::MeasurementBase> *rotCnv = 0; - const InDet::TRT_DriftCircleOnTrack* mcot = dynamic_cast<const InDet::TRT_DriftCircleOnTrack*>(createTransFromPStore(&rotCnv, *it, log)); + const InDet::TRT_DriftCircleOnTrack* mcot = dynamic_cast<const InDet::TRT_DriftCircleOnTrack*>(createTransFromPStore(&rotCnv, ref, log)); containedChildRots->push_back( mcot ); } diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelClusterCnv_p2.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelClusterCnv_p2.cxx index 066a9784b024c0890f902338b87883d1bba656ac..a0185a1883b1be9262761b6ab4f55accb8be5f5c 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelClusterCnv_p2.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelClusterCnv_p2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ //----------------------------------------------------------------------------- @@ -29,11 +29,10 @@ PixelClusterCnv_p2::createPixelCluster (const InDet::PixelCluster_p2* persObj, Identifier id (persObj->m_clusId); Identifier::value_type id32 = id.get_compact(); std::vector<Identifier>::iterator tit = rdoList.begin(); - for(std::vector<InDet::PixelCluster_p2::rdo_diff_type>::const_iterator it = persObj->m_rdoList.begin(); - it != persObj->m_rdoList.end();it++) + for (const InDet::PixelCluster_p2::rdo_diff_type& rdo : persObj->m_rdoList) { - *tit = Identifier((Identifier::value_type) *it + id32); - tit++; + *tit = Identifier((Identifier::value_type) rdo + id32); + ++tit; } InDet::SiWidth width; @@ -99,10 +98,9 @@ void PixelClusterCnv_p2::transToPers( const InDet::PixelCluster *transObj, InDet std::vector<InDet::PixelCluster_p2::rdo_diff_type>::iterator pit = persObj->m_rdoList.begin(); - for (std::vector<Identifier>::const_iterator it=transObj->rdoList().begin(); it != transObj->rdoList().end(); it++) { - - *pit = (InDet::PixelCluster_p2::rdo_diff_type) (it->get_compact()) - persObj->m_clusId ; - pit++; + for (const Identifier& id : transObj->rdoList()) { + *pit = (InDet::PixelCluster_p2::rdo_diff_type) (id.get_compact()) - persObj->m_clusId ; + ++pit; } } diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelClusterCnv_p3.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelClusterCnv_p3.cxx index 96fdafb1a49edb0a443adc86c61ae6371072ffe3..50aac2cac0f89b418f7622b37cb29c8b35ad3990 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelClusterCnv_p3.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelClusterCnv_p3.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ //----------------------------------------------------------------------------- @@ -158,11 +158,11 @@ void PixelClusterCnv_p3::transToPers( const InDet::PixelCluster *transObj, InDet // Save offset to wafer id for the cluster id Identifier waferId = m_pixId2->wafer_id(clusId); // remove the eta/phi of channel id *pit = static_cast<InDet::PixelCluster_p3::rdo_diff_type>( m_pixId2->calc_offset(waferId, clusId) ); - pit++; + ++pit; for (const Identifier& id : transObj->rdoList()) { *pit = static_cast<InDet::PixelCluster_p3::rdo_diff_type>( m_pixId2->calc_offset(clusId, id) ); - pit++; + ++pit; } // Setting of cluster properties: diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelClusterContainerCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelClusterContainerCnv_p1.cxx index e73443f6eddda9d2a9bf2e17fad0dc8948abaf38..21ba9aaa626871b338f4ec574ccda2b79cf5af8e 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelClusterContainerCnv_p1.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelClusterContainerCnv_p1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // Athena @@ -50,7 +50,7 @@ void InDet::PixelClusterContainerCnv_p1::transToPers(const InDet::PixelClusterCo unsigned int chanEnd = 0; persCont->m_collections.resize(transCont->numberOfCollections()); - for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, it_Coll++) { + for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, ++it_Coll) { // Add in new collection const InDet::PixelClusterCollection& collection = (**it_Coll); chanBegin = chanEnd; diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelGangedClusterAmbiguitiesCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelGangedClusterAmbiguitiesCnv_p1.cxx index ca87616fd94bd9d7629dc016023c652335dfc74a..a31249f799dde6f78509de10acf2641cb2ae9f0d 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelGangedClusterAmbiguitiesCnv_p1.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/PixelGangedClusterAmbiguitiesCnv_p1.cxx @@ -56,7 +56,7 @@ void PixelGangedClusterAmbiguitiesCnv_p1::transToPers IdentifierHash idHash = pixelCluster->getHashAndIndex().collHash(); // idHash of collection // loop over dhs - for ( ; dh!=dhEnd; dh++ ) { + for ( ; dh!=dhEnd; ++dh ) { auto coll = dh->indexFindPtr(idHash); //matching collection // does coll exist? // check prd exists in collection @@ -77,7 +77,7 @@ void PixelGangedClusterAmbiguitiesCnv_p1::transToPers const InDet::SiCluster* keyPixelCluster(0); const InDet::SiCluster* gangedPixelCluster(0); unsigned int count(1); - for( ; itr != itrE ; itr++ ) { + for( ; itr != itrE ; ++itr ) { // for clarity assign the elements keyPixelCluster = itr->first; @@ -124,20 +124,15 @@ void PixelGangedClusterAmbiguitiesCnv_p1::persToTrans(const InDet::PixelGangedC << persObj->m_pixelClusterContainerName << endmsg; } - std::vector< std::pair<uint32_t, std::vector<uint32_t> > >::const_iterator persItr = persObj->m_ambiguityMap.begin(); - std::vector< std::pair<uint32_t, std::vector<uint32_t> > >::const_iterator persItrE = persObj->m_ambiguityMap.end(); - const InDet::PixelCluster* keyPixelCluster(0); const InDet::PixelCluster* gangedPixelCluster(0); - - for( ; persItr != persItrE ; persItr++ ) + + for (const std::pair<uint32_t, std::vector<uint32_t> >& mapElement : persObj->m_ambiguityMap) { - const std::pair<uint32_t, std::vector<uint32_t> >& mapElement = (*persItr); - for (std::vector<uint32_t>::const_iterator newItr = (mapElement.second).begin(); - newItr != (mapElement.second).end(); ++newItr) + for (uint32_t elt : mapElement.second) { IdentContIndex keyIdentContIndex(mapElement.first); - IdentContIndex gangedIdentContIndex(*newItr); + IdentContIndex gangedIdentContIndex(elt); for (InDet::PixelClusterContainer::const_iterator contItr = pCC->begin(); contItr != pCC->end(); ++contItr) { diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/SCT_ClusterCnv_p2.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/SCT_ClusterCnv_p2.cxx index 22adf0022e4ab5c03a8e0258b090bde444b8e242..9d48c95fb3698225cd2f87ca212ebbdbe6fc4e28 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/SCT_ClusterCnv_p2.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/SCT_ClusterCnv_p2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ //----------------------------------------------------------------------------- @@ -38,10 +38,9 @@ SCT_ClusterCnv_p2::createSCT_Cluster (const InDet::SCT_Cluster_p2* persObj, //Identifier::value_type id32 = transObj->identify().get_compact(); //Identifier id32 = transObj->identify(); std::vector<Identifier>::iterator tit = rdoList.begin(); - for (std::vector<InDet::SCT_Cluster_p2::rdo_diff_type>::const_iterator it=persObj->m_rdoList.begin(); it != persObj->m_rdoList.end(); it++) { - - *tit = Identifier(m_sctId2->strip_id_offset(clusId,*it) ); - tit++; + for (const InDet::SCT_Cluster_p2::rdo_diff_type& rdo : persObj->m_rdoList) { + *tit = Identifier(m_sctId2->strip_id_offset(clusId,rdo) ); + ++tit; } InDet::SiWidth sw; @@ -100,10 +99,9 @@ void SCT_ClusterCnv_p2::transToPers( const InDet::SCT_Cluster *transObj, InDet:: std::vector<InDet::SCT_Cluster_p2::rdo_diff_type>::iterator pit = persObj->m_rdoList.begin(); - for (std::vector<Identifier>::const_iterator it=transObj->rdoList().begin(); it != transObj->rdoList().end(); it++) { - //*pit = static_cast<InDet::SCT_Cluster_p2::rdo_diff_type>(it->get_compact() - id32); - *pit = static_cast<InDet::SCT_Cluster_p2::rdo_diff_type>( m_sctId2->calc_offset(id32, *it) ); - pit++; + for (const Identifier& id : transObj->rdoList()) { + *pit = static_cast<InDet::SCT_Cluster_p2::rdo_diff_type>( m_sctId2->calc_offset(id32, id) ); + ++pit; } } diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/SCT_ClusterCnv_p3.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/SCT_ClusterCnv_p3.cxx index 134ed0490d4a76d60f863bc916b24df3aa9c967f..6d5f1628030cbaf8f19fce9ab8f15f4ec20aaabc 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/SCT_ClusterCnv_p3.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/SCT_ClusterCnv_p3.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ //----------------------------------------------------------------------------- @@ -39,10 +39,9 @@ SCT_ClusterCnv_p3::createSCT_Cluster (const InDet::SCT_Cluster_p3* persObj, //Identifier::value_type id32 = transObj->identify().get_compact(); //Identifier id32 = transObj->identify(); std::vector<Identifier>::iterator tit = rdoList.begin(); - for (std::vector<InDet::SCT_Cluster_p3::rdo_diff_type>::const_iterator it=persObj->m_rdoList.begin(); it != persObj->m_rdoList.end(); it++) { - - *tit = Identifier(m_sctId2->strip_id_offset(clusId,*it) ); - tit++; + for (const InDet::SCT_Cluster_p3::rdo_diff_type& rdo : persObj->m_rdoList) { + *tit = Identifier(m_sctId2->strip_id_offset(clusId,rdo) ); + ++tit; } InDet::SiWidth sw; @@ -106,10 +105,9 @@ void SCT_ClusterCnv_p3::transToPers( const InDet::SCT_Cluster *transObj, InDet:: std::vector<InDet::SCT_Cluster_p3::rdo_diff_type>::iterator pit = persObj->m_rdoList.begin(); - for (std::vector<Identifier>::const_iterator it=transObj->rdoList().begin(); it != transObj->rdoList().end(); it++) { - - *pit = static_cast<InDet::SCT_Cluster_p3::rdo_diff_type>( m_sctId2->calc_offset(id32, *it) ); - pit++; + for (const Identifier& id : transObj->rdoList()) { + *pit = static_cast<InDet::SCT_Cluster_p3::rdo_diff_type>( m_sctId2->calc_offset(id32, id) ); + ++pit; } } diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/SCT_ClusterContainerCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/SCT_ClusterContainerCnv_p1.cxx index dc28443ef350a92c8d198b42c2144709e7e27b88..30c40f0b23f344526e2e120fd63b7ca130abd212 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/SCT_ClusterContainerCnv_p1.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/SCT_ClusterContainerCnv_p1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "InDetEventTPCnv/InDetPrepRawData/SCT_ClusterContainerCnv_p1.h" @@ -52,7 +52,7 @@ void InDet::SCT_ClusterContainerCnv_p1::transToPers(const InDet::SCT_ClusterCont persCont->m_collections.resize(transCont->numberOfCollections()); // if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << " Preparing " << persCont->m_collections.size() << "Collections" << endmsg; - for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, it_Coll++) { + for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, ++it_Coll) { // Add in new collection // if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << " New collection" << endmsg; const InDet::SCT_ClusterCollection& collection = (**it_Coll); diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/TRT_DriftCircleContainerCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/TRT_DriftCircleContainerCnv_p1.cxx index 2cec40c90c3a3cbecc2c44bae91f56b62df34185..8c095de94e188a641895419494f0f55b8627eb99 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/TRT_DriftCircleContainerCnv_p1.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/InDetPrepRawData/TRT_DriftCircleContainerCnv_p1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "InDetPrepRawData/TRT_DriftCircle.h" @@ -56,7 +56,7 @@ void InDet::TRT_DriftCircleContainerCnv_p1::transToPers(const InDet::TRT_DriftCi persCont->m_collections.resize(transCont->numberOfCollections()); // if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << " Preparing " << persCont->m_collections.size() << "Collections" << endmsg; - for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, it_Coll++) { + for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, ++it_Coll) { // Add in new collection const InDet::TRT_DriftCircleCollection& collection = (**it_Coll); chanBegin = chanEnd; diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/PixelClusterContainerCnv_p2.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/PixelClusterContainerCnv_p2.cxx index 65de22842c21c04b303cff8e9624e2cf8ce9e93b..9ff99ce36a9757b83c750ca114c731498bcae1bb 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/PixelClusterContainerCnv_p2.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/PixelClusterContainerCnv_p2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // Athena @@ -55,7 +55,7 @@ void PixelClusterContainerCnv_p2::transToPers(const InDet::PixelClusterContainer unsigned int chanEnd = 0; persCont->m_collections.resize(transCont->numberOfCollections()); // if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << " Preparing " << persCont->m_collections.size() << "Collections" << endmsg; - for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, it_Coll++) { + for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, ++it_Coll) { // Add in new collection const InDet::PixelClusterCollection& collection = (**it_Coll); chanBegin = chanEnd; diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/PixelClusterContainerCnv_p3.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/PixelClusterContainerCnv_p3.cxx index 08e4fb20dbdd5dad8726e385ffc3060640cb9a2a..19e411e31040d7fbbe3d09bbc8589305bf2d9d77 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/PixelClusterContainerCnv_p3.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/PixelClusterContainerCnv_p3.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "InDetEventTPCnv/PixelClusterContainerCnv_p3.h" @@ -63,7 +63,7 @@ void PixelClusterContainerCnv_p3::transToPers(const InDet::PixelClusterContainer unsigned int chanEnd = 0; persCont->m_collections.resize(transCont->numberOfCollections()); // if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << " Preparing " << persCont->m_collections.size() << "Collections" << endmsg; - for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, it_Coll++) { + for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, ++it_Coll) { // Add in new collection const InDet::PixelClusterCollection& collection = (**it_Coll); chanBegin = chanEnd; diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/SCT_ClusterContainerCnv_p2.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/SCT_ClusterContainerCnv_p2.cxx index d71a253787aa2f3eda2a3fa1fe1731acce7c9b12..a6476bd530330b1a8d703635acb22190c74f0ad7 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/SCT_ClusterContainerCnv_p2.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/SCT_ClusterContainerCnv_p2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "InDetEventTPCnv/SCT_ClusterContainerCnv_p2.h" @@ -67,7 +67,7 @@ void SCT_ClusterContainerCnv_p2::transToPers(const InDet::SCT_ClusterContainer* // to avoid the inside-loop resize int totSize = 0; //for ( ; it_Coll != it_CollEnd; it_Coll++) { - for ( it_Coll=transCont->begin(); it_Coll != it_CollEnd; it_Coll++) { + for ( it_Coll=transCont->begin(); it_Coll != it_CollEnd; ++it_Coll) { const InDet::SCT_ClusterCollection& collection = (**it_Coll); totSize+=collection.size(); } @@ -76,7 +76,7 @@ void SCT_ClusterContainerCnv_p2::transToPers(const InDet::SCT_ClusterContainer* // if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << " Preparing " << persCont->m_collections.size() << "Collections" << endmsg; //for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, it_Coll++) { - for (collIndex = 0, it_Coll=transCont->begin(); it_Coll != it_CollEnd; ++collIndex, it_Coll++) { + for (collIndex = 0, it_Coll=transCont->begin(); it_Coll != it_CollEnd; ++collIndex, ++it_Coll) { // Add in new collection const InDet::SCT_ClusterCollection& collection = (**it_Coll); chanBegin = chanEnd; diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/SCT_ClusterContainerCnv_p3.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/SCT_ClusterContainerCnv_p3.cxx index 0a7dff6f89c89a4bb5ce7aaa01ab72972a729957..cf7868ddab1914f5d6544edbb58989d182485f25 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/SCT_ClusterContainerCnv_p3.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/SCT_ClusterContainerCnv_p3.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "InDetEventTPCnv/SCT_ClusterContainerCnv_p3.h" @@ -67,7 +67,7 @@ void SCT_ClusterContainerCnv_p3::transToPers(const InDet::SCT_ClusterContainer* // to avoid the inside-loop resize int totSize = 0; //for ( ; it_Coll != it_CollEnd; it_Coll++) { - for ( it_Coll=transCont->begin(); it_Coll != it_CollEnd; it_Coll++) { + for ( it_Coll=transCont->begin(); it_Coll != it_CollEnd; ++it_Coll) { const InDet::SCT_ClusterCollection& collection = (**it_Coll); totSize+=collection.size(); } @@ -76,7 +76,7 @@ void SCT_ClusterContainerCnv_p3::transToPers(const InDet::SCT_ClusterContainer* // if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << " Preparing " << persCont->m_collections.size() << "Collections" << endmsg; //for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, it_Coll++) { - for (collIndex = 0, it_Coll=transCont->begin(); it_Coll != it_CollEnd; ++collIndex, it_Coll++) { + for (collIndex = 0, it_Coll=transCont->begin(); it_Coll != it_CollEnd; ++collIndex, ++it_Coll) { // Add in new collection const InDet::SCT_ClusterCollection& collection = (**it_Coll); chanBegin = chanEnd; diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/TRT_DriftCircleContainerCnv_p2.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/TRT_DriftCircleContainerCnv_p2.cxx index d728296dc4108f86226bd31d54c9c11c43981f26..b686037dadb52379e7974305543ce89b837101f0 100644 --- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/TRT_DriftCircleContainerCnv_p2.cxx +++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/src/TRT_DriftCircleContainerCnv_p2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "InDetPrepRawData/TRT_DriftCircle.h" @@ -67,7 +67,7 @@ void TRT_DriftCircleContainerCnv_p2::transToPers(const InDet::TRT_DriftCircleCon // to avoid the inside-loop resize int totSize = 0; //for ( ; it_Coll != it_CollEnd; it_Coll++) { - for ( it_Coll=transCont->begin(); it_Coll != it_CollEnd; it_Coll++) { + for ( it_Coll=transCont->begin(); it_Coll != it_CollEnd; ++it_Coll) { const InDet::TRT_DriftCircleCollection& collection = (**it_Coll); totSize+=collection.size(); } @@ -76,7 +76,7 @@ void TRT_DriftCircleContainerCnv_p2::transToPers(const InDet::TRT_DriftCircleCon // if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << " Preparing " << persCont->m_collections.size() << "Collections" << endmsg; // for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, it_Coll++) { - for (collIndex = 0, it_Coll=transCont->begin(); it_Coll != it_CollEnd; ++collIndex, it_Coll++) { + for (collIndex = 0, it_Coll=transCont->begin(); it_Coll != it_CollEnd; ++collIndex, ++it_Coll) { // Add in new collection const InDet::TRT_DriftCircleCollection& collection = (**it_Coll); chanBegin = chanEnd; diff --git a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRT_RodDecoder.cxx b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRT_RodDecoder.cxx index 09bf2cd292cd50a505b621ba71b241ec92f928c4..a89fb9bac5140a06e752844bfcfb2f97cb72d4b1 100644 --- a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRT_RodDecoder.cxx +++ b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRT_RodDecoder.cxx @@ -186,7 +186,7 @@ StatusCode TRT_RodDecoder::initialize() std::vector<int>::iterator it; for ( it=m_LoadCompressTableVersions.begin() ; - it < m_LoadCompressTableVersions.end(); it++ ) + it < m_LoadCompressTableVersions.end(); ++it ) { if ( (*it < 4) || (*it > m_maxCompressionVersion) ) { @@ -1743,7 +1743,7 @@ TRT_RodDecoder::update() { Ctable->m_TableVersion ); delete Ctable; - catrIt++; + ++catrIt; continue; } @@ -1754,7 +1754,7 @@ TRT_RodDecoder::update() { ATH_MSG_DEBUG( "Table " << Ctable->m_TableVersion << " already loaded! Not overwriting" ); delete Ctable; - catrIt++; + ++catrIt; continue; } @@ -1843,7 +1843,7 @@ TRT_RodDecoder::update() { } #endif /* NOTDEF */ - catrIt++; + ++catrIt; } diff --git a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRT_RodEncoder.cxx b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRT_RodEncoder.cxx index 87461ac2fff5e9909f86e8c874650eda5f77572f..d67370a7c0de2026b30e7f4a1943f08bcd36c658 100644 --- a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRT_RodEncoder.cxx +++ b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/src/TRT_RodEncoder.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // Implementation of TRT_RodEncoder class @@ -65,7 +65,7 @@ TRT_RodEncoder::fillROD( std::vector<uint32_t>& v32rod ) v32rod[BufferOffset] = StrawWord; - rdo_it++; + ++rdo_it; } return StatusCode::SUCCESS; @@ -107,7 +107,7 @@ TRT_RodEncoder::fillROD3( std::vector<uint32_t>& v32rod ) tmp_data[BufferOffset] = StrawWord; - rdo_it++; + ++rdo_it; } for ( int i=0; i<TRT_MaxBufferSize; i++ )