casacore
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
casacore::FITSTableWriter Class Reference

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 ()
 
RecordInterfacerow ()
 use this to set the value of the current row to be written More...
 
void write ()
 Write the current row() More...
 
FitsOutputwriter ()
 Don't delete this out from under us! More...
 

Static Public Member Functions

static FitsOutputmakeWriter (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 &)
 
FITSTableWriteroperator= (const FITSTableWriter &)
 

Private Attributes

Bool delete_writer_p
 
FitsOutputwriter_p
 
uInt nrows_written_p
 
BinaryTableExtensionbintable_p
 
Record row_p
 
PtrBlock< FITSFieldCopier * > copiers_p
 

Detailed Description

Simplified interface to create and write to a FITS Binary Table.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

Example

Motivation

To Do

Definition at line 346 of file FITSTable.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
DefaultMaxStringSize 

Definition at line 349 of file FITSTable.h.

Constructor & Destructor Documentation

◆ FITSTableWriter() [1/3]

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.

◆ ~FITSTableWriter()

casacore::FITSTableWriter::~FITSTableWriter ( )

◆ FITSTableWriter() [2/3]

casacore::FITSTableWriter::FITSTableWriter ( )
private

Undefined and inaccessible.

◆ FITSTableWriter() [3/3]

casacore::FITSTableWriter::FITSTableWriter ( const FITSTableWriter )
private

Member Function Documentation

◆ makeWriter()

static FitsOutput* casacore::FITSTableWriter::makeWriter ( const String fileName)
static

Returns a writer, with the first HDU filled in (set to null).

The caller is responsible for deleting the pointer returned from makeWriter.

◆ operator=()

FITSTableWriter& casacore::FITSTableWriter::operator= ( const FITSTableWriter )
private

◆ row()

RecordInterface& casacore::FITSTableWriter::row ( )
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.

◆ write()

void casacore::FITSTableWriter::write ( )

Write the current row()

◆ writer()

FitsOutput* casacore::FITSTableWriter::writer ( )
inline

Don't delete this out from under us!

Definition at line 393 of file FITSTable.h.

References writer_p.

Member Data Documentation

◆ bintable_p

BinaryTableExtension* casacore::FITSTableWriter::bintable_p
private

Definition at line 407 of file FITSTable.h.

◆ copiers_p

PtrBlock<FITSFieldCopier *> casacore::FITSTableWriter::copiers_p
private

Definition at line 409 of file FITSTable.h.

◆ delete_writer_p

Bool casacore::FITSTableWriter::delete_writer_p
private

Definition at line 404 of file FITSTable.h.

◆ nrows_written_p

uInt casacore::FITSTableWriter::nrows_written_p
private

Definition at line 406 of file FITSTable.h.

◆ row_p

Record casacore::FITSTableWriter::row_p
private

Definition at line 408 of file FITSTable.h.

Referenced by row().

◆ writer_p

FitsOutput* casacore::FITSTableWriter::writer_p
private

Definition at line 405 of file FITSTable.h.

Referenced by writer().


The documentation for this class was generated from the following file: