casacore
Loading...
Searching...
No Matches
MS1ToMS2Converter.h
Go to the documentation of this file.
1//# MS1ToMS2Converter.h: Definition for ms1 to ms2 converter
2//# Copyright (C) 1994,1995,1996,1997,1998,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_MS1TOMS2CONVERTER_H
27#define MS_MS1TOMS2CONVERTER_H
28
29//# Includes
30#include <casacore/casa/aips.h>
31#include <casacore/tables/Tables/Table.h>
32#include <casacore/casa/Logging/LogIO.h>
33
34namespace casacore { //# NAMESPACE CASACORE - BEGIN
35
36//# Forward declarations
37class String;
38
39
40// <summary>
41// Class to convert a MeasurementSet v1 to v2.
42// </summary>
43
44// <use visibility=export>
45
46// <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
47// </reviewed>
48
49// <synopsis>
50// This class converts a version 1 MeasurementSet to version 2.
51// The keyword MS_VERSION tells the version. If not present it is 1.
52// If it is found that the MS is already a version 2 one, nothing is done.
53// <p>
54// It is possible to do the conversion in place. If not, first a copy
55// is made which is thereafter changed in place.
56// <br>
57// The conversion process does the following steps:
58// <ul>
59// <li> Create the newly required columns and keywords
60// and fill them with new or existing data.
61// <li> Convert the old way of defining measure info to the new
62// TableMeasures way.
63// <li> Rename obsolete columns by prefixing their names with _OBSOLETE_.
64// </ul>
65//
66// The constructor only keeps the names of the input and output MS.
67// The actual conversion is done by the <src>convert</src> function.
68// </synopsis>
69
70
72{
73public:
74 // Create the converter for the given output (ms2) and input (ms1) name.
75 // The input name has to be an MS version 1. If not, nothing will be done.
76 // <br>If <src>inPlace==True</src>, the ms2 name is ignored. In that
77 // case the ms is changed in place.
79 const String& ms1,
80 Bool inPlace);
81
83
84 // Forbid copy constructor and assignment.
85 // <group>
88 // </group>
89
90 // Do the actual conversion.
92
93private:
94 // If possible remove a column from the table.
95 // Otherwise rename it by prefixing it with _OBSOLETE_.
96 void removeColumn(Table& t, const String& col);
97
98
102
103 // Logger
105};
106
107
108
109} //# NAMESPACE CASACORE - END
110
111#endif
MS1ToMS2Converter & operator=(const MS1ToMS2Converter &)=delete
Bool convert()
Do the actual conversion.
MS1ToMS2Converter(const String &ms2, const String &ms1, Bool inPlace)
Create the converter for the given output (ms2) and input (ms1) name.
MS1ToMS2Converter(const MS1ToMS2Converter &)=delete
Forbid copy constructor and assignment.
void removeColumn(Table &t, const String &col)
If possible remove a column from the table.
String: the storage and methods of handling collections of characters.
Definition String.h:223
this file contains all the compiler specific defines
Definition mainpage.dox:28
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40