From 2b1cbf9ce11fb51a70724471b0faeecb762c441b Mon Sep 17 00:00:00 2001 From: Susumu Oda <susumu.oda@cern.ch> Date: Thu, 2 Jul 2020 15:15:40 +0000 Subject: [PATCH] Fix or mark a part of thread safety issues of TRT_GeoModel. --- InnerDetector/InDetDetDescr/TRT_GeoModel/CMakeLists.txt | 3 ++- .../TRT_GeoModel/src/TRT_DetDescrDB_ParameterInterface.cxx | 4 ++-- .../InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.cxx | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/CMakeLists.txt b/InnerDetector/InDetDetDescr/TRT_GeoModel/CMakeLists.txt index ecdc2f7d481..35003c58ac5 100644 --- a/InnerDetector/InDetDetDescr/TRT_GeoModel/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/CMakeLists.txt @@ -16,6 +16,7 @@ atlas_depends_on_subdirs( PUBLIC InnerDetector/InDetDetDescr/InDetReadoutGeometry InnerDetector/InDetDetDescr/TRT_ReadoutGeometry PRIVATE + Control/CxxUtils Control/SGTools Control/StoreGate Database/AthenaPOOL/AthenaPoolUtilities @@ -37,7 +38,7 @@ atlas_add_component( TRT_GeoModel src/*.cxx src/components/*.cxx INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${CORAL_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoModelUtilities GaudiKernel TRT_ConditionsServicesLib InDetGeoModelUtils InDetReadoutGeometry TRT_ReadoutGeometry SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions IdDictDetDescr TRT_ConditionsData InDetIdentifier GeometryDBSvcLib ) + LINK_LIBRARIES ${CORAL_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoModelUtilities GaudiKernel TRT_ConditionsServicesLib InDetGeoModelUtils InDetReadoutGeometry TRT_ReadoutGeometry CxxUtils SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions IdDictDetDescr TRT_ConditionsData InDetIdentifier GeometryDBSvcLib ) atlas_add_test( TRT_GMConfig_test SCRIPT test/TRT_GMConfig_test.py diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetDescrDB_ParameterInterface.cxx b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetDescrDB_ParameterInterface.cxx index 1111e90d1ec..d8e1f3c5223 100755 --- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetDescrDB_ParameterInterface.cxx +++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetDescrDB_ParameterInterface.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "TRT_DetDescrDB_ParameterInterface.h" @@ -503,7 +503,7 @@ const GeoTrf::Transform3D & TRT_DetDescrDB_ParameterInterface::partTransform(const std::string & partName) const { if (m_placements) return m_placements->transform(partName); - static GeoTrf::Transform3D unitTransform = GeoTrf::Transform3D::Identity(); + static const GeoTrf::Transform3D unitTransform = GeoTrf::Transform3D::Identity(); return unitTransform; } diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.cxx b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.cxx index c01f2c5266e..e842093a2fd 100755 --- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.cxx +++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.cxx @@ -20,6 +20,8 @@ #include "AthenaKernel/ClassID_traits.h" #include "SGTools/DataProxy.h" +#include "CxxUtils/checker_macros.h" + //////////////////////////////////////////////////////////////////////////////////////////////////////// // Please consult the README for more information about which options to set in your joboptions file. // //////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -220,7 +222,7 @@ StatusCode TRT_DetectorTool::create() StatusCode -TRT_DetectorTool::registerCallback() +TRT_DetectorTool::registerCallback ATLAS_NOT_THREAD_SAFE () { // This callback is kept because the folder never changes. -- GitLab