ionFinder/src/msInterface.cpp
bool ms2::MsInterface::getScan(utils::msInterface::Scan& scan, std::string fname, size_t scanNum) const
{
    //load spectrum
    auto ms2FileIt = _ms2Map.find(fname);
    if(ms2FileIt == _ms2Map.end()){
        std::cerr << NEW_LINE << "Key error in Ms2Map!" << NEW_LINE;
        return false;
    }
    if(!ms2FileIt->second->getScan(scanNum, scan)){
        std::cerr << NEW_LINE << "Error reading scan!" << NEW_LINE;
        return false;
    }
    return true;
}
/**
 * const qualified version of getScan. If \p fname has not been read, the function will return false.
 * @param scan Empty Scan object to populate.
 * @param fname MS file name.
 * @param scanNum Scan number to retrieve.
 * @return True if parsing scan was successful.
 */
const qualified version of getScan. If \p fname has not been read, the function will return false.
@param scan Empty Scan object to populate.
@param fname MS file name.
@param scanNum Scan number to retrieve.
@return True if parsing scan was successful.
const qualified version of getScan . If \ p fname has not been read the function will return false . @param scan Empty Scan object to populate . @param fname MS file name . @param scanNum Scan number to retrieve . @return True if parsing scan was successful .
bool ms2::MsInterface::getScan(utils::msInterface::Scan& scan, std::string fname, size_t scanNum) const
{
    auto ms2FileIt = _ms2Map.find(fname);
    if(ms2FileIt == _ms2Map.end()){
        std::cerr << NEW_LINE << "Key error in Ms2Map!" << NEW_LINE;
        return false;
    }
    if(!ms2FileIt->second->getScan(scanNum, scan)){
        std::cerr << NEW_LINE << "Error reading scan!" << NEW_LINE;
        return false;
    }
    return true;
}
bool ms2 :: MsInterface :: getScan ( utils :: msInterface :: Scan & scan , std :: string fname , size_t scanNum ) const { auto ms2FileIt = _ms2Map . find ( fname ) ; if ( ms2FileIt == _ms2Map . end ( ) ) { std :: cerr << NEW_LINE << " " << NEW_LINE ; return false ; } if ( ! ms2FileIt -> second -> getScan ( scanNum , scan ) ) { std :: cerr << NEW_LINE << " " << NEW_LINE ; return false ; } return true ; }
const qualified version of getScan.
const qualified version of getScan .
//load spectrum