diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.cxx index fde0af501b58a8dd47608aab6acf734ebd2c3b4c..fd9581a0323caa30e4b7338a03124656028614e9 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "SCT_AlignCondAlg.h" @@ -10,7 +10,7 @@ #include <memory> SCT_AlignCondAlg::SCT_AlignCondAlg(const std::string& name, ISvcLocator* pSvcLocator) - : ::AthAlgorithm(name, pSvcLocator) + : ::AthReentrantAlgorithm(name, pSvcLocator) , m_writeKey{"SCTAlignmentStore", "SCTAlignmentStore"} , m_condSvc{"CondSvc", name} , m_detManager{nullptr} @@ -44,12 +44,12 @@ StatusCode SCT_AlignCondAlg::initialize() return StatusCode::SUCCESS; } -StatusCode SCT_AlignCondAlg::execute() +StatusCode SCT_AlignCondAlg::execute(const EventContext& ctx) const { ATH_MSG_DEBUG("execute " << name()); // ____________ Construct Write Cond Handle and check its validity ____________ - SG::WriteCondHandle<GeoAlignmentStore> writeHandle{m_writeKey}; + SG::WriteCondHandle<GeoAlignmentStore> writeHandle{m_writeKey, ctx}; // Do we have a valid Write Cond Handle for current time? if (writeHandle.isValid()) { @@ -72,7 +72,7 @@ StatusCode SCT_AlignCondAlg::execute() if (not m_useDynamicAlignFolders.value()) { // Static // ____________ Get Read Cond Object ____________ - SG::ReadCondHandle<AlignableTransformContainer> readHandleStatic{m_readKeyStatic}; + SG::ReadCondHandle<AlignableTransformContainer> readHandleStatic{m_readKeyStatic, ctx}; const AlignableTransformContainer* readCdoStatic{*readHandleStatic}; if (readCdoStatic==nullptr) { ATH_MSG_FATAL("Null pointer to the read conditions object of " << m_readKeyStatic.key()); @@ -91,19 +91,19 @@ StatusCode SCT_AlignCondAlg::execute() } } else { // Dynamic // ____________ Get Read Cond Object ____________ - SG::ReadCondHandle<CondAttrListCollection> readHandleDynamicL1{m_readKeyDynamicL1}; + SG::ReadCondHandle<CondAttrListCollection> readHandleDynamicL1{m_readKeyDynamicL1, ctx}; const CondAttrListCollection* readCdoDynamicL1{*readHandleDynamicL1}; if (readCdoDynamicL1==nullptr) { ATH_MSG_FATAL("Null pointer to the read conditions object of " << m_readKeyDynamicL1.key()); return StatusCode::FAILURE; } - SG::ReadCondHandle<CondAttrListCollection> readHandleDynamicL2{m_readKeyDynamicL2}; + SG::ReadCondHandle<CondAttrListCollection> readHandleDynamicL2{m_readKeyDynamicL2, ctx}; const CondAttrListCollection* readCdoDynamicL2{*readHandleDynamicL2}; if (readCdoDynamicL2==nullptr) { ATH_MSG_FATAL("Null pointer to the read conditions object of " << readHandleDynamicL2.key()); return StatusCode::FAILURE; } - SG::ReadCondHandle<AlignableTransformContainer> readHandleDynamicL3{m_readKeyDynamicL3}; + SG::ReadCondHandle<AlignableTransformContainer> readHandleDynamicL3{m_readKeyDynamicL3, ctx}; const AlignableTransformContainer* readCdoDynamicL3{*readHandleDynamicL3}; if (readCdoDynamicL3==nullptr) { ATH_MSG_FATAL("Null pointer to the read conditions object of " << readHandleDynamicL3.key()); diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.h index f222a292abbd96e920e222228507f87cc4162132..daab6ebb54b622910bd3cd3efad103bafd2e9d45 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_AlignCondAlg.h @@ -1,11 +1,11 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef SCT_CONDITIONSALGORITHMS_SCT_ALIGNCONDALG_H #define SCT_CONDITIONSALGORITHMS_SCT_ALIGNCONDALG_H -#include "AthenaBaseComps/AthAlgorithm.h" +#include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "StoreGate/ReadCondHandleKey.h" #include "StoreGate/WriteCondHandleKey.h" @@ -19,14 +19,14 @@ namespace InDetDD { class SCT_DetectorManager; } -class SCT_AlignCondAlg : public AthAlgorithm +class SCT_AlignCondAlg : public AthReentrantAlgorithm { public: SCT_AlignCondAlg(const std::string& name, ISvcLocator* pSvcLocator); virtual ~SCT_AlignCondAlg() override = default; virtual StatusCode initialize() override; - virtual StatusCode execute() override; + virtual StatusCode execute(const EventContext& ctx) const override; virtual StatusCode finalize() override; private: