casacore
Loading...
Searching...
No Matches
MSField.h
Go to the documentation of this file.
1//# MSField.h: The MeasurementSet FIELD Table
2//# Copyright (C) 1996,1999,2000
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 addressed 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#ifndef MS_MSFIELD_H
27#define MS_MSFIELD_H
28
29#include <casacore/casa/aips.h>
30#include <casacore/ms/MeasurementSets/MSTable.h>
31#include <casacore/ms/MeasurementSets/MSFieldEnums.h>
32
33namespace casacore { //# NAMESPACE CASACORE - BEGIN
34
35// <summary>
36// A Table intended to hold a MeasurementSet FIELD table.
37// </summary>
38
39// <use visibility=export>
40
41// <reviewed reviewer="Bob Garwood" date="1997/02/01" tests="" demos="">
42
43// <prerequisite>
44// <li> <linkto class="MeasurementSet:description">MeasurementSet</linkto>
45// <li> <linkto class="MSTable">MSTable</linkto>
46// </prerequisite>
47//
48// <etymology>
49// MSField stands for the MeasurementSet Field table.
50// </etymology>
51//
52// <synopsis>
53// An MSField is a table intended to hold the FIELD table for
54// the MeasurementSet. It has an identical set of member functions as
55// the main MeasurementSet class, except (currently) for the default
56// calibration members. For further info and examples see the
57// MeasurementSet class.
58// </synopsis>
59//
60// <example>
61// See the MeasurementSet for an example of how to access and use this class.
62// </example>
63//
64// <motivation>
65// It was found that subtables and the main table of the MeasurementSet have
66// a lot in common, therefore they derive their interface from the same
67// base class. Each subtable has its own class to keep the enum definitions
68// and conversion functions in separate scopes.
69// </motivation>
70//
71// <todo asof="1999/01/13">
72// see MeasurementSet.
73// </todo>
74
75class MSField:public MSFieldEnums,
76 public MSTable<MSFieldEnums>
77{
78public:
79
80 // This constructs an empty MSField.
82
83 // These constructors mirror the Table ones with additional checking
84 // on validity (verifying that the MSField will have the required columns
85 // and keywords)
86 // An exception is thrown if the constructed Table is not a valid MSField
87 // <thrown>
88 // <li> AipsError
89 // </thrown>
90 // <group name=tableLikeConstructors>
92 MSField (const String &tableName, const String &tableDescName,
94 MSField (SetupNewTable &newTab, rownr_t nrrow = 0,
95 Bool initialize = False);
96 MSField (const Table &table);
97 MSField (const MSField &other);
98 // </group>
99
100 // As with tables, the destructor writes the table if necessary.
101 // Additional checking is done here to verify that all required
102 // columns are still present.
103 // If it is NOT valid, it will write the table and then throw an exception.
104 // <thrown>
105 // <li> AipsError
106 // </thrown>
108
109 // Assignment operator, reference semantics
111
112 // Make a special copy of this Table which references all columns from
113 // this Table except those mentioned; those are empty and writable.
114 // Each forwarded column has the same writable status as the underlying
115 // column. The mentioned columns all use the AipsIO storage manager.
116 // This function is inherited from MSTable and unlikely to be of use,
117 // except in the class MeasurementSet (see comment there)..
118 MSField referenceCopy(const String& newTableName,
119 const Block<String>& writableColumns) const;
120
121 // Add an ephemeris table (there can be many) to the Field table.
122 // The table is copied from inputEphemTableName and named
123 // EPHEM<id>_<comment>.tab
124 // If any tables of the same id exist already, they are removed beforehand.
125 // The optional EPHEMERIS_ID column is added if it doesn't exist, yet.
126 // Return False in case of errors.
127 Bool addEphemeris(const uInt id, const String& inputEphemTableName,
128 const String& comment);
129
130 // Remove (delete) any ephemeris tables with given id (without changes to
131 // the EPHEMERIS_ID column).
132 // Return False in case of errors (but True if the id didn't exist).
134
135 // Initialize the statics appropriately. This does not need to be
136 // called by users, it is called by the implementation class
137 // MSTableImpl.
139
140private:
141
142 // required by the need to throw an exception in the destructor
144};
145
146
147} //# NAMESPACE CASACORE - END
148
149#endif
150
151
152
153
154
simple 1-D array
Definition Block.h:198
Enums for the MeasurementSet FIELD table.
MSField(const MSField &other)
~MSField()
As with tables, the destructor writes the table if necessary.
Bool removeEphemeris(const uInt id)
Remove (delete) any ephemeris tables with given id (without changes to the EPHEMERIS_ID column).
MSField(const Table &table)
Bool addEphemeris(const uInt id, const String &inputEphemTableName, const String &comment)
Add an ephemeris table (there can be many) to the Field table.
MSField(SetupNewTable &newTab, rownr_t nrrow=0, Bool initialize=False)
MSField(const String &tableName, const String &tableDescName, TableOption=Table::Old)
MSField referenceCopy(const String &newTableName, const Block< String > &writableColumns) const
Make a special copy of this Table which references all columns from this Table except those mentioned...
MSField()
This constructs an empty MSField.
static MSTableMaps initMaps()
Initialize the statics appropriately.
MSField(const String &tableName, TableOption=Table::Old)
These constructors mirror the Table ones with additional checking on validity (verifying that the MSF...
MSField & operator=(const MSField &)
Assignment operator, reference semantics.
Bool hasBeenDestroyed_p
required by the need to throw an exception in the destructor
Definition MSField.h:143
A Table intended to hold astronomical data
Definition MSTable.h:143
Create a new table - define shapes, data managers, etc.
String: the storage and methods of handling collections of characters.
Definition String.h:223
const String & tableName() const
Get the table name.
Definition Table.h:1192
TableOption
Define the possible options how a table can be opened.
Definition Table.h:171
@ Old
existing table
Definition Table.h:173
this file contains all the compiler specific defines
Definition mainpage.dox:28
const Bool False
Definition aipstype.h:42
unsigned int uInt
Definition aipstype.h:49
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
uInt64 rownr_t
Define the type of a row number in a table.
Definition aipsxtype.h:44