ATLAS Offline Software
Classes | Functions | Variables
LVL1CaloMonitoringConfig Namespace Reference

Classes

class  L1CaloMonitorCfgHelper
 

Functions

def LVL1CaloMonitoringConfig (flags)
 

Variables

 flags
 
 useTrigger
 
 Environment
 
 DataType
 
 enableLumiAccess
 
 h
 
 type
 
 path
 
 hanConfig
 
 thresholdConfig
 

Function Documentation

◆ LVL1CaloMonitoringConfig()

def LVL1CaloMonitoringConfig.LVL1CaloMonitoringConfig (   flags)
Function to call l1calo DQ monitoring algorithms

Definition at line 280 of file LVL1CaloMonitoringConfig.py.

280 def LVL1CaloMonitoringConfig(flags):
281  '''Function to call l1calo DQ monitoring algorithms'''
282  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
283  from AthenaConfiguration.Enums import Format
284  import logging
285 
286  # local printing
287  local_logger = logging.getLogger('AthenaMonitoringCfg')
288  info = local_logger.info
289  info('In LVL1CaloMonitoringConfig')
290 
291  result = ComponentAccumulator()
292 
293  # If we're not putting trigger objects in event store, can't monitor them
294  if not flags.Trigger.Online.isPartition:
295  if not flags.DQ.triggerDataAvailable:
296  return result
297 
298  isData = not flags.Input.isMC
299 
300  # check if validation requested
301  validation=flags.DQ.Steering.LVL1Calo.doValidation
302 
303  # monitoring algorithm configs
304  # do not run on MC or RAW->ESD(tier0), or AOD-only
305  if not validation and isData and flags.DQ.Environment not in ('tier0Raw', 'AOD'):
306 
307  from TrigT1CaloMonitoring.PprMonitorAlgorithm import PprMonitoringConfig
308  from TrigT1CaloMonitoring.JepJemMonitorAlgorithm import JepJemMonitoringConfig
309 
310  # Use metadata to check Run3 compatible trigger info is available
311  from AthenaConfiguration.AutoConfigFlags import GetFileMD
312  md = GetFileMD(flags.Input.Files)
313  inputContainsRun3FormatConfigMetadata = ("metadata_items" in md and any(('TriggerMenuJson' in key) for key in md["metadata_items"].keys()))
314  result.merge(PprMonitoringConfig(flags))
315  result.merge(JepJemMonitoringConfig(flags))
316  if flags.Input.Format is not Format.POOL or inputContainsRun3FormatConfigMetadata:
317  # L1 menu available in the POOL file
318 
319  # since the legacy system started getting turned off in 2024, use detMask to determine
320  # which things are included, and therefore need monitoring ...
321  import eformat
322  detMask=eformat.helper.DetectorMask(f'{md.get("detectorMask",[0x0])[0]:032x}') #DetectorMask constructor swallows two 64bit ints
323  hasCPM = detMask.is_set(eformat.helper.SubDetector.TDAQ_CALO_CLUSTER_PROC_DAQ)
324  hasJEP = detMask.is_set(eformat.helper.SubDetector.TDAQ_CALO_JET_PROC_DAQ)
325 
326  if hasCPM:
327  from TrigT1CaloMonitoring.CpmMonitorAlgorithm import CpmMonitoringConfig
328  from TrigT1CaloMonitoring.CpmSimMonitorAlgorithm import CpmSimMonitoringConfig
329  result.merge(CpmMonitoringConfig(flags))
330  result.merge(CpmSimMonitoringConfig(flags))
331 
332  if hasJEP:
333  from TrigT1CaloMonitoring.JepCmxMonitorAlgorithm import JepCmxMonitoringConfig
334  result.merge(JepCmxMonitoringConfig(flags))
335 
336  from TrigT1CaloMonitoring.OverviewMonitorAlgorithm import OverviewMonitoringConfig
337  from TrigT1CaloMonitoring.PPMSimBSMonitorAlgorithm import PPMSimBSMonitoringConfig
338  result.merge(PPMSimBSMonitoringConfig(flags))
339  result.merge(OverviewMonitoringConfig(flags))
340 
341  if not hasCPM:
342  # CPM was disabled for run 480893 onwards, so stop monitoring that part
343  OverviewMonAlg = result.getEventAlgo("OverviewMonAlg")
344  OverviewMonAlg.CPMErrorLocation = ""
345  OverviewMonAlg.CPMMismatchLocation = ""
346 
347  if flags.Input.TriggerStream == "physics_Mistimed":
348  from TrigT1CaloMonitoring.MistimedStreamMonitorAlgorithm import MistimedStreamMonitorConfig
349  result.merge(MistimedStreamMonitorConfig(flags))
350 
351  # For running on bytestream data
352  if flags.Input.Format is Format.BS:
353  from TrigT1CaloByteStream.LVL1CaloRun2ByteStreamConfig import LVL1CaloRun2ReadBSCfg
354  result.merge(LVL1CaloRun2ReadBSCfg(flags))
355 
356  # Phase 1 monitoring of inputs and sim-vs-hw
357  if flags.Trigger.enableL1CaloPhase1 and flags.Input.Format is not Format.POOL:
358 
359  # run the L1Calo simulation (causes conflicts with DAOD)
360  from L1CaloFEXSim.L1CaloFEXSimCfg import L1CaloFEXSimCfg
361  result.merge(L1CaloFEXSimCfg(flags))
362 
363  #efex monitoring
364  if flags.Trigger.L1.doeFex:
365  from TrigT1CaloMonitoring.EfexInputMonitorAlgorithm import EfexInputMonitoringConfig
366  result.merge(EfexInputMonitoringConfig(flags))
367 
368  # monitoring of simulation vs hardware
369  from TrigT1CaloMonitoring.EfexSimMonitorAlgorithm import EfexSimMonitoringConfig
370  result.merge(EfexSimMonitoringConfig(flags))
371 
372  #gfex monitoring
373  if flags.Trigger.L1.dogFex:
374  #gfex input monitoring
375  from TrigT1CaloMonitoring.GfexInputMonitorAlgorithm import GfexInputMonitoringConfig
376  result.merge(GfexInputMonitoringConfig(flags))
377 
378  from TrigT1CaloMonitoring.GfexSimMonitorAlgorithm import GfexSimMonitoringConfig
379  result.merge(GfexSimMonitoringConfig(flags))
380 
381  #jfex monitoring
382  if flags.Trigger.L1.dojFex:
383  #jfex monitoring for input data
384  from TrigT1CaloMonitoring.JfexInputMonitorAlgorithm import JfexInputMonitoringConfig
385  result.merge(JfexInputMonitoringConfig(flags))
386 
387  #jfex monitoring for Data Vs Simulation
388  from TrigT1CaloMonitoring.JfexSimMonitorAlgorithm import JfexSimMonitoringConfig
389  JfexSimMonitoring = JfexSimMonitoringConfig(flags)
390  result.merge(JfexSimMonitoring)
391 
392  # run FEX output monitoring if doing validation or running on data not @ tier0 or on AOD
393  if validation or (isData and flags.DQ.Environment not in ('tier0Raw', 'AOD')):
394 
395  if validation:
396  # only run this monitoring if doing validation
397  from TrigT1CaloMonitoring.L1CaloLegacyEDMMonitorAlgorithm import L1CaloLegacyEDMMonitoringConfig
398  result.merge(L1CaloLegacyEDMMonitoringConfig(flags))
399 
400  #efex monitoring
401  if flags.Trigger.L1.doeFex:
402  from TrigT1CaloMonitoring.EfexMonitorAlgorithm import EfexMonitoringConfig
403  result.merge(EfexMonitoringConfig(flags))
404  from TrigT1CaloMonitoring.EfexMonitorAlgorithm import EfexMonitoringHistConfig
405  result.merge(EfexMonitoringHistConfig(flags,result.getEventAlgo('EfexMonAlg')))
406 
407  #gfex monitoring
408  if flags.Trigger.L1.dogFex:
409  from TrigT1CaloMonitoring.GfexMonitorAlgorithm import GfexMonitoringConfig
410  result.merge(GfexMonitoringConfig(flags))
411 
412  #jfex monitoring
413  if flags.Trigger.L1.dojFex:
414  from TrigT1CaloMonitoring.JfexMonitorAlgorithm import JfexMonitoringConfig
415  result.merge(JfexMonitoringConfig(flags))
416 
417  # jet efficiency monitoring -- needs either gfex or jfex to be worth scheduling
418  if flags.Trigger.L1.dojFex or flags.Trigger.L1.dogFex:
419  from TrigT1CaloMonitoring.JetEfficiencyMonitorAlgorithm import JetEfficiencyMonitoringConfig
420  result.merge(JetEfficiencyMonitoringConfig(flags))
421 
422  result.printConfig( withDetails= True )
423 
424  return result
425 

