Skip to content

Commit a484194

Browse files
committed
fix
1 parent ac02539 commit a484194

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Framework/Core/src/WorkflowHelpers.cxx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -314,18 +314,12 @@ void WorkflowHelpers::injectServiceDevices(WorkflowSpec& workflow, ConfigContext
314314
timer.outputs.emplace_back(OutputSpec{concrete.origin, concrete.description, concrete.subSpec, Lifetime::Enumeration});
315315
} break;
316316
case Lifetime::Condition: {
317-
for (auto& option : processor.options) {
318-
if (option.name == "condition-backend") {
319-
hasConditionOption = true;
320-
break;
321-
}
322-
}
323-
if (hasConditionOption == false) {
317+
requestedCCDBs.emplace_back(input);
318+
if ((hasConditionOption == false) && std::none_of(processor.options.begin(), processor.options.end(), [](auto const& option){ return (option.name.compare("condition-backend") == 0); })) {
324319
processor.options.emplace_back(ConfigParamSpec{"condition-backend", VariantType::String, defaultConditionBackend(), {"URL for CCDB"}});
325320
processor.options.emplace_back(ConfigParamSpec{"condition-timestamp", VariantType::Int64, 0ll, {"Force timestamp for CCDB lookup"}});
326321
hasConditionOption = true;
327322
}
328-
requestedCCDBs.emplace_back(input);
329323
} break;
330324
case Lifetime::OutOfBand: {
331325
auto concrete = DataSpecUtils::asConcreteDataMatcher(input);
@@ -411,6 +405,9 @@ void WorkflowHelpers::injectServiceDevices(WorkflowSpec& workflow, ConfigContext
411405
AnalysisSupportHelpers::addMissingOutputsToSpawner({}, ac.spawnerInputs, ac.requestedAODs, aodSpawner);
412406

413407
AnalysisSupportHelpers::addMissingOutputsToReader(ac.providedAODs, ac.requestedAODs, aodReader);
408+
409+
std::sort(requestedCCDBs.begin(), requestedCCDBs.end(), inputSpecLessThan);
410+
std::sort(providedCCDBs.begin(), providedCCDBs.end(), outputSpecLessThan);
414411
AnalysisSupportHelpers::addMissingOutputsToReader(providedCCDBs, requestedCCDBs, ccdbBackend);
415412

416413
std::vector<DataProcessorSpec> extraSpecs;

0 commit comments

Comments
 (0)