LCOV - code coverage report
Current view: top level - synthesis/CalTables - CalDescColumns.h (source / functions) Hit Total Coverage
Test: casa_coverage.info Lines: 0 19 0.0 %
Date: 2023-10-25 08:47:59 Functions: 0 20 0.0 %

          Line data    Source code
       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_CALDESCCOLUMNS_H
      30             : #define CALIBRATION_CALDESCCOLUMNS_H
      31             : 
      32             : #include <casacore/casa/aips.h>
      33             : #include <casacore/measures/Measures/MFrequency.h>
      34             : #include <casacore/tables/Tables/TableColumn.h>
      35             : #include <casacore/tables/Tables/ScalarColumn.h>
      36             : #include <casacore/tables/Tables/ArrayColumn.h>
      37             : #include <casacore/measures/TableMeasures/TableMeasColumn.h>
      38             : #include <casacore/measures/TableMeasures/ScalarMeasColumn.h>
      39             : #include <casacore/measures/TableMeasures/ArrayMeasColumn.h>
      40             : #include <casacore/measures/TableMeasures/ArrayQuantColumn.h>
      41             : #include <synthesis/CalTables/CalTable.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             : 
      80             : class ROCalDescColumns 
      81             : {
      82             :  public:
      83             :   // Construct from a cal_desc calibration sub-table
      84             :   ROCalDescColumns (const CalTable& calTable);
      85             : 
      86             :   // Default destructor
      87           0 :   virtual ~ROCalDescColumns() {};
      88             : 
      89             :   // Read-only column accessors
      90             :   const casacore::ScalarColumn<casacore::Int>& numSpw() const {return numSpw_p;};
      91             :   const casacore::ArrayColumn<casacore::Int>& numChan() const {return numChan_p;};
      92             :   const casacore::ScalarColumn<casacore::Int>& numReceptors() const {return numReceptors_p;};
      93             :   const casacore::ScalarColumn<casacore::Int>& nJones() const {return nJones_p;};
      94           0 :   const casacore::ArrayColumn<casacore::Int>& spwId() const {return spwId_p;};
      95             :   const casacore::ArrayColumn<casacore::Double>& chanFreq() const {return chanFreq_p;};
      96             :   const casacore::ROArrayMeasColumn<casacore::MFrequency>& chanFreqMeas() const
      97             :     {return chanFreqMeas_p;};
      98             :   const casacore::ScalarColumn<casacore::Int>& measFreqRef() const {return measFreqRef_p;};
      99             :   const casacore::ArrayColumn<casacore::Double>& chanWidth() const {return chanWidth_p;}
     100             :   const casacore::ROArrayQuantColumn<casacore::Double>& chanWidthQuant() const {
     101             :     return chanWidthQuant_p;}
     102             :   const casacore::ArrayColumn<casacore::Int>& chanRange() const {return chanRange_p;}
     103             :   const casacore::ArrayColumn<casacore::String>& polznType() const {return polznType_p;}
     104             :   const casacore::ScalarColumn<casacore::String>& jonesType() const {return jonesType_p;};
     105           0 :   const casacore::ScalarColumn<casacore::String>& msName() const {return msName_p;};
     106             : 
     107             :  protected:
     108             :   // Prohibit public use of the null constructor, which
     109             :   // does not produce a usable object.
     110             :   ROCalDescColumns() {};
     111             : 
     112             :   // Return a CalTable cal_desc subtable as a casacore::Table reference. 
     113             :   // Utilizes friendship relationship with class CalTable.
     114           0 :   const casacore::Table& calDescAsTable(const CalTable& calTable) 
     115           0 :     {return calTable.calDescAsTable();}
     116             : 
     117             :   // Attach a table column accessor
     118             :   void attach (const CalTable& calTable, casacore::TableColumn& tabCol, 
     119             :                MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
     120             :   void attach (const CalTable& calTable, casacore::ROTableMeasColumn& tabCol,
     121             :                MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
     122             :   void attach (const CalTable& 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 
     127             :   ROCalDescColumns (const ROCalDescColumns&);
     128             :   ROCalDescColumns& operator= (const ROCalDescColumns&);
     129             : 
     130             :   // Private column accessors
     131             :   casacore::ScalarColumn<casacore::Int> numSpw_p;
     132             :   casacore::ArrayColumn<casacore::Int> numChan_p;
     133             :   casacore::ScalarColumn<casacore::Int> numReceptors_p;
     134             :   casacore::ScalarColumn<casacore::Int> nJones_p;
     135             :   casacore::ArrayColumn<casacore::Int> spwId_p;
     136             :   casacore::ArrayColumn<casacore::Double> chanFreq_p;
     137             :   casacore::ROArrayMeasColumn<casacore::MFrequency> chanFreqMeas_p;
     138             :   casacore::ScalarColumn<casacore::Int> measFreqRef_p;
     139             :   casacore::ArrayColumn<casacore::Double> chanWidth_p;
     140             :   casacore::ROArrayQuantColumn<casacore::Double> chanWidthQuant_p;
     141             :   casacore::ArrayColumn<casacore::Int> chanRange_p;
     142             :   casacore::ArrayColumn<casacore::String> polznType_p;
     143             :   casacore::ScalarColumn<casacore::String> jonesType_p;
     144             :   casacore::ScalarColumn<casacore::String> msName_p;
     145             : };
     146             : 
     147             : // <summary> 
     148             : // CalDescColumns: 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 CalDescColumns 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             : 
     181             : class CalDescColumns 
     182             : {
     183             :  public:
     184             :   // Construct from a calibration table
     185             :   CalDescColumns (CalTable& calTable);
     186             : 
     187             :   // Default destructor
     188           0 :   virtual ~CalDescColumns() {};
     189             : 
     190             :   // Read-write column accessors
     191           0 :   casacore::ScalarColumn<casacore::Int>& numSpw() {return numSpw_p;};
     192           0 :   casacore::ArrayColumn<casacore::Int>& numChan() {return numChan_p;};
     193           0 :   casacore::ScalarColumn<casacore::Int>& numReceptors() {return numReceptors_p;};
     194           0 :   casacore::ScalarColumn<casacore::Int>& nJones() {return nJones_p;};
     195           0 :   casacore::ArrayColumn<casacore::Int>& spwId() {return spwId_p;};
     196             :   casacore::ArrayColumn<casacore::Double>& chanFreq() {return chanFreq_p;};
     197           0 :   casacore::ArrayMeasColumn<casacore::MFrequency>& chanFreqMeas() {return chanFreqMeas_p;};
     198           0 :   casacore::ScalarColumn<casacore::Int>& measFreqRef() {return measFreqRef_p;};
     199             :   casacore::ArrayColumn<casacore::Double>& chanWidth() {return chanWidth_p;}
     200           0 :   casacore::ArrayQuantColumn<casacore::Double>& chanWidthQuant() {return chanWidthQuant_p;}
     201           0 :   casacore::ArrayColumn<casacore::Int>& chanRange() {return chanRange_p;}
     202           0 :   casacore::ArrayColumn<casacore::String>& polznType() {return polznType_p;}
     203           0 :   casacore::ScalarColumn<casacore::String>& jonesType() {return jonesType_p;};
     204           0 :   casacore::ScalarColumn<casacore::String>& msName() {return msName_p;};
     205             : 
     206             :  protected:
     207             :   // Prohibit public use of the null constructor, which
     208             :   // does not produce a usable object.
     209             :   CalDescColumns() {};
     210             : 
     211             :   // Return a CalTable cal_desc subtable as a casacore::Table reference. 
     212             :   // Utilizes friendship relationship with class CalTable.
     213           0 :   casacore::Table& calDescAsTable(CalTable& calTable) {return calTable.calDescAsTable();}
     214             : 
     215             :   // Attach a table column accessor
     216             :   void attach (CalTable& calTable, casacore::TableColumn& tabCol, 
     217             :                MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
     218             :   void attach (CalTable& calTable, casacore::ROTableMeasColumn& tabCol,
     219             :                MSCalEnums::colDef colEnum, const casacore::Bool& optional = false);
     220             :   void attach (CalTable& 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 
     225             :   CalDescColumns (const CalDescColumns&);
     226             :   CalDescColumns& operator= (const CalDescColumns&);
     227             : 
     228             :   // Private column accessors
     229             :   casacore::ScalarColumn<casacore::Int> numSpw_p;
     230             :   casacore::ArrayColumn<casacore::Int> numChan_p;
     231             :   casacore::ScalarColumn<casacore::Int> numReceptors_p;
     232             :   casacore::ScalarColumn<casacore::Int> nJones_p;
     233             :   casacore::ArrayColumn<casacore::Int> spwId_p;
     234             :   casacore::ArrayColumn<casacore::Double> chanFreq_p;
     235             :   casacore::ArrayMeasColumn<casacore::MFrequency> chanFreqMeas_p;
     236             :   casacore::ScalarColumn<casacore::Int> measFreqRef_p;
     237             :   casacore::ArrayColumn<casacore::Double> chanWidth_p;
     238             :   casacore::ArrayQuantColumn<casacore::Double> chanWidthQuant_p;
     239             :   casacore::ArrayColumn<casacore::Int> chanRange_p;
     240             :   casacore::ArrayColumn<casacore::String> polznType_p;
     241             :   casacore::ScalarColumn<casacore::String> jonesType_p;
     242             :   casacore::ScalarColumn<casacore::String> msName_p;
     243             : };
     244             : 
     245             : 
     246             : } //# NAMESPACE CASA - END
     247             : 
     248             : #endif
     249             :    
     250             :   
     251             : 
     252             : 
     253             : 

Generated by: LCOV version 1.16