2 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
3 from AthenaConfiguration.ComponentFactory
import CompFactory
4 from AtlasGeoModel.GeoModelConfig
import GeoModelCfg
5 from IOVDbSvc.IOVDbSvcConfig
import addFolders, addFoldersSplitOnline
6 from StripGeoModelXml.ITkStripGeoModelConfig
import ITkStripReadoutGeometryCfg
11 kwargs.setdefault(
"ConfigTool", acc.popPrivateTools())
12 acc.setPrivateTools(CompFactory.SCT_ByteStreamErrorsTool(name, **kwargs))
20 if flags.ITk.doStripModuleVeto:
23 kwargs.setdefault(
"ConditionsTools", ConditionsTools)
24 kwargs.setdefault(
"SCTDetEleCollKey",
"ITkStripDetectorElementCollection")
25 acc.setPrivateTools(CompFactory.SCT_ConditionsSummaryTool(name, **kwargs))
32 from SCT_ConditionsAlgorithms.ITkStripConditionsAlgorithmsConfig
import getITkStripDAQConfigFolder, ITkStripConfigurationCondAlgCfg
36 cond_kwargs[
"ChannelFolder"] = folder_path + (
"Chip" if flags.IOVDb.DatabaseInstance ==
"COMP200" else "ChipSlim")
37 cond_kwargs[
"ModuleFolder"] = f
"{folder_path}Module"
38 cond_kwargs[
"MurFolder"] = f
"{folder_path}MUR"
39 cond_kwargs[
"dbInstance"] =
"ITkStrip"
40 cond_kwargs[
"SCT_ConfigurationCondAlgName"] =
"ITkStripConfigurationCondAlg"
44 if "ChannelFolderDB" not in cond_kwargs:
46 detDb=cond_kwargs[
"dbInstance"],
47 onlineFolders=cond_kwargs[
"ChannelFolder"],
48 offlineFolders=cond_kwargs[
"ChannelFolder"],
49 className=
"CondAttrListVec",
52 acc.merge(
addFolders(flags, [cond_kwargs[
"ChannelFolderDB"]], detDb=cond_kwargs[
"dbInstance"], className=
"CondAttrListVec"))
53 if "ModuleFolderDB" not in cond_kwargs:
55 detDb=cond_kwargs[
"dbInstance"],
56 onlineFolders=cond_kwargs[
"ModuleFolder"],
57 offlineFolders=cond_kwargs[
"ModuleFolder"],
58 className=
"CondAttrListVec",
61 acc.merge(
addFolders(flags, [cond_kwargs[
"ModuleFolderDB"]], detDb=cond_kwargs[
"dbInstance"], className=
"CondAttrListVec"))
62 if "MurFolderDB" not in cond_kwargs:
64 detDb=cond_kwargs[
"dbInstance"],
65 onlineFolders=cond_kwargs[
"MurFolder"],
66 offlineFolders=cond_kwargs[
"MurFolder"],
67 className=
"CondAttrListVec",
70 acc.merge(
addFolders(flags, [cond_kwargs[
"MurFolderDB"]], detDb=cond_kwargs[
"dbInstance"], className=
"CondAttrListVec"))
72 ConfigCondAlg_kwargs = {}
73 ConfigCondAlg_kwargs[
"ReadKeyChannel"] = cond_kwargs[
"ChannelFolder"]
74 ConfigCondAlg_kwargs[
"ReadKeyModule"] = cond_kwargs[
"ModuleFolder"]
75 ConfigCondAlg_kwargs[
"ReadKeyMur"] = cond_kwargs[
"MurFolder"]
78 acc.setPrivateTools(CompFactory.SCT_ConfigurationConditionsTool(name, **kwargs))
83 """Return a ComponentAccumulator configured for ITk Strip DCS Conditions"""
84 from SCT_ConditionsTools.SCT_ConditionsToolsConfig
import SCT_DCSConditionsCfg
92 acc.setPrivateTools(CompFactory.SCT_FlaggedConditionTool(name, **kwargs))
97 """Return a ComponentAccumulator configured for ITkStripModuleVetoTool
103 kwargs.setdefault(
"useDB",
False)
104 kwargs.setdefault(
"BadModuleIdentifiers", [])
107 kwargs.setdefault(
"BadModuleIdentifiers", [
"database"])
110 folderStrings=
"/ITk/Manual/BadModules",
112 className=
"AthenaAttributeList",
113 tag=kwargs[
"folderTag"]))
115 acc.addCondAlgo(CompFactory.SCT_ModuleVetoCondAlg())
119 toolArgs[
"JsonPath"] = flags.ITk.JsonPathStripModuleVeto
120 toolArgs[
"BadModuleIdentifiers"] = kwargs[
"BadModuleIdentifiers"]
121 acc.setPrivateTools(CompFactory.SCT_ModuleVetoTool(name=f
"{name}Tool", **toolArgs))
127 cond_kwargs.setdefault(
"Folder",
"/ITkStrip/Derived/Monitoring")
128 cond_kwargs.setdefault(
"dbInstance",
"ITkStrip_OFL")
129 cond_kwargs.setdefault(
"MonitorCondAlgName",
"ITkStripMonitorCondAlg")
131 kwargs.setdefault(
"CondKey",
"ITkStripMonitorCondData")
135 if "FolderDb" not in cond_kwargs:
136 cond_kwargs[
"FolderDb"] = cond_kwargs[
"Folder"]
137 acc.merge(
addFolders(flags, cond_kwargs[
"FolderDb"], cond_kwargs[
"dbInstance"], className=
"CondAttrListCollection"))
139 acc.addCondAlgo(CompFactory.SCT_MonitorCondAlg(name=cond_kwargs[
"MonitorCondAlgName"],
140 ReadKey=cond_kwargs[
"Folder"],
141 WriteKey=kwargs[
"CondKey"]))
143 acc.setPrivateTools(CompFactory.SCT_MonitorConditionsTool(name, **kwargs))
150 cond_kwargs.setdefault(
"NoiseFolder",
"/ITkStrip/DAQ/Calibration/NoiseOccupancyDefects")
151 cond_kwargs.setdefault(
"GainFolder",
"/ITkStrip/DAQ/Calibration/NPtGainDefects")
152 cond_kwargs.setdefault(
"ReadCalibDataCondAlgName",
"ITkStripReadCalibDataCondAlg")
156 onlineFolders=cond_kwargs[
"NoiseFolder"],
157 offlineFolders=cond_kwargs[
"NoiseFolder"],
158 className=
"CondAttrListCollection",
162 onlineFolders=cond_kwargs[
"GainFolder"],
163 offlineFolders=cond_kwargs[
"GainFolder"],
164 className=
"CondAttrListCollection",
167 acc.addCondAlgo(CompFactory.SCT_ReadCalibDataCondAlg(name=cond_kwargs[
"ReadCalibDataCondAlgName"],
168 ReadKeyGain=cond_kwargs[
"GainFolder"],
169 ReadKeyNoise=cond_kwargs[
"NoiseFolder"]))
171 from SCT_Cabling.ITkStripCablingConfig
import ITkStripCablingToolCfg
174 acc.setPrivateTools(CompFactory.SCT_ReadCalibDataTool(name, **kwargs))
179 from SCT_Cabling.ITkStripCablingConfig
import ITkStripCablingToolCfg
181 kwargs.setdefault(
"SCT_CablingTool", acc.popPrivateTools())
182 acc.setPrivateTools(CompFactory.SCT_ReadoutTool(name, **kwargs))
187 """Return a ComponentAccumulator configured for ITk Strip SiliconConditions"""
192 from SCT_ConditionsTools.SCT_ConditionsToolsConfig
import SCT_SiliconConditionsCfg
203 folder =
"/TDAQ/Resources/ATLAS/ITkStrip/Robins" if flags.IOVDb.DatabaseInstance ==
"CONDBR2" else "/TDAQ/EnabledResources/ATLAS/ITkStrip/Robins"
204 acc.merge(
addFolders(flags, [folder], detDb=
"TDAQ", className=
"CondAttrListCollection"))
207 from SCT_Cabling.ITkStripCablingConfig
import ITkStripCablingToolCfg
209 acc.addCondAlgo(CompFactory.SCT_TdaqEnabledCondAlg(**kwargs))
212 acc.setPrivateTools(CompFactory.SCT_TdaqEnabledTool(name))