Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/external-alma/atnf/PKSIO/NRODataset.h

    r2289 r2436  
    4444#include <atnf/PKSIO/NRODataRecord.h>
    4545#include <casa/namespace.h>
     46#include <casa/iomanip.h>
    4647
    4748#define SCAN_HEADER_SIZE 424
     
    200201  virtual vector<double> getFrequencies( int i ) ;
    201202  virtual uInt getArrayId( string type ) ;
     203  virtual uInt getPolNo( int irow ) ;
    202204
    203205 protected:
     
    238240  virtual double toLSR( double v, double t, double x, double y ) ;
    239241
     242  // POLNO from RX
     243  uInt polNoFromRX( const char *rx ) ;
     244
    240245  // Type of file record
    241246  string LOFIL ;
     
    518523} ;
    519524
     525// debug message output
     526template<class T> inline void nro_debug_output( char *name, int len, vector<T> &val )
     527{
     528  for ( int i = 0 ; i < len ; i++ ) {
     529    if ( i == 0 ) {
     530      cout << setw(8) << left << name ;
     531    }
     532    else if ( ( i % 5 ) == 0 ) {
     533      cout << endl << "        " ;
     534    }
     535    cout << "\'" << val[i] << "\' " ;
     536  }
     537  cout << endl ;
     538}
     539
     540template<class T> inline void nro_debug_output( char *name, int len1, int len2, vector< vector<T> > &val )
     541{
     542  for ( int i = 0 ; i < len1 ; i++ ) {
     543    for ( int j = 0 ; j < len2 ; j++ ) {
     544      if ( j == 0 ) {
     545        if ( i < 10 )
     546          cout << name << "0" << i << " " ;
     547        else
     548          cout << name << i << " " ;
     549      }
     550      else if ( ( j % 5 ) == 0 ) {
     551        cout << endl << "        " ;
     552      }
     553      cout << "\'" << val[i][j] << "\' " ;
     554    }
     555    cout << endl ;
     556  }
     557}
     558
    520559
    521560#endif /* NRO_HEADER_H */
Note: See TracChangeset for help on using the changeset viewer.