The ROArrayQuantColumn class is the array version of the ROScalarQuantColumn class.
// Create the column object with default units "deg". // It gets the quantum array from row 0 and prints it to stdout. ROArrayQuantColumn<Double> roaqCol(qtab, "ArrQuantDouble", "deg"); cout << roaqCol(0) << endl; // This retrieves the same array with units converted to "m/s". cout << roaqCol(0, "m/s") << endl;
Create the ROArrayQuantColumn from the supplied table and column name. The default unit for data retrieved is the unit in which they were stored.
Create the ROArrayQuantColumn from the supplied table and column name. The default unit for data retrieved is the given unit (the data is converted as needed).
Copy constructor (copy semantics).
Make this object reference the column in "that".
Attach a column to the object. Optionally supply a default unit.
which has the same meaning as the constructor unit argument.
Get the quantum array in the specified row.
If resize is True the resulting array is resized if its shape
is not correct. Otherwise a "conformance exception" is thrown
if the array is not empty and its shape mismatches.
Get the quantum array in the specified row. Each quantum is
converted to the given unit.
Get the quantum array in the specified row.
If resize is True the resulting array is resized if its shape
is not correct. Otherwise a "conformance exception" is thrown
if the array is not empty and its shape mismatches.
Get the quantum array in the specified row. Each quantum is
converted to the given units.
Get the quantum array in the specified row.
If resize is True the resulting array is resized if its shape
is not correct. Otherwise a "conformance exception" is thrown
if the array is not empty and its shape mismatches.
Get the quantum array in the specified row. Each quantum is
converted to the unit in other.
Get the quantum array in the specified row.
If resize is True the resulting array is resized if its shape
is not correct. Otherwise a "conformance exception" is thrown
if the array is not empty and its shape mismatches.
Return the quantum array stored in the specified row.
Return the quantum array stored in the specified row, converted
to the given unit.
Return the quantum array stored in the specified row.
Return the quantum array stored in the specified row, converted
to the given units.
Return the quantum array stored in the specified row.
Return the quantum array stored in the specified row, converted
to the unit in other.
Return the quantum array stored in the specified row.
Test whether the Quantum column has variable units
Returns the column's units as a vector of strings.
An empty vector is returned if the column has no fixed units.
Test if the object is null.
Throw an exception if the object is null.
Get access to itsUnitsCol.
Initialize the ROArrayQuantColumn from the specified table and column.
Deletes allocated memory etc. Called by ~tor and any member which needs
to reallocate data.
Get the data without possible conversion.
Assignment makes no sense in a read only class.
Declaring this operator private makes it unusable.
Comparison is not defined, since its semantics are unclear.
void attach (const Table& tab, const String& columnName)
void attach (const Table& tab, const String& columnName, const Unit&)
void attach (const Table& tab, const String& columnName, const Vector<Unit>&)
void get (uInt rownr, Array<Quantum<T> >& q, const Unit&, Bool resize = False) const
void get (uInt rownr, Array<Quantum<T> >& q, const Vector<Vector>&, Bool resize = False) const
void get (uInt rownr, Array<Quantum<T> >& q, const Quantum<T>& other, Bool resize = False) const
void get (uInt rownr, Array<Quantum<T> >& q, Bool resize = False) const
Array<Quantum<T> > operator() (uInt rownr, const Unit&) const
Array<Quantum<T> > operator() (uInt rownr, const Vector<Vector>&) const
Array<Quantum<T> > operator() (uInt rownr, const Quantum<T>& other) const
Array<Quantum<T> > operator() (uInt rownr) const
Bool isUnitVariable() const
Vector<String> getUnits() const
Bool isNull() const
void throwIfNull() const
const ROArrayColumn<String>* arrUnitsCol() const
const ROScalarColumn<String>* scaUnitsCol() const
void init (const Table& tab, const String& columnName)
void cleanUp()
void getData (uInt rownr, Array<Quantum<T> >& q, Bool resize) const
ROArrayQuantColumn& operator= (const ROArrayQuantColumn<T>& that)
Bool operator== (const ROArrayQuantColumn<T>& that)
template<class T> class ArrayQuantColumn : public ROArrayQuantColumn<T>
Interface
Description
Review Status
Prerequisite
Synopsis
The ArrayQuantColumn class provides read/write access to Quanta
stored in a Quantum Table column. The column should previously have
been defined as a Quantum column by means of the
TableQuantumDesc object.
In addition to the operations provided by its read-only partner,
ROArrayQuantColumn, use
of a ArrayQuantColumn object allows the insertion of Quanta into a column.
Quantum Units
See
TableQuantumDesc for more details.
Example
(See TableQuantumDesc class
for an example of how to define a Quantum column).
// This creates the Quantum array object. ArrayQuantColumn<Double> aqCol(qtab, "ArrQuantDouble"); // Test if the column has variable of fixed units if (aqCol.isUnitVariable()) { cout << "Quantum column supports variable units!" << endl; } else { cout << "Unit for the column is: ", << aqCol.getUnits() << endl; } // need an array of Quanta. IPosition shape(2, 3, 2); Array<Quantum<Double> > qArr(shape); Bool deleteIt; Quantum<Double>* q_p = qArr.getStorage(deleteIt); q_p->setValue(1.41212); q_p->setUnit("GHz"); q_p++; q_p->setValue(1.4921); q_p->setUnit("deg"); q_p++; q_p->setValue(1.4111); q_p->setUnit("ms-1"); q_p++; q_p->setValue(1.4003); q_p->setUnit("Jy"); q_p++; q_p->setValue(1.22); q_p->setUnit("GHz"); q_p++; q_p->setValue(1.090909); q_p->setUnit("g"); qArr.putStorage(q_p, deleteIt); // put the quantum array in the column at row 0. If the column has // fixed units the Unit component of each quantum will be lost. Just // their values will be stored. aqCol.put(0, qArr);
Create the ArrayQuantColumn from the supplied table and column name. The default unit for data retrieved is the unit in which they were stored.
Copy constructor (copy semantics).
Make this object reference the column in "that".
Attach a column to the object.
Put an array of quanta into the specified row of the table.
If the column supports variable units, the units are stored as well.
Otherwise the quanta are converted to the column's units.
reference() can be used for assignment.
Declaring this operator private makes it unusable.
Comparison is not defined, since its semantics are unclear.
Deletes allocated memory etc. Called by destructor and any member
which needs to reallocate data.
void attach (const Table& tab, const String& columnName)
void put (uInt rownr, const Array<Quantum<T> >& q)
ArrayQuantColumn& operator= (const ArrayQuantColumn<T>& that)
Bool operator== (const ArrayQuantColumn<T>& that)
void cleanUp()