ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloBadChannelTool
python
CaloBadChanToolConfig.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3
"""Define method to construct configured private Calo bad channels tool"""
4
5
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
6
from
AthenaConfiguration.ComponentFactory
import
CompFactory
7
8
def
CaloBadChanToolCfg
(flags, **kwargs):
9
"""Return component accumulator with configured private Calo bad channels tool
10
11
Arguments:
12
flags -- Athena configuration flags (ConfigFlags)
13
"""
14
15
kwargs.setdefault(
'name'
,
'CaloBadChanTool'
)
16
kwargs.setdefault(
'LArBadChanKey'
,
'LArBadChannel'
)
17
18
from
LArBadChannelTool.LArBadChannelConfig
import
LArBadChannelCfg
19
acc = LArBadChannelCfg(flags)
20
21
if
'TileBadChanTool'
not
in
kwargs:
22
from
TileConditions.TileBadChannelsConfig
import
TileBadChanToolCfg
23
badChannelsTool = acc.popToolsAndMerge( TileBadChanToolCfg(flags) )
24
kwargs[
'TileBadChanTool'
] = badChannelsTool
25
26
CaloBadChanTool=CompFactory.CaloBadChanTool
27
acc.setPrivateTools(
CaloBadChanTool
(**kwargs))
28
29
return
acc
30
31
32
if
__name__ ==
"__main__"
:
33
34
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
35
from
AthenaConfiguration.TestDefaults
import
defaultGeometryTags, defaultTestFiles
36
from
AthenaCommon.Logging
import
log
37
from
AthenaCommon.Constants
import
DEBUG
38
39
# Test setup
40
log.setLevel(DEBUG)
41
42
flags = initConfigFlags()
43
flags.Input.Files = defaultTestFiles.RAW_RUN2
44
flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
45
46
flags.fillFromArgs()
47
flags.lock()
48
49
acc = ComponentAccumulator()
50
51
print
( acc.popToolsAndMerge(
CaloBadChanToolCfg
(flags) ) )
52
flags.dump()
53
54
acc.printConfig(withDetails =
True
, summariseProps =
True
)
55
acc.store( open(
'CaloBadChanTool.pkl'
,
'wb'
) )
print
void print(char *figname, TCanvas *c1)
Definition
TRTCalib_StrawStatusPlots.cxx:26
CaloBadChanTool
Definition
CaloBadChanTool.h:19
Constants
CaloBadChanToolConfig.CaloBadChanToolCfg
CaloBadChanToolCfg(flags, **kwargs)
Definition
CaloBadChanToolConfig.py:8
Generated on
for ATLAS Offline Software by
1.17.0