casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CalDescBuffer.h
Go to the documentation of this file.
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: 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_CALDESCBUFFER_H
30 #define CALIBRATION_CALDESCBUFFER_H
31 
32 #include <casa/Arrays/Matrix.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 
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  virtual void append (CalTable& /*calTable*/) {};
95 
96  // casacore::Data field accessors
109 
110  protected:
111  // Factory method to create a columns accessor object of the appropriate type
112  virtual CalDescColumns* newCalDescCol (CalTable& calTable)
113  {return new CalDescColumns (calTable);};
114 
115  // Access to the columns accessor object
116  virtual CalDescColumns* calDescCol() {return calDescCol_p;};
117 
118  // Is the buffer connected to an underlying iterator ?
120 
121  private:
122  // true if connected to underlying iterator
124 
125  // Ptr to cal main columns accessor
127 
128  // Buffer fields
141 
142  // Buffer field status flags
155 };
156 
157 
158 } //# NAMESPACE CASA - END
159 
160 #endif
casacore::Array< casacore::MFrequency > & chanFreqMeas()
casacore::Array< casacore::Int > & chanRange()
virtual ~CalDescBuffer()
Default destructor.
casacore::Bool chanRangeOK_p
casacore::Vector< casacore::String > jonesType_p
casacore::Vector< casacore::Int > numSpw_p
Buffer fields.
casacore::Matrix< casacore::Int > & spwId()
casacore::Vector< casacore::Int > & nJones()
virtual void invalidate()
Invalidate the current calibration table cal_desc buffer.
casacore::Array< casacore::Int > chanRange_p
casacore::Bool chanWidthQuantOK_p
casacore::Array< casacore::MFrequency > chanFreqMeas_p
casacore::Bool numReceptorsOK_p
CalDescColumns * calDescCol_p
Ptr to cal main columns accessor.
casacore::Vector< casacore::Int > numReceptors_p
casacore::Vector< casacore::Int > measFreqRef_p
casacore::Matrix< casacore::String > & polznType()
virtual CalDescColumns * calDescCol()
Access to the columns accessor object.
casacore::Vector< casacore::String > msName_p
casacore::Bool connectedToIter_p
true if connected to underlying iterator
CalTable: Calibration table access and creation.
Definition: CalTable.h:82
CalIterBase: Base class for calibration table iterators.
Definition: CalIterBase.h:74
casacore::Array< casacore::Quantity > & chanWidthQuant()
casacore::Vector< casacore::Int > numChan_p
casacore::Bool numSpwOK_p
Buffer field status flags.
casacore::Bool jonesTypeOK_p
CalDescBuffer()
Default constructor.
casacore::Vector< casacore::Int > & numSpw()
casacore::Data field accessors
virtual void append(CalTable &)
Write the current buffer at the end of a specified calibration table cal_desc subtable(NYI) ...
Definition: CalDescBuffer.h:94
casacore::Matrix< casacore::Int > spwId_p
casacore::Matrix< casacore::String > polznType_p
casacore::Vector< casacore::Int > & numReceptors()
casacore::Vector< casacore::Int > & numChan()
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
template &lt;class T, class U&gt; class vector;
Definition: MSFlagger.h:37
casacore::Bool numChanOK_p
casacore::Bool measFreqRefOK_p
casacore::Bool msNameOK_p
CalDescColumns: Read-write cal_desc calibration table column access.
casacore::Bool connectedToIter()
Is the buffer connected to an underlying iterator ?
casacore::Bool spwIdOK_p
casacore::Bool chanFreqMeasOK_p
casacore::Vector< casacore::Int > & measFreqRef()
casacore::Vector< casacore::String > & msName()
casacore::Vector< casacore::Int > nJones_p
casacore::Array< casacore::Quantity > chanWidthQuant_p
virtual CalDescColumns * newCalDescCol(CalTable &calTable)
Factory method to create a columns accessor object of the appropriate type.
CalDescBuffer: Calibration table cal_desc buffer.
Definition: CalDescBuffer.h:74
casacore::Bool nJonesOK_p
casacore::Vector< casacore::String > & jonesType()
casacore::Bool polznTypeOK_p