- Timestamp:
- 12/27/04 20:10:59 (20 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMemTable.cc
r158 r164 104 104 } 105 105 106 SDMemTable SDMemTable::getScan(Int scanID) {106 SDMemTable SDMemTable::getScan(Int scanID) const { 107 107 String cond("SELECT * from $1 WHERE SCANID == "); 108 108 cond += String::toString(scanID); … … 122 122 } 123 123 124 SDMemTable SDMemTable::getSource(const std::string& source) {124 SDMemTable SDMemTable::getSource(const std::string& source) const { 125 125 String cond("SELECT * from $1 WHERE SRCNAME == "); 126 126 cond += source; … … 321 321 } 322 322 323 std::vector<double> SDMemTable::getAbcissa(Int whichRow) {323 std::vector<double> SDMemTable::getAbcissa(Int whichRow) const { 324 324 std::vector<double> absc(nChan()); 325 325 Vector<Double> absc1(nChan()); … … 416 416 } 417 417 418 std::string SDMemTable::getAbcissaString(Int whichRow) 418 std::string SDMemTable::getAbcissaString(Int whichRow) const 419 419 { 420 420 ROArrayColumn<uInt> fid(table_, "FREQID"); … … 471 471 } 472 472 473 void SDMemTable::getSpectrum(Vector<Float>& spectrum, Int whichRow) {473 void SDMemTable::getSpectrum(Vector<Float>& spectrum, Int whichRow) const { 474 474 ROArrayColumn<Float> spec(table_, "SPECTRA"); 475 475 Array<Float> arr; … … 524 524 */ 525 525 MaskedArray<Float> SDMemTable::rowAsMaskedArray(uInt whichRow, 526 Bool useSelection) { 526 Bool useSelection) const 527 { 527 528 ROArrayColumn<Float> spec(table_, "SPECTRA"); 528 529 Array<Float> arr; … … 832 833 }; 833 834 834 std::string SDMemTable::summary() {835 std::string SDMemTable::summary() { 835 836 ROScalarColumn<Int> scans(table_, "SCANID"); 836 837 ROScalarColumn<String> srcs(table_, "SRCNAME"); -
trunk/src/SDMemTable.h
r161 r164 87 87 // get all as aips++ Vectors 88 88 virtual void getSpectrum(casa::Vector<casa::Float>& spectrum, 89 casa::Int whichRow=0) ;89 casa::Int whichRow=0) const; 90 90 91 91 //virtual void getMask(Vector<Bool>& mask,Int whichRow=0) const; … … 126 126 127 127 // get a new SDMemTable containing all rows with the same give SCANID 128 SDMemTable getScan(casa::Int scanID) ;129 SDMemTable getSource(const std::string& source) ;128 SDMemTable getScan(casa::Int scanID) const; 129 SDMemTable getSource(const std::string& source) const; 130 130 131 131 const casa::TableRecord& getHeader() const {return table_.keywordSet();} … … 145 145 // to bool mask 146 146 casa::MaskedArray<casa::Float> rowAsMaskedArray(casa::uInt whichRow, 147 casa::Bool useSelection = casa::False) ;147 casa::Bool useSelection = casa::False) const; 148 148 149 149 casa::SpectralCoordinate getCoordinate(casa::uInt whichIdx) const; … … 153 153 casa::Int nCoordinates() const; 154 154 155 std::vector<double> getAbcissa(int whichRow=0) ;156 std::string getAbcissaString(casa::Int whichRow=0) ;155 std::vector<double> getAbcissa(int whichRow=0) const; 156 std::string getAbcissaString(casa::Int whichRow=0) const; 157 157 158 158 private:
Note:
See TracChangeset
for help on using the changeset viewer.