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

#include <VisibilityProcessing.h>

Inheritance diagram for casa::vpf::VpContainer:
casa::vpf::VisibilityProcessor

Classes

class  VpSet
 

Public Member Functions

 VpContainer (const casacore::String &name, const std::vector< casacore::String > &inputs=std::vector< casacore::String >(1,"In"), const std::vector< casacore::String > &outputs=std::vector< casacore::String >())
 Creates a VpContainer object providing the specified inputs and outputs. More...
 
virtual ~VpContainer ()
 
virtual void add (VisibilityProcessor *processor)
 Adds a VP to the container. More...
 
virtual void connect (VisibilityProcessor *sourceVp, const casacore::String &sourcePortName, VisibilityProcessor *sinkVp, const casacore::String &sinkPortName)
 Connects the specified output to the specified input. More...
 
virtual void connect (const casacore::String &sourcePortName, VisibilityProcessor *sinkVp, const casacore::String &sinkPortName)
 
virtual void connect (VisibilityProcessor *sourceVp, const casacore::String &sourcePortName, const casacore::String &sinkPortName)
 
virtual void chunkStart (const SubchunkIndex &sci)
 
virtual void fillWithSequence (VisibilityProcessor *first,...)
 Fills the container with the specified set of VPs. More...
 
virtual
casa::asyncio::PrefetchColumns 
getPrefetchColumns () const
 Returns the columns that are required to be prefetched if async I/O is used. 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...
 
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 Types

typedef std::vector
< VisibilityProcessor * > 
VPs
 
typedef VPs::const_iterator const_iterator
 
typedef VPs::iterator iterator
 

Protected Member Functions

iterator begin ()
 
const_iterator begin () const
 
casacore::Bool contains (const VisibilityProcessor *) const
 
virtual ProcessingResult doProcessingImpl (ProcessingType processingType, VpData &inputData, const SubchunkIndex &subChunkIndex)
 Requests processing of the provided (possibly empty) input data. More...
 
casacore::Bool empty () const
 
iterator end ()
 
const_iterator end () const
 
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...
 
size_t size () const
 
virtual 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...
 
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 Types

typedef std::map< VpPort, VpPortNetwork
 
typedef std::set< VpPortNetworkReverse
 
typedef std::tuple
< VisibilityProcessor
*, VpData
ReadyVpAndData
 

Private Member Functions

ReadyVpAndData findReadyVp (VpSet &vpsWaiting, VpData &inputs, bool flushing) const
 
ReadyVpAndData findReadyVpFlushing (VpSet &vpsWaiting, VpData &inputs) const
 
ReadyVpAndData findReadyVpNormal (VpSet &vpsWaiting, VpData &inputs) const
 
bool follows (const VisibilityProcessor *a, const VisibilityProcessor *b) const
 
bool followsSet (const VisibilityProcessor *a, const VpSet &vpSet) const
 
void orderContents ()
 
void remapPorts (VpData &data, const VisibilityProcessor *)
 
std::pair< VpPort, VpPortvalidateConnectionPorts (VisibilityProcessor *sourceVp, const casacore::String &sourcePortName, VisibilityProcessor *sinkVp, const casacore::String &sinkPortName)
 

Private Attributes

Network network_p
 
NetworkReverse networkReverse_p
 
VPs vps_p
 backwards order. More...
 

Friends

class VisibilityProcessing
 

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 489 of file VisibilityProcessing.h.

Member Typedef Documentation

typedef VPs::const_iterator casa::vpf::VpContainer::const_iterator
protected

Definition at line 533 of file VisibilityProcessing.h.

typedef VPs::iterator casa::vpf::VpContainer::iterator
protected

Definition at line 534 of file VisibilityProcessing.h.

typedef std::map<VpPort, VpPort> casa::vpf::VpContainer::Network
private

Definition at line 552 of file VisibilityProcessing.h.

Definition at line 553 of file VisibilityProcessing.h.

Definition at line 554 of file VisibilityProcessing.h.

typedef std::vector<VisibilityProcessor *> casa::vpf::VpContainer::VPs
protected

Definition at line 532 of file VisibilityProcessing.h.

Constructor & Destructor Documentation

