ionFinder/src/msInterface.cpp
bool ms2::MsInterface::getScan(utils::msInterface::Scan& scan, std::string fname, size_t scanNum)
{
    auto ms2FileIt = _ms2Map.find(fname);
    if(ms2FileIt == _ms2Map.end()){
        if(!read(fname)) return false;
        ms2FileIt = _ms2Map.find(fname);
    }
    if(!ms2FileIt->second->getScan(scanNum, scan)){
        std::cerr << NEW_LINE << "Error reading scan!" << NEW_LINE;
        return false;
    }
    return true;
}
/**
 * Retrieve a Scan. If \p fname has not been read, the file will be read and stored before being parsed.
 * Because this function is not const, if the file has to be read, the MsInterface object will be modified.
 * This function is thread save.
 * @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.
 */
Retrieve a Scan. If \p fname has not been read, the file will be read and stored before being parsed.
Because this function is not const, if the file has to be read, the MsInterface object will be modified.
This function is thread save.
@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.
Retrieve a Scan . If \ p fname has not been read the file will be read and stored before being parsed . Because this function is not const if the file has to be read the MsInterface object will be modified . This function is thread save . @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)
{
    auto ms2FileIt = _ms2Map.find(fname);
    if(ms2FileIt == _ms2Map.end()){
        if(!read(fname)) return false;
        ms2FileIt = _ms2Map.find(fname);
    }
    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 ) { auto ms2FileIt = _ms2Map . find ( fname ) ; if ( ms2FileIt == _ms2Map . end ( ) ) { if ( ! read ( fname ) ) return false ; ms2FileIt = _ms2Map . find ( fname ) ; } if ( ! ms2FileIt -> second -> getScan ( scanNum , scan ) ) { std :: cerr << NEW_LINE << " " << NEW_LINE ; return false ; } return true ; }
Retrieve a Scan.
Retrieve a Scan .