casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Protected Attributes
casa::VBRemapper Class Reference

VBRemappers remap VisBuffers. More...

#include <VBRemapper.h>

List of all members.

Public Member Functions

 VBRemapper ()
 Defaults to no remapping.
 VBRemapper (const std::map< VisBufferComponents::EnumType, std::map< Int, Int > > &inToOutMaps)
Copy construct VBRemapper (const VBRemapper &gw)
Destructor *virtual ~VBRemapper ()
virtual Assignment VBRemapperoperator= (const VBRemapper &gw)
*const std::map
< VisBufferComponents::EnumType,
std::map< Int, Int > > & 
getMaps () const
void setMaps (const std::map< VisBufferComponents::EnumType, std::map< Int, Int > > &maps)
Bool remap (VisBuffer &vb, const Bool squawk=True) const
 Remaps vb and returns its success value.

Protected Member Functions

Bool remapScalar (Int &colref, const std::map< Int, Int > &mapper) const
 Remaps col using mapper.
Bool remapVector (Vector< Int > &col, const std::map< Int, Int > &mapper) const

Protected Attributes

std::map
< VisBufferComponents::EnumType,
std::map< Int, Int > > 
inToOutMaps_p
 Set of maps from input ID to output ID, keyed by VisBufferComponent.

Detailed Description

VBRemappers remap VisBuffers.

Intended use:

Public interface

Prerequisite

Etymology

VBRemappers remap VisBuffers.

Synopsis

When selected parts of an MS are written to a new MS, it may be necessary to remap metadata indices like Field ID, DDID, ObservationID, etc..

Example

DDIDs 1, 4, and 7, and field ID 3 is selected. They should become 0, 1, and 2, and 0, in the output.

To Do

Definition at line 67 of file VBRemapper.h.


Constructor & Destructor Documentation

Defaults to no remapping.

casa::VBRemapper::VBRemapper ( const std::map< VisBufferComponents::EnumType, std::map< Int, Int > > &  inToOutMaps)
Copy construct casa::VBRemapper::VBRemapper ( const VBRemapper gw) [inline]

Definition at line 77 of file VBRemapper.h.

Destructor* virtual casa::VBRemapper::~VBRemapper ( ) [inline, virtual]

Definition at line 80 of file VBRemapper.h.


Member Function Documentation

* const std::map<VisBufferComponents::EnumType, std::map<Int, Int> >& casa::VBRemapper::getMaps ( ) const [inline]

Definition at line 85 of file VBRemapper.h.

References inToOutMaps_p.

virtual Assignment VBRemapper& casa::VBRemapper::operator= ( const VBRemapper gw) [inline, virtual]

Definition at line 83 of file VBRemapper.h.

Bool casa::VBRemapper::remap ( VisBuffer vb,
const Bool  squawk = True 
) const

Remaps vb and returns its success value.

Bool casa::VBRemapper::remapScalar ( Int colref,
const std::map< Int, Int > &  mapper 
) const [protected]

Remaps col using mapper.

Returns False if col has a value that is not in mapper's keys (those values are left unchanged), True otherwise.

Bool casa::VBRemapper::remapVector ( Vector< Int > &  col,
const std::map< Int, Int > &  mapper 
) const [protected]
void casa::VBRemapper::setMaps ( const std::map< VisBufferComponents::EnumType, std::map< Int, Int > > &  maps) [inline]

Definition at line 90 of file VBRemapper.h.

References inToOutMaps_p.


Member Data Documentation

Set of maps from input ID to output ID, keyed by VisBufferComponent.

Definition at line 106 of file VBRemapper.h.

Referenced by getMaps(), and setMaps().


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