 |
ATLAS Offline Software
|
|
def | PartitionAndEnvironmentConfig () |
|
def | ZdcOnlineConfigFlagsSetting (flags, partition) |
|
def | ZdcOnlineProjectNameManualSetting (flags, isTestbed) |
|
def | ZdcOnlineTriggerStreamManualSetting (flags, partition, isTestbed) |
|
def | ZdcOnlinePrintDebugMsgs () |
|
def | ZdcOnlineByteStreamCfg (flags, partition, isTestbed) |
|
def | ZdcOnlineRecoFlagSettings (flags) |
|
def | RunZdcOnlineRecoCfg (flags, isLED, isInj, isCalib) |
|
def | RunZdcOnlineMonitorCfg (flags, isLED, isInj, isCalib) |
|
◆ PartitionAndEnvironmentConfig()
def python.ZdcOnlineRecMonitorConfig.PartitionAndEnvironmentConfig |
( |
| ) |
|
Set up the partition (object still exists but invalid if offline)
and finds the current environment (testbed / p1)
Returns:
partition: the partition object
isTestbed - boolean that indicates whether it's testbed or p1
Definition at line 27 of file ZdcOnlineRecMonitorConfig.py.
29 '''Set up the partition (object still exists but invalid if offline)
30 and finds the current environment (testbed / p1)
32 partition: the partition object
33 isTestbed - boolean that indicates whether it's testbed or p1'''
38 partition = ispy.IPCPartition(
"")
if os.getenv(
"TDAQ_PARTITION")
is None else ispy.IPCPartition(os.getenv(
"TDAQ_PARTITION"))
42 environmentString = os.getenv(
"ENVIORNMENT")
44 if partition.isValid()
and environmentString
is None:
45 log.warning(
"Warning: Partition is valid but environmental variable ENVIORNMENT is not set!")
46 log.warning(
"Warning: In this case by default assumes environment is p1!")
48 isTestbed = (environmentString ==
"TB")
50 if partition.isValid():
51 log.info(
"Running Online with Partition: %s",partition.name())
53 log.info(
"Partition %s not found. Running Offline - must provide input files!", partition.name())
55 return partition, isTestbed
◆ RunZdcOnlineMonitorCfg()
def python.ZdcOnlineRecMonitorConfig.RunZdcOnlineMonitorCfg |
( |
|
flags, |
|
|
|
isLED, |
|
|
|
isInj, |
|
|
|
isCalib |
|
) |
| |
Definition at line 302 of file ZdcOnlineRecMonitorConfig.py.
305 if not flags.Input.isMC:
307 from ZdcMonitoring.ZdcLEDMonitorAlgorithm
import ZdcLEDMonitoringConfig
309 acc.merge(zdcLEDMonitorAcc)
311 if (isCalib
or isInj):
312 from ZdcMonitoring.ZdcMonitorAlgorithm
import ZdcMonitoringConfig
314 acc.merge(zdcMonitorAcc)
◆ RunZdcOnlineRecoCfg()
def python.ZdcOnlineRecMonitorConfig.RunZdcOnlineRecoCfg |
( |
|
flags, |
|
|
|
isLED, |
|
|
|
isInj, |
|
|
|
isCalib |
|
) |
| |
Definition at line 285 of file ZdcOnlineRecMonitorConfig.py.
289 from ZdcRec.ZdcRecConfig
import ZdcLEDRecCfg
291 acc.merge(ZdcLEDRecAcc)
292 daqMode = 1
if partition.name() ==
'zdcStandalone' else 2
293 ZdcLEDRecAcc.getEventAlgo(
'ZdcRecRun3').DAQMode = daqMode
294 log.info (
'CHECK: The DAQ mode for the LED reconstruction is %s', ZdcLEDRecAcc.getEventAlgo(
'ZdcRecRun3').DAQMode)
296 from ZdcRec.ZdcRecConfig
import ZdcRecCfg
◆ ZdcOnlineByteStreamCfg()
def python.ZdcOnlineRecMonitorConfig.ZdcOnlineByteStreamCfg |
( |
|
flags, |
|
|
|
partition, |
|
|
|
isTestbed |
|
) |
| |
Configure byte-stream input service using environmental (OKS) variables
Definition at line 193 of file ZdcOnlineRecMonitorConfig.py.
194 '''Configure byte-stream input service using environmental (OKS) variables'''
198 bytestreamConversion = CompFactory.ByteStreamCnvSvc()
199 acc.addService(bytestreamConversion, primary=
True)
201 from ByteStreamEmonSvc.EmonByteStreamConfig
import EmonByteStreamCfg
204 bsSvc = acc.getService(
"ByteStreamInputSvc")
205 bsSvc.Partition = partition.name()
208 bsSvc.Key =
"ReadoutApplication"
210 bsSvc.Key = os.environ.get(
"ZDC_KEY",
"dcm")
211 log.debug(
'the value being assigned to bssvc key is %s', os.environ.get(
"ZDC_KEY",
"dcm"))
213 log.info(
'final bssvc key: %s', bsSvc.Key)
214 bsSvc.KeyCount =
int(os.environ.get(
"ZDC_KEY_COUNT",
"250"))
215 log.info(
'final bssvc keycount: %s', bsSvc.KeyCount)
216 bsSvc.BufferSize = 120
217 bsSvc.UpdatePeriod = 30
218 bsSvc.Timeout = 240000
219 bsSvc.PublishName = os.getenv(
"ZDC_ATHENA_JOB_NAME",
"ZDC_Athena_monitor_test")
220 bsSvc.ExitOnPartitionShutdown =
False
221 bsSvc.ClearHistograms =
True
222 bsSvc.GroupName =
"RecExOnline"
224 bsSvc.StreamType = os.getenv(
"ZDC_STREAM_TYPE",
"physics")
if isTestbed
or partition.name() ==
"ATLAS" else "calibration"
225 bsSvc.StreamNames = os.getenv(
"ZDC_STREAM_NAME",
"ZDCCalib:ZDCLEDCalib:MinBias").
split(
":")
if isTestbed
or partition.name() ==
"ATLAS" else "ZDCLEDCalib".
split(
":")
226 bsSvc.StreamLogic = os.getenv(
"ZDC_STREAM_LOGIC",
"Or")
if partition.name() ==
"ATLAS" else "Ignore"
228 bsSvc.ISServer =
"Histogramming"
229 if os.getenv(
"ZDC_STREAM_NAME") ==
"MinBias" or os.getenv(
"ZDC_STREAM_NAME") ==
"Standby":
230 bsSvc.ISServer =
'Histogramming-ZDC-iss'
232 log.info(
'the ISServer is: %s', bsSvc.ISServer)
234 log.debug(
'Printing out for debugging at testing/developing stage')
235 log.debug(
'Testing if settings of these variables in ZDC athena segment OKS are correctly picked up by the python code')
236 log.debug(
'the stream type is: %s', bsSvc.StreamType)
237 log.debug(
'the stream names are: %s', bsSvc.StreamNames)
238 log.debug(
'the stream logic is: %s', bsSvc.StreamLogic)
◆ ZdcOnlineConfigFlagsSetting()
def python.ZdcOnlineRecMonitorConfig.ZdcOnlineConfigFlagsSetting |
( |
|
flags, |
|
|
|
partition |
|
) |
| |
Set additional configuration flags for online environment
Definition at line 58 of file ZdcOnlineRecMonitorConfig.py.
59 '''Set additional configuration flags for online environment'''
61 log.debug (
'Setting additional flags for online environment')
63 flags.Concurrency.NumThreads = 1
64 flags.Common.isOnline =
True
65 flags.DQ.Environment =
'online'
66 flags.DQ.enableLumiAccess =
False
67 flags.Common.useOnlineLumi =
True
68 flags.DQ.doStreamAwareMon =
False
71 flags.IOVDb.GlobalTag=
'CONDBR2-HLTP-2025-02'
72 flags.Trigger.triggerConfig =
'DB'
74 flags.LAr.doHVCorr =
False
75 flags.InDet.useSctDCS =
False
76 flags.InDet.useDCS =
False
78 flags.Output.doWriteESD =
False
79 flags.Output.doWriteAOD =
False
81 if (partition.isValid()
and partition.name() !=
'ATLAS'):
82 flags.DQ.useTrigger =
False
83 flags.DQ.triggerDataAvailable =
False
86 _steeringFlags = [
'HLT.doBjet',
'HLT.doBphys',
'HLT.doCalo',
'HLT.doEgamma',
'HLT.doGeneral',
'HLT.doInDet',
'HLT.doJet',
'HLT.doMET',
'HLT.doMinBias',
'HLT.doMuon',
'HLT.doTau',
'InDet.doAlignMon',
'InDet.doGlobalMon',
'InDet.doPerfMon',
'LVL1Calo.doValidation',
'Muon.doAlignMon',
'Muon.doCombinedMon',
'Muon.doPhysicsMon',
'Muon.doRawMon',
'Muon.doSegmentMon',
'Muon.doTrackMon',
'Muon.doTrkPhysMon',
'doAFPMon',
'doCTPMon',
'doCaloGlobalMon',
'doDataFlowMon',
'doEgammaMon',
'doGlobalMon',
'doHIMon',
'doHLTMon',
'doInDetMon',
'doJetInputsMon',
'doJetMon',
'doJetTagMon',
'doLArMon',
'doLVL1CaloMon',
'doLVL1InterfacesMon',
'doLucidMon',
'doMissingEtMon',
'doMuonMon',
'doPixelMon',
'doSCTMon',
'doTRTMon',
'doTauMon',
'doTileMon']
88 for flag
in _steeringFlags:
89 if flags.hasFlag(
'DQ.Steering.' + flag):
90 flags._set(
'DQ.Steering.' + flag,
False)
92 flags.addFlag(
'DQ.Steering.' + flag,
False)
95 _triggerFlags = [
'CostMonitoring.doCostMonitoring',
'CostMonitoring.monitorROBs',
'DecisionMakerValidation.Execute',
'Jet.fastbtagPFlow',
'Jet.fastbtagVertex',
'enableL1CaloPhase1',
'enableL1MuonPhase1',
'L1.doMuon',
'L1.doCalo',
'L1.doTopo',
'L1MuonSim.NSWVetoMode',
'L1MuonSim.doBIS78',
'L1MuonSim.doMMTrigger',
'L1MuonSim.doPadTrigger',
'doLVL1',
'doHLT',
'doMuon',
'doNavigationSlimming',
'enableL1CaloLegacy',
'endOfEventProcessing.Enabled',
'fastMenuGeneration',
'Online.BFieldAutoConfig']
97 for flag
in _triggerFlags:
98 if flags.hasFlag(
'Trigger.' + flag):
99 flags._set(
'Trigger.' + flag,
False)
101 flags.addFlag(
'Trigger.' + flag,
False)
105 _detectorFlags = [
'MDT',
'MM',
'Muon',
'RPC',
'TGC',
'sTGC']
106 for flag
in _detectorFlags:
107 if flags.hasFlag(
'Detector.Enable' + flag):
108 flags._set(
'Detector.Enable' + flag,
False)
110 flags.addFlag(
'Detector.Enable' + flag,
False)
112 if flags.hasFlag(
'Detector.Geometry' + flag):
113 flags._set(
'Detector.Geometry' + flag,
False)
115 flags.addFlag(
'Detector.Geometry' + flag,
False)
◆ ZdcOnlinePrintDebugMsgs()
def python.ZdcOnlineRecMonitorConfig.ZdcOnlinePrintDebugMsgs |
( |
| ) |
|
Prints debug messages (for now, always on)
Definition at line 177 of file ZdcOnlineRecMonitorConfig.py.
178 '''Prints debug messages (for now, always on)'''
181 log.debug (
'check if the os environment configs are correctly set')
182 log.debug (
'ZDC_RELEASE_NAME %s', os.getenv(
"ZDC_RELEASE"))
183 log.debug (
'ENVIORNMENT %s', os.getenv(
"ENVIORNMENT"))
184 log.debug (
'ZDC_KEY_COUNT %s', os.getenv(
"ZDC_KEY_COUNT"))
185 log.debug (
'ZDC_KEY %s', os.getenv(
"ZDC_KEY"))
186 log.debug (
'ZDC_ATHENA_JOB_NAME %s', os.getenv(
"ZDC_ATHENA_JOB_NAME"))
187 log.debug (
'ZDC_STREAM_NAME %s', os.getenv(
"ZDC_STREAM_NAME"))
188 log.debug (
'ZDC_STREAM_TYPE %s', os.getenv(
"ZDC_STREAM_TYPE"))
◆ ZdcOnlineProjectNameManualSetting()
def python.ZdcOnlineRecMonitorConfig.ZdcOnlineProjectNameManualSetting |
( |
|
flags, |
|
|
|
isTestbed |
|
) |
| |
If running on testbed, manually set Input.ProjectName flag from the OKS variable ZDC_PROJECT_NAME processed as an environmental variable
If running at P1, check for project name and set to default if not properly set
Necessary since ZdcStreamDependentFlagSetting will throw ValueError is ProjectName is not set
Definition at line 120 of file ZdcOnlineRecMonitorConfig.py.
121 '''If running on testbed, manually set Input.ProjectName flag from the OKS variable ZDC_PROJECT_NAME processed as an environmental variable
122 If running at P1, check for project name and set to default if not properly set
123 Necessary since ZdcStreamDependentFlagSetting will throw ValueError is ProjectName is not set'''
126 if os.getenv(
"ZDC_PROJECT_NAME")
is None:
127 log.warning(
"Running on testbed, yet ZDC_PROJECT_NAME is NOT set!")
128 log.warning(
"Setting to be data_test by default.")
129 flags.Input.ProjectName =
'data_test'
131 flags.Input.ProjectName = os.getenv(
"ZDC_PROJECT_NAME")
132 elif partition.isValid
and not flags.Input.ProjectName:
133 if partition.name() ==
'ATLAS':
134 log.warning(
"Running in ATLAS partition, but ProjectName is NOT correctly set!")
135 log.warning(
"Setting to be data24_hi by default. Could cause issues.")
136 flags.Input.ProjectName =
'data24_hi'
138 flags.Input.ProjectName =
'data_test'
◆ ZdcOnlineRecoFlagSettings()
def python.ZdcOnlineRecMonitorConfig.ZdcOnlineRecoFlagSettings |
( |
|
flags | ) |
|
Definition at line 243 of file ZdcOnlineRecMonitorConfig.py.
247 if not partition.isValid()
and len(flags.Input.Files)==0:
248 log.fatal(
"FATAL: Running in offline mode but no input files provided")
252 if partition.isValid():
254 from AthenaConfiguration.AutoConfigOnlineRecoFlags
import autoConfigOnlineRecoFlags
256 log.info(
'the auto-configured globaltag is: %s', flags.IOVDb.GlobalTag)
261 flags.Output.AODFileName=
"AOD.pool.root"
262 flags.Output.HISTFileName=
"HIST.root"
263 flags.Output.doWriteAOD=
True
267 if partition.isValid():
276 from ZdcRec.ZdcRecConfig
import SetConfigTag
280 flags.Trigger.decodeHLT = (
'pO' in config
or 'OO' in config)
and flags.DQ.useTrigger
and flags.Input.TriggerStream ==
'physics_MinBias'
282 return isLED, isInj, isCalib, pn, config
◆ ZdcOnlineTriggerStreamManualSetting()
def python.ZdcOnlineRecMonitorConfig.ZdcOnlineTriggerStreamManualSetting |
( |
|
flags, |
|
|
|
partition, |
|
|
|
isTestbed |
|
) |
| |
manually set Input.TriggerStream flag from the OKS variable ZDC_STREAM_NAME processed as an environmental variable
Should only be called in the online environment (do NOT overwrite the TriggerStream info from offline metadata)
Definition at line 142 of file ZdcOnlineRecMonitorConfig.py.
143 '''manually set Input.TriggerStream flag from the OKS variable ZDC_STREAM_NAME processed as an environmental variable
144 Should only be called in the online environment (do NOT overwrite the TriggerStream info from offline metadata)'''
152 if (
not isTestbed
and partition.name() !=
'ATLAS'):
153 flags.Input.TriggerStream =
"calibration_DcmDummyProcessor"
157 if os.getenv(
"ZDC_STREAM_NAME")
is None:
158 log.warning(
"Running on testbed or on p1 in ATLAS partition, yet ZDC_STREAM_NAME is NOT set!")
159 log.warning(
"Assuming stream to be ZdcCalib by default! Likely to cause issues.")
160 flags.Input.TriggerStream =
"calibration_ZDCCalib"
161 elif os.getenv(
"ZDC_STREAM_NAME") ==
"ZDCCalib":
162 flags.Input.TriggerStream =
"calibration_ZDCCalib"
163 elif os.getenv(
"ZDC_STREAM_NAME") ==
"ZDCLEDCalib":
164 flags.Input.TriggerStream =
"calibration_ZDCLEDCalib"
165 elif os.getenv(
"ZDC_STREAM_NAME") ==
"ZDCInjCalib":
166 flags.Input.TriggerStream =
"calibration_ZDCInjCalib"
167 elif os.getenv(
"ZDC_STREAM_NAME") ==
"MinBias":
168 flags.Input.TriggerStream =
"physics_MinBias"
169 elif os.getenv(
"ZDC_STREAM_NAME") ==
"Standby":
170 flags.Input.TriggerStream =
"physics_Standby"
171 elif os.getenv(
"ZDC_STREAM_NAME") ==
"UCC":
172 flags.Input.TriggerStream =
"physics_UCC"
173 elif os.getenv(
"ZDC_STREAM_NAME") ==
"express":
174 flags.Input.TriggerStream =
"express_express"
◆ acc
python.ZdcOnlineRecMonitorConfig.acc = MainServicesCfg(flags) |
◆ config
python.ZdcOnlineRecMonitorConfig.config |
◆ debugModeOn
tuple python.ZdcOnlineRecMonitorConfig.debugModeOn = (os.getenv("BOOL_DEBUG_MODE") == "True") |
◆ evaluate
python.ZdcOnlineRecMonitorConfig.evaluate |
◆ flags
python.ZdcOnlineRecMonitorConfig.flags = initConfigFlags() |
◆ isCalib
python.ZdcOnlineRecMonitorConfig.isCalib |
◆ isInj
python.ZdcOnlineRecMonitorConfig.isInj |
◆ isLED
python.ZdcOnlineRecMonitorConfig.isLED |
◆ isTestbed
python.ZdcOnlineRecMonitorConfig.isTestbed |
◆ log
python.ZdcOnlineRecMonitorConfig.log = logging.getLogger("ZdcOnlineRecMonitorConfig") |
◆ OutputLevel
python.ZdcOnlineRecMonitorConfig.OutputLevel |
◆ partition
python.ZdcOnlineRecMonitorConfig.partition |
◆ pn
python.ZdcOnlineRecMonitorConfig.pn |
◆ status
python.ZdcOnlineRecMonitorConfig.status = acc.run() |
◆ withDetails
python.ZdcOnlineRecMonitorConfig.withDetails |
def RunZdcOnlineMonitorCfg(flags, isLED, isInj, isCalib)
def EmonByteStreamCfg(flags, type_names=[])
def ZdcOnlineConfigFlagsSetting(flags, partition)
def ZdcLEDMonitoringConfig(inputFlags, run_type)
def ZdcGenericFlagSetting(flags)
def ZdcOnlineByteStreamCfg(flags, partition, isTestbed)
def ZdcOnlineRecoFlagSettings(flags)
def ZdcOnlineTriggerStreamManualSetting(flags, partition, isTestbed)
def PartitionAndEnvironmentConfig()
def autoConfigOnlineRecoFlags(flags, partition=None)
def PhysStreamAdditionalFlagSetting(flags)
def ZdcOnlineProjectNameManualSetting(flags, isTestbed)
def ZdcStreamDependentFlagSetting(flags)
def RunZdcOnlineRecoCfg(flags, isLED, isInj, isCalib)
def ZdcMonitoringConfig(inputFlags)
def ZdcOnlinePrintDebugMsgs()