casacore
Public Member Functions | Private Attributes | List of all members
casacore::MSPrimaryGroupHolder Class Reference

A helper class for MSFitsInput. More...

#include <MSFitsInput.h>

Public Member Functions

 MSPrimaryGroupHolder ()
 This is a helper class to avoid cumbersome switch statements on the template type of the primary group It forwards all the PrimaryGroup member function we need in the filler. More...
 
 MSPrimaryGroupHolder (FitsInput &infile)
 Construct from an input file containing a FITS primary group hdu. More...
 
 ~MSPrimaryGroupHolder ()
 
void attach (FitsInput &infile)
 Attach to the input file, create the appropriate PrimaryGroup. More...
 
void detach ()
 Detach from the input file. More...
 
Int dims ()
 Number of dimensions. More...
 
Int dim (Int i)
 Length of i'th axis. More...
 
Charctype (Int i)
 Coordinate type. More...
 
Double crval (Int i)
 Coordinate reference value. More...
 
Double crpix (Int i)
 Coordinate reference pixel. More...
 
Double cdelt (Int i)
 Coordinate delta. More...
 
const FitsKeywordkw (const FITS::ReservedName &n)
 Keyword of given type. More...
 
ConstFitsKeywordListkwlist ()
 All keywords. More...
 
const FitsKeywordnextkw ()
 Advance to next keyword. More...
 
Int gcount () const
 Number of groups. More...
 
Int pcount () const
 Number of parameters. More...
 
Charptype (Int i) const
 Parameter type. More...
 
Int read ()
 Read the next group. More...
 
Double parm (Int i)
 Get i'th parameter. More...
 
Double operator() (Int i) const
 Get group data with index i, scaled and converted to Double. More...
 

Private Attributes

HeaderDataUnithdu_p
 
PrimaryGroup< Short > * ps
 
PrimaryGroup< FitsLong > * pl
 
PrimaryGroup< Float > * pf
 

Detailed Description

A helper class for MSFitsInput.

Intended use:

Internal

Etymology

This class can hold a primary group of several datatypes

Synopsis

This is a helper class to avoid cumbersome switch statements on the template type of the primary group It forwards all the PrimaryGroup member functions we need in the filler.

Definition at line 154 of file MSFitsInput.h.

Constructor & Destructor Documentation

◆ MSPrimaryGroupHolder() [1/2]

casacore::MSPrimaryGroupHolder::MSPrimaryGroupHolder ( )

This is a helper class to avoid cumbersome switch statements on the template type of the primary group It forwards all the PrimaryGroup member function we need in the filler.

Construct an empty holder, used to attach to later

◆ MSPrimaryGroupHolder() [2/2]

casacore::MSPrimaryGroupHolder::MSPrimaryGroupHolder ( FitsInput infile)

Construct from an input file containing a FITS primary group hdu.

Throws an exception if the datatype is not Short, FitsLong or Float

◆ ~MSPrimaryGroupHolder()

casacore::MSPrimaryGroupHolder::~MSPrimaryGroupHolder ( )

Member Function Documentation

◆ attach()

void casacore::MSPrimaryGroupHolder::attach ( FitsInput infile)

Attach to the input file, create the appropriate PrimaryGroup.

Throws an exception if the datatype is not Short, FitsLong or Float

◆ cdelt()

Double casacore::MSPrimaryGroupHolder::cdelt ( Int  i)
inline

◆ crpix()

Double casacore::MSPrimaryGroupHolder::crpix ( Int  i)
inline

◆ crval()

Double casacore::MSPrimaryGroupHolder::crval ( Int  i)
inline

◆ ctype()

Char* casacore::MSPrimaryGroupHolder::ctype ( Int  i)
inline

◆ detach()

void casacore::MSPrimaryGroupHolder::detach ( )

Detach from the input file.

◆ dim()

Int casacore::MSPrimaryGroupHolder::dim ( Int  i)
inline

Length of i'th axis.

Definition at line 183 of file MSFitsInput.h.

References casacore::HeaderDataUnit::dim(), and casacore::MSPrimaryTableHolder::hdu_p.

◆ dims()

Int casacore::MSPrimaryGroupHolder::dims ( )
inline

Number of dimensions.

Definition at line 179 of file MSFitsInput.h.

References casacore::HeaderDataUnit::dims(), and casacore::MSPrimaryTableHolder::hdu_p.

◆ gcount()

Int casacore::MSPrimaryGroupHolder::gcount ( ) const
inline

◆ kw()

const FitsKeyword* casacore::MSPrimaryGroupHolder::kw ( const FITS::ReservedName n)
inline

Keyword of given type.

Definition at line 203 of file MSFitsInput.h.

References casacore::MSPrimaryTableHolder::hdu_p, and casacore::HeaderDataUnit::kw().

◆ kwlist()

ConstFitsKeywordList& casacore::MSPrimaryGroupHolder::kwlist ( )
inline

All keywords.

Definition at line 207 of file MSFitsInput.h.

References casacore::MSPrimaryTableHolder::hdu_p, and casacore::HeaderDataUnit::kwlist().

◆ nextkw()

const FitsKeyword* casacore::MSPrimaryGroupHolder::nextkw ( )
inline

Advance to next keyword.

Definition at line 211 of file MSFitsInput.h.

References casacore::MSPrimaryTableHolder::hdu_p, and casacore::HeaderDataUnit::nextkw().

◆ operator()()

Double casacore::MSPrimaryGroupHolder::operator() ( Int  i) const
inline

Get group data with index i, scaled and converted to Double.

Definition at line 235 of file MSFitsInput.h.

References casacore::MSPrimaryTableHolder::pf, casacore::MSPrimaryTableHolder::pl, and casacore::MSPrimaryTableHolder::ps.

◆ parm()

Double casacore::MSPrimaryGroupHolder::parm ( Int  i)
inline

◆ pcount()

Int casacore::MSPrimaryGroupHolder::pcount ( ) const
inline

◆ ptype()

Char* casacore::MSPrimaryGroupHolder::ptype ( Int  i) const
inline

◆ read()

Int casacore::MSPrimaryGroupHolder::read ( )
inline

Member Data Documentation

◆ hdu_p

HeaderDataUnit* casacore::MSPrimaryGroupHolder::hdu_p
private

Definition at line 239 of file MSFitsInput.h.

◆ pf

PrimaryGroup<Float>* casacore::MSPrimaryGroupHolder::pf
private

Definition at line 242 of file MSFitsInput.h.

◆ pl

PrimaryGroup<FitsLong>* casacore::MSPrimaryGroupHolder::pl
private

Definition at line 241 of file MSFitsInput.h.

◆ ps

PrimaryGroup<Short>* casacore::MSPrimaryGroupHolder::ps
private

Definition at line 240 of file MSFitsInput.h.


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