Skip to content

Commit

Permalink
DPL: do not add summary outputs more than once
Browse files Browse the repository at this point in the history
This seem to be the cause for the spurious circular dependency for
the internal-dpl-injected-dummy-sink.
  • Loading branch information
ktf committed Sep 3, 2024
1 parent 8391e4d commit 815676e
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Framework/Core/src/WorkflowHelpers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,22 @@ void WorkflowHelpers::injectServiceDevices(WorkflowSpec& workflow, ConfigContext
bool timeframeSink = hasTimeframeInputs && !hasTimeframeOutputs;
if (std::stoi(ctx.options().get<std::string>("timeframes-rate-limit-ipcid")) != -1) {
if (timeframeSink && processor.name.find("internal-dpl-injected-dummy-sink") == std::string::npos) {
processor.outputs.push_back(OutputSpec{{"dpl-summary"}, ConcreteDataMatcher{"DPL", "SUMMARY", static_cast<DataAllocator::SubSpecificationType>(runtime_hash(processor.name.c_str()))}});
O2_SIGNPOST_ID_GENERATE(sid, workflow_helpers);
uint32_t hash = runtime_hash(processor.name.c_str());
bool hasMatch = false;
ConcreteDataMatcher summaryMatcher = ConcreteDataMatcher{"DPL", "SUMMARY", static_cast<DataAllocator::SubSpecificationType>(hash)};
for (auto& output : processor.outputs) {
if (DataSpecUtils::match(output, summaryMatcher)) {
O2_SIGNPOST_EVENT_EMIT(workflow_helpers, sid, "output enumeration", "%{public}s already there in %{public}s",
DataSpecUtils::describe(output).c_str(), processor.name.c_str());
hasMatch = true;
break;
}
}
if (!hasMatch) {
O2_SIGNPOST_EVENT_EMIT(workflow_helpers, sid, "output enumeration", "Adding DPL/SUMMARY/%d to %{public}s", hash, processor.name.c_str());
processor.outputs.push_back(OutputSpec{{"dpl-summary"}, ConcreteDataMatcher{"DPL", "SUMMARY", static_cast<DataAllocator::SubSpecificationType>(hash)}});
}
}
}
bool hasConditionOption = false;
Expand Down

0 comments on commit 815676e

Please sign in to comment.