Exemple #1
0
bool
Targeting::operator()( const MassSpectrum& ms )
{
    candidates_.clear();

    if ( !ms.isCentroid() )
        return false;

    bool polarity_positive = (ms.polarity() == PolarityPositive) || (ms.polarity() == PolarityIndeterminate);

    segment_wrapper< const adcontrols::MassSpectrum > segs( ms );
    int fcn = 0;
    for ( auto& fms : segs ) {
        if ( polarity_positive ) {
            find_candidate( fms, fcn++, true, poslist_ );
        }
        else {
            find_candidate( fms, fcn++, false, neglist_ );
        }
    }
    return true;
}