diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/CMakeLists.txt b/InnerDetector/InDetAlignTools/InDetAlignGenTools/CMakeLists.txt
index 73dab69a5dbef3536a664ffff6cc5174da33221b..71d4c62e79a8b7671ccdc8f325022541d5086e7e 100644
--- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/CMakeLists.txt
+++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/CMakeLists.txt
@@ -9,6 +9,7 @@ atlas_subdir( InDetAlignGenTools )
 atlas_depends_on_subdirs( PUBLIC
                           Control/AthenaBaseComps
                           Control/AthenaKernel
+                          Control/CxxUtils
                           Database/AthenaPOOL/AthenaPoolUtilities
                           DetectorDescription/GeoPrimitives
                           DetectorDescription/Identifier
@@ -55,7 +56,7 @@ atlas_add_component( InDetAlignGenTools
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${HEPPDT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}  ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CORAL_LIBRARIES} ${HEPPDT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib ${EIGEN_LIBRARIES} AthenaBaseComps AthenaPoolUtilities GeoPrimitives Identifier EventPrimitives InDetAlignTrkInfo InDetPrepRawData TrkEventPrimitives TrkEventUtils TrkTrack TrkExInterfaces TrkToolInterfaces AthenaKernel AthContainers AtlasDetDescr DetDescrConditions GaudiKernel InDetIdentifier InDetReadoutGeometry PixelReadoutGeometry SCT_ReadoutGeometry TRT_ReadoutGeometry TrkMeasurementBase TrkParameters TrkPrepRawData TrkRIO_OnTrack TrkTrackSummary TrkTruthData TrkFitterInterfaces EventContainers TrackRecordLib )
+                     LINK_LIBRARIES ${CORAL_LIBRARIES} ${HEPPDT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib ${EIGEN_LIBRARIES} AthenaBaseComps AthenaPoolUtilities GeoPrimitives Identifier EventPrimitives InDetAlignTrkInfo InDetPrepRawData TrkEventPrimitives TrkEventUtils TrkTrack TrkExInterfaces TrkToolInterfaces AthenaKernel AthContainers AtlasDetDescr CxxUtils DetDescrConditions GaudiKernel InDetIdentifier InDetReadoutGeometry PixelReadoutGeometry SCT_ReadoutGeometry TRT_ReadoutGeometry TrkMeasurementBase TrkParameters TrkPrepRawData TrkRIO_OnTrack TrkTrackSummary TrkTruthData TrkFitterInterfaces EventContainers TrackRecordLib )
 
 # Install files from the package:
 atlas_install_headers( InDetAlignGenTools )
diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..b422f2a4d7091a1d5edde97568e70c5b0e43fb22
--- /dev/null
+++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+InnerDetector/InDetAlignTools/InDetAlignGenTools
diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/InDetAlignDBTool.h b/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/InDetAlignDBTool.h
index e3d6bc03ce3210d09363f443e583168957a5a495..3b81a464b0df463d591588d629fc5f5892221924 100755
--- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/InDetAlignDBTool.h
+++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/InDetAlignGenTools/InDetAlignDBTool.h
@@ -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
 */
 
 #ifndef INDETALIGNGENTOOLS_ALIGNDBTOOL_H
@@ -36,6 +36,7 @@
 #include "GaudiKernel/ServiceHandle.h" 
 #include "InDetAlignGenTools/IInDetAlignDBTool.h"
 #include "AthenaPoolUtilities/CondAttrListCollection.h"
+#include "CxxUtils/checker_macros.h"
 
 class PixelID;
 class SCT_ID;
@@ -46,7 +47,8 @@ namespace InDetDD {
   class SCT_DetectorManager;
 }
 
-class InDetAlignDBTool: virtual public IInDetAlignDBTool, public AthAlgTool {
+class ATLAS_NOT_THREAD_SAFE InDetAlignDBTool: // Global variables and const_cast are used.
+virtual public IInDetAlignDBTool, public AthAlgTool {
  public:
   InDetAlignDBTool(const std::string& type, const std::string& name,
 		 const IInterface* parent);