Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/PotentialAction/FitPotentialAction.cpp

    r707a2b re1fe7e  
    9393  LOG(2, "DEBUG: counts_per_charge is " << counts_per_charge << ".");
    9494  // we want to check each (unique) key only once
    95   for (HomologyContainer::const_key_iterator iter = homologies.key_begin();
    96       iter != homologies.key_end(); iter = homologies.getNextKey(iter)) {
    97     // check if every element has the right number of counts
     95  HomologyContainer::const_key_iterator olditer = homologies.key_end();
     96  for (HomologyContainer::const_key_iterator iter =
     97      homologies.key_begin(); iter != homologies.key_end(); olditer = iter++) {
     98    // if it's the same as the old one, skip it
     99    if (*olditer == *iter)
     100      continue;
     101    // if it's a new key, check if every element has the right number of counts
    98102    Extractors::elementcounts_t::const_iterator countiter = counts_per_charge.begin();
    99103    for (; countiter != counts_per_charge.end(); ++countiter)
     
    133137      } catch (SerializablePotentialMissingValueException &e) {
    134138        if (const std::string *key = boost::get_error_info<SerializablePotentialKey>(e))
    135           STATUS("Missing value when parsing information for potential "+*key+".");
     139          ELOG(1, "Missing value when parsing information for potential "
     140              << *key << ".");
    136141        else
    137           STATUS("Missing value parsing information for potential with unknown key.");
     142          ELOG(1, "Missing value parsing information for potential with unknown key.");
    138143        return Action::failure;
    139144      } catch (SerializablePotentialIllegalKeyException &e) {
    140145        if (const std::string *key = boost::get_error_info<SerializablePotentialKey>(e))
    141           STATUS("Illegal key parsing information for potential "+*key+".");
     146          ELOG(1, "Illegal key parsing information for potential "
     147              << *key << ".");
    142148        else
    143           STATUS("Illegal key parsing information for potential with unknown key.");
     149          ELOG(1, "Illegal key parsing information for potential with unknown key.");
    144150        return Action::failure;
    145151      }
    146152    } else {
    147       STATUS("Failed to parse from "+params.potential_file.get().string()+".");
     153      ELOG(0, "Failed to parse from " << params.potential_file.get().string() << ".");
    148154      return Action::failure;
    149155    }
     
    156162  } else {
    157163    if (params.charges.get().empty()) {
    158       STATUS("Neither charges nor potential file given!");
     164      ELOG(1, "Neither charges nor potential file given!");
    159165      return Action::failure;
    160166    } else {
     
    216222        << fragmentnumbers << " is " << graph << ".");
    217223  } else {
    218     STATUS("Specific fragment "+toString(fragmentnumbers)+" not found in homologies!");
     224    ELOG(1, "Specific fragment " << fragmentnumbers << " not found in homologies!");
    219225    return Action::failure;
    220226  }
     
    299305          << l2error << " are " << model->getParameters() << ".");
    300306    } else {
    301       STATUS("No required parameter derivatives for a box constraint minimization known.");
     307      ELOG(0, "We require parameter derivatives for a box constraint minimization.");
    302308      return Action::failure;
    303309    }
Note: See TracChangeset for help on using the changeset viewer.