3"""Define method to construct configured TileRawChannelToHit algorithm"""
5from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6from AthenaConfiguration.ComponentFactory
import CompFactory
7from TileConfiguration.TileConfigFlags
import TileRunType
10 """Return component accumulator with configured TileRawChannelToHit algorithm
13 flags -- Athena configuration flags
16 kwargs.setdefault(
'UseSamplFract',
False)
18 acc = ComponentAccumulator()
20 from TileConditions.TileCablingSvcConfig
import TileCablingSvcCfg
21 acc.merge( TileCablingSvcCfg(flags) )
23 if kwargs[
'UseSamplFract']:
24 from TileConditions.TileSamplingFractionConfig
import TileSamplingFractionCondAlgCfg
25 acc.merge( TileSamplingFractionCondAlgCfg(flags) )
27 if 'TileCondToolEmscale' not in kwargs:
28 from TileConditions.TileEMScaleConfig
import TileCondToolEmscaleCfg
29 emScaleTool = acc.popToolsAndMerge( TileCondToolEmscaleCfg(flags) )
30 kwargs[
'TileCondToolEmscale'] = emScaleTool
32 TileRawChannelToHit = CompFactory.TileRawChannelToHit
39if __name__ ==
"__main__":
41 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
42 from AthenaConfiguration.TestDefaults
import defaultConditionsTags, defaultGeometryTags, defaultTestFiles
43 from AthenaCommon.Logging
import log
49 flags = initConfigFlags()
50 flags.Input.Files = defaultTestFiles.RAW_RUN3
51 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
52 flags.IOVDb.GlobalTag = defaultConditionsTags.RUN3_DATA
53 flags.Tile.RunType = TileRunType.PHY
54 flags.Exec.MaxEvents = 3
58 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
59 cfg = MainServicesCfg(flags)
61 from TileByteStream.TileByteStreamConfig
import TileRawDataReadingCfg
62 cfg.merge( TileRawDataReadingCfg(flags, readMuRcv=
False, readDigits=
False) )
67 cfg.printConfig(withDetails=
True, summariseProps=
True)
68 cfg.store( open(
'TileRawChannelToHit.pkl',
'wb') )
74 sys.exit(
not sc.isSuccess())
TileRawChannelToHitCfg(flags, **kwargs)