casa
$Rev:20696$
|
VBRemappers remap VisBuffers. More...
#include <VBRemapper.h>
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 VBRemapper & | operator= (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. |
VBRemappers remap VisBuffers.
Public interface
VBRemappers remap VisBuffers.
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..
DDIDs 1, 4, and 7, and field ID 3 is selected. They should become 0, 1, and 2, and 0, in the output.
Definition at line 67 of file VBRemapper.h.
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.
* 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.
std::map<VisBufferComponents::EnumType, std::map<Int, 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.