From faa1d52b0e37ee518ddd44907232bc403a27ad08 Mon Sep 17 00:00:00 2001 From: Nicholas Styles <nicholas.styles@desy.de> Date: Wed, 2 Dec 2020 12:20:12 +0100 Subject: [PATCH] adding virtual/override/final following !38695 --- .../SolidStateDetectorElementBase.h | 30 +++++++++---------- .../InDetReadoutGeometry/SiDetectorElement.h | 4 +-- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SolidStateDetectorElementBase.h b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SolidStateDetectorElementBase.h index c9b43f0c165..5714eea1442 100644 --- a/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SolidStateDetectorElementBase.h +++ b/DetectorDescription/ReadoutGeometryBase/ReadoutGeometryBase/SolidStateDetectorElementBase.h @@ -214,14 +214,12 @@ namespace InDetDD { /** * identifier of this detector element (inline) */ - //do these need to be virtual? - they are in 21.9 but I don't see why - Identifier identify() const; + virtual Identifier identify() const override final; /** * identifier hash (inline) */ - //do these need to be virtual? - as above - IdentifierHash identifyHash() const; + virtual IdentifierHash identifyHash() const override final; /** * Returns the id helper (inline) @@ -247,12 +245,12 @@ namespace InDetDD { /** * Element Surface */ - virtual Trk::Surface& surface(); - virtual const Trk::Surface& surface() const; + Trk::Surface& surface(); + virtual const Trk::Surface& surface() const override final; /** * TrkDetElementBase interface (inline) */ - virtual const Trk::Surface& surface(const Identifier&) const; + virtual const Trk::Surface& surface(const Identifier&) const override final; /** * @name Transformation */ @@ -260,17 +258,17 @@ namespace InDetDD { /** * Local (simulation/hit frame) to global transform */ - virtual const GeoTrf::Transform3D& transformHit() const; + const GeoTrf::Transform3D& transformHit() const; /** * Local (reconstruction frame) to global transform */ const HepGeom::Transform3D& transformCLHEP() const; - const Amg::Transform3D& transform() const; + virtual const Amg::Transform3D& transform() const override final; /** * TrkDetElementBase interface (inline) */ - virtual const Amg::Transform3D& transform(const Identifier&) const; + virtual const Amg::Transform3D& transform(const Identifier&) const override final; /** * Default Local (reconstruction frame) to global transform @@ -332,11 +330,11 @@ namespace InDetDD { /** * Get reconstruction local normal axes in global frame. Choosen to give right-handed coordinate frame. */ - const Amg::Vector3D& normal() const; + virtual const Amg::Vector3D& normal() const override final; /** * TrkDetElementBase interface (inline) */ - virtual const Amg::Vector3D& normal(const Identifier&) const; + virtual const Amg::Vector3D& normal(const Identifier&) const override final; //@} @@ -347,11 +345,11 @@ namespace InDetDD { /** * Center in global coordinates */ - const Amg::Vector3D& center() const; + virtual const Amg::Vector3D& center() const override final; /** * TrkDetElementBase interface (inline) */ - virtual const Amg::Vector3D& center(const Identifier&) const; + virtual const Amg::Vector3D& center(const Identifier&) const override final; /** * transform a hit local position into a global position (inline): @@ -426,11 +424,11 @@ namespace InDetDD { virtual const DetectorDesign& design() const; - virtual const Trk::SurfaceBounds& bounds() const; + virtual const Trk::SurfaceBounds& bounds() const override final; /** * TrkDetElementBase interface (inline) */ - virtual const Trk::SurfaceBounds& bounds(const Identifier&) const; + virtual const Trk::SurfaceBounds& bounds(const Identifier&) const override final; /** * Methods from design (inline) diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h index 1bc64277219..4929bdf190d 100644 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h @@ -107,7 +107,7 @@ namespace InDetDD { */ - class SiDetectorElement : public InDetDD::SolidStateDetectorElementBase { + class SiDetectorElement final : public InDetDD::SolidStateDetectorElementBase { public: @@ -217,7 +217,7 @@ namespace InDetDD { /** * Returns the full list of surfaces associated to this detector element */ - virtual const std::vector<const Trk::Surface*>& surfaces() const; + const std::vector<const Trk::Surface*>& surfaces() const; //@{ /** -- GitLab