@@ -31,19 +31,20 @@ PostProcessingConfig::PostProcessingConfig(const std::string& id, const boost::p
3131 config.get<std::string>(" qc.config.Activity.provenance" , " qc" ),
3232 { config.get <uint64_t >(" qc.config.Activity.start" , 0 ),
3333 config.get <uint64_t >(" qc.config.Activity.end" , -1 ) }),
34- matchAnyRunNumber (config.get<bool >(" qc.config.postprocessing.matchAnyRunNumber" , false )),
35- critical(true )
34+ matchAnyRunNumber (config.get<bool >(" qc.config.postprocessing.matchAnyRunNumber" , false ))
3635{
37- moduleName = config.get <std::string>(" qc.postprocessing." + id + " .moduleName" );
38- className = config.get <std::string>(" qc.postprocessing." + id + " .className" );
39- detectorName = config.get <std::string>(" qc.postprocessing." + id + " .detectorName" , " MISC" );
36+ auto ppTree = config.get_child (" qc.postprocessing." + id);
37+
38+ moduleName = ppTree.get <std::string>(" moduleName" );
39+ className = ppTree.get <std::string>(" className" );
40+ detectorName = ppTree.get <std::string>(" detectorName" , " MISC" );
4041 ccdbUrl = config.get <std::string>(" qc.config.conditionDB.url" , " " );
4142 consulUrl = config.get <std::string>(" qc.config.consul.url" , " " );
4243 kafkaBrokersUrl = config.get <std::string>(" qc.config.kafka.url" , " " );
4344 kafkaTopicAliECSRun = config.get <std::string>(" qc.config.kafka.topicAliecsRun" , " aliecs.run" );
4445
4546 // if available, use the source repo as defined in the postprocessing task, otherwise the general QCDB
46- auto sourceRepo = config .get_child_optional (" qc.postprocessing. " + id + " . sourceRepo" );
47+ auto sourceRepo = ppTree .get_child_optional (" sourceRepo" );
4748 auto databasePath = sourceRepo ? " qc.postprocessing." + id + " .sourceRepo" : " qc.config.database" ;
4849 auto qcdbUrl = config.get <std::string>(databasePath + " .implementation" ) == " CCDB" ? config.get <std::string>(databasePath + " .host" ) : " " ;
4950 // build the config of the qcdb
@@ -53,16 +54,15 @@ PostProcessingConfig::PostProcessingConfig(const std::string& id, const boost::p
5354 };
5455 repository = dbConfig;
5556
56- for (const auto & initTrigger : config .get_child (" qc.postprocessing. " + id + " . initTrigger" )) {
57+ for (const auto & initTrigger : ppTree .get_child (" initTrigger" )) {
5758 initTriggers.push_back (initTrigger.second .get_value <std::string>());
5859 }
59- for (const auto & updateTrigger : config .get_child (" qc.postprocessing. " + id + " . updateTrigger" )) {
60+ for (const auto & updateTrigger : ppTree .get_child (" updateTrigger" )) {
6061 updateTriggers.push_back (updateTrigger.second .get_value <std::string>());
6162 }
62- for (const auto & stopTrigger : config .get_child (" qc.postprocessing. " + id + " . stopTrigger" )) {
63+ for (const auto & stopTrigger : ppTree .get_child (" stopTrigger" )) {
6364 stopTriggers.push_back (stopTrigger.second .get_value <std::string>());
6465 }
65- auto ppTree = config.get_child (" qc.postprocessing." + id);
6666 if (ppTree.count (" extendedTaskParameters" )) {
6767 customParameters.populateCustomParameters (ppTree.get_child (" extendedTaskParameters" ));
6868 } else if (ppTree.count (" taskParameters" ) > 0 ) {
0 commit comments