4 '''@file TileTMDBDigitsMonitorAlgorithm.py
7 @brief Python configuration of TileTMDBDigitsMonitorAlgorithm algorithm for the Run III
11 '''Function to configures some algorithms in the monitoring system.'''
12 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
15 from TileConditions.TileCablingSvcConfig
import TileCablingSvcCfg
18 from AthenaMonitoring
import AthMonitorCfgHelper
19 helper = AthMonitorCfgHelper(flags,
'TileTMDBDigitsMonitoring')
22 from AthenaConfiguration.ComponentFactory
import CompFactory
23 tileTMDBDigitsMonAlg = helper.addAlgorithm(CompFactory.TileTMDBDigitsMonitorAlgorithm,
'TileTMDBDigitsMonAlg')
25 tileTMDBDigitsMonAlg.TriggerChain =
''
28 run =
str(flags.Input.RunNumbers[0])
29 from TileMonitoring.TileMonitoringCfgHelper
import addTileTMDB_1DHistogramsArray, addTileTMDB_2DHistogramsArray
35 value =
'pedestal', title =
'Mean pedestal (sample[0])',
36 path =
'Tile/TMDBDigits', type=
'TProfile2D', run = run)
39 value =
'amplitude', title =
'Difference between maximum and minimum sample',
40 path =
'Tile/TMDBDigits', type=
'TProfile2D', run = run)
43 value =
'HFN', title =
'Mean RMS of 7 samples (HFN)',
44 path =
'Tile/TMDBDigits', type=
'TProfile2D', run = run)
48 xvalue =
'pedestal', title =
'Pedestal (sample[0]);[ADC]',
49 path =
'Tile/TMDBDigits', type=
'TH1D', run = run,
50 xbins = 101, xmin = -0.5, xmax = 100.5)
53 xvalue =
'HFN', title =
'Mean RMS (HFN);[ADC]',
54 path =
'Tile/TMDBDigits', type=
'TH1D', run = run,
55 xbins = 41, xmin = -0.5, xmax = 40.5)
58 xvalue =
'amplitude', title =
'Difference between maximum and minimum sample;[ADC]',
59 path =
'Tile/TMDBDigits', type=
'TH1D', run = run,
60 xbins = 101, xmin = -0.5, xmax = 100.5)
63 accumalator = helper.result()
64 result.merge(accumalator)
69 if __name__==
'__main__':
71 from AthenaCommon.Logging
import log
76 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
77 from AthenaConfiguration.TestDefaults
import defaultGeometryTags, defaultTestFiles
79 flags.Input.Files = defaultTestFiles.RAW_RUN2
80 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
81 flags.Output.HISTFileName =
'TileTMDBDigitsMonitorOutput.root'
82 flags.DQ.useTrigger =
False
83 flags.DQ.enableLumiAccess =
False
84 flags.Exec.MaxEvents = 3
89 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
92 from TileByteStream.TileByteStreamConfig
import TileRawDataReadingCfg
94 readMuRcv=
False, readMuRcvDigits=
True) )
98 cfg.merge(tileTMDBDigitsMonitorAccumulator)
100 cfg.printConfig(withDetails =
True, summariseProps =
True)
104 cfg.store(
open(
'TileTMDBDigitsMonitorAlgorithm.pkl',
'wb') )
109 sys.exit(
not sc.isSuccess())