cavcalc.output.MultiOutput.get
#
- MultiOutput.get(key, default=None)#
Retrieve a target result, or a collection of these, using a suitable key.
If
key
is a string or aParameterType
then the corresponding target parameter will be returned if it exists,default
is returned otherwise.Alternatively,
key
can be aParameterCategory
. In this case all the target parameters belonging to this category will be returned, ordefault
if no targets of this category are present in the output.- Parameters:
- keystr |
ParameterType
|ParameterCategory
The key of the target(s) to retrieve. See above for options.
- defaultAny | NoneType, optional
The default value to return if no target(s) corresponding to
key
could be found.
- keystr |
- Returns:
- target
TargetParameter
| tuple[TargetParameter
] | Any The target, or tuple of targets if
key
was aParameterCategory
, ordefault
if no target(s) could be obtained from the givenkey
.
- target