Skip to content
Snippets Groups Projects
Commit 67babe65 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

AtlasFieldMapCondAlg: apply LoadMapOnStart only when running HLT

Move the `AtlasFieldMapCondAlg.LoadMapOnStart` setting into HLT-specific
job options. This should only be enabled when running in athenaHLT or in
a partition. Plain athena will not have a valid `EventContext` available
before the first event.

This went unnoticed until gaudi/Gaudi!1347 fixed a bug in the initialization
of the `EventIDRange` class.
parent fd16a7ff
No related merge requests found
......@@ -113,7 +113,7 @@ def setupCommonServices(flags):
def setupCommonServicesEnd():
from AthenaCommon.AppMgr import ServiceMgr as svcMgr
from AthenaCommon.AppMgr import ServiceMgr as svcMgr, athCondSeq
from AthenaCommon.Logging import logging
from AthenaCommon.AlgSequence import AlgSequence
......@@ -168,4 +168,7 @@ def setupCommonServicesEnd():
svcMgr.IOVDbSvc.CacheRun = 0
svcMgr.IOVDbSvc.CacheTime = 0
if hasattr(athCondSeq, 'AtlasFieldMapCondAlg'):
athCondSeq.AtlasFieldMapCondAlg.LoadMapOnStart = True
return
......@@ -25,8 +25,7 @@ def MagneticFieldSvcCfg(flags, **kwargs):
"name": "AtlasFieldMapCondAlg",
}
if flags.Common.isOnline:
# online has the map loaded at start and does not use DCS
afmArgs.update( LoadMapOnStart = True )
# online does not use DCS
afmArgs.update( UseMapsFromCOOL = False )
else:
# UseMapsFromCOOL is default for standard running
......
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
# JobOption fragment to set up the magnetic field services and algorithms
# Valerio Ippolito - Harvard University
......@@ -26,9 +26,8 @@ def AtlasFieldCacheCondAlg(name="AtlasFieldCacheCondAlg",**kwargs):
def AtlasFieldMapCondAlg(name="AtlasFieldMapCondAlg",**kwargs):
if athenaCommonFlags.isOnline():
# online has the map loaded at start and does not use DCS
# online does not use DCS
kwargs.setdefault( "UseMapsFromCOOL", False )
kwargs.setdefault( "LoadMapOnStart", True )
return CfgMgr.MagField__AtlasFieldMapCondAlg(name,**kwargs)
......
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