@@ -66,20 +66,20 @@ concept is_enumeration = is_enumeration_v<std::decay_t<T>>;
6666namespace {
6767struct AnalysisDataProcessorBuilder {
6868 template <typename G, typename ... Args>
69- static void addGroupingCandidates (std::vector<StringPair> & bk, std::vector<StringPair> & bku)
69+ static void addGroupingCandidates (Cache & bk, Cache & bku, bool enabled )
7070 {
71- [&bk, &bku]<typename ... As>(framework::pack<As...>) mutable {
71+ [&bk, &bku, enabled ]<typename ... As>(framework::pack<As...>) mutable {
7272 std::string key;
7373 if constexpr (soa::is_iterator<std::decay_t <G>>) {
7474 key = std::string{" fIndex" } + o2::framework::cutString (soa::getLabelFromType<std::decay_t <G>>());
7575 }
76- ([&bk, &bku, &key]() mutable {
76+ ([&bk, &bku, &key, enabled ]() mutable {
7777 if constexpr (soa::relatedByIndex<std::decay_t <G>, std::decay_t <As>>()) {
7878 auto binding = soa::getLabelFromTypeForKey<std::decay_t <As>>(key);
7979 if constexpr (o2::soa::is_smallgroups<std::decay_t <As>>) {
80- framework::updatePairList (bku, binding, key);
80+ framework::updatePairList (bku, binding, key, enabled );
8181 } else {
82- framework::updatePairList (bk, binding, key);
82+ framework::updatePairList (bk, binding, key, enabled );
8383 }
8484 }
8585 }(),
@@ -147,7 +147,7 @@ struct AnalysisDataProcessorBuilder {
147147 // / helper to parse the process arguments
148148 // / 1. enumeration (must be the only argument)
149149 template <typename R, typename C, is_enumeration A>
150- static void inputsFromArgs (R (C::*)(A), const char* /* name*/ , bool /* value*/ , std::vector<InputSpec>& inputs, std::vector<ExpressionInfo>&, std::vector<StringPair> &, std::vector<StringPair> &)
150+ static void inputsFromArgs (R (C::*)(A), const char* /* name*/ , bool /* value*/ , std::vector<InputSpec>& inputs, std::vector<ExpressionInfo>&, Cache &, Cache &)
151151 {
152152 std::vector<ConfigParamSpec> inputMetadata;
153153 // FIXME: for the moment we do not support begin, end and step.
@@ -156,17 +156,17 @@ struct AnalysisDataProcessorBuilder {
156156
157157 // / 2. grouping case - 1st argument is an iterator
158158 template <typename R, typename C, soa::is_iterator A, soa::is_table... Args>
159- static void inputsFromArgs (R (C::*)(A, Args...), const char* name, bool value, std::vector<InputSpec>& inputs, std::vector<ExpressionInfo>& eInfos, std::vector<StringPair> & bk, std::vector<StringPair> & bku)
159+ static void inputsFromArgs (R (C::*)(A, Args...), const char* name, bool value, std::vector<InputSpec>& inputs, std::vector<ExpressionInfo>& eInfos, Cache & bk, Cache & bku)
160160 requires(std::is_lvalue_reference_v<A> && (std::is_lvalue_reference_v<Args> && ...))
161161 {
162- addGroupingCandidates<A, Args...>(bk, bku);
162+ addGroupingCandidates<A, Args...>(bk, bku, value );
163163 constexpr auto hash = o2::framework::TypeIdHelpers::uniqueId<R (C::*)(A, Args...)>();
164164 addInputsAndExpressions<typename std::decay_t <A>::parent_t , Args...>(hash, name, value, inputs, eInfos);
165165 }
166166
167167 // / 3. generic case
168168 template <typename R, typename C, soa::is_table... Args>
169- static void inputsFromArgs (R (C::*)(Args...), const char* name, bool value, std::vector<InputSpec>& inputs, std::vector<ExpressionInfo>& eInfos, std::vector<StringPair> &, std::vector<StringPair> &)
169+ static void inputsFromArgs (R (C::*)(Args...), const char* name, bool value, std::vector<InputSpec>& inputs, std::vector<ExpressionInfo>& eInfos, Cache &, Cache &)
170170 requires(std::is_lvalue_reference_v<Args> && ...)
171171 {
172172 constexpr auto hash = o2::framework::TypeIdHelpers::uniqueId<R (C::*)(Args...)>();
@@ -480,8 +480,8 @@ DataProcessorSpec adaptAnalysisTask(ConfigContext const& ctx, Args&&... args)
480480 std::vector<InputSpec> inputs;
481481 std::vector<ConfigParamSpec> options;
482482 std::vector<ExpressionInfo> expressionInfos;
483- std::vector<StringPair> bindingsKeys;
484- std::vector<StringPair> bindingsKeysUnsorted;
483+ Cache bindingsKeys;
484+ Cache bindingsKeysUnsorted;
485485
486486 // / make sure options and configurables are set before expression infos are created
487487 homogeneous_apply_refs ([&options, &hash](auto & element) { return analysis_task_parsers::appendOption (options, element); }, *task.get ());
0 commit comments