Skip to content
Snippets Groups Projects
Verified Commit 688977bb authored by Tadej Novak's avatar Tadej Novak
Browse files

Fix legacy config of BunchCrossingCondAlg

parent afc02600
No related branches found
No related tags found
No related merge requests found
...@@ -44,9 +44,32 @@ def BunchCrossingCondAlgDefault(): ...@@ -44,9 +44,32 @@ def BunchCrossingCondAlgDefault():
elif beamFlags.bunchStructureSource() == 2: elif beamFlags.bunchStructureSource() == 2:
bgkey = 'L1BunchGroup' # unless we use in file metadata... bgkey = 'L1BunchGroup' # unless we use in file metadata...
from AthenaCommon.AppMgr import ServiceMgr as svcMgr from AthenaCommon.AppMgr import ServiceMgr as svcMgr
if getattr(svcMgr, 'xAODConfigSvc'): if getattr(svcMgr, 'xAODConfigSvc') and svcMgr.xAODConfigSvc.UseInFileMetadata:
if svcMgr.xAODConfigSvc.UseInFileMetadata: from AthenaConfiguration.AllConfigFlags import ConfigFlags
if 'TriggerMenuJson_BG' not in ConfigFlags.Input.MetadataItems:
# this is for when we need to configure the BunchGroupCondAlg with info extracted from converted JSON
# in this case avoid using the xAODConfigSvc, because it will be set up incorrectly
configFlags_with_DB = ConfigFlags.clone()
configFlags_with_DB.Trigger.triggerConfig = 'FILE'
from AthenaCommon.Configurable import ConfigurableRun3Behavior
with ConfigurableRun3Behavior():
from AthenaConfiguration.AllConfigFlags import ConfigFlags
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator, appendCAtoAthena
from TrigConfigSvc.TrigConfigSvcCfg import BunchGroupCondAlgCfg
acc = ComponentAccumulator()
acc.merge(BunchGroupCondAlgCfg(configFlags_with_DB))
appendCAtoAthena(acc)
else:
bgkey = '' bgkey = ''
else:
from AthenaCommon.Configurable import ConfigurableRun3Behavior
with ConfigurableRun3Behavior():
from AthenaConfiguration.AllConfigFlags import ConfigFlags
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator, appendCAtoAthena
from TrigConfigSvc.TrigConfigSvcCfg import BunchGroupCondAlgCfg
acc = ComponentAccumulator()
acc.merge(BunchGroupCondAlgCfg(ConfigFlags))
appendCAtoAthena(acc)
# this probably fails for reading R21 ESD but not going to support that case # this probably fails for reading R21 ESD but not going to support that case
elif beamFlags.bunchStructureSource() == 0: elif beamFlags.bunchStructureSource() == 0:
folder = '/TDAQ/OLC/LHC/FILLPARAMS' folder = '/TDAQ/OLC/LHC/FILLPARAMS'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment