casa
5.7.0-16
|
Simplified interface to create and write to a FITS Binary Table. More...
#include <FITSTable.h>
Public Types | |
enum | { DefaultMaxStringSize } |
Public Member Functions | |
FITSTableWriter (FitsOutput *file, const RecordDesc &description, const Record &maxLengths, uInt nrows, const Record &extraKeywords, const Record &units, Bool freeOutput=True, const Record &variableShapes=Record()) | |
You MUST have already written a first HDU to FitsOutput. More... | |
~FITSTableWriter () | |
RecordInterface & | row () |
use this to set the value of the current row to be written More... | |
void | write () |
Write the current row() More... | |
FitsOutput * | writer () |
Don't delete this out from under us! More... | |
Static Public Member Functions | |
static FitsOutput * | makeWriter (const String &fileName) |
Returns a writer, with the first HDU filled in (set to null). More... | |
Private Member Functions | |
FITSTableWriter () | |
Undefined and inaccessible. More... | |
FITSTableWriter (const FITSTableWriter &) | |
FITSTableWriter & | operator= (const FITSTableWriter &) |
Private Attributes | |
Bool | delete_writer_p |
FitsOutput * | writer_p |
uInt | nrows_written_p |
BinaryTableExtension * | bintable_p |
Record | row_p |
PtrBlock< FITSFieldCopier * > | copiers_p |
Simplified interface to create and write to a FITS Binary Table.
Public interface
Definition at line 346 of file FITSTable.h.
anonymous enum |
Enumerator | |
---|---|
DefaultMaxStringSize |
Definition at line 349 of file FITSTable.h.
casacore::FITSTableWriter::FITSTableWriter | ( | FitsOutput * | file, |
const RecordDesc & | description, | ||
const Record & | maxLengths, | ||
uInt | nrows, | ||
const Record & | extraKeywords, | ||
const Record & | units, | ||
Bool | freeOutput = True , |
||
const Record & | variableShapes = Record() |
||
) |
You MUST have already written a first HDU to FitsOutput.
description contains the names and types of the table columns to be written. The row is not rearranged (i.e. they are used in order) for alignment purposes. Array columns must have fixed shape unless tdimColumns is used. Use the maxLengths record to indicate any string columns which should have a length other than the default value by providing an int field of the same name as the string field in this record. The size of the table (nrows) must be given at creation. Use extraKeywords to indicate any keywords not automatically created. The units record is used to indicate the units for any column. Provide a string field with the same name as the column field in description. If freeOutput is True, file must come from new since it will be deleted upon destruction. You might not want this to happen if you are going to write many tables to the same fits file. Use variableShapes to signal which array columns have variable shape and use maxLengths to indicate the maximum size of those variable shaped columns. The variableShapes record should contain a String corresponding to the longest TDIM value appropriate for each variable shaped column. The maxLengths record should contain an int field for each variable shaped column which indicates the maximum number of elements to be found in that column. Unused values in any cell in the variable shaped columns will be filled with zero. These columns will use the SDFITS TDIM convention where for column nnn there is a corresponding TDIMnnn column where the values in each row are the true shape of the data in column nnn. variableShapes appears as the last argument for backwards compatibility with existing code.
casacore::FITSTableWriter::~FITSTableWriter | ( | ) |
|
private |
Undefined and inaccessible.
|
private |
|
static |
Returns a writer, with the first HDU filled in (set to null).
The caller is responsible for deleting the pointer returned from makeWriter.
|
private |
|
inline |
use this to set the value of the current row to be written
Definition at line 387 of file FITSTable.h.
References row_p.
void casacore::FITSTableWriter::write | ( | ) |
Write the current row()
|
inline |
Don't delete this out from under us!
Definition at line 393 of file FITSTable.h.
References writer_p.
|
private |
Definition at line 407 of file FITSTable.h.
|
private |
Definition at line 409 of file FITSTable.h.
|
private |
Definition at line 404 of file FITSTable.h.
|
private |
Definition at line 406 of file FITSTable.h.
|
private |
Definition at line 408 of file FITSTable.h.
Referenced by row().
|
private |
Definition at line 405 of file FITSTable.h.
Referenced by writer().