5 from AthenaConfiguration.AthConfigFlags
import AthConfigFlags
6 from AthenaConfiguration.Enums
import FlagEnum,HIMode
8 _steeringFlags = [
'doGlobalMon',
'doLVL1CaloMon',
'doLVL1InterfacesMon',
'doCTPMon',
'doHLTMon',
9 'doPixelMon',
'doSCTMon',
'doTRTMon',
'doInDetMon',
10 'doLArMon',
'doTileMon',
11 'doCaloGlobalMon',
'doMuonMon',
12 'doLucidMon',
'doAFPMon',
'doZDCMon',
13 'doHIMon',
'doEgammaMon',
'doJetMon',
'doMissingEtMon',
15 'doTauMon',
'doJetTagMon',
'doDataFlowMon' ]
17 _lowLevelSteeringFlags = [
'InDet.doGlobalMon',
'InDet.doAlignMon',
18 'InDet.doPerfMon',
'Muon.doRawMon',
19 'Muon.doTrackMon',
'Muon.doAlignMon',
21 'Muon.doPhysicsMon',
'Muon.doTrkPhysMon',
22 'Muon.doCombinedMon',
'LVL1Calo.doValidation'
27 """Flag values for DQ.DataType"""
28 Collisions =
'collisions'
30 HeavyIon =
'heavyioncollisions'
37 acf.addFlag(
'DQ.doMonitoring',
False)
38 acf.addFlag(
'DQ.doStreamAwareMon',
True)
39 acf.addFlag(
'DQ.disableAtlasReadyFilter',
False)
40 acf.addFlag(
'DQ.disableFilledBunchFilter',
False)
41 acf.addFlag(
'DQ.enableLumiAccess',
True)
42 acf.addFlag(
'DQ.FileKey',
'CombinedMonitoring')
45 acf.addFlag(
'DQ.triggerDataAvailable',
True)
47 acf.addFlag(
'DQ.useTrigger', getUseTrigger)
50 acf.addFlag(
'DQ.Environment', getEnvironment )
51 acf.addFlag(
'DQ.DataType', getDataType, type=DQDataType )
54 acf.addFlag(
'DQ.doPostProcessing',
False)
55 acf.addFlag(
'DQ.postProcessingInterval', 100)
58 for flag
in _steeringFlags + _lowLevelSteeringFlags:
59 if flag ==
'doLVL1CaloMon':
62 if flag
in [
'doJetTagMon',
'doMissingEtMon',
'doTauMon']:
63 arg =
lambda x: x.DQ.DataType
is not DQDataType.Cosmics
and x.Reco.HIMode
is not HIMode.HI
64 if flag
in [
'doJetMon',
'doJetTagMon'] :
65 arg =
lambda x: x.DQ.DataType
is not DQDataType.Cosmics
66 if flag ==
'doHLTMon':
69 arg =
lambda x: x.Trigger.EDMVersion == 3
and x.DQ.Environment !=
'AOD'
70 if flag ==
'LVL1Calo.doValidation':
72 acf.addFlag(
'DQ.Steering.' + flag, arg)
75 acf.addFlag(
'DQ.Steering.doLVL1CaloMon', _hasL1Calo)
78 from PyUtils.moduleExists
import moduleExists
79 if moduleExists (
'TrigHLTMonitoring'):
80 from TrigHLTMonitoring.TrigHLTMonitorAlgorithm
import createHLTDQConfigFlags
85 from PyUtils.moduleExists
import moduleExists
86 hlt_exists = moduleExists (
'TrigHLTMonitoring')
87 return hlt_exists
and flags.DQ.triggerDataAvailable
90 from AthenaConfiguration.Enums
import BeamType
93 elif flags.Reco.EnableHI:
94 return DQDataType.HeavyIon
95 elif flags.Beam.Type
is BeamType.Cosmics:
96 return DQDataType.Cosmics
97 elif flags.Beam.Type
is BeamType.Collisions:
98 return DQDataType.Collisions
99 elif flags.Beam.Type
is BeamType.SingleBeam:
101 return DQDataType.Collisions
103 from AthenaCommon.Logging
import logging
104 local_logger = logging.getLogger(
'DQConfigFlags_getDataType')
105 local_logger.warning(
'Unable to figure out beam type for DQ; using "User"')
106 return DQDataType.User
109 if flags.Common.isOnline:
113 from AthenaConfiguration.Enums
import Format
114 if flags.Input.Format
is Format.BS:
115 if flags.Output.AODFileName:
119 elif 'StreamESD' in flags.Input.ProcessingTags:
121 elif 'StreamAOD' in flags.Input.ProcessingTags:
123 elif 'StreamDAOD_PHYS' in flags.Input.ProcessingTags:
126 from AthenaCommon.Logging
import logging
127 local_logger = logging.getLogger(
'DQConfigFlags_getEnvironment')
128 local_logger.warning(
'Unable to figure out environment for DQ; using "tier0ESD"')
132 from AthenaConfiguration.AutoConfigFlags
import GetFileMD
135 detMask = eformat.helper.DetectorMask(f
'{md.get("detectorMask",[0x0])[0]:032x}')
137 detMask.is_set(eformat.helper.SubDetector.TDAQ_CALO_PREPROC),
138 detMask.is_set(eformat.helper.SubDetector.TDAQ_CALO_TOPO_PROC),
139 detMask.is_set(eformat.helper.SubDetector.TDAQ_CALO_FEAT_EXTRACT_DAQ),
140 detMask.is_set(eformat.helper.SubDetector.TDAQ_CALO_FEAT_EXTRACT_ROI)])
144 for flag
in _steeringFlags:
145 setattr(getattr(flags,
'DQ.Steering'), flag,
False)