diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/TRT_CalibAlgs/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/TRT_CalibAlgs/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..65e2e2e5a2aa1cb71618647d67a0302a588a6396 --- /dev/null +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/TRT_CalibAlgs/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetCalibAlgs/TRT_CalibAlgs diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/TRT_CalibAlgs/TRTCalibrationMgr.h b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/TRT_CalibAlgs/TRTCalibrationMgr.h index 019525dd9e54c0f083441d146aeade0e2ccc8608..e885ff7cdd1ec4dd1c799f0dd858a06046fe3487 100755 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/TRT_CalibAlgs/TRTCalibrationMgr.h +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/TRT_CalibAlgs/TRTCalibrationMgr.h @@ -72,7 +72,7 @@ public: virtual StatusCode initialize(void) override; virtual StatusCode execute(void) override; virtual StatusCode finalize(void) override; - StatusCode streamOutCalibObjects() const; + StatusCode streamOutCalibObjects(); private: diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/TRT_CalibAlgs/TRT_StrawStatus.h b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/TRT_CalibAlgs/TRT_StrawStatus.h index 8c2bb4a916366c68cb4d65009daa293a414b026f..5266d7865fbce1a2cb551e1b9beb8126538f767c 100644 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/TRT_CalibAlgs/TRT_StrawStatus.h +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/TRT_CalibAlgs/TRT_StrawStatus.h @@ -22,6 +22,7 @@ #include "VxVertex/VxContainer.h" #include "StoreGate/ReadHandleKey.h" #include "TrkToolInterfaces/ITrackHoleSearchTool.h" +#include "CxxUtils/checker_macros.h" #include <cstdlib> #include <string> @@ -51,7 +52,7 @@ namespace InDet @author Sasa Fratina <sasa.fratina@cern.ch> */ - class TRT_StrawStatus : public AthAlgorithm + class ATLAS_NOT_THREAD_SAFE TRT_StrawStatus : public AthAlgorithm // A global variable (last_lumiBlock0) is read and written. Results should not be reproducible in multi-threading. { public: diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRTCalibrationMgr.cxx b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRTCalibrationMgr.cxx index bf8b93f7a6918fb8de9a31fae9d0890831431f65..d6537bbb098b67757f848419211297dd2cd54683 100644 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRTCalibrationMgr.cxx +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRTCalibrationMgr.cxx @@ -247,16 +247,10 @@ StatusCode TRTCalibrationMgr::finalize() return StatusCode::SUCCESS; } -StatusCode TRTCalibrationMgr::streamOutCalibObjects() const +StatusCode TRTCalibrationMgr::streamOutCalibObjects() { ATH_MSG_INFO( "entering streamOutCalibObjects " ); - StatusCode sc; - - - IAthenaOutputStreamTool* streamer=const_cast<IAthenaOutputStreamTool*>(&(*m_streamer)); - - - sc = streamer->connectOutput(); + StatusCode sc = m_streamer->connectOutput(); if (sc.isFailure()) { ATH_MSG_ERROR("Could not connect stream to output"); return( StatusCode::FAILURE); @@ -266,13 +260,13 @@ StatusCode TRTCalibrationMgr::streamOutCalibObjects() const typeKeys.push_back( IAthenaOutputStreamTool::TypeKeyPair(StrawT0Container::classname(),m_par_t0containerkey)) ; typeKeys.push_back( IAthenaOutputStreamTool::TypeKeyPair(RtRelationContainer::classname(),m_par_rtcontainerkey)) ; - sc = streamer->streamObjects(typeKeys); + sc = m_streamer->streamObjects(typeKeys); if (sc.isFailure()) { ATH_MSG_ERROR("Could not stream out Containers "); return( StatusCode::FAILURE); } - sc = streamer->commitOutput(); + sc = m_streamer->commitOutput(); if (sc.isFailure()) { ATH_MSG_ERROR("Could not commit output stream"); return( StatusCode::FAILURE); diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRTOccupancyInclude.cxx b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRTOccupancyInclude.cxx index f882d874b23ff82f8573e523d6b5c9df8862303d..c35f014f13be8e50383804b0ec42639b3bf8c1b5 100755 --- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRTOccupancyInclude.cxx +++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/src/TRTOccupancyInclude.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 */ /* ******************************************************************* @@ -12,6 +12,7 @@ #include "xAODEventInfo/EventInfo.h" #include "StoreGate/ReadHandle.h" +#include "CxxUtils/checker_macros.h" TRTOccupancyInclude::TRTOccupancyInclude(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm (name, pSvcLocator), @@ -44,7 +45,7 @@ StatusCode TRTOccupancyInclude::initialize() //--------------------------------------------------------------------- -StatusCode TRTOccupancyInclude::execute() +StatusCode TRTOccupancyInclude::execute ATLAS_NOT_THREAD_SAFE () // static variables are used. { msg(MSG::DEBUG) << "execute()" << endmsg;