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