diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/InDetServMatGeometryManager.h b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/InDetServMatGeometryManager.h index 8a8be6ec4382fba4fabcd7163023816fdd4010cd..81260af058f9985274ed0b2f65171a02f9425db9 100644 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/InDetServMatGeometryManager.h +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/InDetServMatGeometryManager.h @@ -143,11 +143,11 @@ public: double sctInnerSupport() const; // Pixel support tubes dimensions: specify name from simple services table - double SupportTubeRMin(std::string name) const; - double SupportTubeRMax(std::string name) const; - double SupportTubeZMin(std::string name) const; - double SupportTubeZMax(std::string name) const; - int SupportTubeExists(std::string name) const; + double SupportTubeRMin(const std::string& name) const; + double SupportTubeRMax(const std::string& name) const; + double SupportTubeZMin(const std::string& name) const; + double SupportTubeZMax(const std::string& name) const; + int SupportTubeExists(const std::string& name) const; private: // Record sets @@ -188,7 +188,7 @@ private: InDetMaterialManager * m_matMgr; // index of named support tube in m_InDetSimpleServices table, -1 if not found. Could be cached for speed. - int SupportTubeIndex(std::string name) const; + int SupportTubeIndex(const std::string& name) const; }; diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/ServiceMaterial.h b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/ServiceMaterial.h index 3ce60a9862b0c09fc8238f02f568d75b85dfca7c..13558191a933914c1079adecdb24d6e8a93dcfe1 100644 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/ServiceMaterial.h +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/ServiceMaterial.h @@ -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 */ #ifndef ServiceMaterial_H @@ -19,8 +19,8 @@ public: If the weight is zero it will be taken from the material DB */ struct Entry { - Entry( std::string nam, int num, bool lin) : name(nam), number(num), linear(lin), weight(1) {} - Entry( std::string nam, int num, bool lin, double w) : name(nam), number(num), linear(lin), weight(w) {} + Entry( const std::string& nam, int num, bool lin) : name(nam), number(num), linear(lin), weight(1) {} + Entry( const std::string& nam, int num, bool lin, double w) : name(nam), number(num), linear(lin), weight(w) {} std::string name; int number; @@ -55,7 +55,7 @@ public: //ServiceMaterial operator*( double len) const {return ServiceMaterial( name(), len*linearWeight(), m_components);} void multiply( int factor) { - for ( std::vector< Entry>::iterator i=m_components.begin(); i!=m_components.end(); i++) { + for ( std::vector< Entry>::iterator i=m_components.begin(); i!=m_components.end(); ++i) { i->number *= factor; } } diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/ServicesTracker.h b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/ServicesTracker.h index 5921cf4e04db6c7fa2729d0cd98e21e525ca79ab..df278561272ff8cd5cc6c597b68af9c1ae114eae 100644 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/ServicesTracker.h +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/ServicesTracker.h @@ -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 */ #ifndef ServicesTracker_H @@ -46,7 +46,7 @@ public: const std::vector<ServiceVolume*>& serviceVolumes() const {return m_volumes;} // Called by Routing - void setServiceVolumes( const std::vector<ServiceVolume*> vc) {m_volumes=vc;} + void setServiceVolumes( const std::vector<ServiceVolume*>& vc) {m_volumes=vc;} // methods called by Builder void constructBarrelLayer( double radius, double zHalfLength, diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/StaveServices.h b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/StaveServices.h index f02284511a0acd933321f6d55a6dad046f4c1b6e..9ff9794853ab95fc21dab5fef673310a01fef94d 100644 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/StaveServices.h +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/StaveServices.h @@ -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 */ #ifndef StaveServices_H @@ -17,7 +17,7 @@ class StaveServices { public: StaveServices( DetType::Type type, DetType::Part part, int layer, - int nhv, int ndcs, int ndata, std::vector<int> lvGauge) : + int nhv, int ndcs, int ndata, const std::vector<int>& lvGauge) : m_type( type), m_part(part), m_layer(layer), m_numHV(nhv), m_numDCS( ndcs), m_numData( ndata), m_lvGauge( lvGauge) {} diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatBuilderToolSLHC.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatBuilderToolSLHC.cxx index 311a0fbeb142e3bb7e46f0806bb799bbea854543..2d3a9a1208ba8f2ca3acb56068f7148b6d162a49 100644 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatBuilderToolSLHC.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatBuilderToolSLHC.cxx @@ -161,7 +161,7 @@ void InDetServMatBuilderToolSLHC::build() fixMissingMaterials(); typedef std::vector<ServiceVolume*>::const_iterator iter; - for (iter i=tracker->serviceVolumes().begin(); i!=tracker->serviceVolumes().end(); i++) { + for (iter i=tracker->serviceVolumes().begin(); i!=tracker->serviceVolumes().end(); ++i) { /* msg(MSG::INFO) << "Calling ServiceVolume->dump() for the " << n++ << "th time" << endmsg; (**i).dump(); // for DEBUG only @@ -219,7 +219,7 @@ void InDetServMatBuilderToolSLHC::addServiceVolume( const ServiceVolume& vol) param->setZmax(vol.zMax()); param->setZsymm(true); for (std::vector<ServiceMaterial>::const_iterator ism=vol.materials().begin(); ism!=vol.materials().end(); ++ism) { - for ( ServiceMaterial::EntryIter ient= ism->components().begin(); ient!=ism->components().end(); ient++) { + for ( ServiceMaterial::EntryIter ient= ism->components().begin(); ient!=ism->components().end(); ++ient) { /* msg(MSG::INFO) << "Inside components loop, comp = " << ient->name << " number " << ient->number diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatGeometryManager.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatGeometryManager.cxx index 33ba286ac6fe13c1ca4e0364c8d4d002ca790a59..a76cac7e98ba6c2ba5f612c57145d6a50c2152cf 100644 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatGeometryManager.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatGeometryManager.cxx @@ -105,7 +105,7 @@ bool InDetServMatGeometryManager::buildServices() const return false; } -int InDetServMatGeometryManager::SupportTubeIndex(std::string name) const +int InDetServMatGeometryManager::SupportTubeIndex(const std::string& name) const { for (unsigned int i = 0; i < db()->getTableSize(m_InDetSimpleServices); i++) { @@ -114,35 +114,35 @@ int InDetServMatGeometryManager::SupportTubeIndex(std::string name) const return -1; } -double InDetServMatGeometryManager::SupportTubeRMin(std::string name) const +double InDetServMatGeometryManager::SupportTubeRMin(const std::string& name) const { int ind = SupportTubeIndex(name); if (ind >= 0) return db()->getDouble(m_InDetSimpleServices, "RMIN", ind); return 0; } -double InDetServMatGeometryManager::SupportTubeRMax(std::string name) const +double InDetServMatGeometryManager::SupportTubeRMax(const std::string& name) const { int ind = SupportTubeIndex(name); if (ind >= 0) return db()->getDouble(m_InDetSimpleServices, "RMAX", ind); return 0; } -double InDetServMatGeometryManager::SupportTubeZMin(std::string name) const +double InDetServMatGeometryManager::SupportTubeZMin(const std::string& name) const { int ind = SupportTubeIndex(name); if (ind >= 0) return db()->getDouble(m_InDetSimpleServices, "ZMIN", ind); return 0; } -double InDetServMatGeometryManager::SupportTubeZMax(std::string name) const +double InDetServMatGeometryManager::SupportTubeZMax(const std::string& name) const { int ind = SupportTubeIndex(name); if (ind >= 0) return db()->getDouble(m_InDetSimpleServices, "ZMAX", ind); return 0; } -int InDetServMatGeometryManager::SupportTubeExists(std::string name) const +int InDetServMatGeometryManager::SupportTubeExists(const std::string& name) const { if (SupportTubeIndex(name) != -1) return 1; return 0; diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/Route.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/Route.cxx index c1845c111405b07f9f6be0c3bdde0a5758a3080c..29a3e38864260657d5432e15ce268471803f4116 100644 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/Route.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/Route.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 */ #include "InDetServMatGeoModel/Route.h" @@ -21,7 +21,7 @@ ServiceVolume* Route::entryVolume( double pos, bool ascending, Athena::MsgStream // else { //should iterate to find exit volume if ( ascending) { - for (VolumeContainer::const_iterator i=volumes().begin(); i!=volumes().end(); i++) { + for (VolumeContainer::const_iterator i=volumes().begin(); i!=volumes().end(); ++i) { msg << MSG::DEBUG << "Comparing " << pos << " and " << (**i).position() << endmsg; @@ -57,7 +57,7 @@ ServiceVolume* Route::exitVolume( bool ascending, Athena::MsgStreamMember& msg) // returns the volume closest to the exit point, coming from the given direction if (volumes().empty()) return 0; if ( ascending) { - for (VolumeContainer::const_iterator i=volumes().begin(); i!=volumes().end(); i++) { + for (VolumeContainer::const_iterator i=volumes().begin(); i!=volumes().end(); ++i) { if ((**i).contains(exit())) return *i; else { msg << MSG::DEBUG << "volume at pos " << (**i).radius() diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServiceVolume.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServiceVolume.cxx index 9b96b7a7738f87e87c89b9994ef1cec715c63220..217c35c64b072309451e9ea062072fe9da4d704a 100644 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServiceVolume.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServiceVolume.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 */ #include "InDetServMatGeoModel/ServiceVolume.h" @@ -23,7 +23,7 @@ void ServiceVolume::dump( bool dumpMaterial) const if ( dumpMaterial && !materials().empty()) { for (std::vector<ServiceMaterial>::const_iterator i=materials().begin(); i!=materials().end(); ++i) { cout << " service material " << i->name() << " has the following components" << endl; - for ( ServiceMaterial::EntryIter ient= i->components().begin(); ient!=i->components().end(); ient++) { + for ( ServiceMaterial::EntryIter ient= i->components().begin(); ient!=i->components().end(); ++ient) { cout << ient->name << " linear? " << ient->linear << " number " << ient->number << " l/w " << ient->weight diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServicesTracker.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServicesTracker.cxx index f3427457dead732568ded049e74054d8c6b7b581..f43b215dd2563de7350ab2824e10d20e9c34bfea 100644 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServicesTracker.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServicesTracker.cxx @@ -85,7 +85,7 @@ void ServicesTracker::finaliseServices() std::map<const ServicesLayer*, ServiceMaterial> layerMaterial; // cache the layer services typedef std::vector<ServiceVolume*>::iterator VolumeIter; - for (VolumeIter iv=m_volumes.begin(); iv!=m_volumes.end(); iv++) { + for (VolumeIter iv=m_volumes.begin(); iv!=m_volumes.end(); ++iv) { std::vector<ServiceMaterial> result; // = (**iv).materials(); // preserve already present mat. (EOS) if ((**iv).isEOS()) addEosMaterial(**iv, result);