diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx index 50341442031a0805758723525ee2ec3da5a9f0c4..0b7b74c562cde13366fd5ebb0f5ee3b361718c72 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx @@ -12,7 +12,7 @@ #include <map> SCT_DetectorElementCondAlg::SCT_DetectorElementCondAlg(const std::string& name, ISvcLocator* pSvcLocator) - : ::AthAlgorithm(name, pSvcLocator) + : ::AthReentrantAlgorithm(name, pSvcLocator) , m_readKey{"SCTAlignmentStore", "SCTAlignmentStore"} , m_condSvc{"CondSvc", name} , m_detManager{nullptr} @@ -39,12 +39,12 @@ StatusCode SCT_DetectorElementCondAlg::initialize() return StatusCode::SUCCESS; } -StatusCode SCT_DetectorElementCondAlg::execute() +StatusCode SCT_DetectorElementCondAlg::execute(const EventContext& ctx) const { ATH_MSG_DEBUG("execute " << name()); // ____________ Construct Write Cond Handle and check its validity ____________ - SG::WriteCondHandle<InDetDD::SiDetectorElementCollection> writeHandle{m_writeKey}; + SG::WriteCondHandle<InDetDD::SiDetectorElementCollection> writeHandle{m_writeKey, ctx}; // Do we have a valid Write Cond Handle for current time? if (writeHandle.isValid()) { @@ -65,7 +65,7 @@ StatusCode SCT_DetectorElementCondAlg::execute() EventIDRange rangeW; // ____________ Get Read Cond Object ____________ - SG::ReadCondHandle<GeoAlignmentStore> readHandle{m_readKey}; + SG::ReadCondHandle<GeoAlignmentStore> readHandle{m_readKey, ctx}; const GeoAlignmentStore* readCdo{*readHandle}; if (readCdo==nullptr) { ATH_MSG_FATAL("Null pointer to the read conditions object of " << m_readKey.key()); diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.h index 1cae060980f53bf28a90e1b19481f4e0f7329af0..a24a5f1db3272582a64e3630e43ad19d7418d0b7 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.h @@ -5,7 +5,7 @@ #ifndef SCT_CONDITIONSALGORITHMS_SCT_DETECTORELEMENTCONDALG_H #define SCT_CONDITIONSALGORITHMS_SCT_DETECTORELEMENTCONDALG_H -#include "AthenaBaseComps/AthAlgorithm.h" +#include "AthenaBaseComps/AthReentrantAlgorithm.h" #include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelUtilities/GeoAlignmentStore.h" @@ -19,14 +19,14 @@ namespace InDetDD { class SCT_DetectorManager; } -class SCT_DetectorElementCondAlg : public AthAlgorithm +class SCT_DetectorElementCondAlg : public AthReentrantAlgorithm { public: SCT_DetectorElementCondAlg(const std::string& name, ISvcLocator* pSvcLocator); virtual ~SCT_DetectorElementCondAlg() override = default; virtual StatusCode initialize() override; - virtual StatusCode execute() override; + virtual StatusCode execute(const EventContext& ctx) const override; virtual StatusCode finalize() override; private: