casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
ROCalMainColumns2.h
Go to the documentation of this file.
00001 //# CalMainColumns.h: Calibration table cal_main column access
00002 //# Copyright (C) 1996,1997,1998,2001,2002,2003
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be adressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //#
00027 //# $Id$
00028 
00029 #ifndef CALIBRATION_ROCALMAINCOLUMNS2_H
00030 #define CALIBRATION_ROCALMAINCOLUMNS2_H
00031 
00032 #include <casa/aips.h>
00033 #include <measures/Measures/MEpoch.h>
00034 #include <measures/Measures/MFrequency.h>
00035 #include <measures/Measures/MDirection.h>
00036 #include <tables/Tables/TableColumn.h>
00037 #include <tables/Tables/ScalarColumn.h>
00038 #include <tables/Tables/ArrayColumn.h>
00039 #include <measures/TableMeasures/TableMeasColumn.h>
00040 #include <measures/TableMeasures/ScalarMeasColumn.h>
00041 #include <measures/TableMeasures/ArrayMeasColumn.h>
00042 #include <measures/TableMeasures/ScalarQuantColumn.h>
00043 #include <synthesis/CalTables/CalTable2.h>
00044 #include <synthesis/MSVis/MSCalEnums.h>
00045 
00046 namespace casa { //# NAMESPACE CASA - BEGIN
00047 
00048   template<class T>
00049   class ROCalMainColumns2
00050   {
00051   public:
00052     // Construct from a calibration table
00053     ROCalMainColumns2 (const CalTable2& calTable);
00054     
00055     // Default destructor
00056     virtual ~ROCalMainColumns2() {};
00057     
00058     // Read-only column accessors
00059     const ROScalarColumn<Double>& time() const {return time_p;};
00060     const ROScalarMeasColumn<MEpoch>& timeMeas() const {return timeMeas_p;};
00061     const ROScalarColumn<Double>& timeEP() const {return timeEP_p;};
00062     const ROScalarQuantColumn<Double>& timeEPQuant() const 
00063     {return timeEPQuant_p;};
00064     const ROScalarColumn<Double>& interval() const {return interval_p;};
00065     const ROScalarQuantColumn<Double>& intervalQuant() const
00066     {return intervalQuant_p;};
00067     const ROScalarColumn<Int>& antenna1() const {return antenna1_p;};
00068     const ROScalarColumn<Int>& feed1() const {return feed1_p;};
00069     const ROScalarColumn<Int>& fieldId() const {return fieldId_p;};
00070     const ROScalarColumn<Int>& arrayId() const {return arrayId_p;};
00071     const ROScalarColumn<Int>& obsId() const {return obsId_p;};
00072     const ROScalarColumn<Int>& scanNo() const {return scanNo_p;};
00073     const ROScalarColumn<Int>& processorId() const {return processorId_p;};
00074     const ROScalarColumn<Int>& stateId() const {return stateId_p;};
00075     const ROScalarColumn<Int>& phaseId() const {return phaseId_p;};
00076     const ROScalarColumn<Int>& pulsarBin() const {return pulsarBin_p;};
00077     const ROScalarColumn<Int>& pulsarGateId() const {return pulsarGateId_p;};
00078     const ROScalarColumn<Int>& freqGrp() const {return freqGrp_p;};
00079     const ROScalarColumn<String>& freqGrpName() const {return freqGrpName_p;};
00080     const ROScalarColumn<String>& fieldName() const {return fieldName_p;};
00081     const ROScalarColumn<String>& fieldCode() const {return fieldCode_p;};
00082     const ROScalarColumn<String>& sourceName() const {return sourceName_p;};
00083     const ROScalarColumn<String>& sourceCode() const {return sourceCode_p;};
00084     const ROScalarColumn<Int>& calGrp() const {return calGrp_p;};
00085     //const ROArrayColumn<Complex>& gain() const {return gain_p;};
00086     const ROArrayColumn<T>& gain() const {return gain_p;};
00087     const ROArrayColumn<Float>& solvePar() const {return solvePar_p;};
00088     const ROArrayColumn<Int>& refAnt() const {return refAnt_p;};
00089     const ROArrayColumn<Int>& refFeed() const {return refFeed_p;};
00090     const ROArrayColumn<Int>& refReceptor() const {return refReceptor_p;};
00091     const ROArrayColumn<Double>& refFreq() const {return refFreq_p;};
00092     const ROArrayMeasColumn<MFrequency>& refFreqMeas() const 
00093     {return refFreqMeas_p;};
00094     const ROScalarColumn<Int>& measFreqRef() const {return measFreqRef_p;};
00095     const ROArrayColumn<Double>& refDir() const {return refDir_p;};
00096     const ROArrayMeasColumn<MDirection>& refDirMeas() const 
00097     {return refDirMeas_p;};
00098     const ROScalarColumn<Int>& measDirRef() const {return measDirRef_p;};
00099     const ROScalarColumn<Int>& calDescId() const {return calDescId_p;};
00100     const ROScalarColumn<Int>& calHistoryId() const {return calHistoryId_p;};
00101     
00102   protected:
00103     // Prohibit public use of the null constructor, which
00104     // does not produce a usable object.
00105     ROCalMainColumns2() {};
00106     
00107     // Return a CalTable as a Table reference. Utilizes friendship
00108     // relationship with class CalTable.
00109     const Table& asTable(const CalTable2& calTable) 
00110     {return calTable.calMainAsTable();}
00111     
00112     // Attach a table column accessor
00113     void attach (const CalTable2& calTable, ROTableColumn& tabCol, 
00114                  MSCalEnums::colDef colEnum, const Bool& optional = False);
00115     void attach (const CalTable2& calTable, 
00116                  ROArrayMeasColumn<MEpoch>& tabCol, 
00117                  MSCalEnums::colDef colEnum, const Bool& optional = False);
00118     void attach (const CalTable2& calTable, 
00119                  ROArrayMeasColumn<MFrequency>& tabCol, 
00120                  MSCalEnums::colDef colEnum, const Bool& optional = False);
00121     void attach (const CalTable2& calTable, 
00122                  ROArrayMeasColumn<MDirection>& tabCol, 
00123                  MSCalEnums::colDef colEnum, const Bool& optional = False);
00124     void attach (const CalTable2& calTable, ROScalarMeasColumn<MEpoch>& tabCol, 
00125                  MSCalEnums::colDef colEnum, const Bool& optional = False);
00126     void attach (const CalTable2& calTable, ROScalarQuantColumn<Double>& tabCol, 
00127                  MSCalEnums::colDef colEnum, const Bool& optional = False);
00128     
00129   private:
00130     // Prohibit copy constructor and assignment operator 
00131     ROCalMainColumns2 (const ROCalMainColumns2&);
00132     ROCalMainColumns2& operator= (const ROCalMainColumns2&);
00133     
00134     // Private column accessors
00135     ROScalarColumn<Double> time_p;
00136     ROScalarMeasColumn<MEpoch> timeMeas_p;
00137     ROScalarColumn<Double> timeEP_p;
00138     ROScalarQuantColumn<Double> timeEPQuant_p;
00139     ROScalarColumn<Double> interval_p;
00140     ROScalarQuantColumn<Double> intervalQuant_p;
00141     ROScalarColumn<Int> antenna1_p;
00142     ROScalarColumn<Int> feed1_p;
00143     ROScalarColumn<Int> fieldId_p;
00144     ROScalarColumn<Int> arrayId_p;
00145     ROScalarColumn<Int> obsId_p;
00146     ROScalarColumn<Int> scanNo_p;
00147     ROScalarColumn<Int> processorId_p;
00148     ROScalarColumn<Int> stateId_p;
00149     ROScalarColumn<Int> phaseId_p;
00150     ROScalarColumn<Int> pulsarBin_p;
00151     ROScalarColumn<Int> pulsarGateId_p;
00152     ROScalarColumn<Int> freqGrp_p;
00153     ROScalarColumn<String> freqGrpName_p;
00154     ROScalarColumn<String> fieldName_p;
00155     ROScalarColumn<String> fieldCode_p;
00156     ROScalarColumn<String> sourceName_p;
00157     ROScalarColumn<String> sourceCode_p;
00158     ROScalarColumn<Int> calGrp_p;
00159     //ROArrayColumn<Complex> gain_p;
00160     ROArrayColumn<T> gain_p;
00161     ROArrayColumn<Float> solvePar_p;
00162     ROArrayColumn<Int> refAnt_p;
00163     ROArrayColumn<Int> refFeed_p;
00164     ROArrayColumn<Int> refReceptor_p;
00165     ROArrayColumn<Double> refFreq_p;
00166     ROArrayMeasColumn<MFrequency> refFreqMeas_p;
00167     ROScalarColumn<Int> measFreqRef_p;
00168     ROArrayColumn<Double> refDir_p;
00169     ROArrayMeasColumn<MDirection> refDirMeas_p;
00170     ROScalarColumn<Int> measDirRef_p;
00171     ROScalarColumn<Int> calDescId_p;
00172     ROScalarColumn<Int> calHistoryId_p;
00173   };
00174   
00175 }
00176 
00177 
00178 #ifndef AIPS_NO_TEMPLATE_SRC
00179 #include <synthesis/CalTables/ROCalMainColumns2.tcc>
00180 #endif
00181 
00182 #endif