157 }
catch (dqm_core::BadConfig &) { }
158 std::map< std::string,double >
pars;
159 std::map<std::string,std::string> strPars;
160 std::map<std::string,double> grthr;
161 std::map<std::string,double> rdthr;
163 std::map< std::string, double > oldpars(
config.getParameters());
164 std::map<std::string,double> oldgrthr(
config.getGreenThresholds());
165 std::map<std::string,double> oldrdthr(
config.getRedThresholds());
167 for (std::map< std::string, double >::const_iterator parVal = oldpars.begin();
168 parVal != oldpars.end(); ++parVal) {
169 std::string
parname(parVal->first);
170 std::string::size_type
pos =
parname.find(
'|');
171 if (
pos == std::string::npos) {
172 pars.insert(*parVal);
173 }
else if (
parname.substr(0,
pos) == subalg) {
174 pars.insert(std::map< std::string, double >::value_type(
parname.substr(
pos+1), parVal->second));
177 for (
auto& strPar :
config.getGenericParameters() ) {
178 std::string
parname = strPar.first;
179 auto pipeIndex =
parname.find(
'|' );
180 if ( pipeIndex == std::string::npos ) {
181 strPars.insert( strPar );
182 }
else if (
parname.substr( 0, pipeIndex ) == subalg ) {
183 strPars.emplace(
parname.substr( pipeIndex + 1 ), strPar.second );
186 for (std::map< std::string, double >::const_iterator thrVal = oldgrthr.begin();
187 thrVal != oldgrthr.end(); ++thrVal) {
188 std::string thrname(thrVal->first);
189 std::string::size_type
pos = thrname.find(
'|');
190 if (
pos == std::string::npos) {
191 grthr.insert(*thrVal);
192 }
else if (thrname.substr(0,
pos) == subalg) {
193 grthr.insert(std::map< std::string, double >::value_type(thrname.substr(
pos+1), thrVal->second));
196 for (std::map< std::string, double >::const_iterator thrVal = oldrdthr.begin();
197 thrVal != oldrdthr.end(); ++thrVal) {
198 std::string thrname(thrVal->first);
199 std::string::size_type
pos = thrname.find(
'|');
200 if (
pos == std::string::npos) {
201 rdthr.insert(*thrVal);
202 }
else if (thrname.substr(0,
pos) == subalg) {
203 rdthr.insert(std::map< std::string, double >::value_type(thrname.substr(
pos+1), thrVal->second));
206 return new HanAlgorithmConfig(
ref,
pars, strPars, grthr, rdthr, 0);