diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py index e5bc740e4bf4134dc74a8268329ba68ad4405ac8..7cc5b4bcfc6b7fde2d4b33986aabde265c8931af 100644 --- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py +++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py @@ -332,7 +332,8 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs): def PixelAlignCondAlgCfg(flags, name="PixelAlignCondAlg", **kwargs): """Return a ComponentAccumulator with configured PixelAlignCondAlg""" - acc = ComponentAccumulator() + from PixelGeoModel.PixelGeoModelConfig import PixelGeoModelCfg + acc = PixelGeoModelCfg(flags) if flags.GeoModel.Align.Dynamic: acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL1/ID","/Indet/AlignL1/ID",className="CondAttrListCollection")) @@ -473,16 +474,26 @@ def PixelDetectorElementCondAlgCfg(flags, name="PixelDetectorElementCondAlg", ** kwargs.setdefault("PixelAlignmentStore", "PixelAlignmentStore") 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) - alg._descriptors['MuonManagerKey'].semantics.merge = merge_lists - alg._descriptors['TRT_DetEltContKey'].semantics.merge = merge_lists - alg._descriptors['SCTAlignmentStore'].semantics.merge = merge_lists - 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.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 def PixelDistortionAlgCfg(flags, name="PixelDistortionAlg", **kwargs): diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDetectorElementCondAlg.cxx b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDetectorElementCondAlg.cxx index 5fee720126b91856786a2f89a8c92f00a38c8975..e1b8e276e66e91725bd497c497a78381cef7727e 100644 --- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDetectorElementCondAlg.cxx +++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDetectorElementCondAlg.cxx @@ -38,9 +38,9 @@ StatusCode PixelDetectorElementCondAlg::initialize() ATH_CHECK(detStore()->retrieve(m_detManager, m_detManagerName)); // used only if they exist - ATH_CHECK(m_trtDetElContKey.initialize()); - ATH_CHECK(m_muonManagerKey.initialize()); - ATH_CHECK(m_SCT_readKey.initialize()); + ATH_CHECK(m_trtDetElContKey.initialize(SG::AllowEmpty)); + ATH_CHECK(m_muonManagerKey.initialize(SG::AllowEmpty)); + ATH_CHECK(m_SCT_readKey.initialize(SG::AllowEmpty)); return StatusCode::SUCCESS; } @@ -83,28 +83,31 @@ StatusCode PixelDetectorElementCondAlg::execute(const EventContext& ctx) const // Add dependency for IOV range writeHandle.addDependency(readHandle); // Additional dependencies for IOV range to limit lifetime to TrackingGeometry lifetime - for (const SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> &key :m_muonManagerKey ) { - SG::ReadCondHandle<MuonGM::MuonDetectorManager> muonDependency{key, ctx}; - if (*muonDependency != nullptr){ + if (!m_muonManagerKey.empty()) { + SG::ReadCondHandle<MuonGM::MuonDetectorManager> muonDependency{m_muonManagerKey, ctx}; + if (*muonDependency != nullptr) { writeHandle.addDependency(muonDependency); } 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 ) { - SG::ReadCondHandle<InDetDD::TRT_DetElementContainer> trtDependency{key, ctx}; - if (*trtDependency != nullptr){ + if (!m_trtDetElContKey.empty()) { + SG::ReadCondHandle<InDetDD::TRT_DetElementContainer> trtDependency{m_trtDetElContKey, ctx}; + if (*trtDependency != nullptr) { writeHandle.addDependency(trtDependency); } 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 ) { - SG::ReadCondHandle<GeoAlignmentStore> sctDependency{key, ctx}; - if (*sctDependency != nullptr){ + if (!m_SCT_readKey.empty()) { + SG::ReadCondHandle<GeoAlignmentStore> sctDependency{m_SCT_readKey, ctx}; + if (*sctDependency != nullptr) { writeHandle.addDependency(sctDependency); } 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; } } diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDetectorElementCondAlg.h b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDetectorElementCondAlg.h index 6c8561bcdc3e85104f15283c859530db5ddd55eb..0c085e2ff399384546265b06d2d4f9778c1520bb 100644 --- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDetectorElementCondAlg.h +++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/src/PixelDetectorElementCondAlg.h @@ -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, // which is why we intersect with the IOV Ranges from the TG's dependencies. - SG::ReadCondHandleKeyArray<MuonGM::MuonDetectorManager> m_muonManagerKey - {this, "MuonManagerKey", {}, "MuonManager ReadKey for IOV Range intersection"}; - SG::ReadCondHandleKeyArray<InDetDD::TRT_DetElementContainer> m_trtDetElContKey - {this, "TRT_DetEltContKey", {}, "TRT ReadKey for IOV Range intersection"}; - SG::ReadCondHandleKeyArray<GeoAlignmentStore> m_SCT_readKey - {this, "SCTAlignmentStore", {}, "SCTAlignmentStore ReadKey for IOV Range intersection "}; + SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> m_muonManagerKey + {this, "MuonManagerKey", "", "MuonManager ReadKey for IOV Range intersection"}; + SG::ReadCondHandleKey<InDetDD::TRT_DetElementContainer> m_trtDetElContKey + {this, "TRT_DetEltContKey", "", "TRT ReadKey for IOV Range intersection"}; + SG::ReadCondHandleKey<GeoAlignmentStore> m_SCT_readKey + {this, "SCTAlignmentStore", "", "SCTAlignmentStore ReadKey for IOV Range intersection "}; ServiceHandle<ICondSvc> m_condSvc{this, "CondSvc", "CondSvc"}; diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/python/SCT_ConditionsAlgorithmsConfig.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/python/SCT_ConditionsAlgorithmsConfig.py index 34e2650f8a8991d354574e0a9d8bb0e00be68d20..642486715533a24dee96d71c3848ea77ef9e6dd3 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/python/SCT_ConditionsAlgorithmsConfig.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/python/SCT_ConditionsAlgorithmsConfig.py @@ -68,18 +68,28 @@ def SCT_ConfigurationCondAlgCfg(flags, name="SCT_ConfigurationCondAlg", **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 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 diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx index 8dc7f623ac57327f1b87d8f7a169de1b82f03397..ae8fb47b3961daf48ff59344a4868ad6f6a7f3b1 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx @@ -37,9 +37,9 @@ StatusCode SCT_DetectorElementCondAlg::initialize() ATH_CHECK(detStore()->retrieve(m_detManager, m_detManagerName)); // used only if they exist - ATH_CHECK(m_trtDetElContKey.initialize()); - ATH_CHECK(m_muonManagerKey.initialize()); - ATH_CHECK(m_pixelReadKey.initialize()); + ATH_CHECK(m_trtDetElContKey.initialize(SG::AllowEmpty)); + ATH_CHECK(m_muonManagerKey.initialize(SG::AllowEmpty)); + ATH_CHECK(m_pixelReadKey.initialize(SG::AllowEmpty)); return StatusCode::SUCCESS; } @@ -82,28 +82,31 @@ StatusCode SCT_DetectorElementCondAlg::execute(const EventContext& ctx) const // Add dependency writeHandle.addDependency(readHandle); // Additional dependencies for IOV range to limit lifetime to TrackingGeometry lifetime - for (const SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> &key :m_muonManagerKey ) { - SG::ReadCondHandle<MuonGM::MuonDetectorManager> muonDependency{key, ctx}; - if (*muonDependency != nullptr){ + if (!m_muonManagerKey.empty()) { + SG::ReadCondHandle<MuonGM::MuonDetectorManager> muonDependency{m_muonManagerKey, ctx}; + if (*muonDependency != nullptr) { writeHandle.addDependency(muonDependency); } 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 ) { - SG::ReadCondHandle<InDetDD::TRT_DetElementContainer> trtDependency{key, ctx}; - if (*trtDependency != nullptr){ + if (!m_trtDetElContKey.empty()) { + SG::ReadCondHandle<InDetDD::TRT_DetElementContainer> trtDependency{m_trtDetElContKey, ctx}; + if (*trtDependency != nullptr) { writeHandle.addDependency(trtDependency); } 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 ) { - SG::ReadCondHandle<GeoAlignmentStore> pixelDependency{key, ctx}; - if (*pixelDependency != nullptr){ + if (!m_pixelReadKey.empty()) { + SG::ReadCondHandle<GeoAlignmentStore> pixelDependency{m_pixelReadKey, ctx}; + if (*pixelDependency != nullptr) { writeHandle.addDependency(pixelDependency); } 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; } } diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.h index 5ce3183f86a452f2799555661915067c08203ca9..79696f7048e45bde0e9f4d9f70d925668153ad26 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.h @@ -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, // which is why we intersect with the IOV Ranges from the TG's dependencies. - SG::ReadCondHandleKeyArray<MuonGM::MuonDetectorManager> m_muonManagerKey - {this, "MuonManagerKey", {}, "MuonManager ReadKey for IOV Range intersection"}; - SG::ReadCondHandleKeyArray<InDetDD::TRT_DetElementContainer> m_trtDetElContKey - {this, "TRT_DetEltContKey", {}, "TRT ReadKey for IOV Range intersection"}; - SG::ReadCondHandleKeyArray<GeoAlignmentStore> m_pixelReadKey - {this, "PixelAlignmentStore", {}, "PixelAlignmentStore ReadKey for IOV Range intersection"}; + SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> m_muonManagerKey + {this, "MuonManagerKey", "", "MuonManager ReadKey for IOV Range intersection"}; + SG::ReadCondHandleKey<InDetDD::TRT_DetElementContainer> m_trtDetElContKey + {this, "TRT_DetEltContKey", "", "TRT ReadKey for IOV Range intersection"}; + SG::ReadCondHandleKey<GeoAlignmentStore> m_pixelReadKey + {this, "PixelAlignmentStore", "", "PixelAlignmentStore ReadKey for IOV Range intersection"}; ServiceHandle<ICondSvc> m_condSvc{this, "CondSvc", "CondSvc"}; std::string m_detManagerName; diff --git a/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py b/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py index 597ef10cd2bc70511cf321f7da0486fb5a3b9634..4400ffa8e469002fdfb2265a3e134cd6f096ecbc 100644 --- a/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py +++ b/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py @@ -99,7 +99,8 @@ def MuonDetectorToolCfg(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 @@ -169,12 +170,17 @@ def MuonDetectorCondAlgCfg(flags): return acc -def MuonGeoModelCfg(flags, forceDisableAlignment=False): - acc=GeoModelCfg(flags) - gms=acc.getPrimary() +def MuonGeoModelToolCfg(flags): + acc = GeoModelCfg(flags) + gms = acc.getPrimary() detTool = acc.popToolsAndMerge(MuonDetectorToolCfg(flags)) detTool.FillCacheInitTime = 0 # We do not need to fill cache for the MuonGeoModel MuonDetectorTool, just for the condAlg gms.DetectorTools += [ detTool ] + return acc + + +def MuonGeoModelCfg(flags, forceDisableAlignment=False): + acc = MuonGeoModelToolCfg(flags) if flags.Muon.enableAlignment and not forceDisableAlignment: acc.merge(MuonDetectorCondAlgCfg(flags)) diff --git a/Tracking/TrkConditions/TrackingGeometryCondAlg/python/AtlasTrackingGeometryCondAlg.py b/Tracking/TrkConditions/TrackingGeometryCondAlg/python/AtlasTrackingGeometryCondAlg.py index 9afa7ce795baf39e573df7b5afbb87c96d18cc3a..0669953c263067b7f7e1865aa4b00850fa8a4b09 100644 --- a/Tracking/TrkConditions/TrackingGeometryCondAlg/python/AtlasTrackingGeometryCondAlg.py +++ b/Tracking/TrkConditions/TrackingGeometryCondAlg/python/AtlasTrackingGeometryCondAlg.py @@ -152,10 +152,10 @@ class ConfiguredTrackingGeometryCondAlg( Trk__TrackingGeometryCondAlg ) : prependList.extend(appendList) cond_seq._Configurable__children = prependList - MuonManagerKey = ['MuonDetectorManager'] if DetFlags.Muon_on() else [] - TRT_DetEltKey = ["TRT_DetElementContainer"] if DetFlags.TRT_on() else [] - SCTAlignStore = ["SCTAlignmentStore"] if DetFlags.SCT_on() else [] - PixelAlignStore = ["PixelAlignmentStore"] if DetFlags.pixel_on() else [] + MuonManagerKey = "MuonDetectorManager" if DetFlags.Muon_on() else "" + TRT_DetEltKey = "TRT_DetElementContainer" if DetFlags.TRT_on() else "" + SCTAlignStore = "SCTAlignmentStore" if DetFlags.SCT_on() else "" + PixelAlignStore = "PixelAlignmentStore" if DetFlags.pixel_on() else "" modifyCondAlg('SCT_DetectorElementCondAlg', MuonManagerKey = MuonManagerKey, TRT_DetEltContKey = TRT_DetEltKey, diff --git a/Tracking/TrkConditions/TrackingGeometryCondAlg/python/AtlasTrackingGeometryCondAlgConfig.py b/Tracking/TrkConditions/TrackingGeometryCondAlg/python/AtlasTrackingGeometryCondAlgConfig.py index 5be1850978bb3ac033cb33d1dfd8b767d400c511..15b0b577c43faf46ce1a8da4f34a205ca79fcaf6 100644 --- a/Tracking/TrkConditions/TrackingGeometryCondAlg/python/AtlasTrackingGeometryCondAlgConfig.py +++ b/Tracking/TrkConditions/TrackingGeometryCondAlg/python/AtlasTrackingGeometryCondAlgConfig.py @@ -71,7 +71,7 @@ def _getInDetTrackingGeometryBuilder(name, flags, # Pixel if flags.Detector.GeometryPixel: - # for Pixel DetectorElement conditions data : + # for Pixel DetectorElement conditions data: from PixelGeoModel.PixelGeoModelConfig import PixelReadoutGeometryCfg result.merge(PixelReadoutGeometryCfg(flags)) @@ -106,20 +106,8 @@ def _getInDetTrackingGeometryBuilder(name, flags, binnings += [PixelLayerBinning] 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: - # for SCT DetectorElement conditions data : + # for SCT DetectorElement conditions data: from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg result.merge(SCT_ReadoutGeometryCfg(flags)) @@ -154,18 +142,8 @@ def _getInDetTrackingGeometryBuilder(name, flags, binnings += [SCT_LayerBinning] 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: - # for TRT DetectorElement conditions data : + # for TRT DetectorElement conditions data: from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg result.merge(TRT_ReadoutGeometryCfg(flags)) @@ -705,33 +683,6 @@ def TrackingGeometryCondAlgCfg(flags, name='AtlasTrackingGeometryCondAlg', doMat GeometryProcessors=PrivateToolHandleArray(atlas_geometry_processors)) 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. # We need to be sure # we set "all" DetectorTools otherwise