Commit e9246ddb authored by Tim Martin's avatar Tim Martin
Browse files

Update HLTTriggerResultGetter.py - add protection to "Configure DataScouting"...

Update HLTTriggerResultGetter.py - add protection to "Configure DataScouting" when reading from RAW (no metadata)
parent c2ba0cff
...@@ -222,14 +222,13 @@ class ByteStreamUnpackGetterRun2(Configured): ...@@ -222,14 +222,13 @@ class ByteStreamUnpackGetterRun2(Configured):
# Configure DataScouting # Configure DataScouting
# #
from PyUtils.MetaReaderPeeker import metadata from PyUtils.MetaReaderPeeker import metadata
if 'stream' in metadata:
stream_local = metadata['stream'] stream_local = metadata['stream']
if stream_local.startswith('calibration_DataScouting_') or TriggerFlags.doAlwaysUnpackDSResult():
if stream_local.startswith('calibration_DataScouting_') or TriggerFlags.doAlwaysUnpackDSResult(): if 'calibration' in stream_local and 'DataScouting_' in stream_local:
if 'calibration' in stream_local and 'DataScouting_' in stream_local: ds_tag = stream_local[12:27]
ds_tag = stream_local[12:27] ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "HLT::HLTResult/"+ds_tag ]
ServiceMgr.ByteStreamAddressProviderSvc.TypeNames += [ "HLT::HLTResult/"+ds_tag ] extr.DSResultKeys += [ ds_tag ]
extr.DSResultKeys += [ ds_tag ]
else: else:
#if data doesn't have HLT info set HLTResult keys as empty strings to avoid warnings #if data doesn't have HLT info set HLTResult keys as empty strings to avoid warnings
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment