casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
casa::CCList Class Reference

#include <CCList.h>

Public Member Functions

 CCList ()
 vanilla constructor (npol=1, nComp=0) More...
 
 CCList (const casacore::uInt nPol, const casacore::uInt nDim=2, const casacore::uInt nComp=0)
 more controlling constructor: How many casacore::Stokes per flux casacore::Block? How many spatial dimensions per position? How many total components to allocate for? More...
 
 CCList (const CCList &other)
 copy constructor More...
 
 ~CCList ()
 destructor More...
 
CCListoperator= (const CCList &other)
 operator= More...
 
casacore::IntpositionPtr ()
 get pointer to the casacore::Block<casacore::Int> which holds the CC's positions in pixel coordinates. More...
 
const casacore::IntpositionPtr () const
 
casacore::IntpixelPosition (const casacore::uInt whichCC)
 get pointer to the whichCC'th component's position More...
 
casacore::IntfreePositionPtr ()
 Get a pointer into the Position casacore::Block for the next free clean component. More...
 
const casacore::IntfreePositionPtr () const
 
casacore::FloatfluxPtr ()
 get pointer to the casacore::Block<casacore::Float> which holds the CC's Flux. More...
 
const casacore::FloatfluxPtr () const
 
casacore::FloatpixelFlux (const casacore::uInt whichCC)
 get pointer to the whichCC'th component's flux More...
 
casacore::FloatfreeFluxPtr ()
 Get a pointer into the Flux casacore::Block for the next free clean component. More...
 
const casacore::FloatfreeFluxPtr () const
 
casacore::uInt nPol () const
 How many polarizations? More...
 
casacore::uInt nDim () const
 How many dimentions? More...
 
casacore::uInt nComp () const
 How many components have been filled into the list? More...
 
casacore::uIntnComp ()
 
casacore::uInt maxComp () const
 How many components have been allocated for this list? More...
 
casacore::uInt freeComp () const
 We have free space for how many more components? More...
 
void resize (const casacore::uInt nComp)
 Make the list bigger or smaller. More...
 
void addComp (const casacore::Block< casacore::Float > &flux, const casacore::Block< casacore::Int > &position)
 add a Component; if not enough space, resize the storage blocks to 2*maxComp()+1 More...
 
void tiledSort (const casacore::IPosition &tileShape)
 casacore::Sort components to be organized by tile number. More...
 
casacore::Bool ok () const
 ok() is called to check for an internally consistent state by most everything, often behind the scenes; sometimes, the internal state is in flux after a partial operation, and ok() fails; to turn off ok() checking, set itsSuspendOKCheck = true and remember to reset it to false when the state-changing operation is complete. More...
 

Private Member Functions

void suspendOKCheck ()
 turn OFF error checking via "ok()" More...
 
void reactivateOKCheck ()
 turn ON error checking vua "ok()" More...
 

Private Attributes

casacore::uInt itsPol
 
casacore::uInt itsDim
 
casacore::uInt itsComp
 
casacore::Block< casacore::FloatitsFlux
 
casacore::Block< casacore::IntitsPos
 
casacore::Bool itsSuspendOKCheck
 

Detailed Description

Intended use:

Internal or

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

Example

Motivation

Template Type Argument Requirements (T)

Thrown Exceptions

To Do

Definition at line 83 of file CCList.h.

Constructor & Destructor Documentation

casa::CCList::CCList ( )

vanilla constructor (npol=1, nComp=0)

casa::CCList::CCList ( const casacore::uInt  nPol,
const casacore::uInt  nDim = 2,
const casacore::uInt  nComp = 0 
)

more controlling constructor: How many casacore::Stokes per flux casacore::Block? How many spatial dimensions per position? How many total components to allocate for?

casa::CCList::CCList ( const CCList other)

copy constructor

casa::CCList::~CCList ( )

destructor

Member Function Documentation

void casa::CCList::addComp ( const casacore::Block< casacore::Float > &  flux,
const casacore::Block< casacore::Int > &  position 
)

