MS1ToMS2Converter.h

Classes

MS1ToMS2Converter -- Class to convert a MeasurementSet v1 to v2. (full description)

class MS1ToMS2Converter

Interface

Public Members
MS1ToMS2Converter (const String& ms2, const String& ms1, Bool inPlace)
~MS1ToMS2Converter()
Bool convert()
Private Members
MS1ToMS2Converter (const MS1ToMS2Converter&)
MS1ToMS2Converter& operator= (const MS1ToMS2Converter&)
void removeColumn(Table& t, const String& col)

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Synopsis

This class converts a version 1 MeasurementSet to version 2. The keyword MS_VERSION tells the version. If not present it is 1. If it is found that the MS is already a version 2 one, nothing is done.

It is possible to do the conversion in place. If not, first a copy is made which is thereafter changed in place.
The conversion process does the following steps:

The constructor only keeps the names of the input and output MS. The actual conversion is done by the convert function.

Member Description

MS1ToMS2Converter (const String& ms2, const String& ms1, Bool inPlace)

Create the converter for the given output (ms2) and input (ms1) name. The input name has to be an MS version 1. If not, nothing will be done.
If inPlace==True, the ms2 name is ignored. In that case the ms is changed in place.

~MS1ToMS2Converter()

Bool convert()

Do the actual conversion.

MS1ToMS2Converter (const MS1ToMS2Converter&)
MS1ToMS2Converter& operator= (const MS1ToMS2Converter&)

Forbid copy constrcutor and assignment.

void removeColumn(Table& t, const String& col)

If possible remove a column from the table. Otherwise rename it by prefixing it with _OBSOLETE_.