Changeset 2413 for trunk/src


Ignore:
Timestamp:
02/17/12 19:41:49 (13 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-2816

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Fill Main columns: IFNO, FREQ_ID


Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STGrid.cpp

    r2405 r2413  
    2020#include <tables/Tables/Table.h>
    2121#include <tables/Tables/TableRecord.h>
     22#include <tables/Tables/TableRow.h>
    2223#include <tables/Tables/ExprNode.h>
    2324#include <tables/Tables/ScalarColumn.h>
     
    16561657  os << "saveData: elapsed time is " << t1-t0 << " sec." << LogIO::POST ;
    16571658
     1659  fillMainColumns( tab ) ;
     1660
    16581661  return outfile_ ;
    16591662}
     
    16701673}
    16711674
    1672 }
     1675void STGrid::fillMainColumns( Table &tab )
     1676{
     1677  Table t( infileList_[0], Table::Old ) ;
     1678  Table tsel = t( t.col( "IFNO" ) == (uInt)ifno_, 1 ) ;
     1679  ROTableRow row( tab ) ;
     1680  row.get( 0 ) ;
     1681  const TableRecord &rec = row.record() ;
     1682  uInt freqId = rec.asuInt( "FREQ_ID" ) ;
     1683  Int nrow = tab.nrow() ;
     1684  ScalarColumn<uInt> ifnoCol( tab, "IFNO" ) ;
     1685  ScalarColumn<uInt> freqIdCol( tab, "FREQ_ID" ) ;
     1686  for ( Int i = 0 ; i < nrow ; i++ ) {
     1687    ifnoCol.put( i, (uInt)ifno_ ) ;
     1688    freqIdCol.put( i, freqId ) ;
     1689  }
     1690}
     1691
     1692}
  • trunk/src/STGrid.h

    r2398 r2413  
    195195  void initTable( uInt idx ) ;
    196196  Bool isMultiIF( Table &tab ) ;
     197  void fillMainColumns( Table &tab ) ;
    197198  static bool produceChunk(void *ctx) throw(concurrent::PCException);
    198199  static void consumeChunk(void *ctx) throw(concurrent::PCException);
Note: See TracChangeset for help on using the changeset viewer.