Skip to content

Commit c875b91

Browse files
committed
use ranges to populate requestedIDXs in adjustTopology
1 parent 6c1c30f commit c875b91

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

Framework/Core/src/ArrowSupport.cxx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -595,23 +595,16 @@ o2::framework::ServiceSpec ArrowSupport::arrowBackendSpec()
595595
ac.providedTIMs.clear();
596596
ac.requestedTIMs.clear();
597597

598-
599598
auto inputSpecLessThan = [](InputSpec const& lhs, InputSpec const& rhs) { return DataSpecUtils::describe(lhs) < DataSpecUtils::describe(rhs); };
600599
auto outputSpecLessThan = [](OutputSpec const& lhs, OutputSpec const& rhs) { return DataSpecUtils::describe(lhs) < DataSpecUtils::describe(rhs); };
601600

602601
if (builder != workflow.end()) {
603602
// collect currently requested IDXs
604603
ac.requestedIDXs.clear();
605-
for (auto& d : workflow) {
606-
if (d.name == builder->name) {
607-
continue;
608-
}
609-
for (auto& i : d.inputs) {
610-
if (DataSpecUtils::partialMatch(i, header::DataOrigin{"IDX"})) {
611-
auto copy = i;
612-
DataSpecUtils::updateInputList(ac.requestedIDXs, std::move(copy));
613-
}
614-
}
604+
for (auto& d : workflow | views::exclude_by_name(builder->name)) {
605+
d.inputs |
606+
views::partial_match_filter(header::DataOrigin{"IDX"}) |
607+
sinks::update_input_list{ac.requestedIDXs};
615608
}
616609
// recreate inputs and outputs
617610
builder->inputs.clear();

0 commit comments

Comments
 (0)