Skip to content

Commit bb3cfe5

Browse files
aalkinktf
authored andcommitted
DPL Analysis: fix new dynamic matchers breaking process(enumeration)
1 parent e731821 commit bb3cfe5

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Framework/Core/include/Framework/AnalysisTask.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -667,17 +667,17 @@ DataProcessorSpec adaptAnalysisTask(ConfigContext const& ctx, Args&&... args)
667667
}
668668
// execute process()
669669
if constexpr (requires { &T::process; }) {
670-
constexpr auto phash = o2::framework::TypeIdHelpers::uniqueId<decltype(&T::process)>();
671-
auto matchers = std::ranges::find_if(inputInfos, [&phash](auto const& info) { return info.hash == phash; })->matchers;
670+
auto loc = std::ranges::find_if(inputInfos, [](auto const& info) { return info.hash == o2::framework::TypeIdHelpers::uniqueId<decltype(&T::process)>(); });
671+
auto matchers = loc == inputInfos.end() ? std::vector<std::pair<int, ConcreteDataMatcher>>{} : loc->matchers;
672672
AnalysisDataProcessorBuilder::invokeProcess(*(task.get()), pc.inputs(), matchers, &T::process, expressionInfos, slices, newOrigin);
673673
}
674674
// execute optional process()
675675
homogeneous_apply_refs_sized<numElements>(
676676
[&pc, &expressionInfos, &task, &slices, &inputInfos, &newOrigin](auto& x) {
677677
if constexpr (is_process_configurable<decltype(x)>) {
678678
if (x.value == true) {
679-
constexpr auto phash = o2::framework::TypeIdHelpers::uniqueId<decltype(x.process)>();
680-
auto matchers = std::ranges::find_if(inputInfos, [&phash](auto const& info) { return info.hash == phash; })->matchers;
679+
auto loc = std::ranges::find_if(inputInfos, [](auto const& info) { return info.hash == o2::framework::TypeIdHelpers::uniqueId<decltype(x.process)>(); });
680+
auto matchers = loc == inputInfos.end() ? std::vector<std::pair<int, ConcreteDataMatcher>>{} : loc->matchers;
681681
AnalysisDataProcessorBuilder::invokeProcess(*task.get(), pc.inputs(), matchers, x.process, expressionInfos, slices, newOrigin);
682682
return true;
683683
}

0 commit comments

Comments
 (0)