8 #ifndef VISBUFFERIMPL2INTERNAL_H_
9 #define VISBUFFERIMPL2INTERNAL_H_
61 virtual void fill ()
const = 0;
108 template <
typename T, casacore::Bool IsComputed = false>
132 if (! clearStatusOnly) {
233 "This VisBuffer is does not allow row key values to be changed.");
255 template <
typename U>
262 "This VisBuffer is does not allow row key values to be changed.");
272 template <
typename U>
292 ThrowIf (
true,
"Scalar shapes should not have shape errors.");
305 template <
typename E>
352 copyAux (other, fetchIfNeeded);
364 else if (fetchIfNeeded){
394 template <
typename T, casacore::Bool IsComputed = false>
424 shape.
last() = nRows;
426 this->
getItem().adjustLastAxis (shape);
446 shapeOk = shapeOk && desiredShape [i] == currentShape [i];
449 desiredShape.
last() = nRows;
456 this->
getItem().adjustLastAxis (desiredShape, 20);
463 this->
getItem().reformOrResize (desiredShape);
475 return this->
getItem().shape();
517 this->
getItem().resize (desiredShape, copyValues);
521 this->
getItem() =
typename T::value_type();
537 shape.
last() = newNRows;
539 this->
getItem().resize (shape,
true);
551 "This VisBuffer is does not allow row key values to be changed.");
564 template <
typename U>
580 "No shape error message for NoCheck type array");
583 "Shape is OK so no error message.");
586 : this->
getItem().shape().toString();
588 std::ostringstream os;
590 os <<
"VisBuffer::ShapeError: "
592 <<
" should have shape "
617 cube (j, i, destinationRow) =
cube (j, i, sourceRow);
629 matrix (j, destinationRow) = matrix (j, sourceRow);
656 vector (destinationRow) = vector (sourceRow);
733 template <
typename T,
typename U>
742 if (dataItem.
isPresent() && data.nelements() > 0) {
745 p1.
reference(data (blc, trc).reform(mat));
748 p2.
reference(data (blc, trc).reform(mat));
751 p3.
reference(data (blc, trc).reform(mat));
virtual void clearDirty()=0
A Vector of integers, for indexing into Array<T> objects.
VbCacheItemArray< casacore::Cube< casacore::Float > > weightSpectrum_p
VbCacheItemArray <casacore::Matrix<casacore::Float> > weightMat_p;.
casacore::Vector< casacore::IPosition > validShapes_p
void initialize(VisBufferCache *cache, VisBufferImpl2 *vb, Filler filler, VisBufferComponent2 component, ShapePattern shapePattern, casacore::Bool isKey)
VbCacheItemArray< casacore::Matrix< casacore::Float > > imagingWeight_p
A Measure: astronomical direction.
VbCacheItemArray< casacore::Vector< casacore::Double > > timeCentroid_p
T & getRef(casacore::Bool fillIfAbsent=true)
A 1-D Specialization of the Array class.
casacore::Bool areCorrelationsSorted_p
virtual void copy(const VbCacheItemBase *other, casacore::Bool fetchIfNeeded)=0
VbCacheItemArray< casacore::Matrix< casacore::Float > > weight_p
VbCacheItemArray <casacore::Matrix<CStokesVector> > visibility_p;.
casacore::Bool isPresent_p
virtual void clearDirty()
casacore::Int appendCapacity_p
casacore::Bool isDirty() const
static void sortCorrelationItem(vi::VbCacheItem< T > &dataItem, casacore::IPosition &blc, casacore::IPosition &trc, casacore::IPosition &mat, U &tmp, casacore::Bool sort)
void initialize(VisBufferImpl2 *vb)
virtual casacore::String shapeErrorMessage() const
const IPosition & shape() const
The length of each axis of the Matrix.
FrequencyCache(Updater updater)
VbCacheItem< casacore::Int > nCorrelations_p
VbCacheItemArray< casacore::Cube< casacore::Complex > > visCube_p
void resize(casacore::Bool copyValues)
virtual casacore::Bool isPresent() const =0
VbCacheItemArray< casacore::Matrix< casacore::Double > > uvw_p
VbCacheItemArray< casacore::Cube< casacore::Float > > sigmaSpectrum_p
virtual void copyRowElement(casacore::Int sourceRow, casacore::Int destinationRow)
casacore::Bool isNewArrayId_p
static casacore::String name(VisBufferComponent2 id)
casacore::Bool isPresent() const
virtual casacore::String getFillErrorMessage() const
VbCacheItemArray< casacore::Vector< casacore::uInt > > rowIds_p
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
void assign(T &dst, const T &src)
virtual casacore::String shapeErrorMessage() const =0
VbCacheItemArray< casacore::Vector< casacore::Int > > feed1_p
static void copyRowElementAux(casacore::Cube< typename T::value_type > &cube, casacore::Int sourceRow, casacore::Int destinationRow)
VbCacheItemArray< casacore::Vector< casacore::SquareMatrix< casacore::Complex, 2 > >, true > cjones_p
FrequencyCache< casacore::Int > channelNumbers_p
const IPosition & shape() const
The length of each axis of the cube.
VbCacheItem< casacore::MDirection > phaseCenter_p
A 3-D Specialization of the Array class.
FrequencyCache< casacore::Double > frequencies_p
casacore::Bool isFillable_p
virtual void set(const T &newItem)
ABSTRACT TOOL CLASSES A PlotTool is a higher level event handler for a PlotCanvas The idea is to take common tasks which may require multiple events and put them in one place PlotTools also provide additional functionality in that they can be active and blocking non blocking The PlotCanvas will only send events to active and will not send events to later tools or event handlers if the latest tool was blocking In this way a single tool can be used to handle ALL user interaction via the GUI at one time
virtual void fill() const =0
virtual casacore::IPosition getValidShape(casacore::Int) const
VbCacheItemArray< casacore::Vector< casacore::Int > > stateId_p
casacore::Int pointingTableLastRow_p
void(VisBufferImpl2::* Filler)(T &) const
VbCacheItem(bool isMutable=false)
A 2-D Specialization of the Array class.
casacore::Vector< T >(ViImplementation2::* Updater)(casacore::Double, casacore::Int, casacore::Int, casacore::Int) const
void assign(T &lhs, const T &rhs)
void setAsPresent(casacore::Bool isPresent=true) const
casacore::Bool isNewFieldId_p
virtual void clear(casacore::Bool clearStatusOnly)
ShapePattern shapePattern_p
virtual void appendRows(casacore::Int nRowsToAdd, casacore::Bool truncate=false)=0
casacore::String msName_p
casacore::Bool isAttached_p
casacore::Bool isArray() const
VbCacheItemArray< casacore::Cube< casacore::Bool > > flagCube_p
VbCacheItemArray< casacore::Vector< casacore::Int > > feed2_p
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
VbCacheItemArray< casacore::Vector< casacore::Bool > > flagRow_p
virtual void resize()
Make this array a different shape.
VbCacheItemArray< casacore::Vector< casacore::Int > > spectralWindows_p
VbCacheItemArray <casacore::Matrix<casacore::Float> > sigmaMat_p;.
static void copyRowElementAux(casacore::Array< typename T::value_type > &array, casacore::Int sourceRow, casacore::Int destinationRow)
casacore::Bool isKey() const
VbCacheItemArray< casacore::Array< casacore::Bool > > flagCategory_p
VbCacheItemArray <casacore::Matrix<casacore::Bool> > flag_p;.
VbCacheItemArray< casacore::Vector< casacore::Int > > observationId_p
VbCacheItemArray< casacore::Cube< casacore::Complex > > modelVisCube_p
VisBufferImpl2 * getVb() const
VbCacheItemArray< casacore::Vector< casacore::Int > > antenna2_p
VbCacheItemArray< casacore::Vector< casacore::Int > > processorId_p
VbCacheItemBase(bool isMutable)
VbCacheItemArray< casacore::Vector< casacore::Int > > fieldId_p
VisBufferComponents2 dirtyComponents_p
std::vector< VbCacheItemBase * > CacheRegistry
Referenced counted pointer for constant data.
VbCacheItemArray< casacore::Vector< casacore::Int > > arrayId_p
VbCacheItemArray< casacore::Vector< casacore::Int > > corrType_p
VbCacheItemArray <casacore::Matrix<CStokesVector> > correctedVisibility_p;.
VbCacheItem< casacore::Int > nChannels_p
void setIsKey(casacore::Bool isKey)
casacore::Int appendRow()
virtual const casacore::Vector< casacore::Double > & time() const
VbCacheItemArray< casacore::Vector< casacore::Float > > feed2Pa_p
casacore::Bool isArray() const
VbCacheItemArray(bool isMutable=false)
static void clearValue(casacore::Int &value)
virtual void clear(casacore::Bool clearStatusOnly=false)=0
ssize_t & last(uInt index=0)
Index into the IPosition from the end.
void resizeRows(casacore::Int newNRows)
virtual casacore::Bool isShapeOk() const
virtual casacore::Int msId() const
VisBufferComponent2 getComponent() const
const Char * c_str() const
Get char array.
virtual void resize(casacore::Bool)
virtual void copy(const VbCacheItemBase *otherRaw, casacore::Bool fetchIfNeeded)
virtual void copy (const VbCacheItemBase * otherRaw, casacore::Bool markAsCached) { Convert generic ...
virtual casacore::IPosition getShape() const
T::IteratorSTL::value_type ElementType
VbCacheItemArray< casacore::Vector< casacore::MDirection > > direction1_p
casacore::Bool isWritable_p
virtual casacore::Bool isDirty() const =0
VbCacheItem< casacore::Int > polFrame_p
virtual void fill() const
void initialize(VisBufferCache *cache, VisBufferImpl2 *vb, Filler filler, VisBufferComponent2 component=VisBufferComponent2::Unknown, casacore::Bool isKey=true)
casacore::Vector< T > values_p
static void copyRowElementAux(casacore::Matrix< typename T::value_type > &matrix, casacore::Int sourceRow, casacore::Int destinationRow)
VbCacheItem< casacore::Int > nRows_p
virtual const casacore::Vector< casacore::Int > & spectralWindows() const
virtual const casacore::Matrix<casacore::Float> & sigmaMat () const; virtual casacore::Int spectralWi...
bool Bool
Define the standard types used by Casacore.
void updateCacheIfNeeded(const ViImplementation2 *rovi, casacore::Int rowInBuffer, casacore::Int frame, const VisBufferImpl2 *vb)
TableExprNode cube(const TableExprNode &node)
VbCacheItemArray< casacore::Cube< casacore::Float > > floatDataCube_p
casacore::Int spectralWindowId_p
static String format(const char *picture,...)
Create a formatted string using the given printf format string.
#define ThrowIf(c, m)
Throw an AipsError exception if the condition is true.
VisModelDataI * visModelData_p
virtual casacore::String shapeErrorMessage(const casacore::IPosition *badShape=0) const
VbCacheItemArray< casacore::Vector< casacore::Float > > feed1Pa_p
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
VbCacheItem< T >::Filler Filler
template <class T, class U> class vector;
VisBufferComponent2 vbComponent_p
VisBufferCache(VisBufferImpl2 *vb)
Holds the cached values for a VisBuffer object.
void set(const U &newItem)
virtual casacore::Bool isAttached() const
virtual void resizeRows(casacore::Int)
void setSpecial(const U &newItem)
virtual casacore::Bool isShapeOk() const =0
casacore::CountedPtr< WeightScaling > weightScaling_p
VbCacheItemArray< casacore::Vector< casacore::Int > > scan_p
VbCacheItemArray< casacore::Vector< casacore::Double > > exposure_p
casacore::Vector< casacore::Int > correlations_p
VisibilityIterator2 iterates through one or more readonly MeasurementSets.
casacore::Vector< casacore::Stokes::StokesTypes > correlationsSelected_p
virtual void setAsPresent(casacore::Bool isPresent=true) const =0
virtual void appendRows(casacore::Int, casacore::Bool)
virtual void appendRows(casacore::Int nRows, casacore::Bool truncate)
void copyAux(const VbCacheItem< T, IsComputed > *other, bool fetchIfNeeded)
virtual ~VbCacheItemArray()
casacore::Vector< casacore::Stokes::StokesTypes > correlationsDefined_p
String: the storage and methods of handling collections of characters.
VbCacheItemArray< casacore::Vector< casacore::Int > > antenna1_p
The values that are potentially cached.
casacore::Bool isNewSpectralWindow_p
void registerItem(VbCacheItemBase *item)
VbCacheItemArray< casacore::Vector< casacore::Int > > dataDescriptionIds_p
VbCacheItem< casacore::Int > polarizationId_p
VbCacheItem< casacore::Int > nAntennas_p
VbCacheItemArray <casacore::Matrix<CStokesVector> > modelVisibility_p;.
This class encapsulates an enum with values corresponding to the various data components accessible v...
static void clearValue(casacore::MDirection &value)
virtual casacore::Bool isArray() const =0
casacore::Bool isRekeyable_p
virtual void initialize(VisBufferCache *cache, VisBufferImpl2 *vb, VisBufferComponent2 component, casacore::Bool isKey=true)
virtual void copyRowElement(casacore::Int sourceRow, casacore::Int destinationRow)=0
VisBufferImpls encapsulate one chunk of visibility data for processing.
VbCacheItemArray< casacore::Vector< casacore::Double > > time_p
VbCacheItemArray< casacore::Cube< casacore::Complex > > correctedVisCube_p
uInt nelements() const
The number of elements in this IPosition.
String toString() const
Write the IPosition into a String.
virtual ~VbCacheItemBase()
virtual void setDirty()=0
virtual casacore::Bool isShapeOk() const
virtual void set(const T &newItem)
void set(const U &newItem)
casacore::Int appendSize_p
VbCacheItemArray< casacore::Vector< casacore::Double > > timeInterval_p
VbCacheItemArray< casacore::Matrix< casacore::Float > > sigma_p
static void clearValue(casacore::Array< E > &value)
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
#define AssertCc(c)
The Assert macro is an alias to the standard assert macro when NDEBUG is defined. ...
virtual casacore::Bool isFillable() const
VbCacheItemArray< casacore::Vector< casacore::MDirection > > direction2_p
static void copyRowElementAux(casacore::Vector< typename T::value_type > &vector, casacore::Int sourceRow, casacore::Int destinationRow)
const IPosition & shape() const
The length of each axis.
static String toString(const T &value)
Convert a value to a String.
virtual void copyRowElement(casacore::Int, casacore::Int)
VbCacheItem< casacore::Int > dataDescriptionId_p