LCOV - code coverage report
Current view: top level - synthesis/CalTables - CalDescBuffer.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 5 0.0 %
Date: 2024-12-11 20:54:31 Functions: 0 4 0.0 %

          Line data    Source code
       1             : //# CalDescBuffer.h: Calibration table cal_desc buffer
       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: casa-feedback@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_CALDESCBUFFER_H
      30             : #define CALIBRATION_CALDESCBUFFER_H
      31             : 
      32             : #include <casacore/casa/Arrays/Matrix.h>
      33             : #include <synthesis/CalTables/CalIterBase.h>
      34             : #include <synthesis/CalTables/CalTable.h>
      35             : #include <synthesis/CalTables/CalDescColumns.h>
      36             : 
      37             : namespace casa { //# NAMESPACE CASA - BEGIN
      38             : 
      39             : // <summary> 
      40             : // CalDescBuffer: Calibration table cal_desc buffer
      41             : // </summary>
      42             : 
      43             : // <use visibility=export>
      44             : 
      45             : // <reviewed reviewer="" date="" tests="" demos="">
      46             : 
      47             : // <prerequisite>
      48             : //   <li> <linkto class="CalTable">CalTable</linkto> module
      49             : //   <li> <linkto class="CalIterBase">CalIterBase</linkto> module
      50             : // </prerequisite>
      51             : //
      52             : // <etymology>
      53             : // From "calibration description table" and "buffer"
      54             : // </etymology>
      55             : //
      56             : // <synopsis>
      57             : // The CalDescBuffer class holds a buffer, optionally connected to a 
      58             : // calibration table cal_desc iterator (of base type CalIterBase). 
      59             : // </synopsis>
      60             : //
      61             : // <example>
      62             : // <srcblock>
      63             : // </srcblock>
      64             : // </example>
      65             : //
      66             : // <motivation>
      67             : // Encapsulate calibration table cal_desc data buffers.
      68             : // </motivation>
      69             : //
      70             : // <todo asof="01/08/01">
      71             : // (i) Deal with non-standard columns.
      72             : // </todo>
      73             : 
      74             : class CalDescBuffer 
      75             : {
      76             :  public:
      77             :   // Default constructor. No connection to an underlying
      78             :   // calibration table iterator in this case.
      79             :   CalDescBuffer();
      80             : 
      81             :   // Construct from a calibration table iterator. The calibration
      82             :   // buffer will remain synchronized with the iterator.
      83             :   CalDescBuffer (CalIterBase& calIter);
      84             : 
      85             :   // Default destructor
      86             :   virtual ~CalDescBuffer();
      87             : 
      88             :   // Invalidate the current calibration table cal_desc buffer. 
      89             :   // This signals that a re-read is required as the iterator has advanced.
      90             :   virtual void invalidate();
      91             : 
      92             :   // Write the current buffer at the end of a specified calibration
      93             :   // table cal_desc subtable(NYI)
      94           0 :   virtual void append (CalTable& /*calTable*/) {};
      95             : 
      96             :   // casacore::Data field accessors
      97             :   casacore::Vector<casacore::Int>& numSpw();
      98             :   casacore::Vector<casacore::Int>& numChan();
      99             :   casacore::Vector<casacore::Int>& numReceptors();
     100             :   casacore::Vector<casacore::Int>& nJones();
     101             :   casacore::Matrix<casacore::Int>& spwId();
     102             :   casacore::Array<casacore::MFrequency>& chanFreqMeas();
     103             :   casacore::Vector<casacore::Int>& measFreqRef();
     104             :   casacore::Array<casacore::Quantity>& chanWidthQuant();
     105             :   casacore::Array<casacore::Int>& chanRange();
     106             :   casacore::Matrix<casacore::String>& polznType();
     107             :   casacore::Vector<casacore::String>& jonesType();
     108             :   casacore::Vector<casacore::String>& msName();
     109             : 
     110             :  protected:
     111             :   // Factory method to create a columns accessor object of the appropriate type
     112           0 :   virtual CalDescColumns* newCalDescCol (CalTable& calTable)
     113           0 :     {return new CalDescColumns (calTable);};
     114             : 
     115             :   // Access to the columns accessor object
     116           0 :   virtual CalDescColumns* calDescCol() {return calDescCol_p;};
     117             : 
     118             :   // Is the buffer connected to an underlying iterator ?
     119           0 :   casacore::Bool connectedToIter() {return connectedToIter_p;};
     120             : 
     121             :  private:
     122             :   // true if connected to underlying iterator
     123             :   casacore::Bool connectedToIter_p;
     124             : 
     125             :   // Ptr to cal main columns accessor
     126             :   CalDescColumns* calDescCol_p;
     127             : 
     128             :   // Buffer fields
     129             :   casacore::Vector<casacore::Int> numSpw_p;
     130             :   casacore::Vector<casacore::Int> numChan_p;
     131             :   casacore::Vector<casacore::Int> numReceptors_p;
     132             :   casacore::Vector<casacore::Int> nJones_p;
     133             :   casacore::Matrix<casacore::Int> spwId_p;
     134             :   casacore::Array<casacore::MFrequency> chanFreqMeas_p;
     135             :   casacore::Vector<casacore::Int> measFreqRef_p;
     136             :   casacore::Array<casacore::Quantity> chanWidthQuant_p;
     137             :   casacore::Array<casacore::Int> chanRange_p;
     138             :   casacore::Matrix<casacore::String> polznType_p;
     139             :   casacore::Vector<casacore::String> jonesType_p;
     140             :   casacore::Vector<casacore::String> msName_p;
     141             : 
     142             :   // Buffer field status flags
     143             :   casacore::Bool numSpwOK_p;
     144             :   casacore::Bool numChanOK_p;
     145             :   casacore::Bool numReceptorsOK_p;
     146             :   casacore::Bool nJonesOK_p;
     147             :   casacore::Bool spwIdOK_p;
     148             :   casacore::Bool chanFreqMeasOK_p;
     149             :   casacore::Bool measFreqRefOK_p;
     150             :   casacore::Bool chanWidthQuantOK_p;
     151             :   casacore::Bool chanRangeOK_p;
     152             :   casacore::Bool polznTypeOK_p;
     153             :   casacore::Bool jonesTypeOK_p;
     154             :   casacore::Bool msNameOK_p;
     155             : };
     156             : 
     157             : 
     158             : } //# NAMESPACE CASA - END
     159             : 
     160             : #endif

Generated by: LCOV version 1.16