From f2048973295a75322b2a5d9923cf80daaf512158 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Fri, 29 Apr 2022 13:43:17 +0200
Subject: [PATCH 1/2] TrackParticleAssociationAlgs: enable thread-checker and
 fixes

---
 .../TrackParticleAssociationAlgs/ATLAS_CHECK_THREAD_SAFETY  | 1 +
 .../src/TrackParticleClusterAssociationAlg.cxx              | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)
 create mode 100644 Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/ATLAS_CHECK_THREAD_SAFETY

diff --git a/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/ATLAS_CHECK_THREAD_SAFETY b/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 000000000000..01c4109ea7ff
--- /dev/null
+++ b/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Reconstruction/RecoAlgs/TrackParticleAssociationAlgs
diff --git a/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/TrackParticleClusterAssociationAlg.cxx b/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/TrackParticleClusterAssociationAlg.cxx
index c6e04a617a67..982abae22644 100644
--- a/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/TrackParticleClusterAssociationAlg.cxx
+++ b/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/TrackParticleClusterAssociationAlg.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrackParticleClusterAssociationAlg.h"
@@ -54,7 +54,7 @@ StatusCode TrackParticleClusterAssociationAlg::execute()
   // pre-calculate a width of clusters, set it as dynamica attribute so we don't have to recalculate it
   SG::ReadHandle<xAOD::CaloClusterContainer> clusterContainer(m_caloClusters);
   ATH_MSG_DEBUG("retrieved "<< m_caloClusters.key() << " size = "<< clusterContainer->size() );
-  static SG::AuxElement::Decorator<float> sig_dec("sigmaWidth");
+  static const SG::AuxElement::Decorator<float> sig_dec("sigmaWidth");
   //for(const xAOD::CaloCluster *cl : *clusterContainer){
   for(const xAOD::CaloCluster *cl : *clusterContainer){
     double rad;
@@ -166,7 +166,7 @@ std::vector<const xAOD::CaloCluster* > TrackParticleClusterAssociationAlg::assoc
 
   float dr2Cut0 = m_dr*m_dr;
   // to access the pre-calculated width :
-  static SG::AuxElement::ConstAccessor<float> sig_acc("sigmaWidth");
+  static const SG::AuxElement::ConstAccessor<float> sig_acc("sigmaWidth");
 
   for(const xAOD::CaloCluster * cl : allClusters){
 
-- 
GitLab


From a0da5feb92cb2abf9588ae4b534c2369f07b1880 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Fri, 29 Apr 2022 14:12:28 +0200
Subject: [PATCH 2/2] ITrackToVertex: enable thread-checker

---
 .../ITrackToVertex/ITrackToVertex/ATLAS_CHECK_THREAD_SAFETY      | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 Reconstruction/RecoTools/ITrackToVertex/ITrackToVertex/ATLAS_CHECK_THREAD_SAFETY

diff --git a/Reconstruction/RecoTools/ITrackToVertex/ITrackToVertex/ATLAS_CHECK_THREAD_SAFETY b/Reconstruction/RecoTools/ITrackToVertex/ITrackToVertex/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 000000000000..a0bbd5f1e715
--- /dev/null
+++ b/Reconstruction/RecoTools/ITrackToVertex/ITrackToVertex/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Reconstruction/RecoTools/ITrackToVertex
-- 
GitLab