casa::vpf::VpContainer::VpContainer ( const casacore::String name,
const std::vector< casacore::String > &  inputs = std::vector< casacore::String >(1,"In"),
const std::vector< casacore::String > &  outputs = std::vector< casacore::String >() 
)

Creates a VpContainer object providing the specified inputs and outputs.

These inputs and outputs will potentially be connected to the inputs and outputs of the VPs that are contained in the container.

virtual casa::vpf::VpContainer::~VpContainer ( )
inlinevirtual

Definition at line 503 of file VisibilityProcessing.h.

Member Function Documentation

virtual void casa::vpf::VpContainer::add ( VisibilityProcessor processor)
virtual

Adds a VP to the container.

Exception if VP is already in the container.

iterator casa::vpf::VpContainer::begin ( )
protected
const_iterator casa::vpf::VpContainer::begin ( ) const
protected
virtual void casa::vpf::VpContainer::chunkStart ( const SubchunkIndex sci)
virtual
virtual void casa::vpf::VpContainer::connect ( VisibilityProcessor sourceVp,
const casacore::String sourcePortName,
VisibilityProcessor sinkVp,
const casacore::String sinkPortName 
)
virtual

Connects the specified output to the specified input.

The VP pointer may be omitted if the port belongs to the container.

virtual void casa::vpf::VpContainer::connect ( const casacore::String sourcePortName,
VisibilityProcessor sinkVp,
const casacore::String sinkPortName 
)
virtual
virtual void casa::vpf::VpContainer::connect ( VisibilityProcessor sourceVp,
const casacore::String sourcePortName,
const casacore::String sinkPortName 
)
virtual
casacore::Bool casa::vpf::VpContainer::contains ( const VisibilityProcessor ) const
protected
virtual ProcessingResult casa::vpf::VpContainer::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::VpContainer::empty ( ) const
protected
iterator casa::vpf::VpContainer::end ( )
protected
const_iterator casa::vpf::VpContainer::end ( ) const
protected
virtual void casa::vpf::VpContainer::fillWithSequence ( VisibilityProcessor first,
  ... 
)
virtual

Fills the container with the specified set of VPs.

The container must be empty prior to this call.

ReadyVpAndData casa::vpf::VpContainer::findReadyVp ( VpSet vpsWaiting,
VpData inputs,
bool  flushing 
) const
private
ReadyVpAndData casa::vpf::VpContainer::findReadyVpFlushing ( VpSet vpsWaiting,
VpData inputs 
) const
private
ReadyVpAndData casa::vpf::VpContainer::findReadyVpNormal ( VpSet vpsWaiting,
VpData inputs 
) const
private
bool casa::vpf::VpContainer::follows ( const VisibilityProcessor a,
const VisibilityProcessor b 
) const
private
bool casa::vpf::VpContainer::followsSet ( const VisibilityProcessor a,
const VpSet vpSet 
) const
private
virtual casa::asyncio::PrefetchColumns casa::vpf::VpContainer::getPrefetchColumns ( ) const
virtual

Returns the columns that are required to be prefetched if async I/O is used.

Reimplemented from casa::vpf::VisibilityProcessor.

void casa::vpf::VpContainer::orderContents ( )
private
virtual void casa::vpf::VpContainer::processingStartImpl ( )
protectedvirtual

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 from casa::vpf::VisibilityProcessor.

void casa::vpf::VpContainer::remapPorts ( VpData data,
const VisibilityProcessor  
)
private
size_t casa::vpf::VpContainer::size ( ) const
protected
std::pair<VpPort,VpPort> casa::vpf::VpContainer::validateConnectionPorts ( VisibilityProcessor sourceVp,
const casacore::String sourcePortName,
VisibilityProcessor sinkVp,
const casacore::String sinkPortName 
)
private
virtual void casa::vpf::VpContainer::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.

Friends And Related Function Documentation

friend class VisibilityProcessing
friend

Definition at line 491 of file VisibilityProcessing.h.

Member Data Documentation

Network casa::vpf::VpContainer::network_p
private

Definition at line 564 of file VisibilityProcessing.h.

NetworkReverse casa::vpf::VpContainer::networkReverse_p
private

Definition at line 565 of file VisibilityProcessing.h.

VPs casa::vpf::VpContainer::vps_p
private

backwards order.

Definition at line 567 of file VisibilityProcessing.h.


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