[1061] | 1 | // ----------------------------------------------------------------------- |
---|
| 2 | // CatalogueSpecification.hh: Define the specification of a catalogue, |
---|
| 3 | // being a set of Columns |
---|
| 4 | // ----------------------------------------------------------------------- |
---|
| 5 | // Copyright (C) 2006, Matthew Whiting, ATNF |
---|
| 6 | // |
---|
| 7 | // This program is free software; you can redistribute it and/or modify it |
---|
| 8 | // under the terms of the GNU General Public License as published by the |
---|
| 9 | // Free Software Foundation; either version 2 of the License, or (at your |
---|
| 10 | // option) any later version. |
---|
| 11 | // |
---|
| 12 | // Duchamp is distributed in the hope that it will be useful, but WITHOUT |
---|
| 13 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
| 14 | // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
---|
| 15 | // for more details. |
---|
| 16 | // |
---|
| 17 | // You should have received a copy of the GNU General Public License |
---|
| 18 | // along with Duchamp; if not, write to the Free Software Foundation, |
---|
| 19 | // Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA |
---|
| 20 | // |
---|
| 21 | // Correspondence concerning Duchamp may be directed to: |
---|
| 22 | // Internet email: Matthew.Whiting [at] atnf.csiro.au |
---|
| 23 | // Postal address: Dr. Matthew Whiting |
---|
| 24 | // Australia Telescope National Facility, CSIRO |
---|
| 25 | // PO Box 76 |
---|
| 26 | // Epping NSW 1710 |
---|
| 27 | // AUSTRALIA |
---|
| 28 | // ----------------------------------------------------------------------- |
---|
| 29 | #ifndef DUCHAMP_CATALOGUE_SPEC_H |
---|
| 30 | #define DUCHAMP_CATALOGUE_SPEC_H |
---|
| 31 | |
---|
| 32 | #include <duchamp/duchamp.hh> |
---|
| 33 | #include <duchamp/Outputs/columns.hh> |
---|
| 34 | #include <vector> |
---|
| 35 | #include <map> |
---|
| 36 | |
---|
| 37 | namespace duchamp { |
---|
| 38 | |
---|
| 39 | namespace Catalogues { |
---|
| 40 | |
---|
| 41 | class CatalogueSpecification |
---|
| 42 | { |
---|
| 43 | public: |
---|
| 44 | CatalogueSpecification(){}; |
---|
| 45 | CatalogueSpecification(const CatalogueSpecification& other); |
---|
| 46 | CatalogueSpecification& operator= (const CatalogueSpecification& other); |
---|
| 47 | virtual ~CatalogueSpecification(){}; |
---|
| 48 | |
---|
| 49 | void addColumn(Column col); |
---|
[1064] | 50 | Column &column(std::string type){return itsColumnList[itsTypeMap[type]];}; |
---|
| 51 | Column &column(int i){return itsColumnList[i];}; |
---|
| 52 | Column *pCol(int i){return &(itsColumnList[i]);}; |
---|
| 53 | void removeColumn(std::string type); |
---|
[1061] | 54 | size_t size(){return itsColumnList.size();}; |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | protected: |
---|
| 58 | std::vector<Column> itsColumnList; |
---|
| 59 | std::map<std::string, int> itsTypeMap; |
---|
| 60 | }; |
---|
| 61 | |
---|
| 62 | |
---|
[1064] | 63 | /// @brief Returns a vector of Col for results file output. |
---|
| 64 | CatalogueSpecification getFullColSet(std::vector<Detection> &objectList, FitsHeader &head); |
---|
| 65 | |
---|
| 66 | /// @brief Returns a vector of Col for logfile output. |
---|
| 67 | CatalogueSpecification getLogColSet(std::vector<Detection> &objectList, FitsHeader &head); |
---|
| 68 | |
---|
[1061] | 69 | } |
---|
| 70 | |
---|
| 71 | } |
---|
| 72 | #endif |
---|