26#ifndef LATTICES_HDF5LATTICE_H
27#define LATTICES_HDF5LATTICE_H
30#include <casacore/casa/aips.h>
31#include <casacore/lattices/Lattices/Lattice.h>
32#include <casacore/lattices/Lattices/TiledShape.h>
33#include <casacore/casa/HDF5/HDF5File.h>
34#include <casacore/casa/HDF5/HDF5Group.h>
35#include <casacore/casa/HDF5/HDF5DataSet.h>
36#include <casacore/casa/BasicSL/String.h>
187 const std::shared_ptr<HDF5File>&
file()
const
191 const std::shared_ptr<HDF5Group>&
group()
const
195 const std::shared_ptr<HDF5DataSet>&
array()
const
273#ifndef CASACORE_NO_AUTO_TEMPLATES
274#include <casacore/lattices/Lattices/HDF5Lattice.tcc>
~HDF5Lattice()
The destructor flushes the HDF5Lattice's contents to disk.
IPosition tileShape() const
Returns the current tile shape for this HDF5Lattice.
virtual IPosition shape() const
Returns the shape of the HDF5Lattice.
const std::shared_ptr< HDF5DataSet > & array() const
Returns the current HDF5DataSet object.
virtual void setCacheSizeFromPath(const IPosition &sliceShape, const IPosition &windowStart, const IPosition &windowLength, const IPosition &axisPath)
Set the cache size as to "fit" the indicated access pattern.
virtual void putAt(const T &value, const IPosition &where)
Put the value of a single element.
virtual Bool ok() const
A function which checks for internal consistency.
const std::shared_ptr< HDF5Group > & group() const
Return the current HDF5Group object.
HDF5Lattice()
The default constructor creates an HDF5Lattice that is useless for just about everything,...
HDF5Lattice(const std::shared_ptr< HDF5File > &file, const String &arrayName, const String &groupName=String())
Reconstruct from a pre-existing HDF5Lattice in the HDF5 file and group with the given name.
HDF5Lattice(const TiledShape &shape, const std::shared_ptr< HDF5File > &file, const String &arrayName, const String &groupName=String())
Construct a new HDF5Lattice, with the specified shape, in the given HDF5 file.
virtual 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 a ...
HDF5Lattice(const String &fileName, const String &arrayName="array", const String &groupName=String())
Reconstruct from a pre-existing HDF5Lattice in the HDF5 file and group with the given names.
virtual void flush()
Flush the data (but do not unlock).
virtual T getAt(const IPosition &where) const
Return the value of the single element located at the argument IPosition.
std::shared_ptr< HDF5Group > itsGroup
virtual Bool doGetSlice(Array< T > &buffer, const Slicer §ion)
Do the actual getting of an array of values.
virtual void doPutSlice(const Array< T > &sourceBuffer, const IPosition &where, const IPosition &stride)
Do the actual getting of an array of values.
HDF5Lattice< T > & operator=(const HDF5Lattice< T > &other)
The assignment operator with reference semantics.
virtual Bool isPersistent() const
A HDF5Lattice is always persistent.
void checkWritable() const
Check if the file is writable.
virtual IPosition doNiceCursorShape(uInt maxPixels) const
Get the best cursor shape.
std::shared_ptr< HDF5DataSet > itsDataSet
HDF5Lattice(const HDF5Lattice< T > &other)
The copy constructor which uses reference semantics.
const std::shared_ptr< HDF5File > & file() const
Return the current HDF5File object.
HDF5Lattice(const TiledShape &shape, const String &filename, const String &arrayName="array", const String &groupName=String())
Construct a new HDF5Lattice with the specified shape.
void makeArray(const TiledShape &shape, const String &arrayName, const String &groupName)
Make the Array in the HDF5 file and group.
virtual String name(Bool stripPath=False) const
Return the current HDF5 file name.
const String & arrayName() const
Returns the name of this HDF5Lattice.
void openArray(const String &arrayName, const String &groupName)
Open the Array in the HDF5 file and group.
HDF5Lattice(const TiledShape &shape)
Construct a temporary HDF5Lattice with the specified shape.
virtual Bool isPaged() const
A HDF5Lattice is always paged to disk.
virtual Bool isWritable() const
Is the HDF5Lattice writable?
virtual uInt advisedMaxPixels() const
Returns the maximum recommended number of pixels for a cursor.
std::shared_ptr< HDF5File > itsFile
virtual void setCacheSizeInTiles(uInt howManyTiles)
Set the actual cache size for this Array to be big enough for the indicated number of tiles.
virtual Lattice< T > * clone() const
Make a copy of the object (reference semantics).
virtual uInt ndim() const
Return the number of axes in this Lattice.
String: the storage and methods of handling collections of characters.
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.