diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py index 90e31a84f0c63339eb2c064add5f1ce36dab3943..2e8cce991ad6919fb9410def81526d54976471e4 100644 --- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py +++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py @@ -2,6 +2,7 @@ Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration """ +from AthenaConfiguration.AccumulatorCache import AccumulatorCache from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.Enums import BeamType, LHCPeriod @@ -76,15 +77,17 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs): acc.addCondAlgo(CompFactory.PixelConfigCondAlg(name, **CondArgs)) return acc - +@AccumulatorCache def PixelAlignCondAlgCfg(flags, name="PixelAlignCondAlg", **kwargs): """Return a ComponentAccumulator with configured PixelAlignCondAlg""" 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")) - acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL2/PIX","/Indet/AlignL2/PIX",className="CondAttrListCollection")) + acc.merge(addFoldersSplitOnline(flags,"INDET", + ["/Indet/Onl/AlignL1/ID","/Indet/Onl/AlignL2/PIX"], + ["/Indet/AlignL1/ID","/Indet/AlignL2/PIX"], + className="CondAttrListCollection")) acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL3","/Indet/AlignL3",className="AlignableTransformContainer")) else: acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align",className="AlignableTransformContainer")) diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/python/PixelConditionsSummaryConfig.py b/InnerDetector/InDetConditions/PixelConditionsTools/python/PixelConditionsSummaryConfig.py index 042eab770f0adc9cdca351a86ace27c0694bf0f1..0ad99135ea275bdc723d71f453566c209fa9401e 100644 --- a/InnerDetector/InDetConditions/PixelConditionsTools/python/PixelConditionsSummaryConfig.py +++ b/InnerDetector/InDetConditions/PixelConditionsTools/python/PixelConditionsSummaryConfig.py @@ -1,7 +1,8 @@ """Define a function to configure PixelConditionsSummaryCfg -Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration """ +from AthenaConfiguration.AccumulatorCache import AccumulatorCache from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.Enums import Format @@ -11,6 +12,8 @@ from PixelConditionsAlgorithms.PixelConditionsConfig import ( ) from PixelReadoutGeometry.PixelReadoutGeometryConfig import PixelReadoutManagerCfg + +@AccumulatorCache def PixelConditionsSummaryCfg(flags, name="PixelConditionsSummary", **kwargs): """Return configured ComponentAccumulator with tool for Pixel Conditions""" acc = PixelReadoutManagerCfg(flags) diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/python/SCT_ConditionsAlgorithmsConfig.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/python/SCT_ConditionsAlgorithmsConfig.py index 6a1fdf87d00233f73c9ed61761f769dc0e8840d5..98768fa7acf0c5d4da75726a9820920117ae2a6c 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/python/SCT_ConditionsAlgorithmsConfig.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/python/SCT_ConditionsAlgorithmsConfig.py @@ -1,16 +1,20 @@ # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +from AthenaConfiguration.AccumulatorCache import AccumulatorCache from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline +@AccumulatorCache def SCT_AlignCondAlgCfg(flags, name="SCT_AlignCondAlg", **kwargs): """Return a configured SCT_AlignCondAlg""" from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeoModelCfg acc = SCT_GeoModelCfg(flags) 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/AlignL2/SCT", "/Indet/AlignL2/SCT", className="CondAttrListCollection")) + acc.merge(addFoldersSplitOnline(flags, "INDET", + ["/Indet/Onl/AlignL1/ID", "/Indet/Onl/AlignL2/SCT"], + ["/Indet/AlignL1/ID", "/Indet/AlignL2/SCT"], + className="CondAttrListCollection")) acc.merge(addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/AlignL3", "/Indet/AlignL3", className="AlignableTransformContainer")) else: acc.merge(addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/Align", "/Indet/Align", className="AlignableTransformContainer")) @@ -39,20 +43,12 @@ def SCT_ConfigurationCondAlgCfg(flags, name="SCT_ConfigurationCondAlg", **kwargs acc.merge(addFoldersSplitOnline(flags, detDb="SCT", - onlineFolders=channelFolder, - offlineFolders=channelFolder, - className="CondAttrListVec", - splitMC=True)) - acc.merge(addFoldersSplitOnline(flags, - detDb="SCT", - onlineFolders=f"{config_folder_prefix}Module", - offlineFolders=f"{config_folder_prefix}Module", - className="CondAttrListVec", - splitMC=True)) - acc.merge(addFoldersSplitOnline(flags, - detDb="SCT", - onlineFolders=f"{config_folder_prefix}MUR", - offlineFolders=f"{config_folder_prefix}MUR", + onlineFolders=[channelFolder, + f"{config_folder_prefix}Module", + f"{config_folder_prefix}MUR"], + offlineFolders=[channelFolder, + f"{config_folder_prefix}Module", + f"{config_folder_prefix}MUR"], className="CondAttrListVec", splitMC=True)) @@ -66,9 +62,8 @@ def SCT_ConfigurationCondAlgCfg(flags, name="SCT_ConfigurationCondAlg", **kwargs return acc - +@AccumulatorCache def SCT_DetectorElementCondAlgCfg(flags, name="SCT_DetectorElementCondAlg", **kwargs): - from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConfig import SCT_AlignCondAlgCfg acc = SCT_AlignCondAlgCfg(flags) # FIXME diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ConditionsToolsConfig.py b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ConditionsToolsConfig.py index ccdab110ecc87b3288932b8d1a8da8c1fcc98fcd..5048b9ad20bc7b93e18b549287958dc56323867c 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ConditionsToolsConfig.py +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/python/SCT_ConditionsToolsConfig.py @@ -1,4 +1,5 @@ -# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +from AthenaConfiguration.AccumulatorCache import AccumulatorCache from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.Enums import Format @@ -67,6 +68,8 @@ def SCT_DetectorElementStatusAddByteStreamErrorsToolCfg(flags, name="InDetSCT_De acc.setPrivateTools( acc.popToolsAndMerge( SCT_ConditionsSummaryToolBaseCfg( flags, name, **kwargs) ) ) return acc + +@AccumulatorCache def SCT_ConditionsSummaryToolCfg(flags, name="InDetSCT_ConditionsSummaryTool", **kwargs): acc = ComponentAccumulator() @@ -112,7 +115,7 @@ def SCT_ConditionsSummaryToolCfg(flags, name="InDetSCT_ConditionsSummaryTool", * return acc - +@AccumulatorCache def SCT_ConfigurationConditionsToolCfg(flags, name="InDetSCT_ConfigurationConditionsTool", **kwargs): # Load conditions configuration service and load folders and algorithm for it # Load folders that have to exist for both MC and Data diff --git a/InnerDetector/InDetConditions/TRT_ConditionsAlgs/python/TRT_ConditionsAlgsConfig.py b/InnerDetector/InDetConditions/TRT_ConditionsAlgs/python/TRT_ConditionsAlgsConfig.py index cae8f9f842393aa132bca2bcfc9ffc3f2b6d7933..e0afe14c918502d92bca2f9350b48483daa1e7a0 100644 --- a/InnerDetector/InDetConditions/TRT_ConditionsAlgs/python/TRT_ConditionsAlgsConfig.py +++ b/InnerDetector/InDetConditions/TRT_ConditionsAlgs/python/TRT_ConditionsAlgsConfig.py @@ -1,4 +1,5 @@ -# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +from AthenaConfiguration.AccumulatorCache import AccumulatorCache from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline @@ -28,14 +29,20 @@ def TRTAlignCondAlgCfg(flags, name="TRTAlignCondAlg", **kwargs): def TRTStrawStatusCondAlgCfg(flags, name="TRTStrawStatusCondAlg", **kwargs): """Return a ComponentAccumulator for TRTStrawStatusCondAlg algorithm""" acc = ComponentAccumulator() - acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Cond/Status", "/TRT/Cond/Status", className="TRTCond::StrawStatusMultChanContainer")) - acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Cond/StatusPermanent", "/TRT/Cond/StatusPermanent", className="TRTCond::StrawStatusMultChanContainer")) - # Argon straw list - acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Cond/StatusHT", "/TRT/Cond/StatusHT", className="TRTCond::StrawStatusMultChanContainer")) + acc.merge(addFoldersSplitOnline(flags, "TRT", + onlineFolders = ["/TRT/Onl/Cond/Status", + "/TRT/Onl/Cond/StatusPermanent", + "/TRT/Onl/Cond/StatusHT"], # Argon straw list + offlineFolders = ["/TRT/Cond/Status", + "/TRT/Cond/StatusPermanent", + "/TRT/Cond/StatusHT"], # Argon straw list + className = "TRTCond::StrawStatusMultChanContainer")) + acc.addCondAlgo(CompFactory.TRTStrawStatusCondAlg(name, **kwargs)) return acc +@AccumulatorCache def TRTStrawCondAlgCfg(flags, name="TRTStrawCondAlg", **kwargs): """Return a ComponentAccumulator for TRTStrawCondAlg algorithm""" acc = TRTAlignCondAlgCfg(flags) @@ -45,6 +52,7 @@ def TRTStrawCondAlgCfg(flags, name="TRTStrawCondAlg", **kwargs): return acc +@AccumulatorCache def TRTActiveCondAlgCfg(flags, name="TRTActiveCondAlg", **kwargs): """Return a ComponentAccumulator for TRTActiveCondAlg algorithm""" acc = TRTAlignCondAlgCfg(flags) diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/python/TRT_ConditionsServicesConfig.py b/InnerDetector/InDetConditions/TRT_ConditionsServices/python/TRT_ConditionsServicesConfig.py index 092a54636897a021bbdd4f22378975158482d1f4..6ea825731ee0ccf035caa92ca362885dc53ca7ff 100644 --- a/InnerDetector/InDetConditions/TRT_ConditionsServices/python/TRT_ConditionsServicesConfig.py +++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/python/TRT_ConditionsServicesConfig.py @@ -1,9 +1,11 @@ -# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +from AthenaConfiguration.AccumulatorCache import AccumulatorCache from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline +@AccumulatorCache def TRT_StrawStatusSummaryToolCfg(flags, name="TRT_StrawStatusSummaryTool", forceLegacyAccess=False, **kwargs): """Return a ComponentAccumulator for TRT_StrawStatusSummaryTool""" acc = ComponentAccumulator() diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/python/SCT_CablingConfig.py b/InnerDetector/InDetDetDescr/SCT_Cabling/python/SCT_CablingConfig.py index 4595576f6493635323f212562f036b4bed6c7cd6..5349b1439704353bb24965e21dbbf769ffcf0beb 100644 --- a/InnerDetector/InDetDetDescr/SCT_Cabling/python/SCT_CablingConfig.py +++ b/InnerDetector/InDetDetDescr/SCT_Cabling/python/SCT_CablingConfig.py @@ -1,5 +1,6 @@ -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +from AthenaConfiguration.AccumulatorCache import AccumulatorCache from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory @@ -17,6 +18,7 @@ def SCT_CablingFoldersCfg(flags): return cfg, path +@AccumulatorCache def SCT_CablingCondAlgCfg(flags, name="SCT_CablingCondAlgFromCoraCool"): cfg = ComponentAccumulator() foldersCfg, path = SCT_CablingFoldersCfg(flags) diff --git a/LumiBlock/LumiBlockComps/python/LBDurationCondAlgConfig.py b/LumiBlock/LumiBlockComps/python/LBDurationCondAlgConfig.py index a51309559cce304469580eb9336aa17b2baaf9a6..2cd1af743e4f5c8f453cfa85ff732b9b8c3eccf1 100644 --- a/LumiBlock/LumiBlockComps/python/LBDurationCondAlgConfig.py +++ b/LumiBlock/LumiBlockComps/python/LBDurationCondAlgConfig.py @@ -1,14 +1,17 @@ -# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration # # File: LumiBlockComps/python/LBDurationCondAlgConfig.py # Created: May 2019, sss # Purpose: Configure LBDurationCondAlg. # +from AthenaConfiguration.AccumulatorCache import AccumulatorCache from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from IOVDbSvc.IOVDbSvcConfig import addFolders + +@AccumulatorCache def LBDurationCondAlgCfg (flags): name = 'LBDurationCondAlg' result = ComponentAccumulator() diff --git a/MagneticField/MagFieldServices/python/MagFieldServicesConfig.py b/MagneticField/MagFieldServices/python/MagFieldServicesConfig.py index 781c9ef26223b73f12b4a5bc29ef1c8884a475b9..fbb5fa6fde730e17147a5359420b3a77207ce70d 100644 --- a/MagneticField/MagFieldServices/python/MagFieldServicesConfig.py +++ b/MagneticField/MagFieldServices/python/MagFieldServicesConfig.py @@ -1,8 +1,10 @@ # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration +from AthenaConfiguration.AccumulatorCache import AccumulatorCache from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator - + +@AccumulatorCache def AtlasFieldCacheCondAlgCfg(flags, **kwargs): ''' Configure the CondAlgsfor the ATLAS magnetic field. diff --git a/MuonSpectrometer/MuonConfig/python/MuonCalibrationConfig.py b/MuonSpectrometer/MuonConfig/python/MuonCalibrationConfig.py index ca467305d239603994f03c1181227c3bb4fa4036..d7a1775d55fb18ee3ca107c39e9a788a3a21f99b 100644 --- a/MuonSpectrometer/MuonConfig/python/MuonCalibrationConfig.py +++ b/MuonSpectrometer/MuonConfig/python/MuonCalibrationConfig.py @@ -4,6 +4,7 @@ from MuonConfig.MuonCondAlgConfig import CscCondDbAlgCfg, NswCalibDbAlgCfg from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg +from AthenaConfiguration.AccumulatorCache import AccumulatorCache from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.Enums import BeamType, LHCPeriod @@ -79,6 +80,7 @@ def _setupMdtCondDB(flags): return result, mdt_folder_name_appendix # end of function setupMdtCondDB() +@AccumulatorCache def MdtCalibrationToolCfg(flags, name= "MdtCalibrationTool", **kwargs): result=ComponentAccumulator() result.merge(MdtCalibDbAlgCfg(flags)) diff --git a/MuonSpectrometer/MuonConfig/python/MuonCondAlgConfig.py b/MuonSpectrometer/MuonConfig/python/MuonCondAlgConfig.py index da04a3800c2f8d43e58a543388867859267a79c1..7d99a527716d359a5541a9a77804ad7db3f6a768 100644 --- a/MuonSpectrometer/MuonConfig/python/MuonCondAlgConfig.py +++ b/MuonSpectrometer/MuonConfig/python/MuonCondAlgConfig.py @@ -1,12 +1,15 @@ -# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration ## Configuration Access to OFFLINE DB (COMP200) +from AthenaConfiguration.AccumulatorCache import AccumulatorCache from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory from IOVDbSvc.IOVDbSvcConfig import addFolders from AthenaConfiguration.Enums import LHCPeriod + +@AccumulatorCache def MdtCondDbAlgCfg(flags, **kwargs): result = ComponentAccumulator() folders = [] @@ -167,6 +170,8 @@ def TgcDigitCondAlgCfg(flags): result.merge(addFolders(flags, ["/TGC/DIGIT/XTALK"], tag='TgcDigitXTalk-00-01', detDb="TGC_OFL", db="OFLP200", className="CondAttrListCollection")) return result + +@AccumulatorCache def NswCalibDbAlgCfg(flags, **kwargs): result = ComponentAccumulator() diff --git a/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py b/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py index f2c609ce9c01ab4e63144b0d30c356a8496648d1..5b3e55d326747225c1ee0276b09b36920e1809b7 100644 --- a/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py +++ b/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory @@ -97,6 +97,7 @@ def MuonDetectorToolCfg(flags, name = "MuonDetectorTool", **kwargs): acc.setPrivateTools(detTool) return acc + def MuonAlignmentCondAlgCfg(flags, name="MuonAlignmentCondAlg", **kwargs): acc = ComponentAccumulator() from IOVDbSvc.IOVDbSvcConfig import addFolders @@ -188,7 +189,10 @@ def CscILineCondAlgCfg(flags, name="CscILinesCondAlg", **kwargs): the_alg = CompFactory.CscILinesCondAlg(name, **kwargs) result.addCondAlgo(the_alg, primary = True) - return result + return result + + +@AccumulatorCache def MuonDetectorCondAlgCfg(flags, name = "MuonDetectorCondAlg", **kwargs): result = ComponentAccumulator()