ATLAS Offline Software
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 
5 from GaudiPython.Bindings import iService, iAlgorithm
6 from AthenaCommon.Logging import logging
7 
8 log = logging.getLogger("setMagFieldCurrents.py")
9 mapCondAlg = iAlgorithm('AtlasFieldMapCondAlg')
10 
11 if 'solCur' in dir():
12  log.info("Setting solenoid current to %d", solCur)
13  setattr(mapCondAlg, 'MapSoleCurrent', solCur)
14 
15 if 'torCur' in dir():
16  log.info("Setting toroid current to %d", torCur)
17  setattr(mapCondAlg, 'MapToroCurrent', torCur)
18 
19 if 'run' in dir():
20  log.info("Setting run number to %d", run)
21  setattr(iService('HltEventLoopMgr'), 'forceRunNumber', run)
beamspotman.dir
string dir
Definition: beamspotman.py:623