Skip to content

Commit b6e750a

Browse files
authored
[QC-999] Set ccdb url also for Checks and Aggregators (#1916)
1 parent 962ca12 commit b6e750a

4 files changed

Lines changed: 11 additions & 4 deletions

File tree

Framework/include/QualityControl/AggregatorConfig.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ struct AggregatorConfig {
4141
bool allObjects = false;
4242
framework::Inputs inputSpecs{};
4343
std::vector<AggregatorSource> sources;
44+
std::string conditionUrl{};
4445
};
4546

4647
} // namespace o2::quality_control::checker

Framework/include/QualityControl/CheckConfig.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ struct CheckConfig {
4141
bool allowBeautify = false;
4242
framework::Inputs inputSpecs{};
4343
framework::OutputSpec qoSpec{ "XXX", "INVALID" };
44+
std::string conditionUrl{};
4445
};
4546

4647
} // namespace o2::quality_control::checker

Framework/src/Aggregator.cxx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "QualityControl/ActivityHelpers.h"
2323
#include "QualityControl/Activity.h"
2424
#include <Common/Exceptions.h>
25+
#include "QualityControl/CommonSpec.h"
2526

2627
#include <utility>
2728

@@ -46,6 +47,7 @@ void Aggregator::init()
4647
root_class_factory::create<AggregatorInterface>(mAggregatorConfig.moduleName, mAggregatorConfig.className);
4748
mAggregatorInterface->setName(mAggregatorConfig.name);
4849
mAggregatorInterface->setCustomParameters(mAggregatorConfig.customParameters);
50+
mAggregatorInterface->setCcdbUrl(mAggregatorConfig.conditionUrl);
4951
mAggregatorInterface->configure();
5052
} catch (...) {
5153
std::string diagnostic = boost::current_exception_diagnostic_information();
@@ -170,7 +172,7 @@ std::vector<AggregatorSource> Aggregator::getSources(core::DataSourceType type)
170172
return matches;
171173
}
172174

173-
AggregatorConfig Aggregator::extractConfig(const core::CommonSpec&, const AggregatorSpec& aggregatorSpec)
175+
AggregatorConfig Aggregator::extractConfig(const core::CommonSpec& commonSpec, const AggregatorSpec& aggregatorSpec)
174176
{
175177
framework::Inputs inputs;
176178
std::vector<std::string> objectNames;
@@ -217,7 +219,8 @@ AggregatorConfig Aggregator::extractConfig(const core::CommonSpec&, const Aggreg
217219
std::move(objectNames),
218220
checkAllObjects,
219221
std::move(inputs),
220-
sources
222+
sources,
223+
commonSpec.conditionDBUrl
221224
};
222225
}
223226

Framework/src/Check.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ void Check::init()
6363
mCheckInterface = root_class_factory::create<CheckInterface>(mCheckConfig.moduleName, mCheckConfig.className);
6464
mCheckInterface->setName(mCheckConfig.name);
6565
mCheckInterface->setCustomParameters(mCheckConfig.customParameters);
66+
mCheckInterface->setCcdbUrl(mCheckConfig.conditionUrl);
6667
} catch (...) {
6768
std::string diagnostic = boost::current_exception_diagnostic_information();
6869
ILOG(Fatal, Ops) << "Unexpected exception, diagnostic information follows: "
@@ -202,7 +203,7 @@ bool Check::getAllObjectsOption() const
202203
return mCheckConfig.allObjects;
203204
}
204205

205-
CheckConfig Check::extractConfig(const CommonSpec&, const CheckSpec& checkSpec)
206+
CheckConfig Check::extractConfig(const CommonSpec& commonSpec, const CheckSpec& checkSpec)
206207
{
207208
framework::Inputs inputs;
208209
std::vector<std::string> objectNames;
@@ -252,7 +253,8 @@ CheckConfig Check::extractConfig(const CommonSpec&, const CheckSpec& checkSpec)
252253
checkAllObjects,
253254
allowBeautify,
254255
std::move(inputs),
255-
createOutputSpec(checkSpec.checkName)
256+
createOutputSpec(checkSpec.checkName),
257+
commonSpec.conditionDBUrl
256258
};
257259
}
258260

0 commit comments

Comments
 (0)