ATLAS Offline Software
Loading...
Searching...
No Matches
setMagFieldCurrents.py
Go to the documentation of this file.
1# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
2#
3# Job options fragment to set field currents, used in magFieldOnOff.trans
4
5from GaudiPython.Bindings import iService, iAlgorithm
6from AthenaCommon.Logging import logging
7
8log = logging.getLogger("setMagFieldCurrents.py")
9mapCondAlg = iAlgorithm('AtlasFieldMapCondAlg')
10
11if 'solCur' in dir():
12 log.info("Setting solenoid current to %d", solCur)
13 setattr(mapCondAlg, 'MapSoleCurrent', solCur)
14
15if 'torCur' in dir():
16 log.info("Setting toroid current to %d", torCur)
17 setattr(mapCondAlg, 'MapToroCurrent', torCur)
18
19if 'run' in dir():
20 log.info("Setting run number to %d", run)
21 setattr(iService('HltEventLoopMgr'), 'forceRunNumber', run)