1616
1717#include " QualityControl/PostProcessingConfig.h"
1818
19+ #include " QualityControl/runnerUtils.h"
20+
1921#include < boost/property_tree/ptree.hpp>
2022
2123namespace o2 ::quality_control::postprocessing
@@ -27,7 +29,6 @@ PostProcessingConfig::PostProcessingConfig(const std::string& id, const boost::p
2729 moduleName(config.get<std::string>(" qc.postprocessing." + id + " .moduleName" )),
2830 className(config.get<std::string>(" qc.postprocessing." + id + " .className" )),
2931 detectorName(config.get<std::string>(" qc.postprocessing." + id + " .detectorName" , " MISC" )),
30- qcdbUrl(config.get<std::string>(" qc.config.database.implementation" ) == "CCDB" ? config.get<std::string>(" qc.config.database.host" ) : ""),
3132 ccdbUrl(config.get<std::string>(" qc.config.conditionDB.url" , " " )),
3233 consulUrl(config.get<std::string>(" qc.config.consul.url" , " " )),
3334 activity(config.get<int >(" qc.config.Activity.number" , 0 ),
@@ -40,6 +41,11 @@ PostProcessingConfig::PostProcessingConfig(const std::string& id, const boost::p
4041 matchAnyRunNumber (config.get<bool >(" qc.config.postprocessing.matchAnyRunNumber" , false )),
4142 critical(true )
4243{
44+ // if available, use the source repo as defined in the postprocessing task, otherwise the general QCDB
45+ auto sourceRepo = config.get_child_optional (" qc.postprocessing." + id + " .sourceRepo" );
46+ auto databasePath = sourceRepo? " qc.postprocessing." + id + " .sourceRepo" : " qc.config.database" ;
47+ qcdbUrl = config.get <std::string>(databasePath + " .implementation" ) == " CCDB" ? config.get <std::string>(databasePath + " .host" ) : " " ;
48+
4349 for (const auto & initTrigger : config.get_child (" qc.postprocessing." + id + " .initTrigger" )) {
4450 initTriggers.push_back (initTrigger.second .get_value <std::string>());
4551 }
0 commit comments