From 36f30a45bf9ded60540feb94f4e26f4e7936c948 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Wed, 7 Feb 2024 18:00:40 -0500
Subject: [PATCH] ActsDataPreparation: Fix using declarations.

Avoid using declarations in the global namespace where they can be seen
by #included headers.

Instead, put the Cell functions in the InDet namespace, where they can be
found by ADL.
---
 .../ActsDataPreparation/src/PixelClusteringTool.cxx    |  3 ---
 .../Acts/ActsDataPreparation/src/PixelClusteringTool.h | 10 +++++++++-
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/Tracking/Acts/ActsDataPreparation/src/PixelClusteringTool.cxx b/Tracking/Acts/ActsDataPreparation/src/PixelClusteringTool.cxx
index a5d1f90d62d3..d15b475b83b7 100644
--- a/Tracking/Acts/ActsDataPreparation/src/PixelClusteringTool.cxx
+++ b/Tracking/Acts/ActsDataPreparation/src/PixelClusteringTool.cxx
@@ -3,9 +3,6 @@
 */
 
 #include "PixelClusteringTool.h"
-using ActsTrk::getCellRow;
-using ActsTrk::getCellColumn;
-using ActsTrk::getCellLabel;
 
 #include <Acts/Clusterization/Clusterization.hpp>
 
diff --git a/Tracking/Acts/ActsDataPreparation/src/PixelClusteringTool.h b/Tracking/Acts/ActsDataPreparation/src/PixelClusteringTool.h
index a98cbb9dadf8..c82d474119e8 100644
--- a/Tracking/Acts/ActsDataPreparation/src/PixelClusteringTool.h
+++ b/Tracking/Acts/ActsDataPreparation/src/PixelClusteringTool.h
@@ -14,9 +14,11 @@
 #include "SiClusterizationTool/PixelRDOTool.h"
 #include "xAODInDetMeasurement/PixelClusterContainer.h"
 
-namespace ActsTrk {
+namespace InDet {
 
 // Helper functions for use with ACTS clusterization
+// Put these in the InDet namespace so that ACTS can find them
+// via ADL.
 //
 inline int getCellRow(const InDet::UnpackedPixelRDO& cell)
 {
@@ -34,6 +36,12 @@ inline int& getCellLabel(InDet::UnpackedPixelRDO& cell)
 }
 
 
+} // namespace InDet
+
+
+namespace ActsTrk {
+
+
 class PixelClusteringTool : public extends<AthAlgTool,IPixelClusteringTool> {
 public:
 
-- 
GitLab