diff --git a/InnerDetector/InDetG4/TRT_G4_SD/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetG4/TRT_G4_SD/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..72be774972ffba17ee4d3636b8c29e48d0e316fc --- /dev/null +++ b/InnerDetector/InDetG4/TRT_G4_SD/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetG4/TRT_G4_SD diff --git a/InnerDetector/InDetG4/TRT_G4_SD/src/TRTPrintingOfHits.h b/InnerDetector/InDetG4/TRT_G4_SD/src/TRTPrintingOfHits.h index ab6c44a22c31096ce24cb92ceba1951e05c03370..02c6169617e23501062d5a2846d12d31b16d9694 100644 --- a/InnerDetector/InDetG4/TRT_G4_SD/src/TRTPrintingOfHits.h +++ b/InnerDetector/InDetG4/TRT_G4_SD/src/TRTPrintingOfHits.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 TRT_G4_SD_TRTPrintingOfHits_hh @@ -7,6 +7,8 @@ #include "AthenaKernel/MsgStreamMember.h" +#include "CxxUtils/checker_macros.h" + class TRTUncompressedHit; class TRTOutputFile; @@ -29,7 +31,7 @@ class TRTPrintingOfHits TRTOutputFile* m_pOutputFile; - mutable Athena::MsgStreamMember m_msg; + mutable Athena::MsgStreamMember m_msg ATLAS_THREAD_SAFE; }; diff --git a/InnerDetector/InDetG4/TRT_G4_SD/src/TRTProcessingOfBarrelHits.cxx b/InnerDetector/InDetG4/TRT_G4_SD/src/TRTProcessingOfBarrelHits.cxx index dfaaef0e73dc570b2ad1a84776160409a270a152..73d3b085de0d49fab56496427cfd64e6b0b107c4 100644 --- a/InnerDetector/InDetG4/TRT_G4_SD/src/TRTProcessingOfBarrelHits.cxx +++ b/InnerDetector/InDetG4/TRT_G4_SD/src/TRTProcessingOfBarrelHits.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 */ // Class header @@ -144,8 +144,8 @@ bool TRTProcessingOfBarrelHits::ProcessHit(G4Step* pStep) G4ThreeVector globalPostStepPoint = pPostStepPoint->GetPosition(); - G4TouchableHistory* pTouchableHistory = - (G4TouchableHistory*) pPreStepPoint->GetTouchable(); + const G4TouchableHistory* pTouchableHistory = + dynamic_cast<const G4TouchableHistory*>(pPreStepPoint->GetTouchable()); const G4AffineTransform& topTransform = pTouchableHistory->GetHistory()-> GetTopTransform(); diff --git a/InnerDetector/InDetSimUtils/TRT_TR_Process/CMakeLists.txt b/InnerDetector/InDetSimUtils/TRT_TR_Process/CMakeLists.txt index e9bfd7aa1677290042a7b43c627d23259b75aae8..1bd1d7f7eb4f8bc560361b990049155473cdb8d0 100644 --- a/InnerDetector/InDetSimUtils/TRT_TR_Process/CMakeLists.txt +++ b/InnerDetector/InDetSimUtils/TRT_TR_Process/CMakeLists.txt @@ -11,6 +11,7 @@ atlas_depends_on_subdirs( PUBLIC PRIVATE Control/AthenaBaseComps Control/AthenaKernel + Control/CxxUtils Control/StoreGate DetectorDescription/GeoModel/GeoModelInterfaces DetectorDescription/IdDictDetDescr @@ -29,7 +30,7 @@ atlas_add_component( TRT_TR_Process src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel AthenaBaseComps AthenaKernel StoreGateLib SGtests IdDictDetDescr G4AtlasInterfaces GeoMaterial2G4 GeoModelInterfaces PathResolver ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel AthenaBaseComps AthenaKernel CxxUtils StoreGateLib SGtests IdDictDetDescr G4AtlasInterfaces GeoMaterial2G4 GeoModelInterfaces PathResolver ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRRegionXMLHandler.h b/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRRegionXMLHandler.h index 16ef0967c6000650f4789161ff3f445c70e2494b..49e31cc5944baaf2a7369514a837033d5ede8692 100644 --- a/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRRegionXMLHandler.h +++ b/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRRegionXMLHandler.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 TRREGIONXMLHANDLER_H @@ -8,6 +8,7 @@ #include <string> #include "StoreGate/StoreGateSvc.h" #include "AthenaKernel/MsgStreamMember.h" +#include "CxxUtils/checker_macros.h" class TRTTransitionRadiation; @@ -22,7 +23,7 @@ private: TRTTransitionRadiation * m_theProcess; StoreGateSvc* m_storeGate; bool m_initialLayoutIdDict; - mutable Athena::MsgStreamMember m_msg; + mutable Athena::MsgStreamMember m_msg ATLAS_THREAD_SAFE; }; #endif diff --git a/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTRadiatorParameters.h b/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTRadiatorParameters.h index c571ce7542f04ed0b6663b67e2ef5dd574abe284..03d964267cbf20279bed227573a6b01635fbcf31 100644 --- a/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTRadiatorParameters.h +++ b/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTRadiatorParameters.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 TRTRADIATORPARAMETERS_H @@ -20,7 +20,7 @@ public: m_GasThickness(dGas), m_BEflg(beflag) {} - G4LogicalVolume * GetLogicalVolume() const { return m_aLogicalVolume; } + const G4LogicalVolume * GetLogicalVolume() const { return m_aLogicalVolume; } G4double GetFoilThickness() const { return m_FoilThickness; } G4double GetGasThickness() const { return m_GasThickness; } BEflag GetBEflag() const { return m_BEflg; } diff --git a/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTTransitionRadiation.h b/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTTransitionRadiation.h index 18c17bb7e841e34f0bc54df5c92fc729ab366b9e..96735c7c06565a852bc28f6c461f4cf57d160f41 100644 --- a/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTTransitionRadiation.h +++ b/InnerDetector/InDetSimUtils/TRT_TR_Process/src/TRTTransitionRadiation.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 TRTTRANSITIONRADIATION_H @@ -14,9 +14,11 @@ #include "G4Step.hh" #include "G4Track.hh" +#include "AthenaKernel/MsgStreamMember.h" +#include "CxxUtils/checker_macros.h" + #include <vector> #include <iostream> -#include "AthenaKernel/MsgStreamMember.h" //using namespace std; @@ -106,7 +108,7 @@ private: G4double* m_sigmaGas; G4double* m_sigmaFoil; - mutable Athena::MsgStreamMember m_msg; + mutable Athena::MsgStreamMember m_msg ATLAS_THREAD_SAFE; };