Skip to content

Commit

Permalink
Merge pull request #75 from alibuild/alibot-cleanup-13847
Browse files Browse the repository at this point in the history
  • Loading branch information
aalkin authored Jan 9, 2025
2 parents 515c5c7 + a6f94af commit bcafe46
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Framework/Core/include/Framework/AnalysisTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ struct AnalysisDataProcessorBuilder {
using T = std::decay_t<As>;
addExpression<T>(ai, hash, eInfos);
addInput<T>(name, value, inputs);
}(), ...);
}(),
...);
}

/// helper to parse the process arguments
Expand All @@ -203,7 +204,8 @@ struct AnalysisDataProcessorBuilder {

/// 2. grouping case - 1st argument is an iterator
template <typename R, typename C, soa::is_iterator A, soa::is_table... Args>
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) requires(std::is_lvalue_reference_v<A> && (std::is_lvalue_reference_v<Args>&&...))
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)
requires(std::is_lvalue_reference_v<A> && (std::is_lvalue_reference_v<Args> && ...))
{
addGroupingCandidates<A, Args...>(bk, bku);
constexpr auto hash = o2::framework::TypeIdHelpers::uniqueId<R (C::*)(Args...)>();
Expand All @@ -212,7 +214,8 @@ struct AnalysisDataProcessorBuilder {

/// 3. generic case
template <typename R, typename C, soa::is_table A, soa::is_table... Args>
static void inputsFromArgs(R (C::*)(A, Args...), const char* name, bool value, std::vector<InputSpec>& inputs, std::vector<ExpressionInfo>& eInfos, std::vector<StringPair>&, std::vector<StringPair>&) requires(std::is_lvalue_reference_v<A> && (std::is_lvalue_reference_v<Args>&&...))
static void inputsFromArgs(R (C::*)(A, Args...), const char* name, bool value, std::vector<InputSpec>& inputs, std::vector<ExpressionInfo>& eInfos, std::vector<StringPair>&, std::vector<StringPair>&)
requires(std::is_lvalue_reference_v<A> && (std::is_lvalue_reference_v<Args> && ...))
{
constexpr auto hash = o2::framework::TypeIdHelpers::uniqueId<R (C::*)(Args...)>();
addInputsAndExpressions<A, Args...>(hash, name, value, inputs, eInfos);
Expand Down Expand Up @@ -538,13 +541,13 @@ DataProcessorSpec adaptAnalysisTask(ConfigContext const& ctx, Args&&... args)
AnalysisDataProcessorBuilder::inputsFromArgs(&T::process, "default", true, inputs, expressionInfos, bindingsKeys, bindingsKeysUnsorted);
}
homogeneous_apply_refs(
overloaded {
overloaded{
[name = name_str, &expressionInfos, &inputs, &bindingsKeys, &bindingsKeysUnsorted](framework::is_process_configurable auto& x) mutable {
// this pushes (argumentIndex,processHash,schemaPtr,nullptr) into expressionInfos for arguments that are Filtered/filtered_iterators
AnalysisDataProcessorBuilder::inputsFromArgs(x.process, (name + "/" + x.name).c_str(), x.value, inputs, expressionInfos, bindingsKeys, bindingsKeysUnsorted);
return true;
},
[](auto&){
[](auto&) {
return false;
}},
*task.get());
Expand Down

0 comments on commit bcafe46

Please sign in to comment.