Changeset 2781
- Timestamp:
- 03/07/13 16:44:44 (12 years ago)
- Location:
- trunk/external-alma/atnf/PKSIO
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma/atnf/PKSIO/ASTEDataset.cc
r2436 r2781 831 831 // 832 832 833 834 scanNum_ = NSCAN + 1 ; // includes ZERO scan 835 rowNum_ = scanNum_ * ARYNM ; 833 //scanNum_ = NSCAN + 1 ; // includes ZERO scan 836 834 scanLen_ = SCNLEN ; 837 835 dataLen_ = scanLen_ - SCAN_HEADER_SIZE ; 836 scanNum_ = getScanNum(); 837 rowNum_ = scanNum_ * ARYNM ; 838 838 chmax_ = (int) ( dataLen_ * 8 / IBIT ) ; 839 839 record_->LDATA = new char[dataLen_] ; 840 840 841 initArray(); 842 841 843 show() ; 842 844 -
trunk/external-alma/atnf/PKSIO/ASTEFXDataset.cc
r2436 r2781 831 831 // 832 832 833 scanNum_ = NSCAN + 1 ; // includes ZERO scan 834 rowNum_ = scanNum_ * ARYNM ; 833 //scanNum_ = NSCAN + 1 ; // includes ZERO scan 835 834 scanLen_ = SCNLEN ; 836 835 dataLen_ = scanLen_ - SCAN_HEADER_SIZE ; 836 scanNum_ = getScanNum(); 837 rowNum_ = scanNum_ * ARYNM ; 837 838 chmax_ = (int) ( dataLen_ * 8 / IBIT ) ; 838 839 record_->LDATA = new char[dataLen_] ; 839 840 841 initArray(); 842 840 843 show() ; 841 844 -
trunk/external-alma/atnf/PKSIO/NRODataset.cc
r2779 r2781 280 280 281 281 // fill NRODataset 282 intoffset = getDataSize() + scanLen_ * i ;282 long offset = getDataSize() + scanLen_ * i ; 283 283 // DEBUG 284 284 //cout << "NRODataset::fillRecord() offset (header) = " << offset << endl ; … … 880 880 //cout << "numArray=" << numArray << endl; 881 881 } 882 883 int 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 } -
trunk/external-alma/atnf/PKSIO/NRODataset.h
r2777 r2781 249 249 virtual int arrayMax() {return 0;} ; 250 250 251 // get scanNum from NSCAN (NSCAN or NSCAN + 1) 252 int getScanNum(); 253 251 254 // Type of file record 252 255 std::string LOFIL ; -
trunk/external-alma/atnf/PKSIO/NROOTFDataset.cc
r2777 r2781 828 828 // 829 829 830 scanNum_ = NSCAN + 1 ; // includes ZERO scan 831 //scanNum_ = NSCAN ; 832 rowNum_ = scanNum_ * ARYNM ; 830 //scanNum_ = NSCAN + 1 ; // includes ZERO scan 833 831 scanLen_ = SCNLEN ; 834 832 dataLen_ = scanLen_ - SCAN_HEADER_SIZE ; 833 scanNum_ = getScanNum(); 834 rowNum_ = scanNum_ * ARYNM ; 835 835 chmax_ = (int) ( dataLen_ * 8 / IBIT ) ; 836 836 record_->LDATA = new char[dataLen_] ;
Note:
See TracChangeset
for help on using the changeset viewer.