casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 155 of file MSFitsInput.h.

Constructor & Destructor Documentation

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

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

casacore::MSPrimaryGroupHolder::~MSPrimaryGroupHolder ( )

Member Function Documentation

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

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

Coordinate delta.

Definition at line 200 of file MSFitsInput.h.

References casacore::PrimaryArray< TYPE >::cdelt(), pf, pl, and ps.

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

Coordinate reference pixel.

Definition at line 196 of file MSFitsInput.h.

References casacore::PrimaryArray< TYPE >::crpix(), pf, pl, and ps.

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

Coordinate reference value.

Definition at line 192 of file MSFitsInput.h.

References casacore::PrimaryArray< TYPE >::crval(), pf, pl, and ps.

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

Coordinate type.

Definition at line 188 of file MSFitsInput.h.

References casacore::PrimaryArray< TYPE >::ctype(), pf, pl, and ps.

void casacore::MSPrimaryGroupHolder::detach ( )

Detach from the input file.

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

Length of i'th axis.

Definition at line 184 of file MSFitsInput.h.

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

Int casacore::MSPrimaryGroupHolder::dims ( )
inline

Number of dimensions.

Definition at line 180 of file MSFitsInput.h.

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

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

Number of groups.

Definition at line 216 of file MSFitsInput.h.

References casacore::PrimaryGroup< TYPE >::gcount(), pf, pl, and ps.

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

Keyword of given type.

Definition at line 204 of file MSFitsInput.h.

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

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

All keywords.

Definition at line 208 of file MSFitsInput.h.

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

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

Advance to next keyword.

Definition at line 212 of file MSFitsInput.h.

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

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

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

Definition at line 236 of file MSFitsInput.h.

References pf, pl, and ps.

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

Get i'th parameter.

Definition at line 232 of file MSFitsInput.h.

References casacore::PrimaryGroup< TYPE >::parm(), pf, pl, and ps.

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

Number of parameters.

Definition at line 220 of file MSFitsInput.h.

References casacore::PrimaryGroup< TYPE >::pcount(), pf, pl, and ps.

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

Parameter type.

Definition at line 224 of file MSFitsInput.h.

References pf, pl, ps, and casacore::PrimaryGroup< TYPE >::ptype().

Int casacore::MSPrimaryGroupHolder::read ( )
inline

Read the next group.

Definition at line 228 of file MSFitsInput.h.

References pf, pl, ps, and casacore::PrimaryGroup< TYPE >::read().

Member Data Documentation

HeaderDataUnit* casacore::MSPrimaryGroupHolder::hdu_p
private

Definition at line 240 of file MSFitsInput.h.

Referenced by dim(), dims(), kw(), kwlist(), and nextkw().

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

Definition at line 243 of file MSFitsInput.h.

Referenced by cdelt(), crpix(), crval(), ctype(), gcount(), operator()(), parm(), pcount(), ptype(), and read().

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

Definition at line 242 of file MSFitsInput.h.

Referenced by cdelt(), crpix(), crval(), ctype(), gcount(), operator()(), parm(), pcount(), ptype(), and read().

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

Definition at line 241 of file MSFitsInput.h.

Referenced by cdelt(), crpix(), crval(), ctype(), gcount(), operator()(), parm(), pcount(), ptype(), and read().


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