process#

caput.pipeline.tasklib.io.LoadFilesAndSelect.process(incont)[source]#

Select and return a file from the collection based on the input container.

If key_format is provided, the selection key is derived from the attributes of the input container. If the resulting key is not found in the collection, a warning is logged, and None is returned.

If key_format is not provided, files are selected sequentially from the collection, cycling back to the beginning if more input containers are received than the number of available files.

Parameters:
incontContainer

Container whose attributes are used to determine the selection key.

Returns:
containerContainer | None

The selected file if found, otherwise None.