LCOV - code coverage report
Current view: top level - synthesis/CalTables - CalHistoryBuffer.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 5 0.0 %
Date: 2024-10-04 18:58:15 Functions: 0 4 0.0 %

          Line data    Source code
       1             : //# CalHistoryBuffer.h: Calibration table cal_history buffer
       2             : //# Copyright (C) 1996,1997,1998,2001,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_CALHISTORYBUFFER_H
      30             : #define CALIBRATION_CALHISTORYBUFFER_H
      31             : 
      32             : #include <synthesis/CalTables/CalIterBase.h>
      33             : #include <synthesis/CalTables/CalTable.h>
      34             : #include <synthesis/CalTables/CalHistoryColumns.h>
      35             : 
      36             : namespace casa { //# NAMESPACE CASA - BEGIN
      37             : 
      38             : // <summary> 
      39             : // CalHistoryBuffer: Calibration table cal_history buffer
      40             : // </summary>
      41             : 
      42             : // <use visibility=export>
      43             : 
      44             : // <reviewed reviewer="" date="" tests="" demos="">
      45             : 
      46             : // <prerequisite>
      47             : //   <li> <linkto class="CalTable">CalTable</linkto> module
      48             : //   <li> <linkto class="CalIterBase">CalIterBase</linkto> module
      49             : // </prerequisite>
      50             : //
      51             : // <etymology>
      52             : // From "calibration history sub-table" and "buffer"
      53             : // </etymology>
      54             : //
      55             : // <synopsis>
      56             : // The CalHistoryBuffer class holds a buffer for the cal_history
      57             : // sub-table, optionally connected to a calibration table 
      58             : // iterator (of base type CalIterBase). 
      59             : // </synopsis>
      60             : //
      61             : // <example>
      62             : // <srcblock>
      63             : // </srcblock>
      64             : // </example>
      65             : //
      66             : // <motivation>
      67             : // Encapsulate calibration table cal_history data buffer.
      68             : // </motivation>
      69             : //
      70             : // <todo asof="01/12/26">
      71             : // (i) Deal with non-standard columns.
      72             : // </todo>
      73             : 
      74             : class CalHistoryBuffer 
      75             : {
      76             :  public:
      77             :   // Default constructor. No connection to an underlying
      78             :   // calibration table iterator in this case.
      79             :   CalHistoryBuffer();
      80             : 
      81             :   // Construct from a calibration table iterator. The calibration
      82             :   // buffer will remain synchronized with the iterator.
      83             :   CalHistoryBuffer (CalIterBase& calIter);
      84             : 
      85             :   // Default destructor
      86             :   virtual ~CalHistoryBuffer();
      87             : 
      88             :   // Invalidate the current calibration buffer. This signals
      89             :   // 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 
      93             :   // cal_history table (NYI)
      94           0 :   virtual void append (CalTable& /*calTable*/) {};
      95             : 
      96             :   // casacore::Data field accessors
      97             :   casacore::Vector<casacore::String>& calParms();
      98             :   casacore::Vector<casacore::String>& calTables();
      99             :   casacore::Vector<casacore::String>& calSelect();
     100             :   casacore::Vector<casacore::String>& calNotes();
     101             : 
     102             :  protected:
     103             :   // Factory method to create a columns accessor object of the appropriate type
     104           0 :   virtual CalHistoryColumns* newCalHistoryCol (CalTable& calTable)
     105           0 :     {return new CalHistoryColumns (calTable);};
     106             : 
     107             :   // Access to the columns accessor object
     108           0 :   virtual CalHistoryColumns* calHistCol() {return calHistCol_p;};
     109             : 
     110             :   // Is the buffer connected to an underlying iterator ?
     111           0 :   casacore::Bool connectedToIter() {return connectedToIter_p;};
     112             : 
     113             :  private:
     114             :   // true if connected to underlying iterator
     115             :   casacore::Bool connectedToIter_p;
     116             : 
     117             :   // Ptr to cal_history columns accessor
     118             :   CalHistoryColumns* calHistCol_p;
     119             : 
     120             :   // Buffer fields
     121             :   casacore::Vector<casacore::String> calParms_p;
     122             :   casacore::Vector<casacore::String> calTables_p;
     123             :   casacore::Vector<casacore::String> calSelect_p;
     124             :   casacore::Vector<casacore::String> calNotes_p;
     125             : 
     126             :   // Buffer field status flags
     127             :   casacore::Bool calParmsOK_p;
     128             :   casacore::Bool calTablesOK_p;
     129             :   casacore::Bool calSelectOK_p;
     130             :   casacore::Bool calNotesOK_p;
     131             : };
     132             : 
     133             : 
     134             : } //# NAMESPACE CASA - END
     135             : 
     136             : #endif
     137             :    
     138             :   
     139             : 
     140             : 
     141             : 

Generated by: LCOV version 1.16