Changeset 2911 for trunk/src/STMath.cpp


Ignore:
Timestamp:
04/01/14 13:05:18 (10 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: test_sdcal

Put in Release Notes: Yes/No?

Module(s): Module Names change impacts.

Description: Describe your changes here...

Defined new index iterator class, STIdxIter2.
STIdxIter2 has almost same functionality as STIdxIter and support
various kind of data.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STMath.cpp

    r2905 r2911  
    36213621    cols[1] = "POLNO" ;
    36223622    cols[2] = "IFNO" ;
    3623     STIdxIter *iter = new STIdxIterAcc( out, cols ) ;
     3623    STIdxIter2 iter( out, cols ) ;
    36243624    STSelector sel ;
    3625     while ( !iter->pastEnd() ) {
    3626       Vector<uInt> ids = iter->current() ;
     3625    while ( !iter.pastEnd() ) {
     3626      Record ids = iter.currentValue() ;
    36273627      stringstream ss ;
    36283628      ss << "SELECT FROM $1 WHERE "
    3629          << "BEAMNO==" << ids[0] << "&&"
    3630          << "POLNO==" << ids[1] << "&&"
    3631          << "IFNO==" << ids[2] ;
     3629         << "BEAMNO==" << ids.asuInt(cols[0]) << "&&"
     3630         << "POLNO==" << ids.asuInt(cols[1]) << "&&"
     3631         << "IFNO==" << ids.asuInt(cols[2]) ;
    36323632      //cout << "TaQL string: " << ss.str() << endl ;
    36333633      sel.setTaQL( ss.str() ) ;
    36343634      aoff->setSelection( sel ) ;
    3635       Vector<uInt> rows = iter->getRows( SHARE ) ;
     3635      Vector<uInt> rows = iter.getRows( SHARE ) ;
    36363636      // out should be an exact copy of s except that SPECTRA column is empty
    36373637      calibrateALMA( out, s, aoff, rows ) ;
    36383638      aoff->unsetSelection() ;
    36393639      sel.reset() ;
    3640       iter->next() ;
    3641     }
    3642     delete iter ;
     3640      iter.next() ;
     3641    }
    36433642    s->table_ = torg ;
    36443643    s->attach() ;
Note: See TracChangeset for help on using the changeset viewer.