Changeset 90
- Timestamp:
- 11/12/04 12:16:44 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMemTableWrapper.h
r83 r90 42 42 43 43 public: 44 SDMemTableWrapper(const std::string& name) : 44 SDMemTableWrapper(const std::string& name) : 45 45 table_(new SDMemTable(name)) {;} 46 SDMemTableWrapper() : 46 SDMemTableWrapper() : 47 47 table_(new SDMemTable()) {;} 48 48 49 49 SDMemTableWrapper(CountedPtr<SDMemTable> cp) : table_(cp) {;} 50 SDMemTableWrapper(SDMemTable* sdmt) : table_(sdmt) {;} 51 50 //SDMemTableWrapper(SDMemTable* sdmt) : table_(sdmt) {;} 51 SDMemTableWrapper(const SDMemTableWrapper& mt) : 52 table_(mt.getCP()) {;} 53 52 54 SDMemTableWrapper(const SDMemTableWrapper& mt, const std::string& expr) : 53 55 table_(new SDMemTable(mt.getCP()->table(), expr)) {;} 54 56 57 SDMemTableWrapper copy() { 58 //CountedPtr<SDMemTable> cp = new SDMemTable(*this, False); 59 return SDMemTableWrapper(new SDMemTable(*(this->getCP()), False)); 60 } 61 55 62 SDMemTableWrapper getScan(int scan) { 56 63 String cond("SELECT * from $1 WHERE SCANID == "); … … 69 76 } 70 77 71 std::vector<double> getAbscissa(int whichRow, 72 73 74 78 std::vector<double> getAbscissa(int whichRow, 79 const std::string& unit = "GHz", 80 const std::string& frame = "TOPO", 81 double restfreq=0.0) const { 75 82 return table_->getAbscissa(whichRow,unit,frame,restfreq); 76 83 } … … 79 86 std::string getTime(int whichRow=0) {return table_->getTime(whichRow);} 80 87 81 std::vector<bool> getMask(int whichRow=0) const { 82 return table_->getMask(whichRow); 88 std::vector<bool> getMask(int whichRow=0) const { 89 return table_->getMask(whichRow); 83 90 } 84 bool setMask(const std::vector<int> mvals) const { 85 return table_->setMask(mvals); 86 }91 bool setMask(const std::vector<int> mvals) const { 92 return table_->setMask(mvals); 93 } 87 94 95 void flag(int whichRow=-1) { 96 table_->flag(whichRow); 97 } 88 98 std::string getSourceName(int whichRow=0) { 89 99 return table_->getSourceName(whichRow); 90 100 } 91 101 102 void setSpectrum(std::vector<float> spectrum, int whichRow=0) { 103 table_->setSpectrum(spectrum, whichRow); 104 } 105 92 106 bool setIF(int whichIF=0) {return table_->setIF(whichIF);} 93 107 bool setBeam(int whichBeam=0) {return table_->setBeam(whichBeam);} 94 bool setPol(int whichPol=0) {return table_->setPol(whichPol);} 108 bool setPol(int whichPol=0) {return table_->setPol(whichPol);} 95 109 96 110 int getIF() {return table_->getIF();} 97 111 int getBeam() {return table_->getBeam();} 98 int getPol() {return table_->getPol();} 112 int getPol() {return table_->getPol();} 99 113 100 114 int nIF() {return table_->nIF();} 101 115 int nBeam() {return table_->nBeam();} 102 int nPol() {return table_->nPol();} 103 int nChan() {return table_->nChan();} 104 int nScans() {return table_->nScans();} 116 int nPol() {return table_->nPol();} 117 int nChan() {return table_->nChan();} 118 int nScan() {return table_->nScan();} 119 int nRow() {return table_->nRow();} 105 120 106 121 //sets the mask 107 122 bool setChannels(const std::vector<int>& whichChans) { 108 return setChannels(whichChans); 123 return setChannels(whichChans); 109 124 } 110 125 void makePersistent(const std::string& fname) { 111 126 table_->makePersistent(fname); 112 127 } 128 129 void setRestFreqs(std::vector<double> freqs, const std::string& theunit) { 130 table_->setRestFreqs(freqs, theunit); 131 } 132 113 133 CountedPtr<SDMemTable> getCP() const {return table_;} 114 void summary() {table_->summary(); }115 134 std::string summary() { return table_->summary(); } 135 116 136 private: 117 137 CountedPtr<SDMemTable> table_;
Note:
See TracChangeset
for help on using the changeset viewer.