Changeset 2376 for trunk


Ignore:
Timestamp:
12/19/11 20:28:19 (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...

Sort table before process.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STGrid.cpp

    r2375 r2376  
    457457    node = node && taborg.col("SCANNO").in( scanlist_ ) ;
    458458  }
    459   tab = taborg( node ) ;
     459  Block<String> cols( 3 ) ;
     460  cols[0] = "TIME" ;
     461  cols[1] = "BEAMNO" ;
     462  cols[2] = "POLNO" ;
     463  Block<Int> order( 3, Sort::Ascending ) ;
     464  tab = taborg( node ).sort( cols, order ) ;
    460465  if ( tab.nrow() == 0 ) {
    461466    LogIO os( LogOrigin("STGrid","selectData",WHERE) ) ;
    462467    os << LogIO::SEVERE
    463        << "No corresponding rows for given selection: IFNO " << ifno
    464        << " SCANNO " << scanlist_
    465        << LogIO::EXCEPTION ;
     468       << "No corresponding rows for given selection: IFNO " << ifno ;
     469    if ( scanlist_.size() > 0 )
     470      os << " SCANNO " << scanlist_ ;
     471    os << LogIO::EXCEPTION ;
    466472  }
    467473}
     
    583589void STGrid::setupArray( Table &tab )
    584590{
     591  LogIO os( LogOrigin("STGrid","setupArray",WHERE) ) ;
    585592  ROScalarColumn<uInt> polnoCol( tab, "POLNO" ) ;
    586593  Vector<uInt> pols = polnoCol.getColumn() ;
     594  //os << pols << LogIO::POST ;
    587595  Vector<uInt> pollistOrg ;
    588596  uInt npolOrg = 0 ;
     
    613621  npol_ = pollist_.size() ;
    614622  if ( npol_ == 0 ) {
    615     LogIO os( LogOrigin("STGrid","setupArray",WHERE) ) ;
    616623    os << LogIO::SEVERE << "Empty pollist" << LogIO::EXCEPTION ;
    617624  }
     
    619626  ROArrayColumn<uChar> tmpCol( tab, "FLAGTRA" ) ;
    620627  nchan_ = tmpCol( 0 ).nelements() ;
    621 //   LogIO os( LogOrigin("STGrid","setupArray",WHERE) ) ;
    622628//   os << "npol_ = " << npol_ << "(" << pollist_ << ")" << endl
    623629//      << "nchan_ = " << nchan_ << endl
Note: See TracChangeset for help on using the changeset viewer.