|
def | __init__ (self, f, name) |
|
def | __getattr__ (self, name) |
|
def | __setattr__ (self, name, value) |
|
def | __delattr__ (self, name) |
|
def | __cmp__ (self, other) |
|
def | __bool__ (self) |
|
def | __getitem__ (self, name) |
|
def | __setitem__ (self, name, value) |
|
def | __delitem__ (self, name) |
|
def | __iter__ (self) |
|
def | asdict (self) |
|
Definition at line 121 of file AthConfigFlags.py.
◆ __init__()
def python.AthConfigFlags.FlagAddress.__init__ |
( |
|
self, |
|
|
|
f, |
|
|
|
name |
|
) |
| |
Definition at line 122 of file AthConfigFlags.py.
123 if isinstance(f, AthConfigFlags):
125 rname = self._flags._renames.get(name, name)
128 elif isinstance(f, FlagAddress):
129 self._flags = f._flags
130 name = f._name+
"."+name
131 rname = self._flags._renames.get(name, name)
◆ __bool__()
def python.AthConfigFlags.FlagAddress.__bool__ |
( |
|
self | ) |
|
Definition at line 161 of file AthConfigFlags.py.
162 raise RuntimeError(
"No such flag: "+ self._name+
". The name is likely incomplete." )
◆ __cmp__()
def python.AthConfigFlags.FlagAddress.__cmp__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
Definition at line 152 of file AthConfigFlags.py.
152 def __cmp__(self, other):
153 raise RuntimeError(
"No such flag: "+ self._name+
". The name is likely incomplete." )
◆ __delattr__()
def python.AthConfigFlags.FlagAddress.__delattr__ |
( |
|
self, |
|
|
|
name |
|
) |
| |
◆ __delitem__()
def python.AthConfigFlags.FlagAddress.__delitem__ |
( |
|
self, |
|
|
|
name |
|
) |
| |
Definition at line 170 of file AthConfigFlags.py.
170 def __delitem__(self, name):
171 merged = self._name +
"." + name
172 del self._flags[merged]
◆ __getattr__()
def python.AthConfigFlags.FlagAddress.__getattr__ |
( |
|
self, |
|
|
|
name |
|
) |
| |
Definition at line 134 of file AthConfigFlags.py.
134 def __getattr__(self, name):
135 return getattr(self._flags, self._name +
"." + name)
◆ __getitem__()
def python.AthConfigFlags.FlagAddress.__getitem__ |
( |
|
self, |
|
|
|
name |
|
) |
| |
◆ __iter__()
def python.AthConfigFlags.FlagAddress.__iter__ |
( |
|
self | ) |
|
Definition at line 174 of file AthConfigFlags.py.
175 self._flags.loadAllDynamicFlags()
176 rmap = self._flags._renamed_map()
178 for flag
in self._flags._flagdict.keys():
179 if flag.startswith(self._name.rstrip(
'.') +
'.'):
180 for newflag
in rmap[flag]:
181 ntrim = len(self._name) + 1
182 n_dots_in = flag[:ntrim].
count(
'.')
183 remaining = newflag.split(
'.')[n_dots_in]
184 if remaining
not in used:
◆ __setattr__()
def python.AthConfigFlags.FlagAddress.__setattr__ |
( |
|
self, |
|
|
|
name, |
|
|
|
value |
|
) |
| |
Definition at line 137 of file AthConfigFlags.py.
138 if name.startswith(
"_"):
139 return object.__setattr__(self, name, value)
140 merged = self._name +
"." + name
142 if not self._flags.hasFlag( merged ):
143 self._flags._loadDynaFlags( merged )
145 if not self._flags.hasFlag( merged ):
146 raise RuntimeError(
"No such flag: {} The name is likely incomplete.".
format(merged) )
147 return self._flags._set( merged, value )
◆ __setitem__()
def python.AthConfigFlags.FlagAddress.__setitem__ |
( |
|
self, |
|
|
|
name, |
|
|
|
value |
|
) |
| |
◆ _subflag_itr()
def python.AthConfigFlags.FlagAddress._subflag_itr |
( |
|
self | ) |
|
|
private |
Subflag iterator specialized for this address
Definition at line 188 of file AthConfigFlags.py.
188 def _subflag_itr(self):
189 """Subflag iterator specialized for this address
192 self._flags.loadAllDynamicFlags()
194 rename = self._flags._renamed_map()
195 for key
in self._flags._flagdict.keys():
196 if key.startswith(address.rstrip(
'.') +
'.'):
197 ntrim = len(address) + 1
198 remaining = key[ntrim:]
199 for r
in rename[key]:
200 yield r, getattr(self, remaining)
◆ asdict()
def python.AthConfigFlags.FlagAddress.asdict |
( |
|
self | ) |
|
Convert to a python dictionary
Recursively convert this flag and all subflags into a
structure of nested dictionaries. All dynamic flags are
resolved in the process.
The resulting data structure should be easy to serialize as
json or yaml.
Definition at line 202 of file AthConfigFlags.py.
203 """Convert to a python dictionary
205 Recursively convert this flag and all subflags into a
206 structure of nested dictionaries. All dynamic flags are
207 resolved in the process.
209 The resulting data structure should be easy to serialize as
213 d =
_asdict(self._subflag_itr())
214 for k
in self._name.
split(
'.'):
◆ __eq__
def python.AthConfigFlags.FlagAddress.__eq__ = __cmp__ |
|
staticprivate |
◆ __ge__
def python.AthConfigFlags.FlagAddress.__ge__ = __cmp__ |
|
staticprivate |
◆ __gt__
def python.AthConfigFlags.FlagAddress.__gt__ = __cmp__ |
|
staticprivate |
◆ __le__
def python.AthConfigFlags.FlagAddress.__le__ = __cmp__ |
|
staticprivate |
◆ __lt__
def python.AthConfigFlags.FlagAddress.__lt__ = __cmp__ |
|
staticprivate |
◆ __ne__
def python.AthConfigFlags.FlagAddress.__ne__ = __cmp__ |
|
staticprivate |
◆ _flags
python.AthConfigFlags.FlagAddress._flags |
|
private |
◆ _name
python.AthConfigFlags.FlagAddress._name |
|
private |
The documentation for this class was generated from the following file:
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.