From d627a0a1499cff1b1f244a68830f31bccdc74b73 Mon Sep 17 00:00:00 2001 From: christos Date: Sun, 21 Aug 2022 21:59:09 +0200 Subject: [PATCH] ISF_Core: cppcheck prefer prefix --- .../ISF_Algorithms/src/SimHitTreeCreator.cxx | 26 +++++++++---------- .../ISF_Core/ISF_Services/src/GeoIDSvc.cxx | 8 +++--- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Simulation/ISF/ISF_Core/ISF_Algorithms/src/SimHitTreeCreator.cxx b/Simulation/ISF/ISF_Core/ISF_Algorithms/src/SimHitTreeCreator.cxx index e8d4d417193..39e25fbebb6 100644 --- a/Simulation/ISF/ISF_Core/ISF_Algorithms/src/SimHitTreeCreator.cxx +++ b/Simulation/ISF/ISF_Core/ISF_Algorithms/src/SimHitTreeCreator.cxx @@ -144,11 +144,11 @@ StatusCode ISF::SimHitTreeCreator::fillSimHitsTree() HepMcParticleLink HMPL = (*ih).particleLink(); this->addHepMcParticleLinkInfoToTree(HMPL); - ih++; + ++ih; while (ih!=mdtHits->end() && m_id==(*ih).MDTid() && m_barcode==(*ih).trackNumber() ) { // merge energy deposits and move on m_edeposit += (*ih).energyDeposit(); - ih++; + ++ih; } m_t_simHits->Fill(); } @@ -168,11 +168,11 @@ StatusCode ISF::SimHitTreeCreator::fillSimHitsTree() HepMcParticleLink HMPL = (*ih).particleLink(); this->addHepMcParticleLinkInfoToTree(HMPL); - ih++; + ++ih; while (ih!=rpcHits->end() && m_id==(*ih).RPCid() && m_barcode==(*ih).trackNumber() ) { // merge energy deposits and move on m_edeposit += (*ih).energyDeposit(); - ih++; + ++ih; } m_t_simHits->Fill(); } @@ -192,11 +192,11 @@ StatusCode ISF::SimHitTreeCreator::fillSimHitsTree() HepMcParticleLink HMPL = (*ih).particleLink(); this->addHepMcParticleLinkInfoToTree(HMPL); - ih++; + ++ih; while (ih!=tgcHits->end() && m_id==(*ih).TGCid() && m_barcode==(*ih).trackNumber() ) { // merge energy deposits and move on m_edeposit += (*ih).energyDeposit(); - ih++; + ++ih; } m_t_simHits->Fill(); } @@ -216,11 +216,11 @@ StatusCode ISF::SimHitTreeCreator::fillSimHitsTree() HepMcParticleLink HMPL = (*ih).particleLink(); this->addHepMcParticleLinkInfoToTree(HMPL); - ih++; + ++ih; while (ih!=cscHits->end() && m_id==(*ih).CSCid() && m_barcode==(*ih).trackNumber() ) { // merge energy deposits and move on m_edeposit += (*ih).energyDeposit(); - ih++; + ++ih; } m_t_simHits->Fill(); } @@ -244,11 +244,11 @@ StatusCode ISF::SimHitTreeCreator::fillSimHitsTree() m_barcode = (*ih).trackNumber(); this->addHepMcParticleLinkInfoToTree(HMPL); - ih++; + ++ih; while (ih!=pixHits->end() && ((unsigned int)m_id)==(*ih).identify() && m_barcode==(*ih).trackNumber() ) { // merge energy deposits and move on m_edeposit += (*ih).energyLoss(); - ih++; + ++ih; } m_t_simHits->Fill(); } @@ -269,11 +269,11 @@ StatusCode ISF::SimHitTreeCreator::fillSimHitsTree() m_barcode = (*ih).trackNumber(); this->addHepMcParticleLinkInfoToTree(HMPL); - ih++; + ++ih; while (ih!=sctHits->end() && ((unsigned int)m_id)==(*ih).identify() && m_barcode==(*ih).trackNumber() ) { // merge energy deposits and move on m_edeposit += (*ih).energyLoss(); - ih++; + ++ih; } m_t_simHits->Fill(); } @@ -293,7 +293,7 @@ StatusCode ISF::SimHitTreeCreator::fillSimHitsTree() m_barcode = (*ih).GetTrackID(); this->addHepMcParticleLinkInfoToTree(HMPL); - ih++; + ++ih; while (ih!=trtHits->end() && m_id==(*ih).GetHitID() && m_barcode==(*ih).GetTrackID() ) { // merge energy deposits and move on m_edeposit += (*ih).GetEnergyDeposit(); diff --git a/Simulation/ISF/ISF_Core/ISF_Services/src/GeoIDSvc.cxx b/Simulation/ISF/ISF_Core/ISF_Services/src/GeoIDSvc.cxx index 59b803f5764..b21062d9b7d 100644 --- a/Simulation/ISF/ISF_Core/ISF_Services/src/GeoIDSvc.cxx +++ b/Simulation/ISF/ISF_Core/ISF_Services/src/GeoIDSvc.cxx @@ -196,7 +196,7 @@ StatusCode ISF::GeoIDSvc::initialize() RadiusGeoIDPairSet::iterator radIt = tmpRBinsGlobal[i].begin(); RadiusGeoIDPairSet::iterator radItEnd = tmpRBinsGlobal[i].end(); size_t ii = 0; - for ( ; radIt!=radItEnd; radIt++) { + for ( ; radIt!=radItEnd; ++radIt) { double curR = sqrt((*radIt).first); // skip this one if it has radius==0 if (curRfirst-posIt->first)>m_tolerance || fabs(negIt->second+posIt->second)>m_tolerance) return false; - posIt++; + ++posIt; } // all fine -- GitLab