2 from AthenaConfiguration.AccumulatorCache
import AccumulatorCache
3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
5 from IOVDbSvc.IOVDbSvcConfig
import addFoldersSplitOnline
10 """Return a configured SCT_AlignCondAlg"""
11 from SCT_GeoModel.SCT_GeoModelConfig
import SCT_GeoModelCfg
13 if flags.GeoModel.Align.Dynamic:
15 [
"/Indet/Onl/AlignL1/ID",
"/Indet/Onl/AlignL2/SCT"],
16 [
"/Indet/AlignL1/ID",
"/Indet/AlignL2/SCT"],
17 className=
"CondAttrListCollection"))
18 acc.merge(
addFoldersSplitOnline(flags,
"INDET",
"/Indet/Onl/AlignL3",
"/Indet/AlignL3", className=
"AlignableTransformContainer"))
20 acc.merge(
addFoldersSplitOnline(flags,
"INDET",
"/Indet/Onl/Align",
"/Indet/Align", className=
"AlignableTransformContainer"))
22 kwargs.setdefault(
"UseDynamicAlignFolders", flags.GeoModel.Align.Dynamic)
24 acc.addCondAlgo(CompFactory.SCT_AlignCondAlg(name, **kwargs))
29 if flags.InDet.ForceCoolVectorPayload
and flags.InDet.ForceCoraCool:
30 raise Exception(
"SCT DB CONFIGURATION FLAG CONFLICT: Both CVP and CoraCool selected")
31 return "/SCT/DAQ/Config/" if (flags.InDet.ForceCoolVectorPayload
32 or (flags.IOVDb.DatabaseInstance !=
"COMP200"
33 and not flags.InDet.ForceCoraCool))
else "/SCT/DAQ/Configuration/"
39 channelFolder = config_folder_prefix + (
"Chip" if flags.IOVDb.DatabaseInstance ==
"COMP200" else "ChipSlim")
40 kwargs.setdefault(
"ReadKeyChannel", channelFolder)
41 kwargs.setdefault(
"ReadKeyModule", f
"{config_folder_prefix}Module")
42 kwargs.setdefault(
"ReadKeyMur", f
"{config_folder_prefix}MUR")
46 onlineFolders=[channelFolder,
47 f
"{config_folder_prefix}Module",
48 f
"{config_folder_prefix}MUR"],
49 offlineFolders=[channelFolder,
50 f
"{config_folder_prefix}Module",
51 f
"{config_folder_prefix}MUR"],
52 className=
"CondAttrListVec",
55 from SCT_Cabling.SCT_CablingConfig
import SCT_CablingToolCfg
58 from SCT_ConditionsTools.SCT_ConditionsToolsConfig
import SCT_ReadoutToolCfg
61 acc.addCondAlgo(CompFactory.SCT_ConfigurationCondAlg(name, **kwargs))
73 if flags.Detector.GeometryMuon
and flags.Muon.enableAlignment:
74 from MuonConfig.MuonGeometryConfig
import MuonGeoModelCfg
76 kwargs.setdefault(
"MuonManagerKey",
"MuonDetectorManager")
77 if flags.Detector.GeometryTRT:
78 from TRT_GeoModel.TRT_GeoModelConfig
import TRT_ReadoutGeometryCfg
80 kwargs.setdefault(
"TRT_DetEltContKey",
"TRT_DetElementContainer")
81 if not flags.GeoModel.Align.LegacyConditionsAccess
and flags.Detector.GeometryPixel:
82 from PixelGeoModel.PixelGeoModelConfig
import PixelAlignmentCfg
84 kwargs.setdefault(
"PixelAlignmentStore",
"PixelAlignmentStore")
87 acc.addCondAlgo(CompFactory.SCT_DetectorElementCondAlg(name, **kwargs))
93 if 'ConditionsSummaryTool' not in kwargs :
94 from SCT_ConditionsTools.SCT_ConditionsToolsConfig
import SCT_ConditionsSummaryToolCfg
95 kwargs.setdefault(
"ConditionsSummaryTool", acc.popToolsAndMerge(
SCT_ConditionsSummaryToolCfg(flags, withFlaggedCondTool=
False, withByteStreamErrorsTool=
False)) )
96 kwargs.setdefault(
"WriteKey",
"SCTDetectorElementStatusCondData")
99 acc.addCondAlgo( CompFactory.InDet.SiDetectorElementStatusCondAlg(name, **kwargs) )
104 Algorithm which just creates event data from conditions data.
107 if 'ConditionsSummaryTool' not in kwargs :
108 from SCT_ConditionsTools.SCT_ConditionsToolsConfig
import SCT_DetectorElementStatusAddByteStreamErrorsToolCfg
111 SCTDetElStatusCondDataBaseKey =
"SCTDetectorElementStatusCondData",
112 SCTDetElStatusEventDataBaseKey =
"")) )
113 kwargs.setdefault(
"WriteKey",
"SCTDetectorElementStatusWithoutFlagged")
116 acc.addEventAlgo( CompFactory.InDet.SiDetectorElementStatusAlg(name, **kwargs) )
122 if 'ConditionsSummaryTool' not in kwargs :
123 from SCT_ConditionsTools.SCT_ConditionsToolsConfig
import SCT_DetectorElementStatusAddFlaggedToolCfg
126 SCTDetElStatusCondDataBaseKey =
"",
127 SCTDetElStatusEventDataBaseKey =
"SCTDetectorElementStatusWithoutFlagged")) )
129 kwargs.setdefault(
"WriteKey",
"SCTDetectorElementStatus")
133 if __name__==
"__main__":
134 from AthenaCommon.Logging
import log
140 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
142 flags.Input.isMC =
False
143 flags.Input.Files = [
"./myESD.pool.root"]
144 flags.Input.ProjectName =
"data17_13TeV"
145 flags.Input.RunNumbers = [330470]
146 flags.IOVDb.GlobalTag =
"CONDBR2-BLKPA-2018-03"
147 from AthenaConfiguration.TestDefaults
import defaultGeometryTags
148 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
151 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
154 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
158 algkwargs[
"OutputLevel"] = INFO
159 if algorithm ==
"AlignCondAlg":
161 elif algorithm ==
"ConfigurationCondAlg":
163 elif algorithm ==
"DetectorElementCondAlg":
166 cfg.run(maxEvents=25)