casa
$Rev:20696$
|
00001 //# MSSpectralWindow.h: The MeasurementSet SPECTRALWINDOW Table 00002 //# Copyright (C) 1996,1999,2000 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 addressed 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: MSSpectralWindow.h 20299 2008-04-03 05:56:44Z gervandiepen $ 00028 00029 #ifndef MS_MSSPECTRALWINDOW_H 00030 #define MS_MSSPECTRALWINDOW_H 00031 00032 #include <casa/aips.h> 00033 #include <ms/MeasurementSets/MSTable.h> 00034 #include <ms/MeasurementSets/MSSpWindowEnums.h> 00035 00036 namespace casa { //# NAMESPACE CASA - BEGIN 00037 00038 // <summary> 00039 // A Table intended to hold a MeasurementSet SPECTRAL_WINDOW table. 00040 // </summary> 00041 00042 // <use visibility=export> 00043 00044 // <reviewed reviewer="Bob Garwood" date="1997/02/01" tests="" demos=""> 00045 00046 // <prerequisite> 00047 // <li> <linkto class="MeasurementSet:description">MeasurementSet</linkto> 00048 // <li> <linkto class="MSTable">MSTable</linkto> 00049 // </prerequisite> 00050 // 00051 // <etymology> 00052 // MSSpectralWindow stands for the MeasurementSet Spectral Window table. 00053 // </etymology> 00054 // 00055 // <synopsis> 00056 // An MSSpectralWindow is a table intended to hold the SPECTRAL_WINDOW table for 00057 // the MeasurementSet. It has an identical set of member functions as 00058 // the main MeasurementSet class, except (currently) for the default 00059 // calibration members. For further info and examples see the 00060 // MeasurementSet class. 00061 // </synopsis> 00062 // 00063 // <example> 00064 // See the MeasurementSet for an example of how to access and use this class. 00065 // </example> 00066 // 00067 // <motivation> 00068 // It was found that subtables and the main table of the MeasurementSet have 00069 // a lot in common, therefore they derive their interface from the same 00070 // base class. Each subtable has its own class to keep the enum definitions 00071 // and conversion functions in separate scopes. 00072 // </motivation> 00073 // 00074 // <todo asof="1999/1/22"> 00075 // see MeasurementSet. 00076 // </todo> 00077 00078 class MSSpectralWindow:public MSSpectralWindowEnums, 00079 public MSTable<MSSpectralWindowEnums::PredefinedColumns, 00080 MSSpectralWindowEnums::PredefinedKeywords> 00081 { 00082 public: 00083 00084 // This constructs an empty MSSpectralWindow. 00085 MSSpectralWindow (); 00086 00087 // These constructors mirror the Table ones with additional checking 00088 // on validity (verifying that the MSSpectralWindow will have the required columns 00089 // and keywords) 00090 // An exception is thrown if the constructed Table is not a valid MSSpectralWindow 00091 // <thrown> 00092 // <li> AipsError 00093 // </thrown> 00094 // <group name=tableLikeConstructors> 00095 MSSpectralWindow (const String &tableName, TableOption = Table::Old); 00096 MSSpectralWindow (const String &tableName, const String &tableDescName, 00097 TableOption = Table::Old); 00098 MSSpectralWindow (SetupNewTable &newTab, uInt nrrow = 0, 00099 Bool initialize = False); 00100 MSSpectralWindow (const Table &table); 00101 MSSpectralWindow (const MSSpectralWindow &other); 00102 // </group> 00103 00104 // As with tables, the destructor writes the table if necessary. 00105 // Additional checking is done here to verify that all required 00106 // columns are still present. 00107 // If it is NOT valid, it will write the table and then throw an exception. 00108 // <thrown> 00109 // <li> AipsError 00110 // </thrown> 00111 ~MSSpectralWindow(); 00112 00113 // Assignment operator, reference semantics 00114 MSSpectralWindow& operator=(const MSSpectralWindow&); 00115 00116 // Make a special copy of this Table which references all columns from 00117 // this Table except those mentioned; those are empty and writable. 00118 // Each forwarded column has the same writable status as the underlying 00119 // column. The mentioned columns all use the AipsIO storage manager. 00120 // This function is inherited from MSTable and unlikely to be of use, 00121 // except in the class MeasurementSet (see comment there).. 00122 MSSpectralWindow referenceCopy(const String& newTableName, 00123 const Block<String>& writableColumns) const; 00124 00125 // Initialize the statics appropriately. This does not need to be 00126 // called by users, it is called by the implementation class 00127 // MSTableImpl. 00128 static void init(); 00129 00130 private: 00131 00132 // required by the need to throw an exception in the destructor 00133 Bool hasBeenDestroyed_p; 00134 }; 00135 00136 00137 } //# NAMESPACE CASA - END 00138 00139 #endif 00140 00141 00142 00143 00144