5 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6 from AthenaConfiguration.Enums
import BeamType
9 @file TileRawChannelToNtupleConfig.py
10 @brief Python configuration of Tile raw channels to ntuple algorithm for the Run III
13 from AthenaConfiguration.ComponentFactory
import CompFactory
17 ''' Function to configure Tile digits to h70 ntuple algorithm.'''
21 from TileGeoModel.TileGMConfig
import TileGMCfg
24 from TileConditions.TileCablingSvcConfig
import TileCablingSvcCfg
28 prefix =
'tiletb' if flags.Beam.Type
is BeamType.TestBeam
else 'tile'
29 outputFile = f
'{prefix}.ntup.root'
31 ntupleSvc = CompFactory.NTupleSvc()
32 ntupleSvc.Output = [
"NTUP DATAFILE='%s' OPT='NEW'" % outputFile]
33 acc.addService(ntupleSvc)
35 kwargs.setdefault(
'TileRawChannelContainer',
'TileRawChannelCnt')
36 kwargs.setdefault(
'NTupleLoc',
'/NTUP')
38 TileRawChannelToNtuple = CompFactory.TileRawChannelToNtuple
41 acc.setAppProperty(
'HistogramPersistency',
'ROOT')
46 if __name__ ==
'__main__':
49 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
53 from AthenaCommon.Logging
import log
57 from AthenaConfiguration.TestDefaults
import defaultTestFiles
58 flags.Input.Files = defaultTestFiles.RDO_RUN3
59 flags.Exec.MaxEvents = 3
62 log.info(
'Final configuration flags follow:')
68 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
71 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
76 cfg.printConfig(withDetails=
True, summariseProps=
True)
78 with open(
'TileRawChannelToNtupleConfig.pkl',
'wb')
as f:
85 sys.exit(0
if sc.isSuccess()
else 1)