From 9af404f45c7f63b41b5fc536d9305b228d18bd4f Mon Sep 17 00:00:00 2001 From: Scott Snyder <scott.snyder@cern.ch> Date: Fri, 17 Sep 2021 19:47:03 +0200 Subject: [PATCH] MuonCondSvc+MuonCondInterface: Enable thread-safety checking. --- .../MuonCondInterface/CscICoolStrSvc.h | 5 +- .../MuonCondInterface/ICSCConditionsSvc.h | 5 +- .../MuonCondInterface/ICSC_DCSConditionsSvc.h | 4 +- .../MuonCondInterface/IRPCConditionsSvc.h | 5 +- .../MuonCondInterface/IRPC_DCSConditionsSvc.h | 4 +- .../IRPC_STATUSConditionsSvc.h | 4 +- .../MuonCondInterface/ITGCConditionsSvc.h | 5 +- .../ITGC_STATUSConditionsSvc.h | 4 +- .../MuonCondInterface/ITriggerCoolSvc.h | 5 +- .../MuonCondInterface/RpcICoolStrSvc.h | 5 +- .../MuonCondSvc/ATLAS_CHECK_THREAD_SAFETY | 1 + .../MuonCondSvc/CSCCondSummarySvc.h | 4 +- .../MuonCondSvc/CSC_DCSConditionsSvc.h | 4 +- .../MuonCondSvc/MuonCondSvc/CscCoolStrSvc.h | 5 +- .../MuonCondSvc/MuonCondSvc/CscCoolStrSvc.icc | 19 ++-- .../MuonCondSvc/RPCCondSummarySvc.h | 16 +--- .../MuonCondSvc/RPC_DCSConditionsSvc.h | 15 +-- .../MuonCondSvc/RPC_STATUSConditionsSvc.h | 17 +--- .../MuonCondSvc/MuonCondSvc/RpcCoolStrSvc.h | 4 +- .../MuonCondSvc/TGCCondSummarySvc.h | 4 +- .../MuonCondSvc/TGC_STATUSConditionsSvc.h | 4 +- .../MuonCondSvc/MuonCondSvc/TriggerCoolSvc.h | 11 +-- .../MuonCondSvc/src/CscCoolStrSvc.cxx | 10 +- .../MuonCondSvc/src/RPCCondSummarySvc.cxx | 57 +++++------ .../MuonCondSvc/src/RPC_DCSConditionsSvc.cxx | 55 +++++------ .../MuonCondSvc/src/TriggerCoolSvc.cxx | 94 +++++++++---------- 26 files changed, 151 insertions(+), 215 deletions(-) create mode 100644 MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/ATLAS_CHECK_THREAD_SAFETY diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/CscICoolStrSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/CscICoolStrSvc.h index ff02c41fca6a..dd0ff7c16669 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/CscICoolStrSvc.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/CscICoolStrSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONCONDSVC_CSCICOOLSTRSVC_H @@ -12,6 +12,7 @@ #include <string> #include <vector> #include "GaudiKernel/IInterface.h" +#include "CxxUtils/checker_macros.h" //#include "MuonCondData/CscCalibData.h" @@ -22,7 +23,7 @@ namespace MuonCalib { class CscCondDataContainer; class CscCondDataCollectionBase; - class CscICoolStrSvc : virtual public IInterface { + class ATLAS_NOT_THREAD_SAFE CscICoolStrSvc : virtual public IInterface { public: static const InterfaceID& interfaceID(); diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ICSCConditionsSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ICSCConditionsSvc.h index 5f9ba63cb1bc..4d1bfd220d88 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ICSCConditionsSvc.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ICSCConditionsSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ //vitrual interface for all the Muon CSC technologies @@ -13,6 +13,7 @@ //STL includes #include <list> #include <string> +#include "CxxUtils/checker_macros.h" //forward declarations class Identifier; @@ -20,7 +21,7 @@ class IdentifierHash; class StatusCode; -class ICSCConditionsSvc: virtual public IInterface{ +class ATLAS_NOT_THREAD_SAFE ICSCConditionsSvc: virtual public IInterface{ public: virtual ~ICSCConditionsSvc(){} static const InterfaceID & interfaceID(); //!< reimplemented from IInterface diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ICSC_DCSConditionsSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ICSC_DCSConditionsSvc.h index 6075a186148c..b9b85bf67cb2 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ICSC_DCSConditionsSvc.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ICSC_DCSConditionsSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef ICSC_DCSCONDITIONSSVC_H @@ -19,7 +19,7 @@ class IdentifierHash; class StatusCode; -class ICSC_DCSConditionsSvc : virtual public ICSCConditionsSvc { +class ATLAS_NOT_THREAD_SAFE ICSC_DCSConditionsSvc : virtual public ICSCConditionsSvc { public: diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/IRPCConditionsSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/IRPCConditionsSvc.h index d2d0efd0a519..81e1a0da1311 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/IRPCConditionsSvc.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/IRPCConditionsSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ //vitrual interface for all the Muon RPC technologies @@ -9,6 +9,7 @@ #include "GaudiKernel/IInterface.h" #include "AthenaKernel/IOVSvcDefs.h" +#include "CxxUtils/checker_macros.h" #include <list> #include <string> @@ -18,7 +19,7 @@ class Identifier; class StatusCode; -class IRPCConditionsSvc: virtual public IInterface{ +class ATLAS_NOT_THREAD_SAFE IRPCConditionsSvc: virtual public IInterface{ public: virtual ~IRPCConditionsSvc(){} static const InterfaceID & interfaceID(); //!< reimplemented from IInterface diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/IRPC_DCSConditionsSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/IRPC_DCSConditionsSvc.h index 08e02bb7c421..7caa37cf390a 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/IRPC_DCSConditionsSvc.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/IRPC_DCSConditionsSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef IRPC_DCSCONDITIONSSVC_H @@ -21,7 +21,7 @@ class StatusCode; -class IRPC_DCSConditionsSvc : virtual public IRPCConditionsSvc { +class ATLAS_NOT_THREAD_SAFE IRPC_DCSConditionsSvc : virtual public IRPCConditionsSvc { public: diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/IRPC_STATUSConditionsSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/IRPC_STATUSConditionsSvc.h index 79ac84666b8c..6da1199b4084 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/IRPC_STATUSConditionsSvc.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/IRPC_STATUSConditionsSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef IRPC_STATUSCONDITIONSSVC_H @@ -18,7 +18,7 @@ class Identifier; class IdentifierHash; class StatusCode; -class IRPC_STATUSConditionsSvc : virtual public IRPCConditionsSvc { +class ATLAS_NOT_THREAD_SAFE IRPC_STATUSConditionsSvc : virtual public IRPCConditionsSvc { public: diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ITGCConditionsSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ITGCConditionsSvc.h index 07578d183cc4..0e62eb2ba7fe 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ITGCConditionsSvc.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ITGCConditionsSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ //vitrual interface for all the Muon TGC technologies @@ -13,13 +13,14 @@ #include <list> #include <string> #include "AthenaKernel/IOVSvcDefs.h" +#include "CxxUtils/checker_macros.h" //forward declarations class Identifier; class IdentifierHash; class StatusCode; -class ITGCConditionsSvc: virtual public IInterface{ +class ATLAS_NOT_THREAD_SAFE ITGCConditionsSvc: virtual public IInterface{ public: virtual ~ITGCConditionsSvc(){} static const InterfaceID & interfaceID(); //!< reimplemented from IInterface diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ITGC_STATUSConditionsSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ITGC_STATUSConditionsSvc.h index 5fc23c1d79cd..4fc02de77475 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ITGC_STATUSConditionsSvc.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ITGC_STATUSConditionsSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef ITGC_STATUSCONDITIONSSVC_H @@ -21,7 +21,7 @@ class StatusCode; //static const InterfaceID IID_TGC_STATUSConditionsSvc("TGC_STATUSConditionsSvc", 1, 0); -class ITGC_STATUSConditionsSvc : virtual public ITGCConditionsSvc { +class ATLAS_NOT_THREAD_SAFE ITGC_STATUSConditionsSvc : virtual public ITGCConditionsSvc { public: diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ITriggerCoolSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ITriggerCoolSvc.h index 3a1141fc13d2..a7a67161f000 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ITriggerCoolSvc.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/ITriggerCoolSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONCONDSVC_ITRIGGERCOOLSVC_H @@ -9,12 +9,13 @@ #include <string> #include "GaudiKernel/IInterface.h" +#include "CxxUtils/checker_macros.h" namespace MuonCalib { -class ITriggerCoolSvc : virtual public IInterface { +class ATLAS_NOT_THREAD_SAFE ITriggerCoolSvc : virtual public IInterface { public: static const InterfaceID& interfaceID(); diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/RpcICoolStrSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/RpcICoolStrSvc.h index 3a794cee7814..f11dc40f7db7 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/RpcICoolStrSvc.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/MuonCondInterface/RpcICoolStrSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONCONDSVC_RPCICOOLSTRSVC_H @@ -13,6 +13,7 @@ #include <string> #include "GaudiKernel/IInterface.h" +#include "CxxUtils/checker_macros.h" namespace MuonCalib { @@ -20,7 +21,7 @@ namespace MuonCalib { class RpcCalibData; class RpcCondParType; - class RpcICoolStrSvc : virtual public IInterface { + class ATLAS_NOT_THREAD_SAFE RpcICoolStrSvc : virtual public IInterface { public: static const InterfaceID& interfaceID(); diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/ATLAS_CHECK_THREAD_SAFETY b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 000000000000..b0bc4c6fec3b --- /dev/null +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/CSCCondSummarySvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/CSCCondSummarySvc.h index 7774bf0f676f..3990d41e1790 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/CSCCondSummarySvc.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/CSCCondSummarySvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONCONDSVC_CSCCONDSUMMARYSVC_H @@ -22,7 +22,7 @@ template <class TYPE> class SvcFactory; class ISvcLocator; -class CSCCondSummarySvc: virtual public ICSCConditionsSvc, public AthService { +class ATLAS_NOT_THREAD_SAFE CSCCondSummarySvc: virtual public ICSCConditionsSvc, public AthService { friend class SvcFactory<CSCCondSummarySvc>; public: diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/CSC_DCSConditionsSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/CSC_DCSConditionsSvc.h index 2f99c415b627..a86c3cc305ea 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/CSC_DCSConditionsSvc.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/CSC_DCSConditionsSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONCONDSVC_CSC_DCSCONDITIONSSVC_H @@ -30,7 +30,7 @@ class StatusCode; class ICSC_DCSConditionsTool; class IIOVSvc; -class CSC_DCSConditionsSvc : public AthService, virtual public ICSC_DCSConditionsSvc { +class ATLAS_NOT_THREAD_SAFE CSC_DCSConditionsSvc : public AthService, virtual public ICSC_DCSConditionsSvc { friend class SvcFactory<CSC_DCSConditionsSvc>; public: CSC_DCSConditionsSvc (const std::string& name, ISvcLocator* pSvcLocator); diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/CscCoolStrSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/CscCoolStrSvc.h index 1e693c1ea65e..ddd39f61dad3 100755 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/CscCoolStrSvc.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/CscCoolStrSvc.h @@ -21,6 +21,7 @@ #include <string> #include <sstream> #include <fstream> +#include <atomic> template <class TYPE> class SvcFactory; @@ -35,7 +36,7 @@ namespace MuonCalib { Contains the major code to write and read calibration files to the database. */ - class CscCoolStrSvc : public AthService, public virtual CscICoolStrSvc + class ATLAS_NOT_THREAD_SAFE CscCoolStrSvc : public AthService, public virtual CscICoolStrSvc { friend class SvcFactory<CscCoolStrSvc>; @@ -196,7 +197,7 @@ namespace MuonCalib { /**Flags*/ bool m_preCache; - mutable int m_numFailedRequests; + mutable std::atomic<int> m_numFailedRequests; int m_maxFailedRequests; std::vector<std::string> m_parNameVec, m_parSGKeyVec, m_parFolderVec, m_parDataTypeVec, m_parCatVec, diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/CscCoolStrSvc.icc b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/CscCoolStrSvc.icc index 99cb5e94308e..29f378a6b17e 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/CscCoolStrSvc.icc +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/CscCoolStrSvc.icc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ namespace MuonCalib { @@ -18,9 +18,10 @@ namespace MuonCalib { if( itr == m_parNameMap.end()) { if(parName == "t0phase" || parName == "t0base"){ - static bool firstTime = true; - if(firstTime) ATH_MSG_WARNING("Attempted to request t0 parameters (t0phase or t0base) from CscCoolStrSvc. These are not yet implemented but will be in the near future. You can probably ignore this WARNING."); - firstTime = false; + static std::atomic_flag firstTime = ATOMIC_FLAG_INIT; + if(!firstTime.test_and_set()) { + ATH_MSG_WARNING("Attempted to request t0 parameters (t0phase or t0base) from CscCoolStrSvc. These are not yet implemented but will be in the near future. You can probably ignore this WARNING."); + } return StatusCode::RECOVERABLE; } @@ -60,11 +61,12 @@ namespace MuonCalib { condData = coll->at(newHash); if(condData) { - if(m_numFailedRequests < m_maxFailedRequests) + int numFailedRequests = m_numFailedRequests++; + if(numFailedRequests < m_maxFailedRequests) ATH_MSG_WARNING("Invalid chamber layer requested when retrieveing " << parName << ". Tried corresponding channel in valid chamber layer and found good data."); - if(m_numFailedRequests++ == m_maxFailedRequests) + if(numFailedRequests == m_maxFailedRequests) ATH_MSG_WARNING("Reached maximum number of problematic requests to CscCoolStrSvc. No further warnings will be printed."); } } @@ -76,10 +78,11 @@ namespace MuonCalib { { //Return a default value retData = coll->getParDefault(); - if(m_numFailedRequests < m_maxFailedRequests) { + int numFailedRequests = m_numFailedRequests++; + if(numFailedRequests < m_maxFailedRequests) { ATH_MSG_WARNING("Requested index " << index << " has no data cached for parameter " << parName << ". Either its not valid (such as a hash Id for a chamber never installed) or there was a problem caching the database to memory. Returning default value of " << retData); } - if(m_numFailedRequests++ == m_maxFailedRequests) ATH_MSG_WARNING("Reached maximum number of failed requests to CscCoolStrSvc. No further warnings will be printed."); + if(numFailedRequests == m_maxFailedRequests) ATH_MSG_WARNING("Reached maximum number of failed requests to CscCoolStrSvc. No further warnings will be printed."); } else { diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPCCondSummarySvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPCCondSummarySvc.h index cbcb2140ce11..2e9adf919025 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPCCondSummarySvc.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPCCondSummarySvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONCONDSVC_RPCCONDSUMMARYSVC_H @@ -21,7 +21,7 @@ //forward declarations template <class TYPE> class SvcFactory; -class RPCCondSummarySvc: virtual public IRPCConditionsSvc, public AthService{ +class ATLAS_NOT_THREAD_SAFE RPCCondSummarySvc: virtual public IRPCConditionsSvc, public AthService{ friend class SvcFactory<RPCCondSummarySvc>; public: @@ -57,18 +57,6 @@ public: bool m_usesimulation; - protected: - static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelEfficiencyMap_empty; - static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_GapEfficiencyMap_empty; - static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelMeanClusterSizeMap_empty; - static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelFracClusterSize1Map_empty; - static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelFracClusterSize2Map_empty; - static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelFracClusterSize3Map_empty; - static std::map<Identifier ,std::string> s_RPCCondSummarySvc_RPC_PanelDeadStripListMap_empty; - static std::map<Identifier ,float> s_RPCCondSummarySvc_RPC_PanelFracDeadStripMap_empty; - static std::map<Identifier ,int> s_RPCCondSummarySvc_RPC_PanelProjectedTracksMap_empty; - static std::map<Identifier ,int> s_RPCCondSummarySvc_RPC_PanelDeadStripList_empty; - static std::map<Identifier, std::vector<double> >& s_RPCCondSummarySvc_RPC_StripTimeMap_empty; private: ServiceHandleArray<IRPCConditionsSvc> m_reportingServices; //!< list of services to be used diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPC_DCSConditionsSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPC_DCSConditionsSvc.h index 4878ac3d39ff..b37963275e0b 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPC_DCSConditionsSvc.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPC_DCSConditionsSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONCONDSVC_RPC_DCSCONDITIONSSVC_H @@ -30,7 +30,7 @@ class StatusCode; class IRPC_DCSConditionsTool; class IIOVSvc; -class RPC_DCSConditionsSvc : public AthService, virtual public IRPC_DCSConditionsSvc { +class ATLAS_NOT_THREAD_SAFE RPC_DCSConditionsSvc : public AthService, virtual public IRPC_DCSConditionsSvc { friend class SvcFactory<RPC_DCSConditionsSvc>; public: RPC_DCSConditionsSvc (const std::string& name, ISvcLocator* pSvcLocator); @@ -84,17 +84,6 @@ friend class SvcFactory<RPC_DCSConditionsSvc>; std::vector<Identifier> m_cachedeffPanelId; -static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelEfficiencyMap_empty; -static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_GapEfficiencyMap_empty; -static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelMeanClusterSizeMap_empty; -static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelFracClusterSize1Map_empty; -static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelFracClusterSize2Map_empty; -static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelFracClusterSize3Map_empty; -static std::map<Identifier ,std::string> s_RPCCondSummarySvc_RPC_PanelDeadStripListMap_empty; -static std::map<Identifier ,float> s_RPCCondSummarySvc_RPC_PanelFracDeadStripMap_empty; -static std::map<Identifier ,int> s_RPCCondSummarySvc_RPC_PanelProjectedTracksMap_empty; -static std::map<Identifier ,int> s_RPCCondSummarySvc_RPC_PanelDeadStripList_empty; - static std::map<Identifier ,std::vector<double> > s_RPCCondSummarySvc_RPC_StripTimeMap_empty; private: diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPC_STATUSConditionsSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPC_STATUSConditionsSvc.h index 8f7e0dcb400d..e1d5f753d47d 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPC_STATUSConditionsSvc.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RPC_STATUSConditionsSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONCONDSVC_RPC_STATUSCONDITIONSSVC_H @@ -30,7 +30,7 @@ class StatusCode; class IRpcDetectorStatusDbTool; class IIOVSvc; -class RPC_STATUSConditionsSvc : public AthService, virtual public IRPC_STATUSConditionsSvc { +class ATLAS_NOT_THREAD_SAFE RPC_STATUSConditionsSvc : public AthService, virtual public IRPC_STATUSConditionsSvc { friend class SvcFactory<RPC_STATUSConditionsSvc>; public: RPC_STATUSConditionsSvc (const std::string& name, ISvcLocator* pSvcLocator); @@ -85,19 +85,6 @@ friend class SvcFactory<RPC_STATUSConditionsSvc>; std::vector<Identifier> m_cachedoffPanelId; private: - - static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelEfficiencyMap_empty; - - static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_GapEfficiencyMap_empty; - static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelMeanClusterSizeMap_empty; - static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelFracClusterSize1Map_empty; - static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelFracClusterSize2Map_empty; - static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelFracClusterSize3Map_empty; - static std::map<Identifier ,std::string> s_RPCCondSummarySvc_RPC_PanelDeadStripListMap_empty; - static std::map<Identifier ,float> s_RPCCondSummarySvc_RPC_PanelFracDeadStripMap_empty; - static std::map<Identifier ,int> s_RPCCondSummarySvc_RPC_PanelProjectedTracksMap_empty; - static std::map<Identifier ,int> s_RPCCondSummarySvc_RPC_PanelDeadStripList_empty; - static std::map<Identifier ,std::vector<double> > s_RPCCondSummarySvc_RPC_StripTimeMap_empty; std::string m_DataLocation; std::string m_dbToolType; std::string m_dbToolName; diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RpcCoolStrSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RpcCoolStrSvc.h index 632bd4496215..c90261e04894 100755 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RpcCoolStrSvc.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/RpcCoolStrSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONCONDSVC_RPCCOOLSTRSVC_H @@ -41,7 +41,7 @@ namespace MuonCalib { class RpcCalibDBEntry; - class RpcCoolStrSvc : public AthService, virtual public RpcICoolStrSvc + class ATLAS_NOT_THREAD_SAFE RpcCoolStrSvc : public AthService, virtual public RpcICoolStrSvc { friend class SvcFactory<RpcCoolStrSvc>; diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGCCondSummarySvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGCCondSummarySvc.h index e73ddccdadc3..67c0e634c3b7 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGCCondSummarySvc.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGCCondSummarySvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONCONDSVC_TGCCONDSUMMARYSVC_H @@ -20,7 +20,7 @@ template <class TYPE> class SvcFactory; -class TGCCondSummarySvc: virtual public ITGCConditionsSvc, public AthService{ +class ATLAS_NOT_THREAD_SAFE TGCCondSummarySvc: virtual public ITGCConditionsSvc, public AthService{ friend class SvcFactory<TGCCondSummarySvc>; public: diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGC_STATUSConditionsSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGC_STATUSConditionsSvc.h index 7a32e4cd3e15..f17a92f49ac4 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGC_STATUSConditionsSvc.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TGC_STATUSConditionsSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONCONDSVC_TGC_STATUSCONDITIONSSVC_H @@ -38,7 +38,7 @@ class ITGC_STATUSConditionsTool; class IIOVSvc; -class TGC_STATUSConditionsSvc : public AthService, virtual public ITGC_STATUSConditionsSvc { +class ATLAS_NOT_THREAD_SAFE TGC_STATUSConditionsSvc : public AthService, virtual public ITGC_STATUSConditionsSvc { friend class SvcFactory<TGC_STATUSConditionsSvc>; diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TriggerCoolSvc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TriggerCoolSvc.h index 0b3085e6f18a..08ac698d8138 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TriggerCoolSvc.h +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/MuonCondSvc/TriggerCoolSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef MUONCONDSVC_TRIGGERCOOLSVC_H @@ -31,7 +31,7 @@ template <class TYPE> class SvcFactory; namespace MuonCalib { - class TriggerCoolSvc : public AthService, virtual public ITriggerCoolSvc + class ATLAS_NOT_THREAD_SAFE TriggerCoolSvc : public AthService, virtual public ITriggerCoolSvc { friend class SvcFactory<TriggerCoolSvc>; @@ -65,16 +65,9 @@ namespace MuonCalib { StoreGateSvc* p_detstore; - mutable MsgStream m_log; - /**Cool folder name*/ std::string m_etafolder; std::string m_phifolder; - - bool m_debugLevel; - - - }; diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/CscCoolStrSvc.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/CscCoolStrSvc.cxx index dc8919b6f9e5..495b075a11c3 100755 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/CscCoolStrSvc.cxx +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/CscCoolStrSvc.cxx @@ -1008,13 +1008,12 @@ namespace MuonCalib { // CSCCool database contains still all CSCs. A clean fix would be to have a dedicated database for every layout. bool isValid = true; chanId = m_idHelperSvc->cscIdHelper().channelID(stationName, stationEta, stationPhi, chamberLayer, iLayer, measuresPhi, iStrip, true, &isValid); - static bool conversionFailPrinted = false; + static std::atomic_flag conversionFailPrinted = ATOMIC_FLAG_INIT; if (!isValid) { - if (!conversionFailPrinted) { + if (!conversionFailPrinted.test_and_set()) { ATH_MSG_WARNING("Failed to retrieve offline identifier from ASM cool string " << asmIDstr << ". This is likely due to the fact that the CSCCool database contains more entries than " << "the detector layout."); - conversionFailPrinted = true; } continue; } @@ -1197,13 +1196,12 @@ namespace MuonCalib { // CSCCool database contains still all CSCs. A clean fix would be to have a dedicated database for every layout. bool isValid = true; channelId = m_idHelperSvc->cscIdHelper().channelID(stationName,eta,phi,chamLay,wireLay,measuresPhi,strip,true,&isValid); - static bool conversionFailPrinted = false; + static std::atomic_flag conversionFailPrinted = ATOMIC_FLAG_INIT; if (!isValid) { - if (!conversionFailPrinted) { + if (!conversionFailPrinted.test_and_set()) { ATH_MSG_WARNING("Failed to retrieve offline identifier from online identifier " << onlineId << ". This is likely due to the fact that the CSCCool database contains more entries than " << "the detector layout."); - conversionFailPrinted = true; } return StatusCode::FAILURE; } diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/RPCCondSummarySvc.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/RPCCondSummarySvc.cxx index af101c556dc5..12bf5f1bf64b 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/RPCCondSummarySvc.cxx +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/RPCCondSummarySvc.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #include "MuonCondSvc/RPCCondSummarySvc.h" @@ -200,8 +200,7 @@ const std::vector<Identifier>& RPCCondSummarySvc::offPanelId() const{ // only for simulation const std::map<Identifier,double>& RPCCondSummarySvc::RPC_EfficiencyMap(){ -static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelEfficiencyMap_empty; - s_RPCCondSummarySvc_RPC_PanelEfficiencyMap_empty.clear(); + static const std::map<Identifier ,double> RPCCondSummarySvc_RPC_PanelEfficiencyMap_empty; ServiceHandleArray<IRPCConditionsSvc>::const_iterator svc(m_reportingServices.begin()); ServiceHandleArray<IRPCConditionsSvc>::const_iterator lastSvc(m_reportingServices.end()); @@ -212,14 +211,13 @@ static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelEfficiencyMap_ } ATH_MSG_DEBUG(" Efficiency per Panel RPC RPCConditionsSummarySvc "); ATH_MSG_DEBUG("Efficiency Map per RPC panel"); - return s_RPCCondSummarySvc_RPC_PanelEfficiencyMap_empty; + return RPCCondSummarySvc_RPC_PanelEfficiencyMap_empty; } const std::map<Identifier,double>& RPCCondSummarySvc::RPC_EfficiencyGapMap(){ -static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_GapEfficiencyMap_empty; + static const std::map<Identifier ,double> RPCCondSummarySvc_RPC_GapEfficiencyMap_empty; - s_RPCCondSummarySvc_RPC_GapEfficiencyMap_empty.clear(); ServiceHandleArray<IRPCConditionsSvc>::const_iterator svc(m_reportingServices.begin()); ServiceHandleArray<IRPCConditionsSvc>::const_iterator lastSvc(m_reportingServices.end()); for (;svc not_eq lastSvc;++svc){ @@ -228,13 +226,12 @@ static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_GapEfficiencyMap_em } ATH_MSG_DEBUG(" GapEfficiency per RPC RPCConditionsSummarySvc "); ATH_MSG_DEBUG("GapEfficiency Map per RPC "); - return s_RPCCondSummarySvc_RPC_GapEfficiencyMap_empty; + return RPCCondSummarySvc_RPC_GapEfficiencyMap_empty; } const std::map<Identifier,double>& RPCCondSummarySvc::RPC_MeanClusterSizeMap(){ -static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelMeanClusterSizeMap_empty; + static const std::map<Identifier ,double> RPCCondSummarySvc_RPC_PanelMeanClusterSizeMap_empty; - s_RPCCondSummarySvc_RPC_PanelMeanClusterSizeMap_empty.clear(); ServiceHandleArray<IRPCConditionsSvc>::const_iterator svc(m_reportingServices.begin()); ServiceHandleArray<IRPCConditionsSvc>::const_iterator lastSvc(m_reportingServices.end()); @@ -244,13 +241,12 @@ static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelMeanClusterSiz } ATH_MSG_DEBUG(" MeanClusterSize per Panel RPC RPCConditionsSummarySvc "); ATH_MSG_DEBUG("MeanClusterSize Map per RPC panel"); - return s_RPCCondSummarySvc_RPC_PanelMeanClusterSizeMap_empty; + return RPCCondSummarySvc_RPC_PanelMeanClusterSizeMap_empty; } const std::map<Identifier,double>& RPCCondSummarySvc::RPC_FracClusterSize1Map(){ -static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelFracClusterSize1Map_empty; + static const std::map<Identifier ,double> RPCCondSummarySvc_RPC_PanelFracClusterSize1Map_empty; - s_RPCCondSummarySvc_RPC_PanelFracClusterSize1Map_empty.clear(); ServiceHandleArray<IRPCConditionsSvc>::const_iterator svc(m_reportingServices.begin()); ServiceHandleArray<IRPCConditionsSvc>::const_iterator lastSvc(m_reportingServices.end()); @@ -260,13 +256,12 @@ static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelFracClusterSiz } ATH_MSG_DEBUG("FracClusterSize1 per Panel RPC RPCConditionsSummarySvc "); ATH_MSG_DEBUG("FracClusterSize1 Map per RPC panel"); - return s_RPCCondSummarySvc_RPC_PanelFracClusterSize1Map_empty; + return RPCCondSummarySvc_RPC_PanelFracClusterSize1Map_empty; } const std::map<Identifier,double>& RPCCondSummarySvc::RPC_FracClusterSize2Map(){ -static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelFracClusterSize2Map_empty; + static const std::map<Identifier ,double> RPCCondSummarySvc_RPC_PanelFracClusterSize2Map_empty; - s_RPCCondSummarySvc_RPC_PanelFracClusterSize2Map_empty.clear(); ServiceHandleArray<IRPCConditionsSvc>::const_iterator svc(m_reportingServices.begin()); ServiceHandleArray<IRPCConditionsSvc>::const_iterator lastSvc(m_reportingServices.end()); @@ -276,13 +271,12 @@ static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelFracClusterSiz } ATH_MSG_DEBUG("FracClusterSize2 per Panel RPC RPCConditionsSummarySvc "); ATH_MSG_DEBUG("FracClusterSize2 Map per RPC panel"); - return s_RPCCondSummarySvc_RPC_PanelFracClusterSize2Map_empty; + return RPCCondSummarySvc_RPC_PanelFracClusterSize2Map_empty; } const std::map<Identifier,double>& RPCCondSummarySvc::RPC_FracClusterSize3Map(){ -static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelFracClusterSize3Map_empty; + static const std::map<Identifier ,double> RPCCondSummarySvc_RPC_PanelFracClusterSize3Map_empty; - s_RPCCondSummarySvc_RPC_PanelFracClusterSize3Map_empty.clear(); ServiceHandleArray<IRPCConditionsSvc>::const_iterator svc(m_reportingServices.begin()); ServiceHandleArray<IRPCConditionsSvc>::const_iterator lastSvc(m_reportingServices.end()); @@ -292,13 +286,12 @@ static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelFracClusterSiz } ATH_MSG_DEBUG("FracClusterSize3 per Panel RPC RPCConditionsSummarySvc "); ATH_MSG_DEBUG("FracClusterSize3 Map per RPC panel"); - return s_RPCCondSummarySvc_RPC_PanelFracClusterSize3Map_empty; + return RPCCondSummarySvc_RPC_PanelFracClusterSize3Map_empty; } const std::map<Identifier,std::string>& RPCCondSummarySvc::RPC_DeadStripListMap(){ -static std::map<Identifier ,std::string> s_RPCCondSummarySvc_RPC_PanelDeadStripListMap_empty; + static const std::map<Identifier ,std::string> RPCCondSummarySvc_RPC_PanelDeadStripListMap_empty; - s_RPCCondSummarySvc_RPC_PanelDeadStripListMap_empty.clear(); ServiceHandleArray<IRPCConditionsSvc>::const_iterator svc(m_reportingServices.begin()); ServiceHandleArray<IRPCConditionsSvc>::const_iterator lastSvc(m_reportingServices.end()); for (;svc not_eq lastSvc;++svc){ @@ -307,13 +300,12 @@ static std::map<Identifier ,std::string> s_RPCCondSummarySvc_RPC_PanelDeadStrip } ATH_MSG_DEBUG("DeadStripList per Panel RPC RPCConditionsSummarySvc"); ATH_MSG_DEBUG("DeadStripList Map per RPC panel"); - return s_RPCCondSummarySvc_RPC_PanelDeadStripListMap_empty; + return RPCCondSummarySvc_RPC_PanelDeadStripListMap_empty; } const std::map<Identifier,float>& RPCCondSummarySvc::RPC_FracDeadStripMap(){ -static std::map<Identifier ,float> s_RPCCondSummarySvc_RPC_PanelFracDeadStripMap_empty; + static const std::map<Identifier ,float> RPCCondSummarySvc_RPC_PanelFracDeadStripMap_empty; - s_RPCCondSummarySvc_RPC_PanelFracDeadStripMap_empty.clear(); ServiceHandleArray<IRPCConditionsSvc>::const_iterator svc(m_reportingServices.begin()); ServiceHandleArray<IRPCConditionsSvc>::const_iterator lastSvc(m_reportingServices.end()); @@ -323,13 +315,12 @@ static std::map<Identifier ,float> s_RPCCondSummarySvc_RPC_PanelFracDeadStripMa } ATH_MSG_DEBUG("FracDeadStrip per Panel RPC RPCConditionsSummarySvc"); ATH_MSG_DEBUG("FracDeadStrip Map per RPC panel"); - return s_RPCCondSummarySvc_RPC_PanelFracDeadStripMap_empty; + return RPCCondSummarySvc_RPC_PanelFracDeadStripMap_empty; } const std::map<Identifier,int>& RPCCondSummarySvc::RPC_ProjectedTracksMap(){ -static std::map<Identifier ,int> s_RPCCondSummarySvc_RPC_PanelProjectedTracksMap_empty; + static const std::map<Identifier ,int> RPCCondSummarySvc_RPC_PanelProjectedTracksMap_empty; - s_RPCCondSummarySvc_RPC_PanelProjectedTracksMap_empty.clear(); ServiceHandleArray<IRPCConditionsSvc>::const_iterator svc(m_reportingServices.begin()); ServiceHandleArray<IRPCConditionsSvc>::const_iterator lastSvc(m_reportingServices.end()); @@ -339,13 +330,12 @@ static std::map<Identifier ,int> s_RPCCondSummarySvc_RPC_PanelProjectedTracksMa } ATH_MSG_DEBUG("ProjectedTracks per Panel RPC RPCConditionsSummarySvc"); ATH_MSG_DEBUG("ProjectedTracks Map per RPC panel"); - return s_RPCCondSummarySvc_RPC_PanelProjectedTracksMap_empty; + return RPCCondSummarySvc_RPC_PanelProjectedTracksMap_empty; } const std::map<Identifier,int>& RPCCondSummarySvc::RPC_DeadStripList(){ -static std::map<Identifier ,int> s_RPCCondSummarySvc_RPC_PanelDeadStripList_empty; + static const std::map<Identifier ,int> RPCCondSummarySvc_RPC_PanelDeadStripList_empty; - s_RPCCondSummarySvc_RPC_PanelDeadStripList_empty.clear(); ServiceHandleArray<IRPCConditionsSvc>::const_iterator svc(m_reportingServices.begin()); ServiceHandleArray<IRPCConditionsSvc>::const_iterator lastSvc(m_reportingServices.end()); for (;svc not_eq lastSvc;++svc){ @@ -354,13 +344,12 @@ static std::map<Identifier ,int> s_RPCCondSummarySvc_RPC_PanelDeadStripList_emp } ATH_MSG_DEBUG("DeadStripList per Panel RPC RPCConditionsSummarySvc"); ATH_MSG_DEBUG("DeadStripList Map per RPC panel"); - return s_RPCCondSummarySvc_RPC_PanelDeadStripList_empty; + return RPCCondSummarySvc_RPC_PanelDeadStripList_empty; } const std::map<Identifier,std::vector<double> >& RPCCondSummarySvc::RPC_TimeMapforStrip(){ -static std::map<Identifier ,std::vector<double> > s_RPCCondSummarySvc_RPC_StripTimeMap_empty; + static const std::map<Identifier ,std::vector<double> > RPCCondSummarySvc_RPC_StripTimeMap_empty; - s_RPCCondSummarySvc_RPC_StripTimeMap_empty.clear(); ServiceHandleArray<IRPCConditionsSvc>::const_iterator svc(m_reportingServices.begin()); ServiceHandleArray<IRPCConditionsSvc>::const_iterator lastSvc(m_reportingServices.end()); for (;svc not_eq lastSvc;++svc){ @@ -369,7 +358,7 @@ static std::map<Identifier ,std::vector<double> > s_RPCCondSummarySvc_RPC_Strip } ATH_MSG_DEBUG(" Strip Time per Panel RPC RPCConditionsSummarySvc "); ATH_MSG_DEBUG("Strip Time Map per RPC panel"); - return s_RPCCondSummarySvc_RPC_StripTimeMap_empty; + return RPCCondSummarySvc_RPC_StripTimeMap_empty; } diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/RPC_DCSConditionsSvc.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/RPC_DCSConditionsSvc.cxx index f57d8f2e6cce..55e5ce82c643 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/RPC_DCSConditionsSvc.cxx +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/RPC_DCSConditionsSvc.cxx @@ -188,103 +188,92 @@ const std::vector<Identifier>& RPC_DCSConditionsSvc::offPanelId() const{ const std::map<Identifier,double>& RPC_DCSConditionsSvc::RPC_EfficiencyMap(){ -static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelEfficiencyMap_empty; - s_RPCCondSummarySvc_RPC_PanelEfficiencyMap_empty.clear(); + static const std::map<Identifier ,double> RPCCondSummarySvc_RPC_PanelEfficiencyMap_empty; ATH_MSG_VERBOSE("Efficiency Map per RPC panel" ); - return s_RPCCondSummarySvc_RPC_PanelEfficiencyMap_empty; + return RPCCondSummarySvc_RPC_PanelEfficiencyMap_empty; } const std::map<Identifier,double>& RPC_DCSConditionsSvc::RPC_EfficiencyGapMap(){ -static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_GapEfficiencyMap_empty; + static const std::map<Identifier ,double> RPCCondSummarySvc_RPC_GapEfficiencyMap_empty; - s_RPCCondSummarySvc_RPC_GapEfficiencyMap_empty.clear(); ATH_MSG_VERBOSE("EfficiencyGap Map per RPC panel" ); - return s_RPCCondSummarySvc_RPC_GapEfficiencyMap_empty; + return RPCCondSummarySvc_RPC_GapEfficiencyMap_empty; } const std::map<Identifier,double>& RPC_DCSConditionsSvc::RPC_MeanClusterSizeMap(){ - static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelMeanClusterSizeMap_empty; + static const std::map<Identifier ,double> RPCCondSummarySvc_RPC_PanelMeanClusterSizeMap_empty; - s_RPCCondSummarySvc_RPC_PanelMeanClusterSizeMap_empty.clear(); ATH_MSG_VERBOSE("MeanClusterSize Map per RPC panel" ); - return s_RPCCondSummarySvc_RPC_PanelMeanClusterSizeMap_empty; + return RPCCondSummarySvc_RPC_PanelMeanClusterSizeMap_empty; } const std::map<Identifier,double>& RPC_DCSConditionsSvc::RPC_FracClusterSize1Map(){ -static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelFracClusterSize1Map_empty; + static const std::map<Identifier ,double> RPCCondSummarySvc_RPC_PanelFracClusterSize1Map_empty; - s_RPCCondSummarySvc_RPC_PanelFracClusterSize1Map_empty.clear(); ATH_MSG_VERBOSE("FracClusterSize1 Map per RPC panel" ); - return s_RPCCondSummarySvc_RPC_PanelFracClusterSize1Map_empty; + return RPCCondSummarySvc_RPC_PanelFracClusterSize1Map_empty; } const std::map<Identifier,double>& RPC_DCSConditionsSvc::RPC_FracClusterSize2Map(){ -static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelFracClusterSize2Map_empty; + static const std::map<Identifier ,double> RPCCondSummarySvc_RPC_PanelFracClusterSize2Map_empty; - s_RPCCondSummarySvc_RPC_PanelFracClusterSize2Map_empty.clear(); ATH_MSG_VERBOSE("FracClusterSize2 Map per RPC panel" ); - return s_RPCCondSummarySvc_RPC_PanelFracClusterSize2Map_empty; + return RPCCondSummarySvc_RPC_PanelFracClusterSize2Map_empty; } const std::map<Identifier,double>& RPC_DCSConditionsSvc::RPC_FracClusterSize3Map(){ -static std::map<Identifier ,double> s_RPCCondSummarySvc_RPC_PanelFracClusterSize3Map_empty; + static const std::map<Identifier ,double> RPCCondSummarySvc_RPC_PanelFracClusterSize3Map_empty; - s_RPCCondSummarySvc_RPC_PanelFracClusterSize3Map_empty.clear(); ATH_MSG_VERBOSE("FracClusterSize3 Map per RPC panel" ); - return s_RPCCondSummarySvc_RPC_PanelFracClusterSize3Map_empty; + return RPCCondSummarySvc_RPC_PanelFracClusterSize3Map_empty; } const std::map<Identifier,std::string>& RPC_DCSConditionsSvc::RPC_DeadStripListMap(){ - static std::map<Identifier ,std::string> s_RPCCondSummarySvc_RPC_PanelDeadStripListMap_empty; + static const std::map<Identifier ,std::string> RPCCondSummarySvc_RPC_PanelDeadStripListMap_empty; - s_RPCCondSummarySvc_RPC_PanelDeadStripListMap_empty.clear(); ATH_MSG_VERBOSE("DeadStripList Map per RPC panel" ); - return s_RPCCondSummarySvc_RPC_PanelDeadStripListMap_empty; + return RPCCondSummarySvc_RPC_PanelDeadStripListMap_empty; } const std::map<Identifier,float>& RPC_DCSConditionsSvc::RPC_FracDeadStripMap(){ -static std::map<Identifier ,float> s_RPCCondSummarySvc_RPC_PanelFracDeadStripMap_empty; + static const std::map<Identifier ,float> RPCCondSummarySvc_RPC_PanelFracDeadStripMap_empty; - s_RPCCondSummarySvc_RPC_PanelFracDeadStripMap_empty.clear(); ATH_MSG_VERBOSE("FracDeadStrip Map per RPC panel" ); - return s_RPCCondSummarySvc_RPC_PanelFracDeadStripMap_empty; + return RPCCondSummarySvc_RPC_PanelFracDeadStripMap_empty; } const std::map<Identifier,int>& RPC_DCSConditionsSvc::RPC_ProjectedTracksMap(){ -static std::map<Identifier ,int> s_RPCCondSummarySvc_RPC_PanelProjectedTracksMap_empty; + static const std::map<Identifier ,int> RPCCondSummarySvc_RPC_PanelProjectedTracksMap_empty; - s_RPCCondSummarySvc_RPC_PanelProjectedTracksMap_empty.clear(); ATH_MSG_VERBOSE("ProjectedTracks Map per RPC panel" ); - return s_RPCCondSummarySvc_RPC_PanelProjectedTracksMap_empty; + return RPCCondSummarySvc_RPC_PanelProjectedTracksMap_empty; } const std::map<Identifier,int>& RPC_DCSConditionsSvc::RPC_DeadStripList(){ -static std::map<Identifier ,int> s_RPCCondSummarySvc_RPC_PanelDeadStripList_empty; + static const std::map<Identifier ,int> RPCCondSummarySvc_RPC_PanelDeadStripList_empty; - s_RPCCondSummarySvc_RPC_PanelDeadStripList_empty.clear(); ATH_MSG_VERBOSE("DeadStripList per RPC panel" ); - return s_RPCCondSummarySvc_RPC_PanelDeadStripList_empty; + return RPCCondSummarySvc_RPC_PanelDeadStripList_empty; } const std::map<Identifier,std::vector<double> >& RPC_DCSConditionsSvc::RPC_TimeMapforStrip(){ -static std::map<Identifier ,std::vector<double> > s_RPCCondSummarySvc_RPC_StripTimeMap_empty; + static const std::map<Identifier ,std::vector<double> > RPCCondSummarySvc_RPC_StripTimeMap_empty; - s_RPCCondSummarySvc_RPC_StripTimeMap_empty.clear(); ATH_MSG_VERBOSE("StripTimeMap per RPC panel" ); - return s_RPCCondSummarySvc_RPC_StripTimeMap_empty; + return RPCCondSummarySvc_RPC_StripTimeMap_empty; } diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/TriggerCoolSvc.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/TriggerCoolSvc.cxx index 4efe439a682f..c72f5e46b174 100644 --- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/TriggerCoolSvc.cxx +++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/src/TriggerCoolSvc.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #include <fstream> @@ -22,10 +22,8 @@ namespace MuonCalib{ TriggerCoolSvc::TriggerCoolSvc(const std::string& name, ISvcLocator* svc) : AthService(name,svc), p_detstore(0), - m_log(msgSvc(),name), m_etafolder("/RPC/TRIGGER/CM_THR_ETA"), - m_phifolder("/RPC/TRIGGER/CM_THR_PHI"), - m_debugLevel(false) + m_phifolder("/RPC/TRIGGER/CM_THR_PHI") { //declare properties declareProperty("EtaFolder",m_etafolder); @@ -51,21 +49,17 @@ StatusCode TriggerCoolSvc::queryInterface(const InterfaceID& riid, void** ppvInt StatusCode TriggerCoolSvc::initialize() { - // service initialisation - m_log.setLevel(outputLevel()); //individual outputlevel not known before inialize - m_debugLevel = (m_log.level() <= MSG::DEBUG); - - m_log << MSG::INFO << "Initializing TriggerCoolSvc" <<endmsg; + ATH_MSG_INFO ("Initializing TriggerCoolSvc"); // get detector store, linked to cool database by other algorithms in your // jobOptions file. if (StatusCode::SUCCESS!=service("DetectorStore",p_detstore)) { - m_log << MSG::FATAL << "Detector store not found" << endmsg; + ATH_MSG_FATAL( "Detector store not found" ); return StatusCode::FAILURE; } - m_log << MSG::INFO << "using folder phi ******************** " << m_phifolder<<endmsg; - m_log << MSG::INFO << "using folder eta ********************" << m_etafolder<<endmsg; + ATH_MSG_INFO( "using folder phi ******************** " << m_phifolder ); + ATH_MSG_INFO( "using folder eta ********************" << m_etafolder ); // StoreGateSvc* detStore= 0; @@ -78,7 +72,7 @@ StatusCode TriggerCoolSvc::initialize() StatusCode TriggerCoolSvc::finalize() { - m_log << MSG::DEBUG << "in finalize()" << endmsg; + ATH_MSG_DEBUG( "in finalize()" ); return StatusCode::SUCCESS; } @@ -89,7 +83,7 @@ StatusCode TriggerCoolSvc::writeToDBEta(const std::string& etafolder, const std: const int chan, const std::string& sequence,const std::string& info) const{ // this writes the contents of theEntries in the db - m_log << MSG::INFO << "using folder eta ********************" << m_phifolder<<endmsg; + ATH_MSG_INFO( "using folder eta ********************" << m_phifolder ); // reading files to store in string @@ -100,7 +94,7 @@ StatusCode TriggerCoolSvc::writeToDBEta(const std::string& etafolder, const std: fseek (f, 0L, SEEK_END); unsigned int size = ftell (f); fseek (f, 0L, SEEK_SET); - m_log << MSG::INFO << "Input Th0 file size is " << size << endmsg; + ATH_MSG_INFO( "Input Th0 file size is " << size ); std::vector<char> sbuf(size); @@ -108,7 +102,7 @@ StatusCode TriggerCoolSvc::writeToDBEta(const std::string& etafolder, const std: size_t readbytes = 0; readbytes = fread(&sbuf[0],size,1,f); if(readbytes == 0) - m_log << MSG::ERROR << "Empty file read!" << size << endmsg; + ATH_MSG_ERROR( "Empty file read!" << size ); } fclose (f); @@ -121,38 +115,37 @@ StatusCode TriggerCoolSvc::writeToDBEta(const std::string& etafolder, const std: CondAttrListCollection* atrc=0; if (!p_detstore->contains<CondAttrListCollection>(etafolder)) { - m_log << MSG::DEBUG << "Creating new CondAttrListCollection for folder " - << etafolder << endmsg; + ATH_MSG_DEBUG( "Creating new CondAttrListCollection for folder " + << etafolder ); CondAttrListCollection* atrc=new CondAttrListCollection(true); if (StatusCode::SUCCESS!=p_detstore->record(atrc,etafolder)) { - m_log << MSG::ERROR << "Could not create CondAttrListCollection " << - etafolder << endmsg; + ATH_MSG_ERROR( "Could not create CondAttrListCollection " << + etafolder ); return StatusCode::FAILURE; } } // do const cast here so we can add to already exisiting collections const CondAttrListCollection* catrc=0; - m_log << MSG::DEBUG << "Attempting to retrieve collection (const)" << endmsg; + ATH_MSG_DEBUG( "Attempting to retrieve collection (const)" ); if (StatusCode::SUCCESS!=p_detstore->retrieve(catrc,etafolder)) { - m_log << MSG::ERROR << "Could not retrieve CondAttrListCollection " << - etafolder << endmsg; + ATH_MSG_ERROR( "Could not retrieve CondAttrListCollection " << + etafolder ); return StatusCode::FAILURE; } atrc=const_cast<CondAttrListCollection*>(catrc); if (atrc==0) { - m_log << MSG::ERROR << "Could not retrieve non-const pointer to atrc" << - endmsg; + ATH_MSG_ERROR( "Could not retrieve non-const pointer to atrc" ); return StatusCode::FAILURE; } // check channel zero is not being requested if (chan==0) { - m_log << MSG::ERROR << "Channel 0 cannot be used" << endmsg; + ATH_MSG_ERROR( "Channel 0 cannot be used" ); return StatusCode::FAILURE; } - m_log << MSG::DEBUG << "About to create AttributeListSpecification" << endmsg; + ATH_MSG_DEBUG( "About to create AttributeListSpecification" ); coral::AttributeListSpecification* aspec=0; aspec=new coral::AttributeListSpecification(); @@ -171,9 +164,9 @@ StatusCode TriggerCoolSvc::writeToDBEta(const std::string& etafolder, const std: std::ostringstream atrstring; alist.print(atrstring); - m_log << MSG::DEBUG << "About to add channel to: " << atrc << endmsg; + ATH_MSG_DEBUG( "About to add channel to: " << atrc ); atrc->add(channum,alist); - m_log << MSG::DEBUG << " craetion folder" << endmsg; + ATH_MSG_DEBUG( " creation folder" ); return StatusCode::SUCCESS; @@ -189,12 +182,12 @@ StatusCode TriggerCoolSvc::writeToDBPhi(const std::string& phifolder, const std: fseek (f, 0L, SEEK_END); int size = ftell (f); fseek (f, 0L, SEEK_SET); - m_log << MSG::INFO << "Input file size is " << size << endmsg; + ATH_MSG_INFO( "Input file size is " << size ); std::vector<char> sbuf(size); size_t readbytes = 0; readbytes = fread(&sbuf[0],size,1,f); if(readbytes == 0) - m_log << MSG::ERROR << "Empty file read!" << size << endmsg; + ATH_MSG_ERROR( "Empty file read!" << size ); fclose (f); std::string sdata_Th0(sbuf.begin(),sbuf.begin()+size); @@ -203,44 +196,43 @@ StatusCode TriggerCoolSvc::writeToDBPhi(const std::string& phifolder, const std: } - //m_log << MSG::DEBUG << " Data++++++" << sdata_Th0_new<<endmsg; + //ATH_MSG_DEBUG( " Data++++++" << sdata_Th0_new ); //std::cout<< "dentro writeToDBPhi ************************88 " <<std::endl; - //m_log << MSG::DEBUG << " folder" << phifolder<<endmsg; - //m_log << MSG::DEBUG << " filename " << filename_CM<<endmsg; + //ATH_MSG_DEBUG( " folder" << phifolder ); + //ATH_MSG_DEBUG( " filename " << filename_CM ); CondAttrListCollection* atrc=0; if (!p_detstore->contains<CondAttrListCollection>(phifolder)) { - m_log << MSG::DEBUG << "Creating new CondAttrListCollection for folder " - << phifolder << endmsg; + ATH_MSG_DEBUG( "Creating new CondAttrListCollection for folder " + << phifolder ); CondAttrListCollection* atrc=new CondAttrListCollection(true); if (StatusCode::SUCCESS!=p_detstore->record(atrc,phifolder)) { - m_log << MSG::ERROR << "Could not create CondAttrListCollection " << - phifolder << endmsg; + ATH_MSG_ERROR( "Could not create CondAttrListCollection " << + phifolder ); return StatusCode::FAILURE; } } // do const cast here so we can add to already exisiting collections const CondAttrListCollection* catrc=0; - m_log << MSG::DEBUG << "Attempting to retrieve collection (const)" << endmsg; + ATH_MSG_DEBUG( "Attempting to retrieve collection (const)" ); if (StatusCode::SUCCESS!=p_detstore->retrieve(catrc,phifolder)) { - m_log << MSG::ERROR << "Could not retrieve CondAttrListCollection " << - phifolder << endmsg; + ATH_MSG_ERROR( "Could not retrieve CondAttrListCollection " << + phifolder ); return StatusCode::FAILURE; } atrc=const_cast<CondAttrListCollection*>(catrc); if (atrc==0) { - m_log << MSG::ERROR << "Could not retrieve non-const pointer to atrc" << - endmsg; + ATH_MSG_ERROR( "Could not retrieve non-const pointer to atrc" ); return StatusCode::FAILURE; } // check channel zero is not being requested if (chan==0) { - m_log << MSG::ERROR << "Channel 0 cannot be used" << endmsg; + ATH_MSG_ERROR( "Channel 0 cannot be used" ); return StatusCode::FAILURE; } - m_log << MSG::DEBUG << "About to create AttributeListSpecification" << endmsg; + ATH_MSG_DEBUG( "About to create AttributeListSpecification" ); coral::AttributeListSpecification* aspec=0; aspec=new coral::AttributeListSpecification(); @@ -258,10 +250,10 @@ StatusCode TriggerCoolSvc::writeToDBPhi(const std::string& phifolder, const std: std::ostringstream atrstring; alist.print(atrstring); - m_log << MSG::DEBUG << "About to add channel to: " << atrc << endmsg; + ATH_MSG_DEBUG( "About to add channel to: " << atrc ); std::cout<< "channel ************************ " <<chan<<std::endl; atrc->add(channum,alist); - m_log << MSG::DEBUG << " craetion folder" << endmsg; + ATH_MSG_DEBUG( " creation folder" ); return StatusCode::SUCCESS; @@ -274,8 +266,8 @@ StatusCode TriggerCoolSvc::getData(const std::string& phifolder, const int chan) std::string th0=""; std::string info=""; if (StatusCode::SUCCESS!=p_detstore->retrieve(atrc,phifolder)) { - log << MSG::ERROR << "getData failed for folder " << phifolder << " channel " - << chan << endmsg; + ATH_MSG_ERROR( "getData failed for folder " << phifolder << " channel " + << chan ); return StatusCode::FAILURE; } CondAttrListCollection::ChanNum channum=chan; @@ -289,9 +281,9 @@ StatusCode TriggerCoolSvc::getData(const std::string& phifolder, const int chan) if (log.level() < MSG::INFO) { std::ostringstream atrstring; atr.toOutputStream(atrstring); - log << MSG::DEBUG << "read Channum " << channum << " atrlist: " << atrstring.str() << endmsg; + ATH_MSG_DEBUG( "read Channum " << channum << " atrlist: " << atrstring.str() ); } else { - log << MSG::ERROR << "Invalid channel number" << endmsg; + ATH_MSG_ERROR( "Invalid channel number" ); return StatusCode::FAILURE; } return StatusCode::SUCCESS; -- GitLab