Ignore:
Timestamp:
03/07/13 16:44:44 (11 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: List test programs

Put in Release Notes: Yes/No?

Module(s): Module Names change impacts.

Description: Describe your changes here...

Support SAM45 OTF data that is slightly different definition on
number of scans in the data (whether includes ZERO or not).


File:
1 edited

Legend:

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

    r2779 r2781  
    280280
    281281  // fill NRODataset
    282   int offset = getDataSize() + scanLen_ * i ;
     282  long offset = getDataSize() + scanLen_ * i ;
    283283  // DEBUG
    284284  //cout << "NRODataset::fillRecord()  offset (header) = " << offset << endl ;
     
    880880  //cout << "numArray=" << numArray << endl;
    881881}
     882
     883int NRODataset::getScanNum()
     884{
     885  long offset = getDataSize() + scanLen_ * NSCAN * ARYNM ;
     886  fseek( fp_, offset, SEEK_SET ) ;
     887  // try to read data
     888  fgetc( fp_ ) ;
     889  int eof = feof( fp_ ) ;
     890  //cout << "eof=" << eof << endl;
     891  // reset file pointer
     892  fseek( fp_, 0, SEEK_SET ) ;
     893  return NSCAN + (eof > 0 ? 0 : 1) ;
     894}
Note: See TracChangeset for help on using the changeset viewer.