add a Component; if not enough space, resize the storage blocks to 2*maxComp()+1

casacore::Float* casa::CCList::fluxPtr ( )

get pointer to the casacore::Block<casacore::Float> which holds the CC's Flux.

The flux itself is a casacore::Block, as it may be 1, 2, or 4 Stokes. casacore::Block[nPol()*i + iPol] holds the ith component's iPol Stokes.

const casacore::Float* casa::CCList::fluxPtr ( ) const
casacore::uInt casa::CCList::freeComp ( ) const

We have free space for how many more components?

casacore::Float* casa::CCList::freeFluxPtr ( )

Get a pointer into the Flux casacore::Block for the next free clean component.

const casacore::Float* casa::CCList::freeFluxPtr ( ) const
casacore::Int* casa::CCList::freePositionPtr ( )

Get a pointer into the Position casacore::Block for the next free clean component.

const casacore::Int* casa::CCList::freePositionPtr ( ) const
casacore::uInt casa::CCList::maxComp ( ) const

How many components have been allocated for this list?

casacore::uInt casa::CCList::nComp ( ) const
inline

How many components have been filled into the list?

Definition at line 203 of file CCList.h.

References DebugAssert, itsComp, and ok().

casacore::uInt & casa::CCList::nComp ( )
inline

Definition at line 208 of file CCList.h.

References DebugAssert, itsComp, and ok().

casacore::uInt casa::CCList::nDim ( ) const
inline

How many dimentions?

Definition at line 198 of file CCList.h.

References DebugAssert, itsDim, and ok().

casacore::uInt casa::CCList::nPol ( ) const
inline

How many polarizations?

Definition at line 193 of file CCList.h.

References DebugAssert, itsPol, and ok().

casacore::Bool casa::CCList::ok ( ) const

ok() is called to check for an internally consistent state by most everything, often behind the scenes; sometimes, the internal state is in flux after a partial operation, and ok() fails; to turn off ok() checking, set itsSuspendOKCheck = true and remember to reset it to false when the state-changing operation is complete.

Referenced by nComp(), nDim(), and nPol().

CCList& casa::CCList::operator= ( const CCList other)

operator=

casacore::Float* casa::CCList::pixelFlux ( const casacore::uInt  whichCC)

get pointer to the whichCC'th component's flux

casacore::Int* casa::CCList::pixelPosition ( const casacore::uInt  whichCC)

get pointer to the whichCC'th component's position

casacore::Int* casa::CCList::positionPtr ( )

get pointer to the casacore::Block<casacore::Int> which holds the CC's positions in pixel coordinates.

casacore::Block[nDim()*i] holds ith x, casacore::Block[nDim()*i+1] holds ith y

const casacore::Int* casa::CCList::positionPtr ( ) const
void casa::CCList::reactivateOKCheck ( )
private

turn ON error checking vua "ok()"

void casa::CCList::resize ( const casacore::uInt  nComp)

Make the list bigger or smaller.

void casa::CCList::suspendOKCheck ( )
private

turn OFF error checking via "ok()"

void casa::CCList::tiledSort ( const casacore::IPosition tileShape)

casacore::Sort components to be organized by tile number.

If the position and Flux blocks have free space at the end, it gets cut off.

Member Data Documentation

casacore::uInt casa::CCList::itsComp
private

Definition at line 186 of file CCList.h.

Referenced by nComp().

casacore::uInt casa::CCList::itsDim
private

Definition at line 185 of file CCList.h.

Referenced by nDim().

casacore::Block<casacore::Float> casa::CCList::itsFlux
private

Definition at line 187 of file CCList.h.

casacore::uInt casa::CCList::itsPol
private

Definition at line 184 of file CCList.h.

Referenced by nPol().

casacore::Block<casacore::Int> casa::CCList::itsPos
private

Definition at line 188 of file CCList.h.

casacore::Bool casa::CCList::itsSuspendOKCheck
private

Definition at line 189 of file CCList.h.


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