ATLAS Offline Software
RunTileMonitoring.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 #
3 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
4 #
5 '''@file RunTileMonitoring.py
6 @brief Script to run Tile Reconstrcution/Monitoring with new-style configuration
7 '''
8 
9 from AthenaConfiguration.ComponentFactory import CompFactory
10 from AthenaConfiguration.Enums import BeamType, Format, LHCPeriod
11 from TileConfiguration.TileConfigFlags import TileRunType
12 
13 def _configFlagsFromPartition(flags, partition, log):
14  """
15  Configure the following flags from partition in online: run number, beam type, and project
16  """
17 
18  from ipc import IPCPartition
19  from ispy import ISObject
20  ipcPartition = IPCPartition(partition)
21  if not ipcPartition.isValid():
22  log.error( 'Partition: ' + ipcPartition.name() + ' is not valid' )
23  sys.exit(1)
24  try:
25  runParams = ISObject(ipcPartition, 'RunParams.SOR_RunParams', 'RunParams')
26  except Exception:
27  beamType = 'cosmics'
28  runNumber = 399999
29  projectName = 'data20_calib'
30  log.warning("No Run Parameters in IS => Set defaults: partition: %s, beam type: %i, run number: %i, project tag: %s",
31  partition, beamType, runNumber, projectName)
32  else:
33  runParams.checkout()
34  beamType = runParams.beam_type
35  beamEnergy = runParams.beam_energy
36  runNumber = runParams.run_number
37  projectName = runParams.T0_project_tag
38  runType = runParams.run_type
39  log.info("RUN CONFIG: partition: %s, run type: %s, beam type: %i, beam energy: %i, run number: %i, project tag: %s",
40  partition, runType, beamType, beamEnergy, runNumber, projectName)
41 
42  if any([projectName.endswith(_) for _ in ("cos", "test", "calib")]):
43  beamType = 'cosmics'
44  elif projectName.endswith('1beam'):
45  beamType = 'singlebeam'
46  elif beamEnergy > 0:
47  beamType = 'collisions'
48  else:
49  beamType = 'cosmics'
50 
51  if partition == 'Tile':
52  flags.Tile.NoiseFilter = 0
53  if 'CIS' in runType:
54  flags.Tile.RunType = TileRunType.MONOCIS if 'mono' in runType else TileRunType.CIS
55  elif 'Laser' in runType:
56  flags.Tile.RunType = TileRunType.LAS
57  elif 'Pedestals' in runType:
58  flags.Tile.RunType = TileRunType.PED
59 
60  flags.Beam.Type = BeamType(beamType)
61  flags.Input.ProjectName = projectName
62  flags.Input.RunNumbers = [runNumber]
63 
64 
65 if __name__=='__main__':
66  import sys,os
67 
68  def _addBoolArgument(parser, argument, dest=None, help=''):
69  group = parser.add_mutually_exclusive_group()
70  destination = dest if dest else argument
71  group.add_argument('--' + argument, dest=destination, action='store_true', help="Switch on " + help)
72  group.add_argument('--no-' + argument, dest=destination, action='store_false', help="Switch off " + help)
73 
74  from AthenaConfiguration.AllConfigFlags import initConfigFlags
75  flags = initConfigFlags()
76  parser = flags.getArgumentParser()
77  parser.add_argument('--preExec', help='Code to execute before locking configs')
78  parser.add_argument('--postExec', help='Code to execute after setup')
79  parser.add_argument('--printDetailedConfig', action='store_true', help='Print detailed Athena configuration')
80  parser.add_argument('--dumpArguments', action='store_true', help='Print arguments and exit')
81 
82  _addBoolArgument(parser, 'laser', help='Tile Laser monitoring')
83  _addBoolArgument(parser, 'cis', help='Tile CIS monitoring')
84  _addBoolArgument(parser, 'noise', help='Tile Noise monitoring')
85  _addBoolArgument(parser, 'cells', help='Tile Calorimeter Cells monitoring')
86  _addBoolArgument(parser, 'towers', help='Tile Calorimeter Towers monitoring')
87  _addBoolArgument(parser, 'clusters', help='Tile Calorimeter Clusters monitoring')
88  _addBoolArgument(parser, 'muid', help='Tile Calorimeter MuId monitoring')
89  _addBoolArgument(parser, 'muonfit', help='Tile Calorimeter MuonFit monitoring')
90  _addBoolArgument(parser, 'mbts', help='MBTS monitoring')
91  _addBoolArgument(parser, 'rod', help='Tile Calorimeter ROD monitoring')
92  _addBoolArgument(parser, 'digi-noise',dest='digiNoise', help='Tile digi noise monitoring')
93  _addBoolArgument(parser, 'raw-chan-noise',dest='rawChanNoise', help='Tile raw channel noise monitoring')
94  _addBoolArgument(parser, 'tmdb', help='TMDB monitoring')
95  _addBoolArgument(parser, 'tmdb-digits', dest='tmdbDigits', help='TMDB digits monitoring')
96  _addBoolArgument(parser, 'tmdb-raw-channels', dest='tmdbRawChannels', help='TMDB raw channels monitoring')
97  _addBoolArgument(parser, 'online', help='Online environment running')
98 
99  parser.add_argument('--no-mon', action='store_false', dest='mon', help='Do not run Tile monitoring algorithms')
100  parser.add_argument('--cosmics', action='store_true', help='Use cosmics streams for online Tile monitoring')
101  parser.add_argument('--jivexml', action='store_true', help='Create Jive XML output')
102  parser.add_argument('--stateless', action="store_true", help='Run Online Tile monitoring in partition')
103  parser.add_argument('--use-mbts-trigger', action="store_true", dest='useMbtsTrigger', help='Use L1 MBTS triggers')
104  parser.add_argument('--partition', default="", help='EMON, Partition name, default taken from $TDAQ_PARTITION if not set')
105  parser.add_argument('--key', type=str, default="",
106  help='EMON, Selection key, e.g.: SFI, default: dcm (ATLAS), CompleteEvent (TileMon), ReadoutApplication (Tile)')
107  parser.add_argument('--keyValue', default=[],
108  help='EMON, Key values, e.g. [SFI-1, SFI-2]; if empty all SFIs; default: "" (*), TileREB-ROS (Tile)')
109  parser.add_argument('--keyCount', type=int, default=50,
110  help='EMON, key count, e.g. 5 to get five random SFIs, default: 50 (physics), 1000 (laser:CIS)')
111  parser.add_argument('--publishName', default='TilePT-stateless-10', help='EMON, Name under which to publish histograms')
112  parser.add_argument('--include', default="", help='EMON, Regular expression to select histograms to publish')
113  parser.add_argument('--lvl1Items', default=[], help='EMON, A list of L1 bit numbers, default []')
114  parser.add_argument('--lvl1Names', default=[], help='EMON, A list of L1 bit names, default []')
115  parser.add_argument('--lvl1Logic', default='Ignore', choices=['And','Or','Ignore'], help='EMON, default: Ignore')
116  parser.add_argument('--lvl1Origin', default='TAV', choices=['TBP','TAP','TAV'], help='EMON, default: TAV')
117  parser.add_argument('--streamType', default='physics', help='EMON, HLT stream type (e.g. physics or calibration)')
118  parser.add_argument('--streamNames', default=['express','Main','Standby','L1Calo','ZeroBias','Background','MinBias'], help='EMON, List of HLT stream names')
119  parser.add_argument('--streamLogic', default='Or', choices=['And','Or','Ignore'], help='EMON, default: Or')
120  parser.add_argument('--triggerType', type=int, default=256, help='EMON, LVL1 8 bit trigger type, default: 256')
121  parser.add_argument('--groupName', default="TilePhysMon", help='EMON, Name of the monitoring group')
122  parser.add_argument('--postProcessingInterval', type=int, default=10000000,
123  help='Number of events between postprocessing steps (<0: disabled, >evtMax: during finalization)')
124 
125  update_group = parser.add_mutually_exclusive_group()
126  update_group.add_argument('--frequency', type=int, default=0, help='EMON, Frequency (in number of events) of publishing histograms')
127  update_group.add_argument('--updatePeriod', type=int, default=60, help='EMON, Frequency (in seconds) of publishing histograms')
128 
129  args, _ = parser.parse_known_args()
130 
131  # Set up default arguments which can be overriden via command line
132  if not args.mon:
133  parser.set_defaults(cells=False, towers=False, clusters=False, muid=False, muonfit=False, mbts=False,
134  rod=False, tmdb=False, tmdbDigits=False, tmdbRawChannels=False)
135  elif not any([args.laser, args.cis, args.noise, args.mbts]):
136  mbts = False if (args.stateless and args.useMbtsTrigger) else True
137  parser.set_defaults(cells=True, towers=True, clusters=True, muid=True, muonfit=True, mbts=mbts,
138  rod=True, tmdb=True, tmdbDigits=True, tmdbRawChannels=True)
139  elif args.noise:
140  parser.set_defaults(digiNoise=True, rawChanNoise=True)
141 
142  if args.stateless:
143  parser.set_defaults(online=True)
144  partition = args.partition if args.partition else os.getenv('TDAQ_PARTITION', 'ATLAS')
145 
146  keys = {'ATLAS' : 'dcm', 'TileMon' : 'CompleteEvent', 'Tile' : 'ReadoutApplication'}
147  key = args.key if args.key else keys.get(partition, 'dcm')
148 
149  keyValues = {'Tile': ['TileREB-ROS']}
150  keyValue = args.keyValue if args.keyValue else keyValues.get(partition, [])
151 
152  # Given frequency, set up updatePeriod to 0, since updatePeriod has higher priority
153  updatePeriod = 0 if args.frequency > 0 else args.updatePeriod
154  parser.set_defaults(partition=partition, key=key, keyValue=keyValue, updatePeriod=updatePeriod)
155 
156  if any([args.laser, args.cis]):
157  calibGroupName = 'TileLasMon' if args.laser else 'TileCisMon'
158  parser.set_defaults(streamType='calibration', streamNames=['Tile'], streamLogic='And', keyCount=1000, groupName=calibGroupName)
159  elif args.noise:
160  publishInclude = ".*Summary.*|.*DMUErrors.*|.*DigiNoise.*"
161  parser.set_defaults(streamType='physics', streamNames=['CosmicCalo'], streamLogic='And', include=publishInclude,
162  triggerType=0x82, frequency=300, updatePeriod=0, keyCount=100, groupName='TileNoiseMon', postProcessingInterval=299)
163  elif args.mbts:
164 
165  _l1Items = []
166  _l1Names = ['L1_MBTS_1', 'L1_MBTS_1_EMPTY', 'L1_MBTS_1_1_EMPTY']
167  _l1Names += ['L1_MBTSA' + str(counter) for counter in range(0, 16)]
168  _l1Names += ['L1_MBTSC' + str(counter) for counter in range(0, 16)]
169  parser.set_defaults(lvl1Logic='Or', lvl1Origin='TBP', lvl1Items=_l1Items, lvl1Names=_l1Names,
170  keyCount=100, groupName='TileMBTSMon', useMbtsTrigger = True)
171  elif args.cosmics:
172  parser.set_defaults(postProcessingInterval=100, groupName='TileCosmicsMon', streamNames=['CosmicCalo','CosmicMuons','IDCosmic'])
173  else:
174  parser.set_defaults(postProcessingInterval=100)
175 
176  args, _ = parser.parse_known_args()
177 
178  # Setup logs
179  from AthenaCommon.Logging import log
180  from AthenaCommon.Constants import INFO
181  log.setLevel(INFO)
182 
183  if args.dumpArguments:
184  log.info('=====>>> FINAL ARGUMENTS FOLLOW')
185  print('{:40} : {}'.format('Argument Name', 'Value'))
186  for a,v in (vars(args)).items():
187  print(f'{a:40} : {v}')
188  sys.exit(0)
189 
190  # Set the Athena configuration flags to defaults (can be overriden via comand line)
191  flags.DQ.useTrigger = False
192  flags.DQ.enableLumiAccess = False
193  flags.Tile.RunType = TileRunType.PHY
194 
195  if args.mbts and args.useMbtsTrigger:
196  flags.Trigger.triggerConfig = 'DB'
197 
198  flags.Input.Files = []
199  if args.stateless:
200  _configFlagsFromPartition(flags, args.partition, log)
201  flags.Input.isMC = False
202  flags.Input.Format = Format.BS
203  flags.GeoModel.Run = LHCPeriod.Run3
204  if args.mbts and args.useMbtsTrigger:
205  if args.partition in ['TileMon']:
206  flags.Trigger.triggerConfig = 'DB:{:s}:{:d},{:d},{:d},{:d}'.format('TRIGGERDB_RUN3', 3185, 4357, 4219, 2543)
207  else:
208  beamType = flags.Beam.Type
209  from AthenaConfiguration.AutoConfigOnlineRecoFlags import autoConfigOnlineRecoFlags
210  autoConfigOnlineRecoFlags(flags, args.partition)
211  flags.Beam.Type = beamType
212 
213  else:
214  # Initial configuration flags from command line arguments (to be used to set up defaults)
215  flags.fillFromArgs(parser=parser)
216  if not (args.filesInput or flags.Input.Files):
217  if args.laser:
218  inputDirectory = "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TileByteStream/TileByteStream-02-00-00"
219  inputFile = "data18_tilecomm.00363899.calibration_tile.daq.RAW._lb0000._TileREB-ROS._0005-200ev.data"
220  flags.Input.Files = [os.path.join(inputDirectory, inputFile)]
221  flags.Input.RunNumbers = [363899]
222  elif args.cis:
223  inputDirectory = "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TileByteStream/TileByteStream-02-00-00"
224  inputFile = "data18_tilecomm.00363899.calibration_tile.daq.RAW._lb0000._TileREB-ROS._0005-200ev.data"
225  flags.Input.Files = [os.path.join(inputDirectory, inputFile)]
226  flags.Input.RunNumbers = [363899]
227  elif args.noise:
228  inputDirectory = 'root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/det-tile/test'
229  inputFile = 'data12_8TeV.00201555.physics_ZeroBiasOverlay.merge.RAW._lb0150._SFO-ALL._0001.1'
230  flags.Input.Files = [os.path.join(inputDirectory, inputFile)]
231  else:
232  from AthenaConfiguration.TestDefaults import defaultTestFiles
233  flags.Input.Files = defaultTestFiles.RAW_RUN2
234 
235  if any([args.cis, args.laser]):
236  flags.Input.ProjectName = flags.Input.Files[0].split(os.path.sep)[-1].split('.')[0]
237 
238  runNumber = flags.Input.RunNumbers[0]
239  if not flags.Input.isMC:
240  from AthenaConfiguration.TestDefaults import defaultGeometryTags
241  flags.GeoModel.AtlasVersion = defaultGeometryTags.autoconfigure(flags)
242 
243  if not flags.Output.HISTFileName:
244  flags.Output.HISTFileName = 'tilemon_{}.root'.format(runNumber)
245 
246  if args.online:
247  flags.Common.isOnline = True
248  if flags.Common.isOnline:
249  flags.IOVDb.GlobalTag = 'CONDBR2-HLTP-2023-01' if runNumber > 232498 else 'COMCOND-HLTP-004-02'
250  flags.DQ.Environment = 'online'
251  flags.DQ.FileKey = ''
252  else:
253  flags.IOVDb.GlobalTag = 'CONDBR2-BLKPA-2023-01' if runNumber > 232498 else 'COMCOND-BLKPA-RUN1-06'
254 
255  if any([args.laser, args.cis]):
256  if args.laser:
257  flags.Tile.RunType = TileRunType.GAPLAS
258  elif args.cis:
259  flags.Tile.RunType = TileRunType.GAPCIS
260  flags.Tile.doFit = True
261  flags.Tile.correctTime = True
262  flags.Tile.doOverflowFit = False
263  flags.Tile.BestPhaseFromCOOL = True
264  flags.Tile.NoiseFilter = 1
265 
266  if args.jivexml:
267  flags.Output.doJiveXML = True
268 
269  # Override default configuration flags from command line arguments
270  flags.fillFromArgs(parser=parser)
271 
272  if args.preExec:
273  log.info('Executing preExec: %s', args.preExec)
274  exec(args.preExec)
275 
276  log.info('=====>>> FINAL CONFIG FLAGS SETTINGS FOLLOW')
277  flags.dump(pattern='Tile.*|Input.*|Exec.*|IOVDb.[D|G].*', evaluate=True)
278 
279  flags.lock()
280 
281  # Initialize configuration object, add accumulator, merge, and run.
282  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
283  cfg = MainServicesCfg(flags)
284 
285  typeNames = ['CTP_RDO/CTP_RDO'] if args.mbts and args.useMbtsTrigger else []
286 
287  from TileByteStream.TileByteStreamConfig import TileRawDataReadingCfg
288  cfg.merge( TileRawDataReadingCfg(flags, readMuRcv=False,
289  readMuRcvDigits=any([args.tmdbDigits, args.tmdb]),
290  readMuRcvRawCh=any([args.tmdbRawChannels, args.tmdb]),
291  readLaserObj=False,
292  stateless=args.stateless,
293  type_names=typeNames) )
294 
295  if args.stateless:
296  bsEmonInputSvc = cfg.getService( "ByteStreamInputSvc" )
297  bsEmonInputSvc.Partition = args.partition
298  bsEmonInputSvc.Key = args.key
299  bsEmonInputSvc.KeyValue = args.keyValue
300  bsEmonInputSvc.KeyCount = args.keyCount
301  bsEmonInputSvc.PublishName = args.publishName
302  bsEmonInputSvc.ISServer = 'Histogramming'
303  bsEmonInputSvc.Include = args.include
304  bsEmonInputSvc.UpdatePeriod = args.updatePeriod
305  bsEmonInputSvc.Frequency = args.frequency
306  bsEmonInputSvc.LVL1Items = args.lvl1Items
307  bsEmonInputSvc.LVL1Names = args.lvl1Names
308  bsEmonInputSvc.LVL1Logic = args.lvl1Logic
309  bsEmonInputSvc.LVL1Origin = args.lvl1Origin
310  bsEmonInputSvc.StreamType = 'express' if flags.Beam.Type is BeamType.SingleBeam else args.streamType
311  bsEmonInputSvc.StreamNames = args.streamNames
312  bsEmonInputSvc.StreamLogic = args.streamLogic
313  bsEmonInputSvc.GroupName = args.groupName
314  bsEmonInputSvc.ProcessCorruptedEvents = True
315  bsEmonInputSvc.BufferSize = 200
316 
317  cfg.addPublicTool( CompFactory.TileROD_Decoder(fullTileMode = runNumber) )
318 
319  from TileRecUtils.TileRawChannelMakerConfig import TileRawChannelMakerCfg
320  cfg.merge( TileRawChannelMakerCfg(flags) )
321  if args.threads and (args.threads > 1):
322  rawChMaker = cfg.getEventAlgo('TileRChMaker')
323  rawChMaker.Cardinality = args.threads
324 
325  l1Triggers = ['bit0_RNDM', 'bit1_ZeroBias', 'bit2_L1Cal', 'bit3_Muon',
326  'bit4_RPC', 'bit5_FTK', 'bit6_CTP', 'bit7_Calib', 'AnyPhysTrig']
327 
328  if any([args.laser, args.cis]):
329  triggerTypes = [0x34] if args.laser else [0x32]
330  from TileMonitoring.TileRawChannelTimeMonitorAlgorithm import TileRawChannelTimeMonitoringConfig
331  cfg.merge(TileRawChannelTimeMonitoringConfig(flags, TriggerTypes=triggerTypes))
332 
333  if args.rod:
334  from TileMonitoring.TileRODMonitorAlgorithm import TileRODMonitoringConfig
335  cfg.merge(TileRODMonitoringConfig(flags, fillHistogramsForL1Triggers = l1Triggers))
336 
337  if args.tmdbDigits:
338  from TileMonitoring.TileTMDBDigitsMonitorAlgorithm import TileTMDBDigitsMonitoringConfig
339  cfg.merge(TileTMDBDigitsMonitoringConfig(flags))
340 
341  if args.tmdbRawChannels:
342  from TileMonitoring.TileTMDBRawChannelMonitorAlgorithm import TileTMDBRawChannelMonitoringConfig
343  cfg.merge(TileTMDBRawChannelMonitoringConfig(flags))
344 
345  if args.tmdb:
346  from TileMonitoring.TileTMDBMonitorAlgorithm import TileTMDBMonitoringConfig
347  cfg.merge(TileTMDBMonitoringConfig(flags))
348 
349  if any([args.cells, args.towers, args.clusters, args.mbts, args.muid, args.muonfit, flags.Output.doJiveXML]):
350  from TileRecUtils.TileCellMakerConfig import TileCellMakerCfg
351  cfg.merge( TileCellMakerCfg(flags) )
352 
353  if args.cells:
354  from TileMonitoring.TileCellMonitorAlgorithm import TileCellMonitoringConfig
355  cfg.merge(TileCellMonitoringConfig(flags, fillHistogramsForL1Triggers = l1Triggers, fillGapScintilatorHistograms=True))
356 
357  if args.towers:
358  from TileMonitoring.TileTowerMonitorAlgorithm import TileTowerMonitoringConfig
359  cfg.merge(TileTowerMonitoringConfig(flags, fillHistogramsForL1Triggers = l1Triggers))
360 
361  if args.clusters:
362  from TileMonitoring.TileClusterMonitorAlgorithm import TileClusterMonitoringConfig
363  cfg.merge(TileClusterMonitoringConfig(flags, fillTimingHistograms = True, fillHistogramsForL1Triggers = l1Triggers))
364 
365  if args.mbts:
366  from TileMonitoring.TileMBTSMonitorAlgorithm import TileMBTSMonitoringConfig
367  cfg.merge(TileMBTSMonitoringConfig(flags, FillHistogramsPerMBTS = True, useTrigger = args.useMbtsTrigger))
368 
369  if args.muid:
370  from TileMuId.TileMuIdConfig import TileLookForMuAlgCfg
371  cfg.merge(TileLookForMuAlgCfg(flags))
372 
373  from TileMonitoring.TileMuIdMonitorAlgorithm import TileMuIdMonitoringConfig
374  cfg.merge(TileMuIdMonitoringConfig(flags, fillHistogramsForL1Triggers = l1Triggers))
375 
376  if args.muonfit:
377  from TileCosmicAlgs.TileMuonFitterConfig import TileMuonFitterCfg
378  cfg.merge(TileMuonFitterCfg(flags))
379 
380  from TileMonitoring.TileMuonFitMonitorAlgorithm import TileMuonFitMonitoringConfig
381  cfg.merge(TileMuonFitMonitoringConfig(flags, fillHistogramsForL1Triggers = l1Triggers))
382 
383  if args.digiNoise:
384  from TileMonitoring.TileDigiNoiseMonitorAlgorithm import TileDigiNoiseMonitoringConfig
385  cfg.merge(TileDigiNoiseMonitoringConfig(flags))
386 
387  if args.rawChanNoise:
388  from TileMonitoring.TileRawChannelNoiseMonitorAlgorithm import TileRawChannelNoiseMonitoringConfig
389  cfg.merge(TileRawChannelNoiseMonitoringConfig(flags))
390 
391  from TileMonitoring.TileDQFragMonitorAlgorithm import TileDQFragMonitoringConfig
392  cfg.merge( TileDQFragMonitoringConfig(flags) )
393 
394  if any([args.digiNoise, args.rawChanNoise, args.tmdbDigits, args.tmdb]) and args.postProcessingInterval > 0:
395  from AthenaCommon.Utils.unixtools import find_datafile
396  configurations = []
397  dataPath = find_datafile('TileMonitoring')
398  if any([args.tmdbDigits, args.tmdb]):
399  configurations += [os.path.join(dataPath, 'TileTMDBPostProc.yaml')]
400  if args.digiNoise:
401  configurations += [os.path.join(dataPath, 'TileDigiNoisePostProc.yaml')]
402  if args.rawChanNoise:
403  configurations += [os.path.join(dataPath, 'TileRawChanNoisePostProc.yaml')]
404 
405  from DataQualityUtils.DQPostProcessingAlg import DQPostProcessingAlg
406  class TileMonPostProcessingAlg(DQPostProcessingAlg):
407  def initialize(self):
408  if hasattr(self, 'OutputLevel'):
409  self.msg.setLevel(self.OutputLevel)
410  return super(TileMonPostProcessingAlg, self).initialize()
411 
412  ppa = TileMonPostProcessingAlg("TileMonPostProcessingAlg")
413  ppa.OutputLevel = flags.Exec.OutputLevel
414  ppa.ExtraInputs = {( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )}
415  ppa.Interval = args.postProcessingInterval
416  ppa.ConfigFiles = configurations
417  ppa._ctr = 1 # Start postprocessing only after specified number of events (not during the first one)
418  if flags.Common.isOnline:
419  fileKey = flags.DQ.FileKey
420  ppa.FileKey = (fileKey + '/') if not fileKey.endswith('/') else fileKey
421  else:
422  ppa.FileKey = f'/{flags.DQ.FileKey}/run_{runNumber}/'
423 
424  cfg.addEventAlgo(ppa, sequenceName='AthEndSeq')
425 
426  if flags.Output.doJiveXML:
427  from TileMonitoring.TileJiveXMLConfig import TileAlgoJiveXMLCfg
428  cfg.merge(TileAlgoJiveXMLCfg(flags, WriteToFile=(not args.stateless), stateless=args.stateless))
429 
430 
431  # Any last things to do?
432  if args.postExec:
433  log.info('Executing postExec: %s', args.postExec)
434  exec(args.postExec)
435 
436  if flags.Common.isOnline:
437  cfg.getService("THistSvc").Output=["Tile DATAFILE='%s' OPT='RECREATE'" % (flags.Output.HISTFileName)]
438  cfg.getService("TileCablingSvc").CablingType=6
439 
440  if args.stateless and args.cis:
441  cfg.getEventAlgo('TileDQstatusAlg').TileBeamElemContainer=""
442 
443  cfg.printConfig(withDetails=args.printDetailedConfig)
444 
445  sc = cfg.run()
446  sys.exit(0 if sc.isSuccess() else 1)
TileTMDBRawChannelMonitorAlgorithm.TileTMDBRawChannelMonitoringConfig
def TileTMDBRawChannelMonitoringConfig(flags, MuRcvRawChCnt="MuRcvRawChCnt", FillRawChannelHistograms=True, FillEfficiencyHistograms=False, **kwargs)
Definition: TileTMDBRawChannelMonitorAlgorithm.py:48
vtune_athena.format
format
Definition: vtune_athena.py:14
TileJiveXMLConfig.TileAlgoJiveXMLCfg
def TileAlgoJiveXMLCfg(flags, TileDigitsContainer=None, TileRawChannelContainer=None, CaloClusterContainer='TileTopoCluster', **kwargs)
Definition: TileJiveXMLConfig.py:57
RunTileMonitoring._configFlagsFromPartition
def _configFlagsFromPartition(flags, partition, log)
Definition: RunTileMonitoring.py:13
TileTMDBMonitorAlgorithm.TileTMDBMonitoringConfig
def TileTMDBMonitoringConfig(flags, **kwargs)
Definition: TileTMDBMonitorAlgorithm.py:12
TileRawChannelNoiseMonitorAlgorithm.TileRawChannelNoiseMonitoringConfig
def TileRawChannelNoiseMonitoringConfig(flags, **kwargs)
Definition: TileRawChannelNoiseMonitorAlgorithm.py:8
TileMuIdMonitorAlgorithm.TileMuIdMonitoringConfig
def TileMuIdMonitoringConfig(flags, **kwargs)
Definition: TileMuIdMonitorAlgorithm.py:8
TileCellMakerConfig.TileCellMakerCfg
def TileCellMakerCfg(flags, mergeChannels=True, **kwargs)
Definition: TileCellMakerConfig.py:32
TileRODMonitorAlgorithm.TileRODMonitoringConfig
def TileRODMonitoringConfig(flags, **kwargs)
Definition: TileRODMonitorAlgorithm.py:9
RunTileMonitoring.TileMonPostProcessingAlg
Definition: RunTileMonitoring.py:406
TileMuonFitMonitorAlgorithm.TileMuonFitMonitoringConfig
def TileMuonFitMonitoringConfig(flags, **kwargs)
Definition: TileMuonFitMonitorAlgorithm.py:11
TileTowerMonitorAlgorithm.TileTowerMonitoringConfig
def TileTowerMonitoringConfig(flags, **kwargs)
Definition: TileTowerMonitorAlgorithm.py:11
pool::DbPrintLvl::setLevel
void setLevel(MsgLevel l)
Definition: DbPrint.h:32
TileClusterMonitorAlgorithm.TileClusterMonitoringConfig
def TileClusterMonitoringConfig(flags, **kwargs)
Definition: TileClusterMonitorAlgorithm.py:8
CBNT_TBInfo.BeamType
BeamType
Definition: CBNT_TBInfo.py:29
LArG4FSStartPointFilter.exec
exec
Definition: LArG4FSStartPointFilter.py:103
TileMBTSMonitorAlgorithm.TileMBTSMonitoringConfig
def TileMBTSMonitoringConfig(flags, **kwargs)
Definition: TileMBTSMonitorAlgorithm.py:10
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
TileCellMonitorAlgorithm.TileCellMonitoringConfig
def TileCellMonitoringConfig(flags, **kwargs)
Definition: TileCellMonitorAlgorithm.py:8
Constants
some useful constants -------------------------------------------------—
RunTileMonitoring.TileMonPostProcessingAlg.initialize
def initialize(self)
Definition: RunTileMonitoring.py:407
python.AutoConfigOnlineRecoFlags.autoConfigOnlineRecoFlags
def autoConfigOnlineRecoFlags(flags, partition=None)
Definition: AutoConfigOnlineRecoFlags.py:134
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
TileDigiNoiseMonitorAlgorithm.TileDigiNoiseMonitoringConfig
def TileDigiNoiseMonitoringConfig(flags, **kwargs)
Definition: TileDigiNoiseMonitorAlgorithm.py:8
TileTMDBDigitsMonitorAlgorithm.TileTMDBDigitsMonitoringConfig
def TileTMDBDigitsMonitoringConfig(flags)
Definition: TileTMDBDigitsMonitorAlgorithm.py:10
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
TileDQFragMonitorAlgorithm.TileDQFragMonitoringConfig
def TileDQFragMonitoringConfig(flags, **kwargs)
Definition: TileDQFragMonitorAlgorithm.py:10
TileByteStreamConfig.TileRawDataReadingCfg
def TileRawDataReadingCfg(flags, readDigits=True, readRawChannel=True, readMuRcv=None, readMuRcvDigits=False, readMuRcvRawCh=False, readBeamElem=None, readLaserObj=None, readDigitsFlx=False, readL2=False, stateless=False, **kwargs)
Definition: TileByteStreamConfig.py:87
TileRawChannelMakerConfig.TileRawChannelMakerCfg
def TileRawChannelMakerCfg(flags, **kwargs)
Definition: TileRawChannelMakerConfig.py:10
TileMuIdConfig.TileLookForMuAlgCfg
def TileLookForMuAlgCfg(flags, **kwargs)
Definition: TileMuIdConfig.py:12
TileMuonFitterConfig.TileMuonFitterCfg
def TileMuonFitterCfg(flags, **kwargs)
Definition: TileMuonFitterConfig.py:12
str
Definition: BTagTrackIpAccessor.cxx:11
RunTileMonitoring._addBoolArgument
def _addBoolArgument(parser, argument, dest=None, help='')
Definition: RunTileMonitoring.py:68
python.Utils.unixtools.find_datafile
def find_datafile(fname, pathlist=None, access=os.R_OK)
pathresolver-like helper function --------------------------------------—
Definition: unixtools.py:67
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
TileRawChannelTimeMonitorAlgorithm.TileRawChannelTimeMonitoringConfig
def TileRawChannelTimeMonitoringConfig(flags, amplitudeFragIDs=None, **kwargs)
Definition: TileRawChannelTimeMonitorAlgorithm.py:11