2222#include " Framework/EndOfStreamContext.h"
2323#include " Framework/GroupSlicer.h"
2424#include " Framework/StructToTuple.h"
25- #include " Framework/Traits.h"
2625#include " Framework/TypeIdHelpers.h"
2726#include " Framework/ArrowTableSlicingCache.h"
2827#include " Framework/AnalysisDataModel.h"
@@ -596,28 +595,21 @@ DataProcessorSpec adaptAnalysisTask(ConfigContext const& ctx, Args&&... args)
596595 AnalysisDataProcessorBuilder::cacheFromArgs (&T::process, true , bindingsKeys, bindingsKeysUnsorted);
597596 }
598597 homogeneous_apply_refs (
599- [&bindingsKeys, &bindingsKeysUnsorted](auto & x) mutable {
598+ [&bindingsKeys, &bindingsKeysUnsorted](auto & x) {
600599 return AnalysisDataProcessorBuilder::requestCacheFromArgs (x, bindingsKeys, bindingsKeysUnsorted);
601600 },
602601 *task.get ());
603602
604603 ic.services ().get <ArrowTableSlicingCacheDef>().setCaches (std::move (bindingsKeys));
605604 ic.services ().get <ArrowTableSlicingCacheDef>().setCachesUnsorted (std::move (bindingsKeysUnsorted));
606- // initialize global caches
607- homogeneous_apply_refs ([&ic](auto & element) {
608- return analysis_task_parsers::preInitializeCache (ic, element);
609- },
610- *(task.get ()));
611605
612606 return [task, expressionInfos](ProcessingContext& pc) mutable {
613607 // load the ccdb object from their cache
614608 homogeneous_apply_refs ([&pc](auto & element) { return analysis_task_parsers::newDataframeCondition (pc.inputs (), element); }, *task.get ());
615609 // reset partitions once per dataframe
616610 homogeneous_apply_refs ([](auto & element) { return analysis_task_parsers::newDataframePartition (element); }, *task.get ());
617611 // reset selections for the next dataframe
618- for (auto & info : expressionInfos) {
619- info.resetSelection = true ;
620- }
612+ std::ranges::for_each (expressionInfos, [](auto & info){ info.resetSelection = true ; });
621613 // reset pre-slice for the next dataframe
622614 auto slices = pc.services ().get <ArrowTableSlicingCache>();
623615 homogeneous_apply_refs ([&pc, &slices](auto & element) {
@@ -633,17 +625,18 @@ DataProcessorSpec adaptAnalysisTask(ConfigContext const& ctx, Args&&... args)
633625 task->run (pc);
634626 }
635627 // execute process()
636- if constexpr (requires { AnalysisDataProcessorBuilder::invokeProcess (*(task. get ()), pc. inputs (), &T::process, expressionInfos, slices) ; }) {
628+ if constexpr (requires { &T::process; }) {
637629 AnalysisDataProcessorBuilder::invokeProcess (*(task.get ()), pc.inputs (), &T::process, expressionInfos, slices);
638630 }
639631 // execute optional process()
640632 homogeneous_apply_refs (
641- [&pc, &expressionInfos, &task, &slices](auto & x) mutable {
642- if constexpr (base_of_template<ProcessConfigurable, std:: decay_t < decltype (x)> >) {
633+ [&pc, &expressionInfos, &task, &slices](auto & x) {
634+ if constexpr (is_process_configurable< decltype (x)>) {
643635 if (x.value == true ) {
644636 AnalysisDataProcessorBuilder::invokeProcess (*task.get (), pc.inputs (), x.process , expressionInfos, slices);
645637 return true ;
646638 }
639+ return false ;
647640 }
648641 return false ;
649642 },
@@ -657,9 +650,6 @@ DataProcessorSpec adaptAnalysisTask(ConfigContext const& ctx, Args&&... args)
657650
658651 return {
659652 name,
660- // FIXME: For the moment we hardcode this. We could build
661- // this list from the list of methods actually implemented in the
662- // task itself.
663653 inputs,
664654 outputs,
665655 algo,
0 commit comments