casa
$Rev:20696$
|
#include <VisibilityProcessing.h>
Public Types | |
enum | ChunkCode { Normal, RepeatChunk } |
enum | ProcessingType { Subchunk, EndOfChunk, EndOfData } |
typedef boost::tuple < ChunkCode, VpData > | ProcessingResult |
Public Member Functions | |
VisibilityProcessor () | |
VisibilityProcessor (const String &name, const vector< String > &inputNames, const vector< String > &outputNames=vector< String >(), Bool makeIoPorts=False) | |
virtual | ~VisibilityProcessor () |
void | chunkStart (const SubchunkIndex &) |
chunkStart is called to inform the VP that a new chunk is starting. | |
ProcessingResult | doProcessing (ProcessingType processingType, VpData &inputData, VpEngine *vpEngine, const SubchunkIndex &subChunkIndex) |
Called to cause the VP to process the provided inputs. | |
const VpContainer * | getContainer () const |
Returns a pointer to the containing VP or NULL if this VP is top-level. | |
String | getFullName () const |
The full name of a VP is a dotted list of the names of all the containing VPs ending with the name of this VP (e.g., vp0.vp1...vpN.thisVp). | |
VpPort | getInput (const String &name) const |
Returns the input port having the specified name. | |
VpPorts | getInputs (Bool connectedOnly=False) const |
Returns a collection of the input ports for this VP; optionally only the connected ports are returned. | |
String | getName () const |
Returns the name of this VP. | |
Int | getNSubchunksProcessed () const |
Returns the number of Subchunks processed (mainly for testing) | |
Int | getNSubchunksUniqueProcessed () const |
Returns the number of unique Subchunks (i.e., iteration ignored) processed. | |
VpPort | getOutput (const String &name) const |
Returns the output port having the specified name. | |
VpPorts | getOutputs (Bool connectedOnly=False) const |
Returns a collection of the output ports for this VP; optionally only the connected ports are returned. | |
virtual casa::asyncio::PrefetchColumns | getPrefetchColumns () const |
Returns the collection of columns that need to be prefetched if this node is used with async I/O. | |
void | processingStart () |
Called by the framework when the processing is about to begin (i.e., prior to the first VisBuffer being fed into the graph. | |
void | validate () |
Called to ask the VP to check its validity (i.e., are all needed inputs connected, etc.). | |
Protected Member Functions | |
virtual void | chunkStartImpl (const SubchunkIndex &) |
The public API contains many methods that are not virtual. | |
VpPorts | definePorts (const vector< String > &portNames, VpPort::Type type, const String &typeName) |
Defines the set of possible input ports for this VP. | |
virtual ProcessingResult | doProcessingImpl (ProcessingType processingType, VpData &inputData, const SubchunkIndex &subChunkIndex)=0 |
Requests processing of the provided (possibly empty) input data. | |
VpPorts | portsUnconnected (const VpPorts &ports, Bool(VpPort::*isConnected)() const, const vector< String > &except=vector< String >()) const |
Returns a collection of the ports that are not connected using the provided connection method; some ports may also be excluded from this list by name. | |
virtual void | processingStartImpl () |
Called when data processing is about to beging; this allows the VP to perform any initialization that it desires now that it is completely connected into the graph. | |
void | throwIfAnyInputsUnconnected (const vector< String > &exceptThese=vector< String >()) const |
Methods to ease the validation process. | |
void | throwIfAnyInputsUnconnectedExcept (const String &exceptThisOne) const |
void | throwIfAnyOutputsUnconnected (const vector< String > &exceptThese=vector< String >()) const |
void | throwIfAnyOutputsUnconnectedExcept (const String &exceptThisOne) const |
void | throwIfAnyPortsUnconnected () const |
virtual void | validateImpl ()=0 |
Called to allow the node to validate its initial state. | |
Private Member Functions | |
VpPort & | getInputRef (const String &name) |
VpPort & | getOutputRef (const String &name) |
void | setContainer (const VpContainer *) |
VisibilityProcessor (const VisibilityProcessor &other) | |
Prevent copying of existing objects. | |
VisibilityProcessor & | operator= (const VisibilityProcessor &other) |
ROVisibilityIterator * | getVi () |
VpEngine * | getVpEngine () |
Private Attributes | |
const VpContainer * | container_p |
String | name_p |
Int | nSubchunks_p |
Int | nSubchunksUnique_p |
VpEngine * | vpEngine_p |
VpPorts | vpInputs_p |
VpPorts | vpOutputs_p |
Friends | |
class | VpContainer |
class | WriterVp |
Definition at line 227 of file VisibilityProcessing.h.
typedef boost::tuple<ChunkCode, VpData> casa::vpf::VisibilityProcessor::ProcessingResult |
Definition at line 245 of file VisibilityProcessing.h.
Definition at line 234 of file VisibilityProcessing.h.
Definition at line 239 of file VisibilityProcessing.h.
casa::vpf::VisibilityProcessor::VisibilityProcessor | ( | const String & | name, |
const vector< String > & | inputNames, | ||
const vector< String > & | outputNames = vector< String >() , |
||
Bool | makeIoPorts = False |
||
) |
virtual casa::vpf::VisibilityProcessor::~VisibilityProcessor | ( | ) | [inline, virtual] |
Definition at line 252 of file VisibilityProcessing.h.
casa::vpf::VisibilityProcessor::VisibilityProcessor | ( | const VisibilityProcessor & | other | ) | [private] |
Prevent copying of existing objects.
void casa::vpf::VisibilityProcessor::chunkStart | ( | const SubchunkIndex & | ) |
chunkStart is called to inform the VP that a new chunk is starting.
Reimplemented in casa::vpf::VpContainer.
virtual void casa::vpf::VisibilityProcessor::chunkStartImpl | ( | const SubchunkIndex & | ) | [inline, protected, virtual] |
The public API contains many methods that are not virtual.
However, where subclass-specific behavior is potentially useful, a corresponding xxxImpl method is provided. This allows the framework to perform certain required housekeeping options while allowing the subclass to perform custom operations.
Called on the object when a new chunk is about to be started.
Reimplemented in casa::CorrectorVp.
Definition at line 330 of file VisibilityProcessing.h.
VpPorts casa::vpf::VisibilityProcessor::definePorts | ( | const vector< String > & | portNames, |
VpPort::Type | type, | ||
const String & | typeName | ||
) | [protected] |
Defines the set of possible input ports for this VP.
ProcessingResult casa::vpf::VisibilityProcessor::doProcessing | ( | ProcessingType | processingType, |
VpData & | inputData, | ||
VpEngine * | vpEngine, | ||
const SubchunkIndex & | subChunkIndex | ||
) |
Called to cause the VP to process the provided inputs.
It will be called in three different contexts as indicated by the ProcessingType.
virtual ProcessingResult casa::vpf::VisibilityProcessor::doProcessingImpl | ( | ProcessingType | processingType, |
VpData & | inputData, | ||
const SubchunkIndex & | subChunkIndex | ||
) | [protected, pure virtual] |
Requests processing of the provided (possibly empty) input data.
This is called on each subchunk (then inputData will be nonempty) and at the end of a chunk and the end of the entire data set. These last two call types allow the VP to output any data that it might have been accumulating across multiple subchunks, etc.
Implemented in casa::vpf::VpContainer, casa::vpf::WriterVp, casa::vpf::SplitterVp, casa::vpf::VisibilityProcessorStub, and casa::CorrectorVp.
const VpContainer* casa::vpf::VisibilityProcessor::getContainer | ( | ) | const [inline] |
Returns a pointer to the containing VP or NULL if this VP is top-level.
Definition at line 268 of file VisibilityProcessing.h.
The full name of a VP is a dotted list of the names of all the containing VPs ending with the name of this VP (e.g., vp0.vp1...vpN.thisVp).
VpPort casa::vpf::VisibilityProcessor::getInput | ( | const String & | name | ) | const |
Returns the input port having the specified name.
Exception if port is undefined.
VpPort& casa::vpf::VisibilityProcessor::getInputRef | ( | const String & | name | ) | [private] |
VpPorts casa::vpf::VisibilityProcessor::getInputs | ( | Bool | connectedOnly = False | ) | const |
Returns a collection of the input ports for this VP; optionally only the connected ports are returned.
Returns the name of this VP.
Returns the number of Subchunks processed (mainly for testing)
Returns the number of unique Subchunks (i.e., iteration ignored) processed.
(mainly for testing)
VpPort casa::vpf::VisibilityProcessor::getOutput | ( | const String & | name | ) | const |
Returns the output port having the specified name.
Exception if port is undefined.
VpPort& casa::vpf::VisibilityProcessor::getOutputRef | ( | const String & | name | ) | [private] |
VpPorts casa::vpf::VisibilityProcessor::getOutputs | ( | Bool | connectedOnly = False | ) | const |
Returns a collection of the output ports for this VP; optionally only the connected ports are returned.
virtual casa::asyncio::PrefetchColumns casa::vpf::VisibilityProcessor::getPrefetchColumns | ( | ) | const [virtual] |
Returns the collection of columns that need to be prefetched if this node is used with async I/O.
Reimplemented in casa::vpf::VpContainer.
ROVisibilityIterator* casa::vpf::VisibilityProcessor::getVi | ( | ) | [private] |
VpEngine* casa::vpf::VisibilityProcessor::getVpEngine | ( | ) | [private] |
VisibilityProcessor& casa::vpf::VisibilityProcessor::operator= | ( | const VisibilityProcessor & | other | ) | [private] |
VpPorts casa::vpf::VisibilityProcessor::portsUnconnected | ( | const VpPorts & | ports, |
Bool(VpPort::*)() const | isConnected, | ||
const vector< String > & | except = vector< String >() |
||
) | const [protected] |
Returns a collection of the ports that are not connected using the provided connection method; some ports may also be excluded from this list by name.
Called by the framework when the processing is about to begin (i.e., prior to the first VisBuffer being fed into the graph.
virtual void casa::vpf::VisibilityProcessor::processingStartImpl | ( | ) | [inline, protected, virtual] |
Called when data processing is about to beging; this allows the VP to perform any initialization that it desires now that it is completely connected into the graph.
Reimplemented in casa::vpf::VpContainer, and casa::CorrectorVp.
Definition at line 355 of file VisibilityProcessing.h.
void casa::vpf::VisibilityProcessor::setContainer | ( | const VpContainer * | ) | [private] |
void casa::vpf::VisibilityProcessor::throwIfAnyInputsUnconnected | ( | const vector< String > & | exceptThese = vector< String >() | ) | const [protected] |
Methods to ease the validation process.
void casa::vpf::VisibilityProcessor::throwIfAnyInputsUnconnectedExcept | ( | const String & | exceptThisOne | ) | const [protected] |
void casa::vpf::VisibilityProcessor::throwIfAnyOutputsUnconnected | ( | const vector< String > & | exceptThese = vector< String >() | ) | const [protected] |
void casa::vpf::VisibilityProcessor::throwIfAnyOutputsUnconnectedExcept | ( | const String & | exceptThisOne | ) | const [protected] |
void casa::vpf::VisibilityProcessor::throwIfAnyPortsUnconnected | ( | ) | const [protected] |
Called to ask the VP to check its validity (i.e., are all needed inputs connected, etc.).
virtual void casa::vpf::VisibilityProcessor::validateImpl | ( | ) | [protected, pure virtual] |
Called to allow the node to validate its initial state.
An AipsError should be thrown if this node decides that it is invalid.
Implemented in casa::vpf::VpContainer, casa::vpf::WriterVp, casa::vpf::SplitterVp, casa::vpf::VisibilityProcessorStub, and casa::CorrectorVp.
friend class VpContainer [friend] |
Definition at line 229 of file VisibilityProcessing.h.
friend class WriterVp [friend] |
Definition at line 230 of file VisibilityProcessing.h.
const VpContainer* casa::vpf::VisibilityProcessor::container_p [private] |
Definition at line 384 of file VisibilityProcessing.h.
String casa::vpf::VisibilityProcessor::name_p [private] |
Definition at line 385 of file VisibilityProcessing.h.
Definition at line 386 of file VisibilityProcessing.h.
Definition at line 387 of file VisibilityProcessing.h.
Definition at line 388 of file VisibilityProcessing.h.
Definition at line 389 of file VisibilityProcessing.h.
Definition at line 390 of file VisibilityProcessing.h.