Changeset 939 for trunk/src


Ignore:
Timestamp:
03/30/06 15:32:28 (19 years ago)
Author:
mar637
Message:

added get functions

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STSelector.cpp

    r902 r939  
    3333  intselections_(other.intselections_),
    3434  stringselections_(other.stringselections_),
    35   taql_(other.taql_) {
     35  taql_(other.taql_),
     36  poltypes_(other.poltypes_),
     37  order_(other.order_) {
    3638}
    3739
     
    153155}
    154156
    155 std::vector< int > STSelector::getint( const std::string& key )
     157std::vector< int > STSelector::getint( const std::string& key ) const
    156158{
    157159  if (intselections_.count(key) > 0) {
     
    161163}
    162164
    163 std::vector< int > STSelector::getScans( )
     165std::vector< int > STSelector::getScans( ) const
    164166{
    165167  return getint("SCANNO");
    166168}
    167169
    168 std::vector< int > STSelector::getBeams( )
     170std::vector< int > STSelector::getBeams( ) const
    169171{
    170172  return getint("BEAMNO");
    171173}
    172174
    173 std::vector< int > STSelector::getIFs( )
     175std::vector< int > STSelector::getIFs( ) const
    174176{
    175177  return getint("IFNO");
    176178}
    177179
    178 std::vector< int > STSelector::getPols( )
     180std::vector< int > STSelector::getPols( ) const
    179181{
    180182  return getint("POLNO");
    181183}
    182184
    183 std::vector< int > asap::STSelector::getCycles( )
     185std::vector< int > asap::STSelector::getCycles( ) const
    184186{
    185187  return getint("CYCLENO");
     
    226228{
    227229  if (order_.nelements() > 0) {
    228     cout << "sorting" << endl;
    229230    Table t = tab.sort(order_);
    230231    return t;
     
    254255}
    255256
    256 std::vector< std::string > asap::STSelector::getPolTypes( )
     257std::vector< std::string > asap::STSelector::getPolTypes( ) const
    257258{
    258259  return poltypes_;
    259260}
     261
     262std::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  
    4949  void setSortOrder(const std::vector<std::string>& order);
    5050
    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;
    5759
    5860  casa::Table apply(const casa::Table& tab);
     
    6668
    6769protected:
    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;
    7072
    7173  void setint(const std::string& key, const std::vector< int >& val);
  • trunk/src/python_STSelector.cpp

    r934 r939  
    2222      class_<STSelector>("selector")
    2323        .def( init <> () )
     24        .def( init < const STSelector& > () )
    2425        .def("_getbeams", &STSelector::getBeams)
    2526        .def("_getifs", &STSelector::getIFs)
     
    2829        .def("_getscans", &STSelector::getScans)
    2930        .def("_getcycles", &STSelector::getCycles)
     31        .def("_gettaql", &STSelector::getTaQL)
     32        .def("_getorder", &STSelector::getSortOrder)
    3033        .def("_reset", &STSelector::reset)
    3134        .def("_setbeams", &STSelector::setBeams)
Note: See TracChangeset for help on using the changeset viewer.