Add functor boilerplate mixins, use header_map helper, functor simplifications
This goes with LHCb!2173 (merged), Brunel!901 (merged) and Moore!260 (merged).
"pure" functor changes:
- Add explicit
FILTERfunctor that adapts something that acts object-wise into something that acts container-wise. This removes some very awkward overload resolution ambiguities and allows several other improvements. In practice the outerFILTER(...)can be added automatically.- Remove CRTP
Functor<>andPredicate<>, just useFunctorBaseandPredicateBase, which are now namedFunctorandPredicate
- Remove CRTP
- Add
rtype()to the type-erasing wrapper -- this returns thestd::type_infoof the wrapped functor return type before it's converted to the specified output type. This is useful for the dump-to-TTree functionality (where the specified output type can bestd::any) - Fix the top-level
prepare(), add a test for that - Try and fix
ALLandNONEto return appropriatemask_vtypes from vector arguments - Add a workaround for what seems to be a Cling limitation (autoloading libraries based on functions)
functor "usage" changes:
- Add
ThOR::FunctorDesc::ALLdefault for use as a default property value - Remove deprecated part of
Functors::IFactoryinterface, improve error-reporting - Add
with_functorsmixin for algorithms that want a fixed number of functors - Add
with_functor_mapsmixin for algorithms that want a fixed number of maps-of-functors
functor testing changes:
- Add a new functor-testing algorithm and use it in
test_functors.py - Optionally (off by default locally, on by default in the nightlies) generate a functor cache from this to catch more problems
- Expand this to test ~all combinations of "track" inputs with ~all functors, plus some combination/composite cases
functor-using algorithm changes:
- Use new utilities in
CombineTracksto reduce copy/pasted boilerplate- Improve its dump-to-TTree functionality to support different types better
- Use new utilities in
VoidFilterto reduce copy/pasted boilerplate - Use new utilities in
Pr::Filterto reduce copy/pasted boilerplate-
Pr::SOAFilteris partially migrated but not fully -- not sure if this is a priority..
-
other changes:
- Use new proxy-defining macros in
IterableVertexRelations.h - Declare
Pr::Selection<T>header - Declare
Pr::Zip<...>header
Edited by Olli Lupton