Variable Documentation

◆ DataType

LVL1CaloMonitoringConfig.DataType

Definition at line 433 of file LVL1CaloMonitoringConfig.py.

◆ enableLumiAccess

LVL1CaloMonitoringConfig.enableLumiAccess

Definition at line 434 of file LVL1CaloMonitoringConfig.py.

◆ Environment

LVL1CaloMonitoringConfig.Environment

Definition at line 432 of file LVL1CaloMonitoringConfig.py.

◆ flags

LVL1CaloMonitoringConfig.flags

Definition at line 430 of file LVL1CaloMonitoringConfig.py.

◆ h

LVL1CaloMonitoringConfig.h

Definition at line 436 of file LVL1CaloMonitoringConfig.py.

◆ hanConfig

LVL1CaloMonitoringConfig.hanConfig

Definition at line 437 of file LVL1CaloMonitoringConfig.py.

◆ path

LVL1CaloMonitoringConfig.path

Definition at line 437 of file LVL1CaloMonitoringConfig.py.

◆ thresholdConfig

LVL1CaloMonitoringConfig.thresholdConfig

Definition at line 445 of file LVL1CaloMonitoringConfig.py.

◆ type

LVL1CaloMonitoringConfig.type

Definition at line 437 of file LVL1CaloMonitoringConfig.py.

