Changeset 46 for trunk/src


Ignore:
Timestamp:
07/15/04 14:28:44 (20 years ago)
Author:
mmarquar
Message:

Minor edits to verbose info. added empty close function. Switched pseudoHeader pol<->chan

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDReader.cc

    r33 r46  
    3939  table_(new SDMemTable()) {
    4040  cursor_ = 0;
    41   timestamp_ = 0;
     41}
     42SDReader::SDReader(const std::string& filename) :
     43  reader_(0),
     44  table_(new SDMemTable()) {
     45  cursor_ = 0;
     46  open(filename);
    4247}
    4348
     
    4651  table_(tbl) {
    4752  cursor_ = 0;
    48   timestamp_ = 0;
    4953}
    5054
    5155SDReader::~SDReader() {
    52   delete reader_;reader_ =0;
     56  if (reader_) delete reader_; reader_ = 0;
    5357}
    5458
    5559void SDReader::reset() {
    56   cursor_ = 0;
    57   timestamp_ = 0;
     60  cursor_ = 0;
    5861  open(filename_);
     62}
     63
     64void SDReader::close() {
     65  cerr << "disabled" << endl;
    5966}
    6067
     
    95102    return;
    96103  }
    97   header_.print(); 
     104  //header_.print(); 
    98105  if ((header_.obstype).matches("*SW*")) {
    99106    // need robust way here - probably read ahead of next timestamp
     
    183190        sc.setFrequencyMap(frqslot,IFno-1);
    184191
    185         sc.scanid = scanNo;
     192        sc.scanid = scanNo-1;//make it 0-based
    186193        sc.setSpectrum(spectra, beamNo-1, IFno-1);
    187194        sc.setFlags(flagtra,  beamNo-1, IFno-1);
  • trunk/src/SDReader.h

    r33 r46  
    3737#include <aips/aips.h>
    3838#include <aips/iostream.h>
    39 #include <aips/iomanip.h>
    4039#include <aips/Utilities/CountedPtr.h>
    4140#include <aips/Utilities/String.h>
     
    5251public:
    5352  SDReader();
     53  SDReader(const std::string& filename);
    5454  SDReader(CountedPtr<SDMemTable> tbl);
    5555  virtual ~SDReader();
    5656
    5757  void open(const std::string& filename);
     58  void close();
    5859  int read(const std::vector<int>& seq);
    5960
     
    6566    std::vector<int> v;
    6667    v.push_back(nBeam_);v.push_back(nIF_);
    67     v.push_back(nChan_);v.push_back(nPol_);
     68    v.push_back(nPol_);v.push_back(nChan_);
    6869    return v;
    6970  }
Note: See TracChangeset for help on using the changeset viewer.