Skip to content
Snippets Groups Projects
Commit 2ebbd483 authored by Susumu Oda's avatar Susumu Oda
Browse files

Make SCT_AlignCondAlg reentrant

parent 4bd7e054
No related branches found
No related tags found
9 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!28528Revert 63f845ae,!27054Atr20369 210,!26342Monopole: Handle fractionally charged particles,!20504Make SCT_AlignCondAlg reentrant (ATLASRECTS-4824)
/*
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());
......
/*
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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment