- Timestamp:
- 07/15/04 14:28:44 (20 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDReader.cc
r33 r46 39 39 table_(new SDMemTable()) { 40 40 cursor_ = 0; 41 timestamp_ = 0; 41 } 42 SDReader::SDReader(const std::string& filename) : 43 reader_(0), 44 table_(new SDMemTable()) { 45 cursor_ = 0; 46 open(filename); 42 47 } 43 48 … … 46 51 table_(tbl) { 47 52 cursor_ = 0; 48 timestamp_ = 0;49 53 } 50 54 51 55 SDReader::~SDReader() { 52 delete reader_;reader_ =0;56 if (reader_) delete reader_; reader_ = 0; 53 57 } 54 58 55 59 void SDReader::reset() { 56 cursor_ = 0; 57 timestamp_ = 0; 60 cursor_ = 0; 58 61 open(filename_); 62 } 63 64 void SDReader::close() { 65 cerr << "disabled" << endl; 59 66 } 60 67 … … 95 102 return; 96 103 } 97 header_.print();104 //header_.print(); 98 105 if ((header_.obstype).matches("*SW*")) { 99 106 // need robust way here - probably read ahead of next timestamp … … 183 190 sc.setFrequencyMap(frqslot,IFno-1); 184 191 185 sc.scanid = scanNo ;192 sc.scanid = scanNo-1;//make it 0-based 186 193 sc.setSpectrum(spectra, beamNo-1, IFno-1); 187 194 sc.setFlags(flagtra, beamNo-1, IFno-1); -
trunk/src/SDReader.h
r33 r46 37 37 #include <aips/aips.h> 38 38 #include <aips/iostream.h> 39 #include <aips/iomanip.h>40 39 #include <aips/Utilities/CountedPtr.h> 41 40 #include <aips/Utilities/String.h> … … 52 51 public: 53 52 SDReader(); 53 SDReader(const std::string& filename); 54 54 SDReader(CountedPtr<SDMemTable> tbl); 55 55 virtual ~SDReader(); 56 56 57 57 void open(const std::string& filename); 58 void close(); 58 59 int read(const std::vector<int>& seq); 59 60 … … 65 66 std::vector<int> v; 66 67 v.push_back(nBeam_);v.push_back(nIF_); 67 v.push_back(n Chan_);v.push_back(nPol_);68 v.push_back(nPol_);v.push_back(nChan_); 68 69 return v; 69 70 }
Note:
See TracChangeset
for help on using the changeset viewer.