Skip to content
Snippets Groups Projects
Commit 1f0b49d1 authored by Edward Moyse's avatar Edward Moyse
Browse files

Merge branch 'cppcheck.PixelGeoModel-20201014' into 'master'

PixelGeoModel: Fix cppcheck warnings.

See merge request atlas/athena!37253
parents 00982340 58318761
No related branches found
No related tags found
No related merge requests found
Showing
with 63 additions and 48 deletions
/* /*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/ */
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
...@@ -44,7 +44,7 @@ public: ...@@ -44,7 +44,7 @@ public:
bool contains3D(); bool contains3D();
bool containsDBM(); bool containsDBM();
std::string setStringParameters(const std::string param,std::string paramName) { std::string setStringParameters(const std::string& param,const std::string& paramName) {
if (m_IBLpresent) { if (m_IBLpresent) {
if (m_disableAllClusterSplitting && paramName=="clusterSplitter") return ""; if (m_disableAllClusterSplitting && paramName=="clusterSplitter") return "";
} }
......
...@@ -16,6 +16,8 @@ class GeoPixelLadder : public GeoVPixelFactory { ...@@ -16,6 +16,8 @@ class GeoPixelLadder : public GeoVPixelFactory {
PixelGeometryManager* mgr, PixelGeometryManager* mgr,
GeoPixelSiCrystal& theSensor, GeoPixelSiCrystal& theSensor,
GeoPixelStaveSupport * staveSupport); GeoPixelStaveSupport * staveSupport);
GeoPixelLadder (const GeoPixelLadder&) = delete;
GeoPixelLadder& operator= (const GeoPixelLadder&) = delete;
virtual ~GeoPixelLadder(); virtual ~GeoPixelLadder();
virtual GeoVPhysVol* Build() override; virtual GeoVPhysVol* Build() override;
double thickness() const {return m_thickness;} double thickness() const {return m_thickness;}
......
...@@ -16,6 +16,8 @@ class GeoPixelLadderServices : public GeoVPixelFactory { ...@@ -16,6 +16,8 @@ class GeoPixelLadderServices : public GeoVPixelFactory {
public: public:
GeoPixelLadderServices(InDetDD::PixelDetectorManager* ddmgr, GeoPixelLadderServices(InDetDD::PixelDetectorManager* ddmgr,
PixelGeometryManager* mgr ,int ladderType); PixelGeometryManager* mgr ,int ladderType);
GeoPixelLadderServices (const GeoPixelLadderServices&) = delete;
GeoPixelLadderServices& operator= (const GeoPixelLadderServices&) = delete;
virtual ~GeoPixelLadderServices(); virtual ~GeoPixelLadderServices();
virtual GeoVPhysVol* Build() override; virtual GeoVPhysVol* Build() override;
const GeoTrf::Vector3D & envelopeCornerA1() {return m_envelopeCornerA1;} const GeoTrf::Vector3D & envelopeCornerA1() {return m_envelopeCornerA1;}
......
...@@ -15,6 +15,8 @@ class GeoPixelModule : public GeoVPixelFactory { ...@@ -15,6 +15,8 @@ class GeoPixelModule : public GeoVPixelFactory {
GeoPixelModule(InDetDD::PixelDetectorManager* ddmgr, GeoPixelModule(InDetDD::PixelDetectorManager* ddmgr,
PixelGeometryManager* mgr, PixelGeometryManager* mgr,
GeoPixelSiCrystal &theSensor); GeoPixelSiCrystal &theSensor);
GeoPixelModule (const GeoPixelModule&) = delete;
GeoPixelModule& operator= (const GeoPixelModule&) = delete;
virtual ~GeoPixelModule(); virtual ~GeoPixelModule();
virtual GeoVPhysVol* Build() override; virtual GeoVPhysVol* Build() override;
double Thickness(); double Thickness();
......
...@@ -211,7 +211,7 @@ GeoPixelServices::GeoPixelServices(InDetDD::PixelDetectorManager* ddmgr, ...@@ -211,7 +211,7 @@ GeoPixelServices::GeoPixelServices(InDetDD::PixelDetectorManager* ddmgr,
std::vector<const InDetDD::ServiceVolume *> servicesOther; std::vector<const InDetDD::ServiceVolume *> servicesOther;
double safety=0.001*Gaudi::Units::mm; double safety=0.001*Gaudi::Units::mm;
for(std::vector<const InDetDD::ServiceVolume *>::const_iterator it=services.begin(); it!=services.end(); it++) for(std::vector<const InDetDD::ServiceVolume *>::const_iterator it=services.begin(); it!=services.end(); ++it)
{ {
const std::string volName=(*it)->volName(); const std::string volName=(*it)->volName();
if(volName.find("BarrelStrip")!=std::string::npos){ if(volName.find("BarrelStrip")!=std::string::npos){
...@@ -384,7 +384,9 @@ void GeoPixelServices::initializeOld(const std::string & a) ...@@ -384,7 +384,9 @@ void GeoPixelServices::initializeOld(const std::string & a)
param.setVolName(m_gmt_mgr->PixelServiceName(a, ii)); param.setVolName(m_gmt_mgr->PixelServiceName(a, ii));
double zShift=0.; // the famous IBL Z shift double zShift=0.; // the famous IBL Z shift
int iShiftIndex = m_gmt_mgr->PixelServiceShift(a, ii); int iShiftIndex = m_gmt_mgr->PixelServiceShift(a, ii);
// FIXME: The magic number 100 here should be explained...
// cppcheck-suppress negativeContainerIndex
if(iShiftIndex>0) zShift=m_layerShift[iShiftIndex-100]; if(iShiftIndex>0) zShift=m_layerShift[iShiftIndex-100];
param.setZShift(zShift); param.setZShift(zShift);
......
...@@ -18,6 +18,8 @@ class GeoPixelServices : public GeoVPixelFactory { ...@@ -18,6 +18,8 @@ class GeoPixelServices : public GeoVPixelFactory {
public: public:
GeoPixelServices(InDetDD::PixelDetectorManager* ddmgr, GeoPixelServices(InDetDD::PixelDetectorManager* ddmgr,
PixelGeometryManager* mgr, InDetDD::Zone * envelopeZone = 0); PixelGeometryManager* mgr, InDetDD::Zone * envelopeZone = 0);
GeoPixelServices (const GeoPixelServices&) = delete;
GeoPixelServices& operator= (const GeoPixelServices&) = delete;
~GeoPixelServices(); ~GeoPixelServices();
virtual GeoVPhysVol* Build() override; virtual GeoVPhysVol* Build() override;
void initialize(const std::string &); void initialize(const std::string &);
......
...@@ -25,19 +25,18 @@ using namespace std; ...@@ -25,19 +25,18 @@ using namespace std;
GeoPixelStaveRing::GeoPixelStaveRing(InDetDD::PixelDetectorManager* ddmgr, GeoPixelStaveRing::GeoPixelStaveRing(InDetDD::PixelDetectorManager* ddmgr,
PixelGeometryManager* mgr) PixelGeometryManager* mgr)
: GeoVPixelFactory (ddmgr, mgr) : GeoVPixelFactory (ddmgr, mgr),
m_physVol (nullptr),
m_zPosition (0),
m_innerRadius (0),
m_outerRadius (0),
m_ringPosition ("AC"),
m_ringName ("staveRing")
{ {
m_ringName="staveRing";
m_ringPosition="AC";
m_zPosition =0;
m_innerRadius = 0.;
m_outerRadius = 0.;
m_physVol = 0;
} }
GeoVPhysVol* GeoPixelStaveRing::SetParametersAndBuild(std::string ringName, std::string ringPos) GeoVPhysVol* GeoPixelStaveRing::SetParametersAndBuild(const std::string& ringName,
const std::string& ringPos)
{ {
m_ringName=ringName; m_ringName=ringName;
m_ringPosition=ringPos; m_ringPosition=ringPos;
......
...@@ -14,7 +14,7 @@ public: ...@@ -14,7 +14,7 @@ public:
PixelGeometryManager* mgr); PixelGeometryManager* mgr);
virtual GeoVPhysVol* Build() override; virtual GeoVPhysVol* Build() override;
GeoVPhysVol* SetParametersAndBuild(std::string,std::string); GeoVPhysVol* SetParametersAndBuild(const std::string&,const std::string&);
double GetPositionAlongZAxis() const { return m_zPosition; } double GetPositionAlongZAxis() const { return m_zPosition; }
double GetInnerRadius() const { return m_innerRadius; } double GetInnerRadius() const { return m_innerRadius; }
......
...@@ -120,6 +120,8 @@ class GeoPixelDisk : public GeoVPixelFactory { ...@@ -120,6 +120,8 @@ class GeoPixelDisk : public GeoVPixelFactory {
public: public:
GeoPixelDisk(InDetDD::PixelDetectorManager* ddmgr, GeoPixelDisk(InDetDD::PixelDetectorManager* ddmgr,
PixelGeometryManager* mgr); PixelGeometryManager* mgr);
GeoPixelDisk (const GeoPixelDisk&) = delete;
GeoPixelDisk& operator= (const GeoPixelDisk&) = delete;
virtual ~GeoPixelDisk(); virtual ~GeoPixelDisk();
virtual GeoVPhysVol* Build() override; virtual GeoVPhysVol* Build() override;
double Thickness(); double Thickness();
...@@ -161,6 +163,8 @@ class GeoPixelECCable : public GeoVPixelFactory { ...@@ -161,6 +163,8 @@ class GeoPixelECCable : public GeoVPixelFactory {
public: public:
GeoPixelECCable(InDetDD::PixelDetectorManager* ddmgr, GeoPixelECCable(InDetDD::PixelDetectorManager* ddmgr,
PixelGeometryManager* mgr); PixelGeometryManager* mgr);
GeoPixelECCable (const GeoPixelECCable&) = delete;
GeoPixelECCable& operator= (const GeoPixelECCable&) = delete;
virtual GeoVPhysVol* Build() override; virtual GeoVPhysVol* Build() override;
virtual ~GeoPixelECCable(); virtual ~GeoPixelECCable();
private: private:
...@@ -215,6 +219,8 @@ class GeoPixelLadder : public GeoVPixelFactory { ...@@ -215,6 +219,8 @@ class GeoPixelLadder : public GeoVPixelFactory {
GeoPixelLadder(InDetDD::PixelDetectorManager* ddmgr, GeoPixelLadder(InDetDD::PixelDetectorManager* ddmgr,
PixelGeometryManager* mgr, PixelGeometryManager* mgr,
GeoPixelSiCrystal& theSensor); GeoPixelSiCrystal& theSensor);
GeoPixelLadder (const GeoPixelLadder&) = delete;
GeoPixelLadder& operator= (const GeoPixelLadder&) = delete;
virtual ~GeoPixelLadder(); virtual ~GeoPixelLadder();
virtual GeoVPhysVol* Build() override; virtual GeoVPhysVol* Build() override;
double Thickness(); double Thickness();
...@@ -260,6 +266,8 @@ class GeoPixelModule : public GeoVPixelFactory { ...@@ -260,6 +266,8 @@ class GeoPixelModule : public GeoVPixelFactory {
GeoPixelModule(InDetDD::PixelDetectorManager* ddmgr, GeoPixelModule(InDetDD::PixelDetectorManager* ddmgr,
PixelGeometryManager* mgr, PixelGeometryManager* mgr,
GeoPixelSiCrystal &theSensor); GeoPixelSiCrystal &theSensor);
GeoPixelModule (const GeoPixelModule&) = delete;
GeoPixelModule& operator= (const GeoPixelModule&) = delete;
virtual ~GeoPixelModule(); virtual ~GeoPixelModule();
virtual GeoVPhysVol* Build() override; virtual GeoVPhysVol* Build() override;
double Thickness(); double Thickness();
......
/* /*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/ */
...@@ -21,43 +21,41 @@ PixelLegacyManager::PixelLegacyManager(IRDBAccessSvc * rdbSvc, ...@@ -21,43 +21,41 @@ PixelLegacyManager::PixelLegacyManager(IRDBAccessSvc * rdbSvc,
const std::string & detectorKey, const std::string & detectorKey,
const std::string & detectorNode) const std::string & detectorNode)
: :
// These are for the new description of the Pixel Frame
m_pfba (rdbSvc->getRecordsetPtr("PFBA", detectorKey, detectorNode)),
m_pbba (rdbSvc->getRecordsetPtr("PBBA", detectorKey, detectorNode)),
m_ptba (rdbSvc->getRecordsetPtr("PTBA", detectorKey, detectorNode)),
m_pfec (rdbSvc->getRecordsetPtr("PFEC", detectorKey, detectorNode)),
m_pbec (rdbSvc->getRecordsetPtr("PBEC", detectorKey, detectorNode)),
m_ptec (rdbSvc->getRecordsetPtr("PTEC", detectorKey, detectorNode)),
m_pecn (rdbSvc->getRecordsetPtr("PECN", detectorKey, detectorNode)),
m_pecf (rdbSvc->getRecordsetPtr("PECF", detectorKey, detectorNode)),
m_pecb (rdbSvc->getRecordsetPtr("PECB", detectorKey, detectorNode)),
m_pect (rdbSvc->getRecordsetPtr("PECT", detectorKey, detectorNode)),
// These are for the design
m_pxbi (rdbSvc->getRecordsetPtr("PXBI", detectorKey, detectorNode)),
m_pdch (rdbSvc->getRecordsetPtr("PDCH", detectorKey, detectorNode)),
m_pxbd (rdbSvc->getRecordsetPtr("PXBD", detectorKey, detectorNode)),
// These are (r a detailed description of the ladders and services on ladde),
m_ptla (rdbSvc->getRecordsetPtr("PTLA", detectorKey, detectorNode)),
m_pctr (rdbSvc->getRecordsetPtr("PCTR", detectorKey, detectorNode)),
m_pftr (rdbSvc->getRecordsetPtr("PFTR", detectorKey, detectorNode)),
m_pttr (rdbSvc->getRecordsetPtr("PTTR", detectorKey, detectorNode)),
m_pome (rdbSvc->getRecordsetPtr("POME", detectorKey, detectorNode)),
m_poti (rdbSvc->getRecordsetPtr("POTI", detectorKey, detectorNode)),
m_pobi (rdbSvc->getRecordsetPtr("POBI", detectorKey, detectorNode)),
m_poai (rdbSvc->getRecordsetPtr("POAI", detectorKey, detectorNode)),
m_poci (rdbSvc->getRecordsetPtr("POCI", detectorKey, detectorNode)),
m_posi (rdbSvc->getRecordsetPtr("POSI", detectorKey, detectorNode)),
m_pccf (rdbSvc->getRecordsetPtr("PCCF", detectorKey, detectorNode)),
m_pcff (rdbSvc->getRecordsetPtr("PCFF", detectorKey, detectorNode)),
m_BarrelInSFrame(false), m_BarrelInSFrame(false),
m_EndcapInSFrame(false), m_EndcapInSFrame(false),
m_EndConeSFrame(false), m_EndConeSFrame(false),
m_dc1Geometry(false) m_dc1Geometry(false)
{ {
// These are for the new description of the Pixel Frame
m_pfba = rdbSvc->getRecordsetPtr("PFBA", detectorKey, detectorNode);
m_pbba = rdbSvc->getRecordsetPtr("PBBA", detectorKey, detectorNode);
m_ptba = rdbSvc->getRecordsetPtr("PTBA", detectorKey, detectorNode);
m_pfec = rdbSvc->getRecordsetPtr("PFEC", detectorKey, detectorNode);
m_pbec = rdbSvc->getRecordsetPtr("PBEC", detectorKey, detectorNode);
m_ptec = rdbSvc->getRecordsetPtr("PTEC", detectorKey, detectorNode);
m_pecn = rdbSvc->getRecordsetPtr("PECN", detectorKey, detectorNode);
m_pecf = rdbSvc->getRecordsetPtr("PECF", detectorKey, detectorNode);
m_pecb = rdbSvc->getRecordsetPtr("PECB", detectorKey, detectorNode);
m_pect = rdbSvc->getRecordsetPtr("PECT", detectorKey, detectorNode);
// These are for the design
m_pxbi = rdbSvc->getRecordsetPtr("PXBI", detectorKey, detectorNode);
m_pdch = rdbSvc->getRecordsetPtr("PDCH", detectorKey, detectorNode);
m_pxbd = rdbSvc->getRecordsetPtr("PXBD", detectorKey, detectorNode);
// These are for a detailed description of the ladders and services on ladder
m_ptla = rdbSvc->getRecordsetPtr("PTLA", detectorKey, detectorNode);
m_pctr = rdbSvc->getRecordsetPtr("PCTR", detectorKey, detectorNode);
m_pftr = rdbSvc->getRecordsetPtr("PFTR", detectorKey, detectorNode);
m_pttr = rdbSvc->getRecordsetPtr("PTTR", detectorKey, detectorNode);
m_pome = rdbSvc->getRecordsetPtr("POME", detectorKey, detectorNode);
m_poti = rdbSvc->getRecordsetPtr("POTI", detectorKey, detectorNode);
m_pobi = rdbSvc->getRecordsetPtr("POBI", detectorKey, detectorNode);
m_poai = rdbSvc->getRecordsetPtr("POAI", detectorKey, detectorNode);
m_poci = rdbSvc->getRecordsetPtr("POCI", detectorKey, detectorNode);
m_posi = rdbSvc->getRecordsetPtr("POSI", detectorKey, detectorNode);
m_pccf = rdbSvc->getRecordsetPtr("PCCF", detectorKey, detectorNode);
m_pcff = rdbSvc->getRecordsetPtr("PCFF", detectorKey, detectorNode);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment