1 """Define a function to configure PixelConditionsSummaryCfg
3 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5 from AthenaConfiguration.AccumulatorCache
import AccumulatorCache
6 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
7 from AthenaConfiguration.ComponentFactory
import CompFactory
8 from AthenaConfiguration.Enums
import Format
10 from PixelConditionsAlgorithms.PixelConditionsConfig
import (
11 PixelDCSCondStateAlgCfg, PixelDCSCondStatusAlgCfg, PixelDeadMapCondAlgCfg
13 from PixelReadoutGeometry.PixelReadoutGeometryConfig
import PixelReadoutManagerCfg
18 """Return configured ComponentAccumulator with tool for Pixel Conditions"""
24 kwargs.setdefault(
"PixelReadoutManager", acc.getPrimary())
25 kwargs.setdefault(
"UseByteStreamFEI4",
not flags.Input.isMC
and not flags.Overlay.DataOverlay
and flags.Input.Format
is Format.BS)
26 kwargs.setdefault(
"UseByteStreamFEI3",
not flags.Input.isMC
and not flags.Overlay.DataOverlay
and flags.Input.Format
is Format.BS)
28 if flags.InDet.usePixelDCS:
29 pixel_states_active = [
'READY',
'ON' ]
31 kwargs.setdefault(
"IsActiveStates", pixel_states_active)
32 kwargs.setdefault(
"IsActiveStatus", [
'OK',
'WARNING',
'ERROR',
'FATAL' ])
34 from PixelConditionsAlgorithms.PixelConditionsConfig
import PixelDetectorElementCondAlgCfg
36 kwargs.setdefault(
"PixelDetEleCollKey",
"PixelDetectorElementCollection")
38 acc.setPrivateTools(CompFactory.PixelConditionsSummaryTool(name=name +
"Tool", **kwargs))
42 kwargs.setdefault(
"ActiveOnly",
True)
43 kwargs.setdefault(
"UseByteStreamFEI4",
False)
44 kwargs.setdefault(
"UseByteStreamFEI3",
False)
45 kwargs.setdefault(
"UseByteStreamRD53",
False)
50 kwargs.setdefault(
"IsActiveStatus", [
'OK',
'WARNING',
'ERROR',
'FATAL' ] )
51 acc.setPrivateTools( CompFactory.PixelActiveDetectorElementStatusTool(name, **kwargs) )
56 if not flags.Input.isMC
and not flags.Overlay.DataOverlay
and flags.Input.Format
is Format.BS :
57 kwargs.setdefault(
"PixelByteStreamErrs",
"PixelByteStreamErrs")
58 kwargs.setdefault(
"UseByteStreamFEI4",
True)
59 kwargs.setdefault(
"UseByteStreamFEI3",
True)
60 kwargs.setdefault(
"ActiveOnly",
False)
61 acc.setPrivateTools( CompFactory.PixelByteStreamErrorDetectorElementStatusTool(name, **kwargs) )
63 kwargs.pop(
"ActiveOnly",
False)
64 acc.setPrivateTools( CompFactory.PixelDetectorElementStatusCloneTool(name, **kwargs) )
68 kwargs.setdefault(
"ActiveOnly",
True)