- Timestamp:
- 03/06/09 11:42:46 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alma/src/STFiller.cpp
r1519 r1521 479 479 return ; 480 480 } 481 482 // DEBUG483 //cout << "STFiller::openNRO() getHeaderInfo " << endl ;484 //485 481 486 482 ifOffset_ = 0; … … 607 603 Array<Double> scanrate ; 608 604 for ( i = 0 ; i < imax ; i++ ) { 609 if( nreader_->getData( i ) != 0) {610 cerr << "STFiller::readNRO() error while reading row " << i << endl ;611 return -1 ;612 }605 // if( nreader_->getDataset()->getRecord( i ) == NULL ) { 606 // cerr << "STFiller::readNRO() error while reading row " << i << endl ; 607 // return -1 ; 608 // } 613 609 614 610 string scanType = nreader_->getScanType( i ) ; 615 611 Int srcType = -1 ; 616 612 if ( scanType.compare( 0, 2, "ON") == 0 ) { 613 // cout << "ON srcType: " << i << endl ; 617 614 srcType = 0 ; 618 615 } … … 799 796 Bool STFiller::fileCheck() 800 797 { 798 bool bval = false ; 799 801 800 // if filename_ is directory, return false 802 801 File inFile( filename_ ) ; 803 802 if ( inFile.isDirectory() ) 804 return false;803 return bval ; 805 804 806 805 // if beginning of header data is "RW", return true … … 808 807 FILE *fp = fopen( filename_.c_str(), "r" ) ; 809 808 char buf[9] ; 809 char buf2[80] ; 810 810 fread( buf, 4, 1, fp ) ; 811 811 buf[4] = '\0' ; 812 if ( ( strncmp( buf, "RW", 2 ) == 0 ) ) 813 return true ; 814 815 return false ; 812 fseek( fp, 640, SEEK_SET ) ; 813 fread( buf2, 80, 1, fp ) ; 814 if ( ( strncmp( buf, "RW", 2 ) == 0 ) || ( strstr( buf2, "NRO45M" ) != NULL ) ) { 815 bval = true ; 816 } 817 fclose( fp ) ; 818 return bval ; 816 819 } 817 820
Note:
See TracChangeset
for help on using the changeset viewer.