ATLAS Offline Software
Loading...
Searching...
No Matches
TileDigiNoiseCalibAlgConfig.py
Go to the documentation of this file.
2# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3#
4'''
5@file TileDigiNoiseCalibAlgConfig.py
6@brief Python configuration of TileDigiNoiseCalibAlg algorithm for the Run III
7'''
8def TileDigiNoiseCalibAlgCfg(flags, **kwargs):
9
10 ''' Function to configure TileDigiNoiseCalibAlg algorithm'''
11
12 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
13 acc = ComponentAccumulator()
14
15 from TileConditions.TileCablingSvcConfig import TileCablingSvcCfg
16 acc.merge( TileCablingSvcCfg(flags) )
17
18 from TileConditions.TileInfoLoaderConfig import TileInfoLoaderCfg
19 acc.merge( TileInfoLoaderCfg(flags) )
20
21 from TileGeoModel.TileGMConfig import TileGMCfg
22 acc.merge(TileGMCfg( flags ))
23
24 from TileRecUtils.TileDQstatusConfig import TileDQstatusAlgCfg
25 acc.merge( TileDQstatusAlgCfg(flags) )
26
27 kwargs.setdefault('name', 'TileDigiNoiseCalibAlg')
28
29 from AthenaConfiguration.ComponentFactory import CompFactory
30 TileDigiNoiseCalibAlgCfg = CompFactory.TileDigiNoiseCalibAlg
31
32 acc.addEventAlgo(TileDigiNoiseCalibAlgCfg(**kwargs), primary=True)
33
34 return acc
35
36if __name__=='__main__':
37
38 # Setup logs
39 from AthenaCommon.Logging import log
40 from AthenaCommon.Constants import INFO
41 log.setLevel(INFO)
42
43 # Set the Athena configuration flags
44 from AthenaConfiguration.AllConfigFlags import initConfigFlags
45 from AthenaConfiguration.TestDefaults import defaultConditionsTags, defaultGeometryTags, defaultTestFiles
46 flags = initConfigFlags()
47 flags.Input.Files = defaultTestFiles.RAW_RUN2
48 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
49 flags.IOVDb.GlobalTag = defaultConditionsTags.RUN2_DATA
50 flags.Exec.MaxEvents = 3
51 flags.fillFromArgs()
52 flags.lock()
53
54 # Initialize configuration object, add accumulator, merge, and run.
55 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
56 cfg = MainServicesCfg(flags)
57
58 from TileByteStream.TileByteStreamConfig import TileRawDataReadingCfg
59 cfg.merge( TileRawDataReadingCfg(flags, readMuRcv=False, readBeamElem=True) )
60
61 cfg.merge( TileDigiNoiseCalibAlgCfg(flags) )
62
63 cfg.printConfig(withDetails = True, summariseProps = True)
64 flags.dump()
65
66 cfg.store( open('TileDigiNoiseCalibAlg.pkl','wb') )
67
68 sc = cfg.run()
69
70 import sys
71 # Success should be 0
72 sys.exit(not sc.isSuccess())