ATLAS Offline Software
Loading...
Searching...
No Matches
MagFieldReader.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2#
3# Testing job options for magnetic field changes. Can be used e.g. in the
4# "magFieldToggle" test instead of the full menu. Only runs one algorithm
5# that prints the field status.
6
7from AthenaCommon.Constants import DEBUG
8from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
9from AthenaConfiguration.ComponentFactory import CompFactory
10from MagFieldServices.MagFieldServicesConfig import AtlasFieldCacheCondAlgCfg
11
12
13def run(flags):
14 """Setup magnetic field and reader algorithm"""
15
16 # Default flags are good enough:
17 flags.lock()
18
19 cfg = ComponentAccumulator()
20 cfg.merge( AtlasFieldCacheCondAlgCfg(flags) )
21 cfg.addEventAlgo( CompFactory.getComp("MagField::CondReader")("MagFieldCondReader") )
22
23 cfg.foreach_component("*AtlasField.*CondAlg").OutputLevel = DEBUG
24
25 return cfg
Definition run.py:1