29 #ifndef LATTICES_TEMPLATTICEIMPL_H
30 #define LATTICES_TEMPLATTICEIMPL_H
34 #include <casacore/casa/aips.h>
35 #include <casacore/lattices/Lattices/Lattice.h>
36 #include <casacore/lattices/Lattices/TiledShape.h>
37 #include <casacore/tables/Tables/Table.h>
38 #include <casacore/casa/Utilities/CountedPtr.h>
137 void apply (T (*
function)(
const T&))
165 {
itsLatticePtr->setCacheSizeFromPath (sliceShape, windowStart, windowLength,
246 #ifndef CASACORE_NO_AUTO_TEMPLATES
247 #include <casacore/lattices/Lattices/TempLatticeImpl.tcc>
Referenced counted pointer for constant data.
String: the storage and methods of handling collections of characters.
Bool empty() const
Test for empty.
void flush(Bool fsync=False, Bool recursive=False)
Flush the table, i.e.
void setCacheSizeInTiles(uInt howManyTiles)
Set the actual cache size for this Array to be be big enough for the indicated number of tiles.
LatticeIterInterface< T > * makeIter(const LatticeNavigator &navigator, Bool useRef) const
This function is used by the LatticeIterator class to generate an iterator of the correct type for th...
void init(const TiledShape &shape, Double maxMemoryInMB=-1)
Initialize the object.
void clearCache()
Clears and frees up the caches, but the maximum allowed cache size is unchanged from when setCacheSiz...
void setMaximumCacheSize(uInt howManyPixels)
Set the maximum (allowed) cache size as indicated.
Bool isWritable() const
Is the TempLattice writable? It should be.
void tempClose()
Close the Lattice temporarily (if it is paged to disk).
CountedPtr< Lattice< T > > itsLatticePtr
void deleteTable()
Make sure that the temporary table gets deleted.
IPosition doNiceCursorShape(uInt maxPixels)
Get the best cursor shape.
Bool doGetSlice(Array< T > &buffer, const Slicer §ion)
Do the actual getting of an array of values.
void apply(T(*function)(const T &))
void set(const T &value)
Set all of the elements in the Lattice to the given value.
void putAt(const T &value, const IPosition &where)
uInt maximumCacheSize() const
Maximum size - not necessarily all used.
TempLatticeImpl()
The default constructor creates a TempLatticeImpl containing a default ArrayLattice object.
TempLatticeImpl(const TempLatticeImpl< T > &other)
The copy constructor cannot be used.
void apply(const Functional< T, T > &function)
Bool ok() const
Check class internals - used for debugging.
TempLatticeImpl(const TiledShape &shape, Double maxMemoryInMB)
void showCacheStatistics(ostream &os) const
Report on cache success.
uInt advisedMaxPixels() const
This function returns the recommended maximum number of pixels to include in the cursor of an iterato...
TempLatticeImpl< T > & operator=(const TempLatticeImpl< T > &other)
The assignment operator cannot be used.
void doReopen() const
Do the reopen of the table (if not open already).
T getAt(const IPosition &where) const
Get or put a single element in the lattice.
~TempLatticeImpl()
The destructor removes the Lattice from memory and if necessary disk.
TempLatticeImpl(const TiledShape &shape, Int maxMemoryInMB)
Create a TempLatticeImpl of the specified shape.
void setCacheSizeFromPath(const IPosition &sliceShape, const IPosition &windowStart, const IPosition &windowLength, const IPosition &axisPath)
Set the cache size as to "fit" the indicated path.
void apply(T(*function)(T))
Replace every element, x, of the Lattice with the result of f(x).
void reopen()
If needed, reopen a temporarily closed TempLatticeImpl.
void tempReopen() const
Do the actual reopen of the temporarily closed table (if not open already).
Bool canReferenceArray() const
Can the lattice data be referenced as an array section?
void doPutSlice(const Array< T > &sourceBuffer, const IPosition &where, const IPosition &stride)
Do the actual getting of an array of values.
Bool isPaged() const
Is the TempLattice paged to disk?
void flush()
Flush the data.
IPosition shape() const
Return the shape of the Lattice including all degenerate axes.
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.