casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CalDescColumns2.h
Go to the documentation of this file.
1 //# CalDescColumns.h: Calibration table cal_desc column access
2 //# Copyright (C) 1996,1997,1998,2001,2002,2003
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be adressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //#
27 //# $Id$
28 
29 #ifndef CALIBRATION_CALDESCCOLUMNS2_H
30 #define CALIBRATION_CALDESCCOLUMNS2_H
31 
32 #include <casa/aips.h>
42 #include <msvis/MSVis/MSCalEnums.h>
43 
44 namespace casa { //# NAMESPACE CASA - BEGIN
45 
46 // <summary>
47 // ROCalDescColumns: Read-only cal_desc calibration table column access
48 // </summary>
49 
50 // <use visibility=export>
51 
52 // <reviewed reviewer="" date="" tests="" demos="">
53 
54 // <prerequisite>
55 // <li> <linkto class="CalTable">CalTable</linkto> module
56 // </prerequisite>
57 //
58 // <etymology>
59 // From "read-only", "calibration descriptor table" and "columns".
60 // </etymology>
61 //
62 // <synopsis>
63 // The ROCalDescColumns class allows read-only access to columns
64 // in the cal_desc calibration sub-table.
65 // </etymology>
66 //
67 // <example>
68 // <srcblock>
69 // </srcblock>
70 // </example>
71 //
72 // <motivation>
73 // Encapsulate read-only access to cal_desc calibration sub-table columns.
74 // </motivation>
75 //
76 // <todo asof="11/01/01">
77 // (i) Deal with non-standard columns.
78 // </todo>
79 
81 {
82  public:
83  // Construct from a cal_desc calibration sub-table
84  ROCalDescColumns2 (const CalTable2& calTable);
85 
86  // Default destructor
87  virtual ~ROCalDescColumns2() {};
88 
89  // Read-only column accessors
96  const casacore::ROArrayMeasColumn<casacore::MFrequency>& chanFreqMeas() const
97  {return chanFreqMeas_p;};
100  const casacore::ROArrayQuantColumn<casacore::Double>& chanWidthQuant() const {
101  return chanWidthQuant_p;}
106 
107  protected:
108  // Prohibit public use of the null constructor, which
109  // does not produce a usable object.
111 
112  // Return a CalTable cal_desc subtable as a casacore::Table reference.
113  // Utilizes friendship relationship with class CalTable.
114  const casacore::Table& calDescAsTable(const CalTable2& calTable)
115  {return calTable.calDescAsTable();}
116 
117  // Attach a table column accessor
118  void attach (const CalTable2& calTable, casacore::TableColumn& tabCol,
119  MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
120  void attach (const CalTable2& calTable, casacore::ROTableMeasColumn& tabCol,
121  MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
122  void attach (const CalTable2& calTable, casacore::ROArrayQuantColumn<casacore::Double>& tabCol,
123  MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
124 
125  private:
126  // Prohibit copy constructor and assignment operator
129 
130  // Private column accessors
137  casacore::ROArrayMeasColumn<casacore::MFrequency> chanFreqMeas_p;
140  casacore::ROArrayQuantColumn<casacore::Double> chanWidthQuant_p;
145 };
146 
147 // <summary>
148 // CalDescColumns2: Read-write cal_desc calibration table column access
149 // </summary>
150 
151 // <use visibility=export>
152 
153 // <reviewed reviewer="" date="" tests="" demos="">
154 
155 // <prerequisite>
156 // <li> <linkto class="CalTable">CalTable</linkto> module
157 // </prerequisite>
158 //
159 // <etymology>
160 // From "calibration descriptor table" and "columns".
161 // </etymology>
162 //
163 // <synopsis>
164 // The CalDescColumns2 class allows read-write access to columns
165 // in the cal_desc calibration sub-table.
166 // </etymology>
167 //
168 // <example>
169 // <srcblock>
170 // </srcblock>
171 // </example>
172 //
173 // <motivation>
174 // Encapsulate access to cal_desc calibration sub-table columns.
175 // </motivation>
176 //
177 // <todo asof="01/07/01">
178 // (i) Deal with non-standard columns.
179 // </todo>
180 
182 {
183  public:
184  // Construct from a calibration table
185  CalDescColumns2 (CalTable2& calTable);
186 
187  // Default destructor
188  virtual ~CalDescColumns2() {};
189 
190  // Read-write column accessors
205 
206  protected:
207  // Prohibit public use of the null constructor, which
208  // does not produce a usable object.
210 
211  // Return a CalTable cal_desc subtable as a casacore::Table reference.
212  // Utilizes friendship relationship with class CalTable.
213  casacore::Table& calDescAsTable(CalTable2& calTable) {return calTable.calDescAsTable();}
214 
215  // Attach a table column accessor
216  void attach (CalTable2& calTable, casacore::TableColumn& tabCol,
217  MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
218  void attach (CalTable2& calTable, casacore::ROTableMeasColumn& tabCol,
219  MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
220  void attach (CalTable2& calTable, casacore::ROArrayQuantColumn<casacore::Double>& tabCol,
221  MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
222 
223  private:
224  // Prohibit copy constructor and assignment operator
227 
228  // Private column accessors
243 };
244 
245 
246 } //# NAMESPACE CASA - END
247 
248 #endif
249 
250 
251 
252 
253 
const casacore::ArrayColumn< casacore::Int > & chanRange() const
const casacore::ScalarColumn< casacore::Int > & nJones() const
const casacore::ArrayColumn< casacore::Double > & chanFreq() const
casacore::ArrayColumn< casacore::Int > spwId_p
const casacore::ArrayColumn< casacore::String > & polznType() const
casacore::ArrayColumn< casacore::Int > numChan_p
casacore::ArrayColumn< casacore::Double > chanWidth_p
Main interface class to a read/write table.
Definition: Table.h:153
casacore::ScalarColumn< casacore::String > jonesType_p
casacore::ArrayColumn< casacore::Double > & chanWidth()
casacore::ArrayColumn< casacore::String > & polznType()
const casacore::ROArrayMeasColumn< casacore::MFrequency > & chanFreqMeas() const
casacore::ArrayMeasColumn< casacore::MFrequency > & chanFreqMeas()
casacore::ROArrayQuantColumn< casacore::Double > chanWidthQuant_p
casacore::ArrayMeasColumn< casacore::MFrequency > chanFreqMeas_p
CalDescColumns2()
Prohibit public use of the null constructor, which does not produce a usable object.
CalTable: Calibration table access and creation.
Definition: CalTable2.h:81
casacore::ScalarColumn< casacore::Int > numReceptors_p
casacore::ScalarColumn< casacore::Int > nJones_p
void attach(CalTable2 &calTable, casacore::TableColumn &tabCol, MSCalEnums::colDef colEnum, const casacore::Bool &optional=false)
Attach a table column accessor.
casacore::ScalarColumn< casacore::Int > numSpw_p
Private column accessors.
casacore::ArrayColumn< casacore::Int > chanRange_p
casacore::ScalarColumn< casacore::Int > measFreqRef_p
const casacore::ScalarColumn< casacore::Int > & measFreqRef() const
casacore::ScalarColumn< casacore::Int > & nJones()
casacore::ScalarColumn< casacore::Int > numSpw_p
Private column accessors.
casacore::ArrayColumn< casacore::Int > & numChan()
casacore::ScalarColumn< casacore::Int > & measFreqRef()
const casacore::ArrayColumn< casacore::Int > & numChan() const
ROCalDescColumns2()
Prohibit public use of the null constructor, which does not produce a usable object.
const casacore::ScalarColumn< casacore::String > & msName() const
casacore::ArrayColumn< casacore::Double > chanFreq_p
const casacore::ArrayColumn< casacore::Int > & spwId() const
casacore::ArrayColumn< casacore::String > polznType_p
casacore::ScalarColumn< casacore::String > jonesType_p
#define ROTableMeasColumn
For backwards compatibility:
virtual ~ROCalDescColumns2()
Default destructor.
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
const casacore::ArrayColumn< casacore::Double > & chanWidth() const
casacore::ScalarColumn< casacore::String > & msName()
ROCalDescColumns2 & operator=(const ROCalDescColumns2 &)
Read/write access to a table column.
Definition: TableColumn.h:98
casacore::ArrayColumn< casacore::String > polznType_p
casacore::Table & calDescAsTable()
Definition: CalTable2.h:163
casacore::ArrayColumn< casacore::Int > chanRange_p
casacore::ScalarColumn< casacore::String > msName_p
casacore::Table & calDescAsTable(CalTable2 &calTable)
Return a CalTable cal_desc subtable as a casacore::Table reference.
casacore::ScalarColumn< casacore::Int > & numSpw()
Read-write column accessors.
void attach(const CalTable2 &calTable, casacore::TableColumn &tabCol, MSCalEnums::colDef colEnum, const casacore::Bool &optional=false)
Attach a table column accessor.
casacore::ArrayColumn< casacore::Int > numChan_p
casacore::ScalarColumn< casacore::Int > numReceptors_p
const casacore::Table & calDescAsTable(const CalTable2 &calTable)
Return a CalTable cal_desc subtable as a casacore::Table reference.
virtual ~CalDescColumns2()
Default destructor.
const casacore::ROArrayQuantColumn< casacore::Double > & chanWidthQuant() const
colDef
Enumerate all relevant data fields (columns and keywords)
Definition: MSCalEnums.h:92
casacore::ArrayQuantColumn< casacore::Double > & chanWidthQuant()
casacore::ArrayQuantColumn< casacore::Double > chanWidthQuant_p
ROCalDescColumns: Read-only cal_desc calibration table column access.
casacore::ScalarColumn< casacore::String > msName_p
const casacore::ScalarColumn< casacore::Int > & numReceptors() const
casacore::ScalarColumn< casacore::Int > & numReceptors()
const casacore::ScalarColumn< casacore::String > & jonesType() const
const casacore::ScalarColumn< casacore::Int > & numSpw() const
Read-only column accessors.
CalDescColumns2: Read-write cal_desc calibration table column access.
casacore::ArrayColumn< casacore::Int > spwId_p
CalDescColumns2 & operator=(const CalDescColumns2 &)
casacore::ArrayColumn< casacore::Double > & chanFreq()
casacore::ArrayColumn< casacore::Double > chanWidth_p
casacore::ROArrayMeasColumn< casacore::MFrequency > chanFreqMeas_p
casacore::ScalarColumn< casacore::Int > measFreqRef_p
casacore::ArrayColumn< casacore::Int > & chanRange()
casacore::ArrayColumn< casacore::Int > & spwId()
casacore::ScalarColumn< casacore::String > & jonesType()
casacore::ScalarColumn< casacore::Int > nJones_p
casacore::ArrayColumn< casacore::Double > chanFreq_p