casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
EPointMBuf.h
Go to the documentation of this file.
00001 //# EPointMBuf.h: SolvableVisJones calibration main table buffer
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_EPOINTMBUF_H
00030 #define CALIBRATION_EPOINTMBUF_H
00031 
00032 #include <synthesis/CalTables/TimeVarVJMBuf.h>
00033 #include <synthesis/CalTables/EPointMCol.h>
00034 #include <synthesis/CalTables/SolvableVJTable.h>
00035 namespace casa {
00036 // <summary> 
00037 // EPointMBuf: EPoint calibration main table buffer
00038 // </summary>
00039 
00040 // <use visibility=export>
00041 
00042 // <reviewed reviewer="" date="" tests="" demos="">
00043 
00044 // <prerequisite>
00045 // <li> <linkto class="CalMainBuffer">CalMainBuffer</linkto> module
00046 // <li> <linkto class="TimeVarVisJonesMBuf">TimeVarVisJonesMBuf</linkto> module
00047 // </prerequisite>
00048 //
00049 // <etymology>
00050 // From "solvable visibility Jones matrix", "cal main table" and "buffer"
00051 // </etymology>
00052 //
00053 // <synopsis>
00054 // The EPointMBuf class holds a buffer, optionally connected to a 
00055 // EPoint calibration main table iterator (of base type 
00056 // CalIterBase). Specializations for different solvable Jones matrix
00057 // types are provided through inheritance.
00058 // </synopsis>
00059 //
00060 // <example>
00061 // <srcblock>
00062 // </srcblock>
00063 // </example>
00064 //
00065 // <motivation>
00066 // Encapsulate EPoint calibration main table data buffers.
00067 // </motivation>
00068 //
00069 // <todo asof="01/08/01">
00070 // (i) Deal with non-standard columns.
00071 // </todo>
00072 
00073 class EPointMBuf : public TimeVarVisJonesMBuf
00074 {
00075  public:
00076   // Default constructor. No connection to an underlying
00077   // calibration table iterator in this case.
00078   EPointMBuf();
00079 
00080   // Construct from a set of calibration buffer indices and
00081   // their specified values. Non-index columns will be set 
00082   // to default values, and there is no connection to an 
00083   // underlying calibration table iterator in this case.
00084   EPointMBuf (const Vector<Int>& calIndices, 
00085                         const Block<Vector<Int> >& indexValues);
00086 
00087   // Construct from a calibration table iterator. The calibration
00088   // buffer will remain synchronized with the iterator.
00089   EPointMBuf (CalIterBase& calIter);
00090 
00091   // Write the current buffer at the end of a specified cal table;
00092   // returns the number of rows appended
00093   virtual Int append (CalTable& calTable);
00094 
00095   // Maximum number of rows in the calibration buffer
00096   virtual Int nRow();
00097 
00098   // Data field accessors
00099   virtual Array<Float>& pointingOffset();
00100 
00101  protected:
00102   // Factory method to create a columns accessor object of the appropriate type
00103   virtual EPointMCol* newCalMainCol (CalTable& calTable) {
00104     return new 
00105       EPointMCol(dynamic_cast<EPointTable&>(calTable));};
00106 
00107   // Calibration table columns accessor
00108   virtual EPointMCol* calMainCol() 
00109     {return dynamic_cast<EPointMCol*>(CalMainBuffer::calMainCol());};
00110 
00111   // Invalidate the current cache.
00112   virtual void invalidate();
00113 
00114   // <group>
00115   // Fill the cal buffer attribute columns in an empty cal buffer,
00116   // after the cal indices have been set using fillIndices(). The
00117   // cal indices, specified as enums from class MSCalEnums, are excluded
00118   // as non-attribute columns
00119   //
00120   // Use a visibility buffer to define the attribute values (NYI)
00121   virtual void fillAttributes(const Vector<Int>& /*calIndices*/,
00122                               const VisBuffer& /*vb*/) {};
00123   //
00124   // Set default attribute values
00125   virtual void fillAttributes(const Vector<Int>& calIndices);
00126   // </group>
00127 
00128  private:
00129   // Buffer fields
00130   Array<Float> pointingOffset_p;
00131 
00132   // Buffer field status flags
00133   Bool pointingOffsetOK_p;
00134 };
00135 }
00136 #endif