ATLAS Offline Software
Loading...
Searching...
No Matches
ITkPixelConditionsSummaryConfig.py
Go to the documentation of this file.
1"""Define a function to configure ITkPixelConditionsSummaryCfg
2
3Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
4"""
5from AthenaConfiguration.ComponentFactory import CompFactory
6from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
7from AthenaConfiguration.Enums import Format
8from PixelConditionsAlgorithms.ITkPixelConditionsConfig import (
9 ITkPixelDCSCondStateAlgCfg, ITkPixelDCSCondStatusAlgCfg, ITkPixelDeadMapCondAlgCfg
10)
11
12def ITkPixelConditionsSummaryCfg(flags, name="ITkPixelConditionsSummary", **kwargs):
13 """Return configured ComponentAccumulator with tool for ITk Pixel Conditions"""
14 acc = ITkPixelDCSCondStateAlgCfg(flags)
15 acc.merge(ITkPixelDCSCondStatusAlgCfg(flags))
16 acc.merge(ITkPixelDeadMapCondAlgCfg(flags))
17
18 kwargs.setdefault("PixelDetEleCollKey", "ITkPixelDetectorElementCollection")
19 kwargs.setdefault("PixelDCSStateCondData", "ITkPixelDCSStateCondData")
20 kwargs.setdefault("PixelDCSStatusCondData", "ITkPixelDCSStatusCondData")
21 kwargs.setdefault("PixelDeadMapCondData", "ITkPixelDeadMapCondData")
22 kwargs.setdefault("UseByteStreamFEI4", not flags.Input.isMC)
23 kwargs.setdefault("UseByteStreamFEI3", not flags.Input.isMC)
24 kwargs.setdefault("UseByteStreamRD53", False) # Turned off until BS format is defined
25
26 acc.setPrivateTools(CompFactory.PixelConditionsSummaryTool(name=name + "Tool", **kwargs))
27 return acc
28
29
30def ITkByteStreamErrorDetectorElementStatusToolCfg(flags, name = "ITkByteStreamErrorDetectorElementStatusTool",**kwargs) :
31 # @TODO bytestream errors for ITk have not been defined yet.
32 acc = ComponentAccumulator()
33 kwargs.setdefault("PixelDetEleCollKey","ITkPixelDetectorElementCollection") # @TODO do we need the DetEleColl for the Acts chain ?
34 if not flags.Input.isMC and not flags.Overlay.DataOverlay and flags.Input.Format is Format.BS :
35 kwargs.setdefault("PixelByteStreamErrs", "PixelByteStreamErrs")
36 kwargs.setdefault("UseByteStreamFEI4", True)
37 kwargs.setdefault("UseByteStreamFEI3", True)
38 kwargs.setdefault("ActiveOnly", False)
39 acc.setPrivateTools( CompFactory.PixelByteStreamErrorDetectorElementStatusTool(name, **kwargs) )
40 else :
41 kwargs.pop("ActiveOnly",False)
42 acc.setPrivateTools( CompFactory.PixelDetectorElementStatusCloneTool(name, **kwargs) )
43 return acc
ITkByteStreamErrorDetectorElementStatusToolCfg(flags, name="ITkByteStreamErrorDetectorElementStatusTool", **kwargs)
ITkPixelConditionsSummaryCfg(flags, name="ITkPixelConditionsSummary", **kwargs)