areaDetector 3-14
EPICS areaDetector framework
NDFileHDF5Dataset.h
Go to the documentation of this file.
1#ifndef NDFILEHDF5DATASET_H_
2#define NDFILEHDF5DATASET_H_
3
4#include <string>
5#include <hdf5.h>
6#include <NDPluginAPI.h>
7#include "NDPluginFile.h"
9
13{
14 public:
15 NDFileHDF5Dataset(asynUser *pAsynUser, const std::string& name, hid_t dataset);
16 virtual ~NDFileHDF5Dataset();
17
18 asynStatus configureDims(NDArray *pArray, bool multiframe, int extradimensions, int *extra_dims, int *extra_dim_chunking, int *user_chunking);
19 asynStatus extendDataSet(int extradims);
20 asynStatus extendDataSet(int extradims, hsize_t *offsets);
21 asynStatus verifyChunking(NDArray *pArray);
22 void configureCompression(Codec_t codec);
23 asynStatus writeFile(NDArray *pArray, hid_t datatype, hid_t dataspace, hsize_t *framesize);
24 hid_t getHandle();
25 asynStatus flushDataset();
26 hsize_t getDim(int index);
27 hsize_t getMaxDim(int index);
28 hsize_t getOffset(int index);
29 hsize_t getVirtualDim(int index);
30
31 private:
32
33 asynUser *pAsynUser_; // Pointer to the asynUser structure
34 std::string name_; // Name of this dataset
35 hid_t dataset_; // Dataset handle
36 int nextRecord_;
37 bool multiFrame_; // Whether this is a multi frame dataset
38 int rank_; // number of dimensions
39 int extra_rank_; // number of extra dimensions
40 hsize_t *dims_; // Array of current dimension sizes. This updates as various dimensions grow.
41 hsize_t *chunkdims_; // Array of current configured chunk dimension sizes.
42 hsize_t *maxdims_; // Array of maximum dimension sizes. The value -1 is HDF5 term for infinite.
43 hsize_t *offset_; // Array of current offset in each dimension. The frame dimensions always have
44 // 0 offset but additional dimensions may grow as new frames are added.
45 hsize_t *virtualdims_; // The desired sizes of the extra (virtual) dimensions: {Y, X, n}
46 hsize_t *virtualchunkdims_; // The chunk sizes of the extra (virtual) dimensions: {Y, X, n}
47 Codec_t codec; // Definition of codec used to compress the data.
48};
49
50
51#endif
52
#define NDPLUGIN_API
Definition NDPluginAPI.h:41
N-dimensional array class; each array has a set of dimensions, a data type, pointer to data,...
Definition NDArray.h:99
Class used for writing a Dataset with the NDFileHDF5 plugin.
Definition NDFileHDF5Dataset.h:13
Definition Codec.h:20