16from AthenaCommon.JobProperties
import JobProperty, JobPropertyContainer
102 """helper function to decode athena-command-line options.
104 @param opts is a list of options which can enable or disable a few
105 jobproperties.PerfMonFlags fields
107 @param dry_run to only decode but not set the options
109 one activates a perfmon flag by prepending '+' in front of the option name
110 (or nothing prepended, '+' being the implied default)
111 and de-activates it by prepending '-'.
113 pmf = jobproperties.PerfMonFlags
115 'perfmonmt': pmf.doMonitoringMT,
116 'fastmonmt': pmf.doFastMonMT,
117 'fullmonmt': pmf.doFullMonMT,
123 if opt.startswith(
'-'):
125 flag_name = flag_name[1:]
126 elif opt.startswith(
'+'):
128 flag_name = flag_name[1:]
129 if flag_name
not in dispatch:
131 '[%s] is not a valid PerfMonFlag (allowed: %r)' %
132 (flag_name, list(dispatch.keys()))
136 dispatch[flag_name].set_Value(val)