- Timestamp:
- 03/30/06 15:32:28 (19 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STSelector.cpp
r902 r939 33 33 intselections_(other.intselections_), 34 34 stringselections_(other.stringselections_), 35 taql_(other.taql_) { 35 taql_(other.taql_), 36 poltypes_(other.poltypes_), 37 order_(other.order_) { 36 38 } 37 39 … … 153 155 } 154 156 155 std::vector< int > STSelector::getint( const std::string& key ) 157 std::vector< int > STSelector::getint( const std::string& key ) const 156 158 { 157 159 if (intselections_.count(key) > 0) { … … 161 163 } 162 164 163 std::vector< int > STSelector::getScans( ) 165 std::vector< int > STSelector::getScans( ) const 164 166 { 165 167 return getint("SCANNO"); 166 168 } 167 169 168 std::vector< int > STSelector::getBeams( ) 170 std::vector< int > STSelector::getBeams( ) const 169 171 { 170 172 return getint("BEAMNO"); 171 173 } 172 174 173 std::vector< int > STSelector::getIFs( ) 175 std::vector< int > STSelector::getIFs( ) const 174 176 { 175 177 return getint("IFNO"); 176 178 } 177 179 178 std::vector< int > STSelector::getPols( ) 180 std::vector< int > STSelector::getPols( ) const 179 181 { 180 182 return getint("POLNO"); 181 183 } 182 184 183 std::vector< int > asap::STSelector::getCycles( ) 185 std::vector< int > asap::STSelector::getCycles( ) const 184 186 { 185 187 return getint("CYCLENO"); … … 226 228 { 227 229 if (order_.nelements() > 0) { 228 cout << "sorting" << endl;229 230 Table t = tab.sort(order_); 230 231 return t; … … 254 255 } 255 256 256 std::vector< std::string > asap::STSelector::getPolTypes( ) 257 std::vector< std::string > asap::STSelector::getPolTypes( ) const 257 258 { 258 259 return poltypes_; 259 260 } 261 262 std::vector<std::string> asap::STSelector::getSortOrder() const 263 { 264 std::vector<std::string> out; 265 for (uInt i=0;i<order_.nelements(); ++i) 266 out.push_back(order_[i]); 267 return out; 268 } -
trunk/src/STSelector.h
r902 r939 49 49 void setSortOrder(const std::vector<std::string>& order); 50 50 51 std::vector<int> getScans(); 52 std::vector<int> getBeams(); 53 std::vector<int> getIFs(); 54 std::vector<int> getPols(); 55 std::vector<int> getCycles(); 56 std::vector<std::string> getPolTypes(); 51 std::vector<int> getScans() const; 52 std::vector<int> getBeams() const; 53 std::vector<int> getIFs() const; 54 std::vector<int> getPols() const; 55 std::vector<int> getCycles() const; 56 std::vector<std::string> getPolTypes() const; 57 std::string getTaQL() const { return taql_; } 58 std::vector<std::string> getSortOrder() const; 57 59 58 60 casa::Table apply(const casa::Table& tab); … … 66 68 67 69 protected: 68 std::vector< int > getint( const std::string& key) ;69 std::vector< std::string > getstring( const std::string& key);70 std::vector< int > getint( const std::string& key) const; 71 //std::vector< std::string > getstring( const std::string& key) const; 70 72 71 73 void setint(const std::string& key, const std::vector< int >& val); -
trunk/src/python_STSelector.cpp
r934 r939 22 22 class_<STSelector>("selector") 23 23 .def( init <> () ) 24 .def( init < const STSelector& > () ) 24 25 .def("_getbeams", &STSelector::getBeams) 25 26 .def("_getifs", &STSelector::getIFs) … … 28 29 .def("_getscans", &STSelector::getScans) 29 30 .def("_getcycles", &STSelector::getCycles) 31 .def("_gettaql", &STSelector::getTaQL) 32 .def("_getorder", &STSelector::getSortOrder) 30 33 .def("_reset", &STSelector::reset) 31 34 .def("_setbeams", &STSelector::setBeams)
Note:
See TracChangeset
for help on using the changeset viewer.