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 a ParameterType then the corresponding target parameter will be returned if it exists, default is returned otherwise.

Alternatively, key can be a ParameterCategory. In this case all the target parameters belonging to this category will be returned, or default 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.

Returns:
targetTargetParameter | tuple[TargetParameter] | Any

The target, or tuple of targets if key was a ParameterCategory, or default if no target(s) could be obtained from the given key.