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

#include <VisibilityProcessing.h>

Inheritance diagram for casa::vpf::WriterVp:
casa::vpf::VisibilityProcessor

Public Member Functions

 WriterVp (const casacore::String &name, VisibilityIterator *vi=NULL, casacore::Bool advanceVi=false, const casacore::String &input="In", const casacore::String &output="Out")
 Creates a WriterVp node. More...
 
casacore::Bool setDisableOutput (casacore::Bool disableIt)
 This paradoxical method allows the user to create a single data flow graph and then programmatically decide at run time whether data should be actually output on this particular run. More...
 
- Public Member Functions inherited from casa::vpf::VisibilityProcessor
 VisibilityProcessor (const VisibilityProcessor &)=delete
 
VisibilityProcessoroperator= (const VisibilityProcessor &)=delete
 
 VisibilityProcessor ()
 
 VisibilityProcessor (const casacore::String &name, const std::vector< casacore::String > &inputNames, const std::vector< casacore::String > &outputNames=std::vector< casacore::String >(), casacore::Bool makeIoPorts=false)
 
virtual ~VisibilityProcessor ()
 
void chunkStart (const SubchunkIndex &)
 chunkStart is called to inform the VP that a new chunk is starting. More...
 
ProcessingResult doProcessing (ProcessingType processingType, VpData &inputData, VpEngine *vpEngine, const SubchunkIndex &subChunkIndex)
 Called to cause the VP to process the provided inputs. More...
 
const VpContainergetContainer () const
 Returns a pointer to the containing VP or NULL if this VP is top-level. More...
 
casacore::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). More...
 
VpPort getInput (const casacore::String &name) const
 Returns the input port having the specified name. More...
 
VpPorts getInputs (casacore::Bool connectedOnly=false) const
 Returns a collection of the input ports for this VP; optionally only the connected ports are returned. More...
 
casacore::String getName () const
 Returns the name of this VP. More...
 
casacore::Int getNSubchunksProcessed () const
 Returns the number of Subchunks processed (mainly for testing) More...
 
casacore::Int getNSubchunksUniqueProcessed () const
 Returns the number of unique Subchunks (i.e., iteration ignored) processed. More...
 
VpPort getOutput (const casacore::String &name) const
 Returns the output port having the specified name. More...
 
VpPorts getOutputs (casacore::Bool connectedOnly=false) const
 Returns a collection of the output ports for this VP; optionally only the connected ports are returned. More...
 
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. More...
 
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. More...
 
void validate ()
 Called to ask the VP to check its validity (i.e., are all needed inputs connected, etc.). More...
 

Protected Member Functions

ProcessingResult doProcessingImpl (ProcessingType processingType, VpData &inputData, const SubchunkIndex &subChunkIndex)
 Requests processing of the provided (possibly empty) input data. More...
 
void validateImpl ()
 Called to allow the node to validate its initial state. More...
 
- Protected Member Functions inherited from casa::vpf::VisibilityProcessor
virtual void chunkStartImpl (const SubchunkIndex &)
 The public API contains many methods that are not virtual. More...
 
VpPorts definePorts (const std::vector< casacore::String > &portNames, VpPort::Type type, const casacore::String &typeName)
 Defines the set of possible input ports for this VP. More...
 
VpPorts portsUnconnected (const VpPorts &ports, casacore::Bool(VpPort::*isConnected)() const, const std::vector< casacore::String > &except=std::vector< casacore::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. More...
 
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. More...
 
void throwIfAnyInputsUnconnected (const std::vector< casacore::String > &exceptThese=std::vector< casacore::String >()) const
 Methods to ease the validation process. More...
 
void throwIfAnyInputsUnconnectedExcept (const casacore::String &exceptThisOne) const
 
void throwIfAnyOutputsUnconnected (const std::vector< casacore::String > &exceptThese=std::vector< casacore::String >()) const
 
void throwIfAnyOutputsUnconnectedExcept (const casacore::String &exceptThisOne) const
 
void throwIfAnyPortsUnconnected () const
 

Private Attributes

casacore::Bool advanceVi_p
 
casacore::Bool disableOutput_p
 N.B., advancing the flow graphs VI is prohibited. More...
 
VisibilityIteratorvi_p
 

Additional Inherited Members

- Public Types inherited from casa::vpf::VisibilityProcessor
enum  ChunkCode {
  Normal,
  RepeatChunk
}
 
enum  ProcessingType {
  Subchunk,
  EndOfChunk,
  EndOfData
}
 
typedef std::tuple< ChunkCode,
VpData
ProcessingResult
 

Detailed Description

Definition at line 451 of file VisibilityProcessing.h.

Constructor & Destructor Documentation

casa::vpf::WriterVp::WriterVp ( const casacore::String name,
VisibilityIterator vi = NULL,
casacore::Bool  advanceVi = false,
const casacore::String input = "In",
const casacore::String output = "Out" 
)

Creates a WriterVp node.

If the vi argument is NULL then the flow graph's VI is used. The advanceVi argument is used to direct the node to advance the VI after each write (i.e., perform a vi++ operation); advancing the flow graph's VI will cause a run time exception.

Member Function Documentation

ProcessingResult casa::vpf::WriterVp::doProcessingImpl ( ProcessingType  processingType,
VpData inputData,
const SubchunkIndex subChunkIndex 
)
protectedvirtual

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.

Implements casa::vpf::VisibilityProcessor.

casacore::Bool casa::vpf::WriterVp::setDisableOutput ( casacore::Bool  disableIt)

This paradoxical method allows the user to create a single data flow graph and then programmatically decide at run time whether data should be actually output on this particular run.

void casa::vpf::WriterVp::validateImpl ( )
protectedvirtual

Called to allow the node to validate its initial state.

An casacore::AipsError should be thrown if this node decides that it is invalid.

Implements casa::vpf::VisibilityProcessor.

Member Data Documentation

casacore::Bool casa::vpf::WriterVp::advanceVi_p
private

Definition at line 483 of file VisibilityProcessing.h.

casacore::Bool casa::vpf::WriterVp::disableOutput_p
private

N.B., advancing the flow graphs VI is prohibited.

Definition at line 485 of file VisibilityProcessing.h.

VisibilityIterator* casa::vpf::WriterVp::vi_p
private

Definition at line 486 of file VisibilityProcessing.h.


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