3"""Define method to construct configured private Calo bad channels tool"""
5from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6from AthenaConfiguration.ComponentFactory
import CompFactory
9 """Return component accumulator with configured private Calo bad channels tool
12 flags -- Athena configuration flags (ConfigFlags)
15 kwargs.setdefault(
'name',
'CaloBadChanTool')
16 kwargs.setdefault(
'LArBadChanKey',
'LArBadChannel')
18 from LArBadChannelTool.LArBadChannelConfig
import LArBadChannelCfg
19 acc = LArBadChannelCfg(flags)
21 if 'TileBadChanTool' not in kwargs:
22 from TileConditions.TileBadChannelsConfig
import TileBadChanToolCfg
23 badChannelsTool = acc.popToolsAndMerge( TileBadChanToolCfg(flags) )
24 kwargs[
'TileBadChanTool'] = badChannelsTool
26 CaloBadChanTool=CompFactory.CaloBadChanTool
32if __name__ ==
"__main__":
34 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
35 from AthenaConfiguration.TestDefaults
import defaultGeometryTags, defaultTestFiles
36 from AthenaCommon.Logging
import log
42 flags = initConfigFlags()
43 flags.Input.Files = defaultTestFiles.RAW_RUN2
44 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
49 acc = ComponentAccumulator()
54 acc.printConfig(withDetails =
True, summariseProps =
True)
55 acc.store( open(
'CaloBadChanTool.pkl',
'wb') )
void print(char *figname, TCanvas *c1)