Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Framework/Core/src/runDataProcessing.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2959,7 +2959,11 @@ int doMain(int argc, char** argv, o2::framework::WorkflowSpec const& workflow,
for (auto& dp : importedWorkflow) {
auto found = std::find_if(physicalWorkflow.begin(), physicalWorkflow.end(),
[&name = dp.name](DataProcessorSpec const& spec) { return spec.name == name; });
if (found == physicalWorkflow.end()) {
// also checking the workflow for processors with the same name but from a different executable,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why two find_if statements?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point :)

// adding them to the workflow to trigger the check for duplicate names in the MATERIALISE_WORKFLOW state
auto duplicate_name = std::find_if(dataProcessorInfos.begin(), dataProcessorInfos.end(),
[&name = dp.name, &exec = currentWorkflow.executable](DataProcessorInfo const& info) { return (info.name == name && info.executable != exec); });
if (found == physicalWorkflow.end() || duplicate_name != dataProcessorInfos.end()) {
physicalWorkflow.push_back(dp);
rankIndex.insert(std::make_pair(dp.name, workflowHashB));
}
Expand Down