Changeset 2442 for trunk/external-alma


Ignore:
Timestamp:
03/22/12 19:39:32 (13 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: sdsave unit test

Put in Release Notes: No

Module(s): Module Names change impacts.

Description: Describe your changes here...

More refactoring


Location:
trunk/external-alma/atnf/PKSIO
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/external-alma/atnf/PKSIO/NROFITSDataset.cc

    r2441 r2442  
    19301930}
    19311931
    1932 int NROFITSDataset::readTable( char *v, char *name )
    1933 {
    1934   //
    1935   // Read 'name' attribute defined as char from the 0-th row
    1936   // of the FITS Scan Record
    1937   //
    1938   int status = readTable( v, name, (int)strlen( v ), 0 ) ;
    1939 
    1940   return status ;
    1941 }
    1942 
    19431932int NROFITSDataset::readTable( char *v, char *name, int clen, int idx )
    19441933{
     
    19761965}
    19771966
    1978 int NROFITSDataset::readTable( int &v, char *name, int b )
    1979 {
    1980   //
    1981   // Read 'name' attribute defined as int from the 0-th row
    1982   // of the FITS Scan Record
    1983   //
    1984   int status = readTable( v, name, b, 0 ) ;
    1985 
    1986   return status ;
    1987 }
    1988 
    19891967int NROFITSDataset::readTable( int &v, char *name, int b, int idx )
    19901968{
     
    20051983}
    20061984
    2007 int NROFITSDataset::readTable( float &v, char *name, int b )
    2008 {
    2009   //
    2010   // Read 'name' attribute defined as float from the 0-th row
    2011   // of the FITS Scan Record
    2012   //
    2013   int status = readTable( v, name, b, 0 ) ;
    2014 
    2015   return status ;
    2016 }
    2017 
    20181985int NROFITSDataset::readTable( float &v, char *name, int b, int idx )
    20191986{
     
    20301997  if ( b == 0 )
    20311998    convertEndian( v ) ;
    2032 
    2033   return status ;
    2034 }
    2035 
    2036 int NROFITSDataset::readTable( double &v, char *name, int b )
    2037 {
    2038   //
    2039   // Read 'name' attribute defined as double from the 0-th row
    2040   // of the FITS Scan Record
    2041   //
    2042   int status = readTable( v, name, b, 0 ) ;
    20431999
    20442000  return status ;
     
    21532109    //cout << "v[" << i << "] = " << v[i] << endl ;
    21542110  }
    2155 
    2156   return status ;
    2157 }
    2158 
    2159 int NROFITSDataset::readColumn( vector<string> &v, char *name )
    2160 {
    2161   //
    2162   // Read 0-th column of ARRYTP-dependent 'name' attributes
    2163   // defined as char array from the FITS Scan Record
    2164   //
    2165   int status = readColumn( v, name, 0 ) ;
    21662111
    21672112  return status ;
     
    22132158}
    22142159
    2215 int NROFITSDataset::readColumn( vector<int> &v, char *name, int b )
    2216 {
    2217   //
    2218   // Read 0-th column of ARRYTP-dependent 'name' attributes
    2219   // defined as int array from the FITS Scan Record
    2220   //
    2221   int status = readColumn( v, name, b, 0 ) ;
    2222 
    2223   return status ;
    2224 }
    2225 
    22262160int NROFITSDataset::readColumn( vector<int> &v, char *name, int b, int idx )
    22272161{
     
    22472181}
    22482182
    2249 int NROFITSDataset::readColumn( vector<float> &v, char *name, int b )
    2250 {
    2251   //
    2252   // Read 0-th column of ARRYTP-dependent 'name' attributes
    2253   // defined as float array from the FITS Scan Record
    2254   //
    2255   int status = readColumn( v, name, b, 0 ) ;
    2256 
    2257   return status ;
    2258 }
    2259 
    22602183int NROFITSDataset::readColumn( vector<float> &v, char *name, int b, int idx )
    22612184{
     
    22812204}
    22822205
    2283 int NROFITSDataset::readColumn( vector<double> &v, char *name, int b )
    2284 {
    2285   //
    2286   // Read 0-th column of ARRYTP-dependent 'name' attributes
    2287   // defined as double array from the FITS Scan Record
    2288   //
    2289   int status = readColumn( v, name, b, 0 ) ;
    2290 
    2291   return status ;
    2292 }
    2293 
    22942206int NROFITSDataset::readColumn( vector<double> &v, char *name, int b, int idx )
    22952207{
  • trunk/external-alma/atnf/PKSIO/NROFITSDataset.h

    r2440 r2442  
    105105  // Read char data
    106106  int readHeader( string &v, char *name ) ;
    107   int readTable( char *v, char *name ) ;
    108   int readTable( char *v, char *name, int clen, int idx ) ;
    109   int readTable( vector<char *> &v, char *name, int idx ) ;
    110   int readColumn( vector<string> &v, char *name ) ;
    111   int readColumn( vector<string> &v, char *name, int idx ) ;
     107  int readTable( char *v, char *name, int clen, int idx=0 ) ;
     108  int readTable( vector<char *> &v, char *name, int idx=0 ) ;
     109  int readColumn( vector<string> &v, char *name, int idx=0 ) ;
    112110
    113111  // Read int data
    114112  int readHeader( int &v, char *name, int b ) ;
    115   int readTable( int &v, char *name, int b ) ;
    116   int readTable( int &v, char *name, int b, int idx ) ;
    117   int readTable( vector<int> &v, char *name, int b, int idx ) ;
    118   int readColumn( vector<int> &v, char *name, int b ) ;
    119   int readColumn( vector<int> &v, char *name, int b, int idx ) ;
     113  int readTable( int &v, char *name, int b, int idx=0 ) ;
     114  int readTable( vector<int> &v, char *name, int b, int idx=0 ) ;
     115  int readColumn( vector<int> &v, char *name, int b, int idx=0 ) ;
    120116
    121117  // Read float data
    122118  int readHeader( float &v, char *name, int b ) ;
    123   int readTable( float &v, char *name, int b ) ;
    124   int readTable( float &v, char *name, int b, int idx ) ;
    125   int readTable( vector<float> &v, char *name, int b, int idx ) ;
    126   int readColumn( vector<float> &v, char *name, int b ) ;
    127   int readColumn( vector<float> &v, char *name, int b, int idx ) ;
     119  int readTable( float &v, char *name, int b, int idx=0 ) ;
     120  int readTable( vector<float> &v, char *name, int b, int idx=0 ) ;
     121  int readColumn( vector<float> &v, char *name, int b, int idx=0 ) ;
    128122
    129123  // Read double data
    130124  int readHeader( double &v, char *name, int b ) ;
    131   int readTable( double &v, char *name, int b ) ;
    132   int readTable( double &v, char *name, int b, int idx ) ;
    133   int readTable( vector<double> &v, char *name, int b, int idx ) ;
    134   int readColumn( vector<double> &v, char *name, int b ) ;
    135   int readColumn( vector<double> &v, char *name, int b, int idx ) ;
     125  int readTable( double &v, char *name, int b, int idx=0 ) ;
     126  int readTable( vector<double> &v, char *name, int b, int idx=0 ) ;
     127  int readColumn( vector<double> &v, char *name, int b, int idx=0 ) ;
    136128
    137129  // read ARRY
Note: See TracChangeset for help on using the changeset viewer.