Skip to content
Snippets Groups Projects
Commit 0233ef82 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'main-clang-warning' into 'main'

Fixed clang warnings

See merge request !68069
parents 2a7c7b32 4caf77ad
No related branches found
No related tags found
1 merge request!68069Fixed clang warnings
/* /*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/ */
#ifndef INDETREADOUTGEOMETRY_STRIPBOXDESIGN_H #ifndef INDETREADOUTGEOMETRY_STRIPBOXDESIGN_H
...@@ -55,92 +55,92 @@ public: ...@@ -55,92 +55,92 @@ public:
// the more natural 2D (strip, row) identifier. The following methods convert 1D to 2D and v.v. // the more natural 2D (strip, row) identifier. The following methods convert 1D to 2D and v.v.
// //
std::pair<int,int> getStripRow(SiCellId id) const final; std::pair<int,int> getStripRow(SiCellId id) const final;
int strip1Dim(int strip, int row) const; virtual int strip1Dim(int strip, int row) const override;
int diodes() const; int diodes() const;
int diodesInRow(const int row) const; virtual int diodesInRow(const int row) const override;
// //
// Pure virtual methods in base class: // Pure virtual methods in base class:
// //
// Distance to nearest detector active edge (+ve = inside, -ve = outside) // Distance to nearest detector active edge (+ve = inside, -ve = outside)
void distanceToDetectorEdge(const SiLocalPosition &localPosition, double &etaDist, virtual void distanceToDetectorEdge(const SiLocalPosition &localPosition, double &etaDist,
double &phiDist) const; double &phiDist) const override;
// check if the position is in active area // check if the position is in active area
bool inActiveArea(const SiLocalPosition &chargePos, bool checkBondGap = true) const; virtual bool inActiveArea(const SiLocalPosition &chargePos, bool checkBondGap = true) const override;
// Element boundary // Element boundary
const Trk::SurfaceBounds &bounds() const; virtual const Trk::SurfaceBounds &bounds() const override;
// Retrieve the two ends of a "strip" // Retrieve the two ends of a "strip"
std::pair<SiLocalPosition, SiLocalPosition> endsOfStrip( virtual std::pair<SiLocalPosition, SiLocalPosition> endsOfStrip(
const SiLocalPosition &position) const; const SiLocalPosition &position) const override;
// Phi-pitch (strip-width). Two names for same thing // Phi-pitch (strip-width). Two names for same thing
double stripPitch(const SiLocalPosition &localPosition) const; virtual double stripPitch(const SiLocalPosition &localPosition) const override;
double stripPitch(const SiCellId &cellId) const; double stripPitch(const SiCellId &cellId) const;
double stripPitch() const; virtual double stripPitch() const override;
double phiPitch(const SiLocalPosition &localPosition) const; virtual double phiPitch(const SiLocalPosition &localPosition) const override;
double phiPitch(const SiCellId &cellId) const; double phiPitch(const SiCellId &cellId) const;
double phiPitch() const; virtual double phiPitch() const override;
// distance to the nearest diode in units of pitch, from 0.0 to 0.5, // distance to the nearest diode in units of pitch, from 0.0 to 0.5,
// this method should be fast as it is called for every surface charge // this method should be fast as it is called for every surface charge
// in the SCT_SurfaceChargesGenerator // in the SCT_SurfaceChargesGenerator
// an active area check, done in the Generator anyway, is removed here // an active area check, done in the Generator anyway, is removed here
double scaledDistanceToNearestDiode(const SiLocalPosition &chargePos) const; virtual double scaledDistanceToNearestDiode(const SiLocalPosition &chargePos) const override;
// readout or diode id -> position, size // readout or diode id -> position, size
SiDiodesParameters parameters(const SiCellId &cellId) const; virtual SiDiodesParameters parameters(const SiCellId &cellId) const override;
SiLocalPosition localPositionOfCell(const SiCellId &cellId) const; virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const override;
SiLocalPosition localPositionOfCluster(const SiCellId &cellId, int clusterSize) const; virtual SiLocalPosition localPositionOfCluster(const SiCellId &cellId, int clusterSize) const override;
// position -> id // position -> id
SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const; virtual SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const override;
// id to position // id to position
SiLocalPosition positionFromStrip(const SiCellId &cellId) const; SiLocalPosition positionFromStrip(const SiCellId &cellId) const;
SiLocalPosition positionFromStrip(const int stripNumber) const; virtual SiLocalPosition positionFromStrip(const int stripNumber) const override;
// row and strip from 1-dim strip number // row and strip from 1-dim strip number
int row(int stripId1Dim) const; virtual int row(int stripId1Dim) const override;
int strip(int stripId1Dim) const; virtual int strip(int stripId1Dim) const override;
// Find and fill a vector with all neighbour strips of a given cell // Find and fill a vector with all neighbour strips of a given cell
void neighboursOfCell(const SiCellId &cellId, virtual void neighboursOfCell(const SiCellId &cellId,
std::vector<SiCellId> &neighbours) const; std::vector<SiCellId> &neighbours) const override;
SiCellId cellIdInRange(const SiCellId &) const; virtual SiCellId cellIdInRange(const SiCellId &) const override;
// For Strip sensors, readout cell == diode cell. Overload the SCT_ModuleSideDesign // For Strip sensors, readout cell == diode cell. Overload the SCT_ModuleSideDesign
// member // member
SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const; virtual SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const override;
const Amg::Transform3D moduleShift() const final; virtual const Amg::Transform3D moduleShift() const override final;
InDetDD::DetectorType type() const override final; virtual InDetDD::DetectorType type() const override final;
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
// DEPRECATED at least for Strips // DEPRECATED at least for Strips
HepGeom::Vector3D<double> phiMeasureSegment(const SiLocalPosition &position) const; virtual HepGeom::Vector3D<double> phiMeasureSegment(const SiLocalPosition &position) const override;
// Method to calculate length of a strip. Which strip?? // Method to calculate length of a strip. Which strip??
double length() const; virtual double length() const override;
// Method to calculate average width of a module. What is it used for?? // Method to calculate average width of a module. What is it used for??
double width() const; virtual double width() const override;
// Method to calculate minimum width of a module // Method to calculate minimum width of a module
double minWidth() const; virtual double minWidth() const override;
// Method to calculate maximum width of a module // Method to calculate maximum width of a module
double maxWidth() const; virtual double maxWidth() const override;
// Pitch in eta direction Deprecated for strips: it varies in endcap // Pitch in eta direction Deprecated for strips: it varies in endcap
double etaPitch() const; virtual double etaPitch() const override;
// Return true if hit local direction is the same as readout direction. // Return true if hit local direction is the same as readout direction.
bool swapHitPhiReadoutDirection() const; virtual bool swapHitPhiReadoutDirection() const override;
bool swapHitEtaReadoutDirection() const; virtual bool swapHitEtaReadoutDirection() const override;
bool nearBondGap(const SiLocalPosition &, double) const; virtual bool nearBondGap(const SiLocalPosition &, double) const override;
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
...@@ -151,9 +151,9 @@ public: ...@@ -151,9 +151,9 @@ public:
double stripLength(const SiCellId &cellId) const; double stripLength(const SiCellId &cellId) const;
// Give upper and lower boundaries, and length, of dead area // Give upper and lower boundaries, and length, of dead area
double deadAreaUpperBoundary() const; virtual double deadAreaUpperBoundary() const override;
double deadAreaLowerBoundary() const; virtual double deadAreaLowerBoundary() const override;
double deadAreaLength() const; virtual double deadAreaLength() const override;
private: private:
int m_nRows; int m_nRows;
int m_nStrips; int m_nStrips;
......
/* /*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/ */
#ifndef INDETREADOUTGEOMETRY_STRIPSTEREOANNULUSDESIGN_H #ifndef INDETREADOUTGEOMETRY_STRIPSTEREOANNULUSDESIGN_H
...@@ -90,39 +90,39 @@ StripStereoAnnulusDesign(const SiDetectorDesign::Axis &stripDirection, ...@@ -90,39 +90,39 @@ StripStereoAnnulusDesign(const SiDetectorDesign::Axis &stripDirection,
SiLocalPosition stripToBeamPC(const SiLocalPosition &pos) const; SiLocalPosition stripToBeamPC(const SiLocalPosition &pos) const;
SiLocalPosition stripToBeamPCpolar(const SiLocalPosition &pos) const; SiLocalPosition stripToBeamPCpolar(const SiLocalPosition &pos) const;
Amg::Vector3D sensorCenter() const; virtual Amg::Vector3D sensorCenter() const override;
// Copy constructor and assignment: // Copy constructor and assignment:
StripStereoAnnulusDesign(const StripStereoAnnulusDesign &design); StripStereoAnnulusDesign(const StripStereoAnnulusDesign &design);
StripStereoAnnulusDesign &operator = (const StripStereoAnnulusDesign &design); StripStereoAnnulusDesign &operator = (const StripStereoAnnulusDesign &design);
std::pair<int,int> getStripRow(SiCellId cellId) const final; std::pair<int,int> getStripRow(SiCellId cellId) const final;
int strip1Dim(int strip, int row) const; virtual int strip1Dim(int strip, int row) const override;
SiLocalPosition stripPosAtR(int strip, int row, double r) const; SiLocalPosition stripPosAtR(int strip, int row, double r) const;
int diodesInRow(const int row) const; virtual int diodesInRow(const int row) const override;
// //
// Pure virtual methods in base class: // Pure virtual methods in base class:
// //
// Distance to nearest detector active edge (+ve = inside, -ve = outside) // Distance to nearest detector active edge (+ve = inside, -ve = outside)
void distanceToDetectorEdge(const SiLocalPosition &localPosition, double &etaDist, virtual void distanceToDetectorEdge(const SiLocalPosition &localPosition, double &etaDist,
double &phiDist) const; double &phiDist) const override;
// check if the position is in active area // check if the position is in active area
bool inActiveArea(const SiLocalPosition &chargePos, bool checkBondGap = true) const; virtual bool inActiveArea(const SiLocalPosition &chargePos, bool checkBondGap = true) const override;
// Element boundary // Element boundary
const Trk::SurfaceBounds &bounds() const; virtual const Trk::SurfaceBounds &bounds() const override;
// Retrieve the two ends of a "strip" // Retrieve the two ends of a "strip"
std::pair<SiLocalPosition, SiLocalPosition> endsOfStrip( virtual std::pair<SiLocalPosition, SiLocalPosition> endsOfStrip(
const SiLocalPosition &position) const; const SiLocalPosition &position) const override;
// Phi-pitch (strip-width). Two names for same thing // Phi-pitch (strip-width). Two names for same thing
double stripPitch(const SiLocalPosition &localPosition) const; virtual double stripPitch(const SiLocalPosition &localPosition) const override;
double stripPitch(const SiCellId &cellId) const; double stripPitch(const SiCellId &cellId) const;
double stripPitch() const; virtual double stripPitch() const override;
double phiPitch(const SiLocalPosition &localPosition) const; virtual double phiPitch(const SiLocalPosition &localPosition) const override;
double phiPitch(const SiCellId &cellId) const; double phiPitch(const SiCellId &cellId) const;
double phiPitch() const; virtual double phiPitch() const override;
// above methods return mm // above methods return mm
...@@ -136,12 +136,12 @@ StripStereoAnnulusDesign(const SiDetectorDesign::Axis &stripDirection, ...@@ -136,12 +136,12 @@ StripStereoAnnulusDesign(const SiDetectorDesign::Axis &stripDirection,
// this method should be fast as it is called for every surface charge // this method should be fast as it is called for every surface charge
// in the SCT_SurfaceChargesGenerator // in the SCT_SurfaceChargesGenerator
// an active area check, done in the Generator anyway, is removed here // an active area check, done in the Generator anyway, is removed here
double scaledDistanceToNearestDiode(const SiLocalPosition &chargePos) const; virtual double scaledDistanceToNearestDiode(const SiLocalPosition &chargePos) const override;
// readout or diode id -> position, size // readout or diode id -> position, size
SiDiodesParameters parameters(const SiCellId &cellId) const; virtual SiDiodesParameters parameters(const SiCellId &cellId) const override;
SiLocalPosition localPositionOfCell(const SiCellId &cellId) const; virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const override;
SiLocalPosition localPositionOfCluster(const SiCellId &cellId, int clusterSize) const; virtual SiLocalPosition localPositionOfCluster(const SiCellId &cellId, int clusterSize) const override;
// these return local position in STRIP PC // these return local position in STRIP PC
// Use only if you work with the polar coordinates, in all other // Use only if you work with the polar coordinates, in all other
...@@ -150,23 +150,23 @@ StripStereoAnnulusDesign(const SiDetectorDesign::Axis &stripDirection, ...@@ -150,23 +150,23 @@ StripStereoAnnulusDesign(const SiDetectorDesign::Axis &stripDirection,
SiLocalPosition localPositionOfClusterPC(const SiCellId &cellId, int clusterSize) const; SiLocalPosition localPositionOfClusterPC(const SiCellId &cellId, int clusterSize) const;
// position -> id // position -> id
SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const; virtual SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const override;
// id to position // id to position
SiLocalPosition positionFromStrip(const SiCellId &cellId) const; SiLocalPosition positionFromStrip(const SiCellId &cellId) const;
SiLocalPosition positionFromStrip(const int stripNumber) const; virtual SiLocalPosition positionFromStrip(const int stripNumber) const override;
// row and strip from 1-dim strip number // row and strip from 1-dim strip number
int row(int stripId1Dim) const; virtual int row(int stripId1Dim) const override;
int strip(int stripId1Dim) const; virtual int strip(int stripId1Dim) const override;
// Find and fill a vector with all neighbour strips of a given cell // Find and fill a vector with all neighbour strips of a given cell
void neighboursOfCell(const SiCellId &cellId, virtual void neighboursOfCell(const SiCellId &cellId,
std::vector<SiCellId> &neighbours) const; std::vector<SiCellId> &neighbours) const override;
SiCellId cellIdInRange(const SiCellId &) const; virtual SiCellId cellIdInRange(const SiCellId &) const override;
// For Strip sensors, readout cell == diode cell. Overload the SCT_ModuleSideDesign // For Strip sensors, readout cell == diode cell. Overload the SCT_ModuleSideDesign
// member // member
SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const; virtual SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const override;
//Returns the wafer centre Radius (needed for annulus shape) //Returns the wafer centre Radius (needed for annulus shape)
double waferCentreR() const; double waferCentreR() const;
...@@ -180,33 +180,33 @@ StripStereoAnnulusDesign(const SiDetectorDesign::Axis &stripDirection, ...@@ -180,33 +180,33 @@ StripStereoAnnulusDesign(const SiDetectorDesign::Axis &stripDirection,
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
// DEPRECATED at least for Strips // DEPRECATED at least for Strips
HepGeom::Vector3D<double> phiMeasureSegment(const SiLocalPosition &position) const; virtual HepGeom::Vector3D<double> phiMeasureSegment(const SiLocalPosition &position) const override;
// Method to calculate length of a strip. Which strip?? // Method to calculate length of a strip. Which strip??
double length() const; virtual double length() const override;
// Method to calculate average width of a module. What is it used for?? // Method to calculate average width of a module. What is it used for??
double width() const; virtual double width() const override;
// Method to calculate minimum width of a module // Method to calculate minimum width of a module
double minWidth() const; virtual double minWidth() const override;
// Method to calculate maximum width of a module // Method to calculate maximum width of a module
double maxWidth() const; virtual double maxWidth() const override;
// Pitch in eta direction Deprecated for strips: it varies in endcap // Pitch in eta direction Deprecated for strips: it varies in endcap
double etaPitch() const; virtual double etaPitch() const override;
// Return true if hit local direction is the same as readout direction. // Return true if hit local direction is the same as readout direction.
bool swapHitPhiReadoutDirection() const; virtual bool swapHitPhiReadoutDirection() const override;
bool swapHitEtaReadoutDirection() const; virtual bool swapHitEtaReadoutDirection() const override;
bool nearBondGap(const SiLocalPosition &, double) const; virtual bool nearBondGap(const SiLocalPosition &, double) const override;
/** Shape of element */ /** Shape of element */
virtual DetectorShape shape() const; virtual DetectorShape shape() const override;
double sinStripAngleReco(double phiCoord, double etaCoord) const; virtual double sinStripAngleReco(double phiCoord, double etaCoord) const override;
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
...@@ -222,9 +222,9 @@ StripStereoAnnulusDesign(const SiDetectorDesign::Axis &stripDirection, ...@@ -222,9 +222,9 @@ StripStereoAnnulusDesign(const SiDetectorDesign::Axis &stripDirection,
double stereo() const; double stereo() const;
// Give upper and lower boundaries, and length, of dead area // Give upper and lower boundaries, and length, of dead area
double deadAreaUpperBoundary() const; virtual double deadAreaUpperBoundary() const override;
double deadAreaLowerBoundary() const; virtual double deadAreaLowerBoundary() const override;
double deadAreaLength() const; virtual double deadAreaLength() const override;
private: private:
const int m_nRows; const int m_nRows;
const std::vector<int> m_nStrips; const std::vector<int> m_nStrips;
......
...@@ -324,7 +324,7 @@ void TFCSONNXHandler::writeBytesToTTree(TTree &tree, ...@@ -324,7 +324,7 @@ void TFCSONNXHandler::writeBytesToTTree(TTree &tree,
void TFCSONNXHandler::readSerializedSession() { void TFCSONNXHandler::readSerializedSession() {
ATH_MSG_DEBUG("Transforming bytes to session."); ATH_MSG_DEBUG("Transforming bytes to session.");
Ort::Env env(ORT_LOGGING_LEVEL_WARNING, "test"); Ort::Env env(ORT_LOGGING_LEVEL_WARNING, "test");
Ort::SessionOptions opts({nullptr}); Ort::SessionOptions opts{nullptr};
m_session = m_session =
std::make_unique<Ort::Session>(env, m_bytes.data(), m_bytes.size(), opts); std::make_unique<Ort::Session>(env, m_bytes.data(), m_bytes.size(), opts);
ATH_MSG_DEBUG("Transformed bytes to session."); ATH_MSG_DEBUG("Transformed bytes to session.");
......
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