Loading...
Searching...
No Matches
casacore::FITSTableWriter Class Reference
fits package (libcasa_fits) » FITS_module

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.
| ~FITSTableWriter ()
RecordInterface & | row ()
| use this to set the value of the current row to be written
void | write ()
| Write the current row().
FitsOutput * | writer ()
| Don't delete this out from under us!

## Static Public Member Functions

static FitsOutput * | makeWriter (const String &fileName)
| Returns a writer, with the first HDU filled in (set to null).

## Private Member Functions

| FITSTableWriter ()
| Undefined and inaccessible.
| 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
Block< 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

- General knowledge of FITS binary and ASCII tables.

### Etymology

### Synopsis

### Example

### Motivation

### To Do

- probably much

Definition at line 343 of file FITSTable.h.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Enumerator
DefaultMaxStringSize |

Definition at line 346 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.

References casacore::description(), casacore::Record(), and casacore::True.

Referenced by FITSTableWriter(), and operator=().

## ~FITSTableWriter()

casacore::FITSTableWriter::~FITSTableWriter | ( |  | ) |

## FITSTableWriter() [2/3]

casacore::FITSTableWriter::FITSTableWriter | ( |  | ) |

private

Undefined and inaccessible.

## FITSTableWriter() [3/3]

casacore::FITSTableWriter::FITSTableWriter | ( | const FITSTableWriter & |  | ) |

private

References FITSTableWriter().

## Member Function Documentation

## makeWriter()

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

References FITSTableWriter().

## row()

RecordInterface & casacore::FITSTableWriter::row | ( |  | ) |

inline

use this to set the value of the current row to be written

Definition at line 384 of file FITSTable.h.

References casacore::RecordInterface(), and 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 390 of file FITSTable.h.

References writer_p.

## Member Data Documentation

## bintable_p

BinaryTableExtension* casacore::FITSTableWriter::bintable_p

private

Definition at line 404 of file FITSTable.h.

## copiers_p

Block<FITSFieldCopier *> casacore::FITSTableWriter::copiers_p

private

Definition at line 406 of file FITSTable.h.

## delete_writer_p

Bool casacore::FITSTableWriter::delete_writer_p

private

Definition at line 401 of file FITSTable.h.

## nrows_written_p

uInt casacore::FITSTableWriter::nrows_written_p

private

Definition at line 403 of file FITSTable.h.

## row_p

Record casacore::FITSTableWriter::row_p

private

Definition at line 405 of file FITSTable.h.

Referenced by row().

## writer_p

FitsOutput* casacore::FITSTableWriter::writer_p

private

Definition at line 402 of file FITSTable.h.

Referenced by writer().

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

- fits/FITS/FITSTable.h