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

VBRemappers remap VisBuffers. More...

#include <VBRemapper.h>

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

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

Detailed Description

VBRemappers remap VisBuffers.

Intended use:

Public interface

Prerequisite

Etymology

VBRemappers remap VisBuffers.

Synopsis

When selected parts of an casacore::MS are written to a new casacore::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

casa::VBRemapper::VBRemapper ( )

Defaults to no remapping.

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

Definition at line 77 of file VBRemapper.h.

Destructor* virtual casa::VBRemapper::~VBRemapper ( )
inlinevirtual

Definition at line 80 of file VBRemapper.h.

Member Function Documentation

* const std::map<VisBufferComponents::EnumType, std::map<casacore::Int, casacore::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)
inlinevirtual

Definition at line 83 of file VBRemapper.h.

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

Remaps vb and returns its success value.

casacore::Bool casa::VBRemapper::remapScalar ( casacore::Int colref,
const std::map< casacore::Int, casacore::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.

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

Definition at line 90 of file VBRemapper.h.

References inToOutMaps_p.

Member Data Documentation

std::map<VisBufferComponents::EnumType, std::map<casacore::Int, casacore::Int> > casa::VBRemapper::inToOutMaps_p
protected

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: