Skip to content

Commit 9527bb7

Browse files
committed
DPL: auto register CCDB path options
ConfigurableCCDBPath only needed if you want to override the value directly.
1 parent add4011 commit 9527bb7

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Framework/Core/include/Framework/AnalysisTask.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "Framework/AlgorithmSpec.h"
1717
#include "Framework/CallbackService.h"
1818
#include "Framework/ConfigContext.h"
19+
#include "Framework/ConfigParamsHelper.h"
1920
#include "Framework/ControlService.h"
2021
#include "Framework/DataProcessorSpec.h"
2122
#include "Framework/Expressions.h"
@@ -557,6 +558,17 @@ DataProcessorSpec adaptAnalysisTask(ConfigContext const& ctx, Args&&... args)
557558
LOG(warn) << "Task " << name_str << " has no inputs";
558559
}
559560

561+
// Auto-register default ccdb: path options from subscribed timestamped-table inputs.
562+
// This allows tasks to accept --ccdb:fXxx overrides without requiring an explicit
563+
// ConfigurableCCDBPath<> member for every column in the subscribed table.
564+
for (auto& input : inputs) {
565+
for (auto& meta : input.metadata) {
566+
if (meta.name.starts_with("ccdb:") && meta.name != "ccdb:") {
567+
ConfigParamsHelper::addOptionIfMissing(options, meta);
568+
}
569+
}
570+
}
571+
560572
homogeneous_apply_refs_sized<numElements>([&outputs, &hash](auto& element) { return analysis_task_parsers::appendOutput(outputs, element, hash); }, *task.get());
561573

562574
auto requiredServices = CommonServices::defaultServices();

0 commit comments

Comments
 (0)