5 from AthenaConfiguration.AthConfigFlags
import AthConfigFlags
10 flags: AthConfigFlags, config_name: str, log: logging.Logger) -> AthConfigFlags:
12 """Get the flags for the named config, ensure that they are set to be active
16 flags : AthConfigFlags
17 The instance of the flags to check
19 The name of the desired tracking config
21 Logger to print related messages
25 Either the current flags instance if all the ActiveConfig is correct or a new
26 version with cloned flags
28 if flags.hasFlag(
"Tracking.ActiveConfig.input_name"):
29 if flags.Tracking.ActiveConfig.input_name == config_name:
31 "flags.Tracking.ActiveConfig is for %s",
32 flags.Tracking.ActiveConfig.input_name,
37 "flags.Tracking.ActiveConfig is not for %s but %s",
39 flags.Tracking.ActiveConfig.input_name,
44 "Menu code invoked ID config without flags.Tracking.ActiveConfig for %s",
48 if flags.Trigger.useActsTracking:
49 return flags.cloneAndReplace(
"Tracking.ActiveConfig",
"Trigger.ActsTracking."+config_name)
56 flags: AthConfigFlags, config_name: str) -> AthConfigFlags:
58 do InDet/ITk specific clone and replace of ActiveConfig without checking flags vs config_name
61 return flags.cloneAndReplace(
62 "Tracking.ActiveConfig",
63 (
"Trigger.ITkTracking." if flags.Detector.GeometryITk
else "Trigger.InDetTracking.") + config_name,