5 '''@file TrigHLTMonitorAlgorithm.py
10 @brief TrigHLTMonitoring top-level files
13 from AthenaConfiguration.Enums
import HIMode
15 logger = logging.getLogger(
'TrigHLTMonitoring')
17 RAWonlySignatureList = [
'Calo',
'MET']
20 from AthenaConfiguration.AthConfigFlags
import AthConfigFlags
23 from AthenaConfiguration.Enums
import Format
24 from AthenaConfiguration.Enums
import BeamType
26 acf.addFlag(
'DQ.Steering.HLT.doGeneral',
True)
27 acf.addFlag(
'DQ.Steering.HLT.doBjet',
lambda flags: flags.Beam.Type
is BeamType.Collisions)
28 acf.addFlag(
'DQ.Steering.HLT.doBphys',
True)
29 acf.addFlag(
'DQ.Steering.HLT.doCalo',
True)
30 acf.addFlag(
'DQ.Steering.HLT.doEgamma',
True)
31 acf.addFlag(
'DQ.Steering.HLT.doInDet',
True)
32 acf.addFlag(
'DQ.Steering.HLT.doJet',
lambda flags: flags.Input.Format
is Format.POOL
or (flags.Input.Format
is Format.BS
and flags.Beam.Type
is BeamType.Collisions))
33 acf.addFlag(
'DQ.Steering.HLT.doMET',
lambda flags: flags.Reco.HIMode
is not HIMode.HI)
34 acf.addFlag(
'DQ.Steering.HLT.doMinBias',
True)
35 acf.addFlag(
'DQ.Steering.HLT.doMuon',
True)
36 acf.addFlag(
'DQ.Steering.HLT.doTau',
lambda flags: flags.Beam.Type
is BeamType.Collisions
and (flags.Reco.HIMode
is not HIMode.HI))
41 if inputFlags.DQ.Environment ==
'AOD' and not inputFlags.Input.isMC:
42 for signature
in RAWonlySignatureList:
43 sigFlag = f
"do{signature}"
44 if getattr(inputFlags.DQ.Steering.HLT, sigFlag):
45 logger.error(f
"HLT monitoring on data AOD input for {signature} not allowed - not all HLT collections are recorded to AOD! Try set DQ.Steering.HLT.{sigFlag}=False.")
46 raise ValueError(
"HLT monitoring enabled on data AOD input.")
49 '''Configuring the HLT signatures top-level steering in the DQ monitoring system.'''
57 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
61 if inputFlags.DQ.Environment
in (
'online',
'tier0',
'tier0ESD',
'AOD'):
67 if inputFlags.DQ.Steering.HLT.doGeneral:
68 from TrigHLTMonitoring.TrigGeneralMonitorAlgorithm
import TrigGeneralMonConfig
71 if inputFlags.DQ.Steering.HLT.doInDet:
72 from TrigInDetMonitoring.TIDAMonitoring
import TrigInDetMonConfig
75 if inputFlags.DQ.Steering.HLT.doBjet:
76 from TrigBjetMonitoring.TrigBjetMonitorAlgorithm
import TrigBjetMonConfig
79 if inputFlags.DQ.Steering.HLT.doBphys:
80 from TrigBphysMonitoring.TrigBphysMonitorAlgorithm
import TrigBphysMonConfig
83 if inputFlags.DQ.Steering.HLT.doCalo:
84 from TrigCaloMonitoring.TrigCaloMonitorAlgorithm
import TrigCaloMonConfig
87 if inputFlags.DQ.Steering.HLT.doEgamma:
88 from TrigEgammaMonitoring.TrigEgammaMonitorAlgorithm
import TrigEgammaMonConfig
91 if inputFlags.DQ.Steering.HLT.doJet:
92 from TrigJetMonitoring.TrigJetMonitorAlgorithm
import TrigJetMonConfig
95 if inputFlags.DQ.Steering.HLT.doMET:
96 from TrigMETMonitoring.TrigMETMonitorAlgorithm
import TrigMETMonConfig
99 if inputFlags.DQ.Steering.HLT.doMinBias:
100 from TrigMinBiasMonitoring.TrigMinBiasMonitoringMT
import TrigMinBias
103 if inputFlags.DQ.Steering.HLT.doMuon:
104 from TrigMuonMonitoring.TrigMuonMonitoringConfig
import TrigMuonMonConfig
107 if inputFlags.DQ.Steering.HLT.doTau:
108 from TrigTauMonitoring.TrigTauMonitorAlgorithm
import TrigTauMonConfig