◆ useTrigger

LVL1CaloMonitoringConfig.useTrigger

Definition at line 431 of file LVL1CaloMonitoringConfig.py.

grepfile.info
info
Definition: grepfile.py:38
python.AutoConfigFlags.GetFileMD
def GetFileMD(filenames, allowEmpty=True, maxLevel='peeker')
Definition: AutoConfigFlags.py:65
EfexMonitorAlgorithm.EfexMonitoringHistConfig
def EfexMonitoringHistConfig(flags, eFexAlg)
Definition: EfexMonitorAlgorithm.py:35
PPMSimBSMonitorAlgorithm.PPMSimBSMonitoringConfig
def PPMSimBSMonitoringConfig(flags)
Definition: PPMSimBSMonitorAlgorithm.py:7
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
EfexSimMonitorAlgorithm.EfexSimMonitoringConfig
def EfexSimMonitoringConfig(flags)
Definition: EfexSimMonitorAlgorithm.py:4
GfexSimMonitorAlgorithm.GfexSimMonitoringConfig
def GfexSimMonitoringConfig(flags, UseOfflineCopy=True)
Definition: GfexSimMonitorAlgorithm.py:4
LVL1CaloRun2ByteStreamConfig.LVL1CaloRun2ReadBSCfg
def LVL1CaloRun2ReadBSCfg(flags, forRoIBResultToxAOD=False)
Definition: LVL1CaloRun2ByteStreamConfig.py:121
CpmSimMonitorAlgorithm.CpmSimMonitoringConfig
def CpmSimMonitoringConfig(inputFlags)
Definition: CpmSimMonitorAlgorithm.py:4
EfexInputMonitorAlgorithm.EfexInputMonitoringConfig
def EfexInputMonitoringConfig(flags)
Definition: EfexInputMonitorAlgorithm.py:4
L1CaloLegacyEDMMonitorAlgorithm.L1CaloLegacyEDMMonitoringConfig
def L1CaloLegacyEDMMonitoringConfig(inputFlags)
Definition: L1CaloLegacyEDMMonitorAlgorithm.py:5
GfexInputMonitorAlgorithm.GfexInputMonitoringConfig
def GfexInputMonitoringConfig(flags)
Definition: GfexInputMonitorAlgorithm.py:4
PprMonitorAlgorithm.PprMonitoringConfig
def PprMonitoringConfig(inputFlags)
Definition: PprMonitorAlgorithm.py:5
LVL1CaloMonitoringConfig.LVL1CaloMonitoringConfig
def LVL1CaloMonitoringConfig(flags)
Definition: LVL1CaloMonitoringConfig.py:280
GfexMonitorAlgorithm.GfexMonitoringConfig
def GfexMonitoringConfig(flags)
Definition: GfexMonitorAlgorithm.py:4
JepCmxMonitorAlgorithm.JepCmxMonitoringConfig
def JepCmxMonitoringConfig(inputFlags)
Definition: JepCmxMonitorAlgorithm.py:4
MistimedStreamMonitorAlgorithm.MistimedStreamMonitorConfig
def MistimedStreamMonitorConfig(flags, Legacy, PhaseI)
Definition: MistimedStreamMonitorAlgorithm.py:6
JfexSimMonitorAlgorithm.JfexSimMonitoringConfig
def JfexSimMonitoringConfig(flags)
Definition: JfexSimMonitorAlgorithm.py:4
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
JfexInputMonitorAlgorithm.JfexInputMonitoringConfig
def JfexInputMonitoringConfig(flags)
Definition: JfexInputMonitorAlgorithm.py:4
EfexMonitorAlgorithm.EfexMonitoringConfig
def EfexMonitoringConfig(inputFlags)
Definition: EfexMonitorAlgorithm.py:4
JetEfficiencyMonitorAlgorithm.JetEfficiencyMonitoringConfig
def JetEfficiencyMonitoringConfig(flags)
Definition: JetEfficiencyMonitorAlgorithm.py:4
CpmMonitorAlgorithm.CpmMonitoringConfig
def CpmMonitoringConfig(inputFlags)
Definition: CpmMonitorAlgorithm.py:4
JepJemMonitorAlgorithm.JepJemMonitoringConfig
def JepJemMonitoringConfig(inputFlags)
Definition: JepJemMonitorAlgorithm.py:4
L1CaloFEXSimCfg
Definition: L1CaloFEXSimCfg.py:1
JfexMonitorAlgorithm.JfexMonitoringConfig
def JfexMonitoringConfig(flags)
Definition: JfexMonitorAlgorithm.py:4
OverviewMonitorAlgorithm.OverviewMonitoringConfig
def OverviewMonitoringConfig(inputFlags)
Definition: OverviewMonitorAlgorithm.py:4