Cannot declare extra inputs on Python-side
We need to be able to add extra data dependencies to an algorithm in the Python configuration to handle algorithms that use functors correctly.
Concretely, given something like:
@configurable
def PrFilterV2Tracks(Functor=None, **kwargs):
return Algorithm(
PrFilter__Track_v2,
Code=Functor.code(),
Headers=Functor.headers(),
Factory='FunctorFactory',
**kwargs)
which we might use as
filter = PrFilterV2Tracks(Functor=(MINIP(make_vertices()) > 0.1*mm), Input=make_input_tracks()).Output
the call to make_vertices()
may return a DataHandle
that is not consumed by any other algorithm.
Right now, the producer of that data is not run and the (C++) scheduler throws an exception.
Two things are needed:
- In the
Algorithm
call we should be able to pass extra data dependencies - The Python wrapper for the functors should be able to return a list of
DataHandle
objects, as well as the.code()
and.headers()
methods
We seem to have ExtraInputs
already, but that solves the inverse problem of telling the C++ scheduler about extra inputs.
cc: @apearce