// // C++ Interface: STSelector // // Description: // // // Author: Malte Marquarding , (C) 2006 // // Copyright: See COPYING file that comes with this distribution // // #ifndef ASAPSTSELECTOR_H #define ASAPSTSELECTOR_H #include #include #include #include namespace asap { /** A class to set a subselection of a Scantable @author Malte Marquarding */ class STSelector { public: STSelector(); STSelector(const STSelector& other); STSelector& operator=(const STSelector& other); ~STSelector(); void setScans(const std::vector& scans); void setBeams(const std::vector& beams); void setIFs(const std::vector& ifs); void setPolarizations(const std::vector& pols); void setTaQL(const std::string& taql); std::vector getScans(); std::vector getBeams(); std::vector getIFs(); std::vector getPols(); casa::Table apply(const casa::Table& tab); casa::Table operator()(const casa::Table& tab) { return apply(tab); }; void reset() { selections_.clear(); taql_ = "";}; bool empty() const; std::string print(); private: // std::vector< int > get( const std::string& key); void set(const std::string& key, const std::vector< int >& val); typedef std::map > idmap; // has to be mutable, as to stl limitations mutable idmap selections_; std::string taql_; }; } #endif