Loading [MathJax]/jax/output/SVG/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ITkPixelConditionsSummaryConfig.py
Go to the documentation of this file.
1 """Define a function to configure ITkPixelConditionsSummaryCfg
2 
3 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
4 """
5 from AthenaConfiguration.ComponentFactory import CompFactory
6 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
7 from AthenaConfiguration.Enums import Format
8 from PixelConditionsAlgorithms.ITkPixelConditionsConfig import (
9  ITkPixelDCSCondStateAlgCfg, ITkPixelDCSCondStatusAlgCfg, ITkPixelDeadMapCondAlgCfg
10 )
11 from PixelReadoutGeometry.PixelReadoutGeometryConfig import ITkPixelReadoutManagerCfg
12 
13 def ITkPixelConditionsSummaryCfg(flags, name="ITkPixelConditionsSummary", **kwargs):
14  """Return configured ComponentAccumulator with tool for ITk Pixel Conditions"""
15  acc = ITkPixelReadoutManagerCfg(flags)
16  acc.merge(ITkPixelDCSCondStateAlgCfg(flags))
17  acc.merge(ITkPixelDCSCondStatusAlgCfg(flags))
18  acc.merge(ITkPixelDeadMapCondAlgCfg(flags))
19 
20  kwargs.setdefault("PixelReadoutManager", acc.getPrimary())
21  kwargs.setdefault("PixelDetEleCollKey", "ITkPixelDetectorElementCollection")
22  kwargs.setdefault("PixelDCSStateCondData", "ITkPixelDCSStateCondData")
23  kwargs.setdefault("PixelDCSStatusCondData", "ITkPixelDCSStatusCondData")
24  kwargs.setdefault("PixelDeadMapCondData", "ITkPixelDeadMapCondData")
25  kwargs.setdefault("UseByteStreamFEI4", not flags.Input.isMC)
26  kwargs.setdefault("UseByteStreamFEI3", not flags.Input.isMC)
27  kwargs.setdefault("UseByteStreamRD53", False) # Turned off until BS format is defined
28 
29  acc.setPrivateTools(CompFactory.PixelConditionsSummaryTool(name=name + "Tool", **kwargs))
30  return acc
31 
32 
33 def ITkByteStreamErrorDetectorElementStatusToolCfg(flags, name = "ITkByteStreamErrorDetectorElementStatusTool",**kwargs) :
34  # @TODO bytestream errors for ITk have not been defined yet.
35  acc = ComponentAccumulator()
36  kwargs.setdefault("PixelReadoutManager","ITkPixelReadoutManager")
37  kwargs.setdefault("PixelDetEleCollKey","ITkPixelDetectorElementCollection") # @TODO do we need the DetEleColl for the Acts chain ?
38  if not flags.Input.isMC and not flags.Overlay.DataOverlay and flags.Input.Format is Format.BS :
39  kwargs.setdefault("PixelByteStreamErrs", "PixelByteStreamErrs")
40  kwargs.setdefault("UseByteStreamFEI4", True)
41  kwargs.setdefault("UseByteStreamFEI3", True)
42  kwargs.setdefault("ActiveOnly", False)
43  acc.setPrivateTools( CompFactory.PixelByteStreamErrorDetectorElementStatusTool(name, **kwargs) )
44  else :
45  kwargs.pop("ActiveOnly",False)
46  acc.setPrivateTools( CompFactory.PixelDetectorElementStatusCloneTool(name, **kwargs) )
47  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
ITkPixelConditionsSummaryConfig.ITkPixelConditionsSummaryCfg
def ITkPixelConditionsSummaryCfg(flags, name="ITkPixelConditionsSummary", **kwargs)
Definition: ITkPixelConditionsSummaryConfig.py:13
ITkPixelConditionsConfig.ITkPixelDCSCondStateAlgCfg
def ITkPixelDCSCondStateAlgCfg(flags, name="ITkPixelDCSCondStateAlg", **kwargs)
Definition: ITkPixelConditionsConfig.py:104
python.PixelReadoutGeometryConfig.ITkPixelReadoutManagerCfg
def ITkPixelReadoutManagerCfg(flags, name="ITkPixelReadoutManager", **kwargs)
Definition: PixelReadoutGeometryConfig.py:13
ITkPixelConditionsSummaryConfig.ITkByteStreamErrorDetectorElementStatusToolCfg
def ITkByteStreamErrorDetectorElementStatusToolCfg(flags, name="ITkByteStreamErrorDetectorElementStatusTool", **kwargs)
Definition: ITkPixelConditionsSummaryConfig.py:33
ITkPixelConditionsConfig.ITkPixelDeadMapCondAlgCfg
def ITkPixelDeadMapCondAlgCfg(flags, name="ITkPixelDeadMapCondAlg", **kwargs)
Definition: ITkPixelConditionsConfig.py:129
ITkPixelConditionsConfig.ITkPixelDCSCondStatusAlgCfg
def ITkPixelDCSCondStatusAlgCfg(flags, name="ITkPixelDCSCondStatusAlg", **kwargs)
Definition: ITkPixelConditionsConfig.py:112