Skip to content
Snippets Groups Projects
Verified Commit 1d4e06a5 authored by Tadej Novak's avatar Tadej Novak
Browse files

Make tracking geometry IoV dependencies less hacky

parent 24f2f375
No related branches found
No related tags found
No related merge requests found
Showing
with 105 additions and 121 deletions
...@@ -332,7 +332,8 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs): ...@@ -332,7 +332,8 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs):
def PixelAlignCondAlgCfg(flags, name="PixelAlignCondAlg", **kwargs): def PixelAlignCondAlgCfg(flags, name="PixelAlignCondAlg", **kwargs):
"""Return a ComponentAccumulator with configured PixelAlignCondAlg""" """Return a ComponentAccumulator with configured PixelAlignCondAlg"""
acc = ComponentAccumulator() from PixelGeoModel.PixelGeoModelConfig import PixelGeoModelCfg
acc = PixelGeoModelCfg(flags)
if flags.GeoModel.Align.Dynamic: if flags.GeoModel.Align.Dynamic:
acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL1/ID","/Indet/AlignL1/ID",className="CondAttrListCollection")) acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL1/ID","/Indet/AlignL1/ID",className="CondAttrListCollection"))
...@@ -473,16 +474,26 @@ def PixelDetectorElementCondAlgCfg(flags, name="PixelDetectorElementCondAlg", ** ...@@ -473,16 +474,26 @@ def PixelDetectorElementCondAlgCfg(flags, name="PixelDetectorElementCondAlg", **
kwargs.setdefault("PixelAlignmentStore", "PixelAlignmentStore") kwargs.setdefault("PixelAlignmentStore", "PixelAlignmentStore")
kwargs.setdefault("WriteKey", "PixelDetectorElementCollection") kwargs.setdefault("WriteKey", "PixelDetectorElementCollection")
def merge_lists(a, b):
a.extend([item for item in b if item not in a])
return a
alg=CompFactory.PixelDetectorElementCondAlg(name, **kwargs) # FIXME
alg._descriptors['MuonManagerKey'].semantics.merge = merge_lists # add artifical dependencies to SCT, TRT and Muon
alg._descriptors['TRT_DetEltContKey'].semantics.merge = merge_lists # conditions algs to ensure that the IOV
alg._descriptors['SCTAlignmentStore'].semantics.merge = merge_lists # is identical to the IOV of the tracking geometry
acc.addCondAlgo(alg) if flags.Detector.GeometryMuon and flags.Muon.enableAlignment:
from MuonConfig.MuonGeometryConfig import MuonDetectorCondAlgCfg
acc.merge(MuonDetectorCondAlgCfg(flags))
kwargs.setdefault("MuonManagerKey", "MuonDetectorManager")
if flags.Detector.GeometryTRT:
from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
acc.merge(TRT_ReadoutGeometryCfg(flags))
kwargs.setdefault("TRT_DetEltContKey", "TRT_DetElementContainer")
if flags.Detector.GeometrySCT:
from SCT_GeoModel.SCT_GeoModelConfig import SCT_AlignmentCfg
acc.merge(SCT_AlignmentCfg(flags))
kwargs.setdefault("SCTAlignmentStore", "SCTAlignmentStore")
# end of hack
acc.addCondAlgo(CompFactory.PixelDetectorElementCondAlg(name, **kwargs))
return acc return acc
def PixelDistortionAlgCfg(flags, name="PixelDistortionAlg", **kwargs): def PixelDistortionAlgCfg(flags, name="PixelDistortionAlg", **kwargs):
......
...@@ -38,9 +38,9 @@ StatusCode PixelDetectorElementCondAlg::initialize() ...@@ -38,9 +38,9 @@ StatusCode PixelDetectorElementCondAlg::initialize()
ATH_CHECK(detStore()->retrieve(m_detManager, m_detManagerName)); ATH_CHECK(detStore()->retrieve(m_detManager, m_detManagerName));
// used only if they exist // used only if they exist
ATH_CHECK(m_trtDetElContKey.initialize()); ATH_CHECK(m_trtDetElContKey.initialize(SG::AllowEmpty));
ATH_CHECK(m_muonManagerKey.initialize()); ATH_CHECK(m_muonManagerKey.initialize(SG::AllowEmpty));
ATH_CHECK(m_SCT_readKey.initialize()); ATH_CHECK(m_SCT_readKey.initialize(SG::AllowEmpty));
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
...@@ -83,28 +83,31 @@ StatusCode PixelDetectorElementCondAlg::execute(const EventContext& ctx) const ...@@ -83,28 +83,31 @@ StatusCode PixelDetectorElementCondAlg::execute(const EventContext& ctx) const
// Add dependency for IOV range // Add dependency for IOV range
writeHandle.addDependency(readHandle); writeHandle.addDependency(readHandle);
// Additional dependencies for IOV range to limit lifetime to TrackingGeometry lifetime // Additional dependencies for IOV range to limit lifetime to TrackingGeometry lifetime
for (const SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> &key :m_muonManagerKey ) { if (!m_muonManagerKey.empty()) {
SG::ReadCondHandle<MuonGM::MuonDetectorManager> muonDependency{key, ctx}; SG::ReadCondHandle<MuonGM::MuonDetectorManager> muonDependency{m_muonManagerKey, ctx};
if (*muonDependency != nullptr){ if (*muonDependency != nullptr) {
writeHandle.addDependency(muonDependency); writeHandle.addDependency(muonDependency);
} else { } else {
ATH_MSG_WARNING("MuonManager not found, ignoring Muons for PixelDetElement lifetime"); ATH_MSG_ERROR("MuonManager not found but configured");
return StatusCode::FAILURE;
} }
} }
for (const SG::ReadCondHandleKey<InDetDD::TRT_DetElementContainer> &key :m_trtDetElContKey ) { if (!m_trtDetElContKey.empty()) {
SG::ReadCondHandle<InDetDD::TRT_DetElementContainer> trtDependency{key, ctx}; SG::ReadCondHandle<InDetDD::TRT_DetElementContainer> trtDependency{m_trtDetElContKey, ctx};
if (*trtDependency != nullptr){ if (*trtDependency != nullptr) {
writeHandle.addDependency(trtDependency); writeHandle.addDependency(trtDependency);
} else { } else {
ATH_MSG_WARNING("TRT DetEls not found, ignoring TRT for PixelDetElement lifetime"); ATH_MSG_ERROR("TRT DetEls not found but configured");
return StatusCode::FAILURE;
} }
} }
for (const SG::ReadCondHandleKey<GeoAlignmentStore> &key :m_SCT_readKey ) { if (!m_SCT_readKey.empty()) {
SG::ReadCondHandle<GeoAlignmentStore> sctDependency{key, ctx}; SG::ReadCondHandle<GeoAlignmentStore> sctDependency{m_SCT_readKey, ctx};
if (*sctDependency != nullptr){ if (*sctDependency != nullptr) {
writeHandle.addDependency(sctDependency); writeHandle.addDependency(sctDependency);
} else { } else {
ATH_MSG_WARNING("SCT AlignmentStore not found, ignoring SCT for PixelDetElement lifetime"); ATH_MSG_ERROR("SCT AlignmentStore not found but configured");
return StatusCode::FAILURE;
} }
} }
......
...@@ -46,12 +46,12 @@ class PixelDetectorElementCondAlg : public AthReentrantAlgorithm ...@@ -46,12 +46,12 @@ class PixelDetectorElementCondAlg : public AthReentrantAlgorithm
// The DetElement Collection must have a life time <= the Tracking Geometry due to DetElt-> Surface -> Layer connection, // The DetElement Collection must have a life time <= the Tracking Geometry due to DetElt-> Surface -> Layer connection,
// which is why we intersect with the IOV Ranges from the TG's dependencies. // which is why we intersect with the IOV Ranges from the TG's dependencies.
SG::ReadCondHandleKeyArray<MuonGM::MuonDetectorManager> m_muonManagerKey SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> m_muonManagerKey
{this, "MuonManagerKey", {}, "MuonManager ReadKey for IOV Range intersection"}; {this, "MuonManagerKey", "", "MuonManager ReadKey for IOV Range intersection"};
SG::ReadCondHandleKeyArray<InDetDD::TRT_DetElementContainer> m_trtDetElContKey SG::ReadCondHandleKey<InDetDD::TRT_DetElementContainer> m_trtDetElContKey
{this, "TRT_DetEltContKey", {}, "TRT ReadKey for IOV Range intersection"}; {this, "TRT_DetEltContKey", "", "TRT ReadKey for IOV Range intersection"};
SG::ReadCondHandleKeyArray<GeoAlignmentStore> m_SCT_readKey SG::ReadCondHandleKey<GeoAlignmentStore> m_SCT_readKey
{this, "SCTAlignmentStore", {}, "SCTAlignmentStore ReadKey for IOV Range intersection "}; {this, "SCTAlignmentStore", "", "SCTAlignmentStore ReadKey for IOV Range intersection "};
ServiceHandle<ICondSvc> m_condSvc{this, "CondSvc", "CondSvc"}; ServiceHandle<ICondSvc> m_condSvc{this, "CondSvc", "CondSvc"};
......
...@@ -68,18 +68,28 @@ def SCT_ConfigurationCondAlgCfg(flags, name="SCT_ConfigurationCondAlg", **kwargs ...@@ -68,18 +68,28 @@ def SCT_ConfigurationCondAlgCfg(flags, name="SCT_ConfigurationCondAlg", **kwargs
def SCT_DetectorElementCondAlgCfg(flags, name="SCT_DetectorElementCondAlg", **kwargs): def SCT_DetectorElementCondAlgCfg(flags, name="SCT_DetectorElementCondAlg", **kwargs):
def merge_lists(a, b):
a.extend([item for item in b if item not in a])
return a
alg = CompFactory.SCT_DetectorElementCondAlg(name, **kwargs)
alg._descriptors["MuonManagerKey"].semantics.merge = merge_lists
alg._descriptors["TRT_DetEltContKey"].semantics.merge = merge_lists
alg._descriptors["PixelAlignmentStore"].semantics.merge = merge_lists
from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConfig import SCT_AlignCondAlgCfg from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConfig import SCT_AlignCondAlgCfg
acc = SCT_AlignCondAlgCfg(flags) acc = SCT_AlignCondAlgCfg(flags)
acc.addCondAlgo(alg)
# FIXME
# add artifical dependencies to SCT, TRT and Muon
# conditions algs to ensure that the IOV
# is identical to the IOV of the tracking geometry
if flags.Detector.GeometryMuon and flags.Muon.enableAlignment:
from MuonConfig.MuonGeometryConfig import MuonDetectorCondAlgCfg
acc.merge(MuonDetectorCondAlgCfg(flags))
kwargs.setdefault("MuonManagerKey", "MuonDetectorManager")
if flags.Detector.GeometryTRT:
from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
acc.merge(TRT_ReadoutGeometryCfg(flags))
kwargs.setdefault("TRT_DetEltContKey", "TRT_DetElementContainer")
if flags.Detector.GeometryPixel:
from PixelGeoModel.PixelGeoModelConfig import PixelAlignmentCfg
acc.merge(PixelAlignmentCfg(flags))
kwargs.setdefault("PixelAlignmentStore", "PixelAlignmentStore")
# end of hack
acc.addCondAlgo(CompFactory.SCT_DetectorElementCondAlg(name, **kwargs))
return acc return acc
......
...@@ -37,9 +37,9 @@ StatusCode SCT_DetectorElementCondAlg::initialize() ...@@ -37,9 +37,9 @@ StatusCode SCT_DetectorElementCondAlg::initialize()
ATH_CHECK(detStore()->retrieve(m_detManager, m_detManagerName)); ATH_CHECK(detStore()->retrieve(m_detManager, m_detManagerName));
// used only if they exist // used only if they exist
ATH_CHECK(m_trtDetElContKey.initialize()); ATH_CHECK(m_trtDetElContKey.initialize(SG::AllowEmpty));
ATH_CHECK(m_muonManagerKey.initialize()); ATH_CHECK(m_muonManagerKey.initialize(SG::AllowEmpty));
ATH_CHECK(m_pixelReadKey.initialize()); ATH_CHECK(m_pixelReadKey.initialize(SG::AllowEmpty));
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
...@@ -82,28 +82,31 @@ StatusCode SCT_DetectorElementCondAlg::execute(const EventContext& ctx) const ...@@ -82,28 +82,31 @@ StatusCode SCT_DetectorElementCondAlg::execute(const EventContext& ctx) const
// Add dependency // Add dependency
writeHandle.addDependency(readHandle); writeHandle.addDependency(readHandle);
// Additional dependencies for IOV range to limit lifetime to TrackingGeometry lifetime // Additional dependencies for IOV range to limit lifetime to TrackingGeometry lifetime
for (const SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> &key :m_muonManagerKey ) { if (!m_muonManagerKey.empty()) {
SG::ReadCondHandle<MuonGM::MuonDetectorManager> muonDependency{key, ctx}; SG::ReadCondHandle<MuonGM::MuonDetectorManager> muonDependency{m_muonManagerKey, ctx};
if (*muonDependency != nullptr){ if (*muonDependency != nullptr) {
writeHandle.addDependency(muonDependency); writeHandle.addDependency(muonDependency);
} else { } else {
ATH_MSG_WARNING("MuonManager not found, ignoring Muons for SCT_DetElement lifetime"); ATH_MSG_ERROR("MuonManager not found but configured");
return StatusCode::FAILURE;
} }
} }
for (const SG::ReadCondHandleKey<InDetDD::TRT_DetElementContainer> &key :m_trtDetElContKey ) { if (!m_trtDetElContKey.empty()) {
SG::ReadCondHandle<InDetDD::TRT_DetElementContainer> trtDependency{key, ctx}; SG::ReadCondHandle<InDetDD::TRT_DetElementContainer> trtDependency{m_trtDetElContKey, ctx};
if (*trtDependency != nullptr){ if (*trtDependency != nullptr) {
writeHandle.addDependency(trtDependency); writeHandle.addDependency(trtDependency);
} else { } else {
ATH_MSG_WARNING("TRT DetEls not found, ignoring TRT for SCT_DetElement lifetime"); ATH_MSG_ERROR("TRT DetEls not found but configured");
return StatusCode::FAILURE;
} }
} }
for (const SG::ReadCondHandleKey<GeoAlignmentStore> &key :m_pixelReadKey ) { if (!m_pixelReadKey.empty()) {
SG::ReadCondHandle<GeoAlignmentStore> pixelDependency{key, ctx}; SG::ReadCondHandle<GeoAlignmentStore> pixelDependency{m_pixelReadKey, ctx};
if (*pixelDependency != nullptr){ if (*pixelDependency != nullptr) {
writeHandle.addDependency(pixelDependency); writeHandle.addDependency(pixelDependency);
} else { } else {
ATH_MSG_WARNING("Pixel AlignmentStore not found, ignoring Pixels for SCT_DetElement lifetime"); ATH_MSG_ERROR("Pixel AlignmentStore not found but configured");
return StatusCode::FAILURE;
} }
} }
......
...@@ -44,12 +44,12 @@ class SCT_DetectorElementCondAlg : public AthReentrantAlgorithm ...@@ -44,12 +44,12 @@ class SCT_DetectorElementCondAlg : public AthReentrantAlgorithm
// The DetElement Collection must have a life time <= the Tracking Geometry due to DetElt-> Surface -> Layer connection, // The DetElement Collection must have a life time <= the Tracking Geometry due to DetElt-> Surface -> Layer connection,
// which is why we intersect with the IOV Ranges from the TG's dependencies. // which is why we intersect with the IOV Ranges from the TG's dependencies.
SG::ReadCondHandleKeyArray<MuonGM::MuonDetectorManager> m_muonManagerKey SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> m_muonManagerKey
{this, "MuonManagerKey", {}, "MuonManager ReadKey for IOV Range intersection"}; {this, "MuonManagerKey", "", "MuonManager ReadKey for IOV Range intersection"};
SG::ReadCondHandleKeyArray<InDetDD::TRT_DetElementContainer> m_trtDetElContKey SG::ReadCondHandleKey<InDetDD::TRT_DetElementContainer> m_trtDetElContKey
{this, "TRT_DetEltContKey", {}, "TRT ReadKey for IOV Range intersection"}; {this, "TRT_DetEltContKey", "", "TRT ReadKey for IOV Range intersection"};
SG::ReadCondHandleKeyArray<GeoAlignmentStore> m_pixelReadKey SG::ReadCondHandleKey<GeoAlignmentStore> m_pixelReadKey
{this, "PixelAlignmentStore", {}, "PixelAlignmentStore ReadKey for IOV Range intersection"}; {this, "PixelAlignmentStore", "", "PixelAlignmentStore ReadKey for IOV Range intersection"};
ServiceHandle<ICondSvc> m_condSvc{this, "CondSvc", "CondSvc"}; ServiceHandle<ICondSvc> m_condSvc{this, "CondSvc", "CondSvc"};
std::string m_detManagerName; std::string m_detManagerName;
......
...@@ -99,7 +99,8 @@ def MuonDetectorToolCfg(flags): ...@@ -99,7 +99,8 @@ def MuonDetectorToolCfg(flags):
def MuonAlignmentCondAlgCfg(flags): def MuonAlignmentCondAlgCfg(flags):
acc = MuonIdHelperSvcCfg(flags) acc = MuonGeoModelToolCfg(flags)
acc.merge(MuonIdHelperSvcCfg(flags))
# This is all migrated from MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonAlignConfig.py # This is all migrated from MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonAlignConfig.py
...@@ -169,12 +170,17 @@ def MuonDetectorCondAlgCfg(flags): ...@@ -169,12 +170,17 @@ def MuonDetectorCondAlgCfg(flags):
return acc return acc
def MuonGeoModelCfg(flags, forceDisableAlignment=False): def MuonGeoModelToolCfg(flags):
acc=GeoModelCfg(flags) acc = GeoModelCfg(flags)
gms=acc.getPrimary() gms = acc.getPrimary()
detTool = acc.popToolsAndMerge(MuonDetectorToolCfg(flags)) detTool = acc.popToolsAndMerge(MuonDetectorToolCfg(flags))
detTool.FillCacheInitTime = 0 # We do not need to fill cache for the MuonGeoModel MuonDetectorTool, just for the condAlg detTool.FillCacheInitTime = 0 # We do not need to fill cache for the MuonGeoModel MuonDetectorTool, just for the condAlg
gms.DetectorTools += [ detTool ] gms.DetectorTools += [ detTool ]
return acc
def MuonGeoModelCfg(flags, forceDisableAlignment=False):
acc = MuonGeoModelToolCfg(flags)
if flags.Muon.enableAlignment and not forceDisableAlignment: if flags.Muon.enableAlignment and not forceDisableAlignment:
acc.merge(MuonDetectorCondAlgCfg(flags)) acc.merge(MuonDetectorCondAlgCfg(flags))
......
...@@ -152,10 +152,10 @@ class ConfiguredTrackingGeometryCondAlg( Trk__TrackingGeometryCondAlg ) : ...@@ -152,10 +152,10 @@ class ConfiguredTrackingGeometryCondAlg( Trk__TrackingGeometryCondAlg ) :
prependList.extend(appendList) prependList.extend(appendList)
cond_seq._Configurable__children = prependList cond_seq._Configurable__children = prependList
MuonManagerKey = ['MuonDetectorManager'] if DetFlags.Muon_on() else [] MuonManagerKey = "MuonDetectorManager" if DetFlags.Muon_on() else ""
TRT_DetEltKey = ["TRT_DetElementContainer"] if DetFlags.TRT_on() else [] TRT_DetEltKey = "TRT_DetElementContainer" if DetFlags.TRT_on() else ""
SCTAlignStore = ["SCTAlignmentStore"] if DetFlags.SCT_on() else [] SCTAlignStore = "SCTAlignmentStore" if DetFlags.SCT_on() else ""
PixelAlignStore = ["PixelAlignmentStore"] if DetFlags.pixel_on() else [] PixelAlignStore = "PixelAlignmentStore" if DetFlags.pixel_on() else ""
modifyCondAlg('SCT_DetectorElementCondAlg', MuonManagerKey = MuonManagerKey, modifyCondAlg('SCT_DetectorElementCondAlg', MuonManagerKey = MuonManagerKey,
TRT_DetEltContKey = TRT_DetEltKey, TRT_DetEltContKey = TRT_DetEltKey,
......
...@@ -71,7 +71,7 @@ def _getInDetTrackingGeometryBuilder(name, flags, ...@@ -71,7 +71,7 @@ def _getInDetTrackingGeometryBuilder(name, flags,
# Pixel # Pixel
if flags.Detector.GeometryPixel: if flags.Detector.GeometryPixel:
# for Pixel DetectorElement conditions data : # for Pixel DetectorElement conditions data:
from PixelGeoModel.PixelGeoModelConfig import PixelReadoutGeometryCfg from PixelGeoModel.PixelGeoModelConfig import PixelReadoutGeometryCfg
result.merge(PixelReadoutGeometryCfg(flags)) result.merge(PixelReadoutGeometryCfg(flags))
...@@ -106,20 +106,8 @@ def _getInDetTrackingGeometryBuilder(name, flags, ...@@ -106,20 +106,8 @@ def _getInDetTrackingGeometryBuilder(name, flags,
binnings += [PixelLayerBinning] binnings += [PixelLayerBinning]
colors += [3] colors += [3]
# add artifical dependencies to Pixel DetectorElement
# conditions algs to ensure that the IOV
# is identical to the IOV of the tracking geoemtry cond alg
from PixelConditionsAlgorithms.PixelConditionsConfig import PixelDetectorElementCondAlgCfg
result.merge(PixelDetectorElementCondAlgCfg(
flags,
MuonManagerKey=[
"MuonDetectorManager"] if flags.Muon.enableAlignment and flags.Detector.GeometryMuon else [],
TRT_DetEltContKey=[
"TRT_DetElementContainer"] if flags.Detector.GeometryTRT else [],
SCTAlignmentStore=["SCTAlignmentStore"] if flags.Detector.GeometrySCT else []))
if flags.Detector.GeometrySCT: if flags.Detector.GeometrySCT:
# for SCT DetectorElement conditions data : # for SCT DetectorElement conditions data:
from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
result.merge(SCT_ReadoutGeometryCfg(flags)) result.merge(SCT_ReadoutGeometryCfg(flags))
...@@ -154,18 +142,8 @@ def _getInDetTrackingGeometryBuilder(name, flags, ...@@ -154,18 +142,8 @@ def _getInDetTrackingGeometryBuilder(name, flags,
binnings += [SCT_LayerBinning] binnings += [SCT_LayerBinning]
colors += [4] colors += [4]
from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConfig import (
SCT_DetectorElementCondAlgCfg)
result.merge(SCT_DetectorElementCondAlgCfg(
flags,
MuonManagerKey=[
"MuonDetectorManager"] if flags.Muon.enableAlignment and flags.Detector.GeometryMuon else [],
TRT_DetEltContKey=[
"TRT_DetElementContainer"] if flags.Detector.GeometryTRT else [],
PixelAlignmentStore=["PixelAlignmentStore"] if flags.Detector.GeometryPixel else []))
if flags.Detector.GeometryTRT: if flags.Detector.GeometryTRT:
# for TRT DetectorElement conditions data : # for TRT DetectorElement conditions data:
from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
result.merge(TRT_ReadoutGeometryCfg(flags)) result.merge(TRT_ReadoutGeometryCfg(flags))
...@@ -705,33 +683,6 @@ def TrackingGeometryCondAlgCfg(flags, name='AtlasTrackingGeometryCondAlg', doMat ...@@ -705,33 +683,6 @@ def TrackingGeometryCondAlgCfg(flags, name='AtlasTrackingGeometryCondAlg', doMat
GeometryProcessors=PrivateToolHandleArray(atlas_geometry_processors)) GeometryProcessors=PrivateToolHandleArray(atlas_geometry_processors))
result.addCondAlgo(condAlg, primary=True) result.addCondAlgo(condAlg, primary=True)
# Hack for Single Threaded Athena: manually move dependencies of SCT_DetectorElementCondAlg
# and PixelDetectorElementCondAlg such that these are executed after their dependencies.
if flags.Concurrency.NumThreads <= 0:
condAlgs = result._conditionsAlgs
dependencies = {"PixelAlignCondAlg",
"SCT_AlignCondAlg",
"TRTAlignCondAlg",
"MuonAlignmentCondAlg",
"MuonDetectorCondAlg",
"CondInputLoader"}
prependList = list()
appendList = list()
for alg in condAlgs:
prepend = False
for name in dependencies:
if str(alg).startswith(name+"("):
prependList.append(alg)
prepend = True
if not prepend:
appendList.append(alg)
prependList.extend(appendList)
condAlgs = prependList
result._conditionsAlgs = condAlgs
# Hack for running on RecExCommon via CAtoGlobalWrapper. # Hack for running on RecExCommon via CAtoGlobalWrapper.
# We need to be sure # We need to be sure
# we set "all" DetectorTools otherwise # we set "all" DetectorTools otherwise
......
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