32 #ifndef BASE_OUTPUT_STREAM_H 33 #define BASE_OUTPUT_STREAM_H 88 float* bufferToReuse =
nullptr);
104 virtual void create() = 0;
107 virtual void reopen() = 0;
110 virtual void sample() = 0;
119 virtual void close() = 0;
Calculate root mean square.
The class for real matrices.
virtual void freeMemory()
Free memory.
virtual ~BaseOutputStream()
Destructor.
std::string mRootObjectName
HDF5 group/dataset in the output file where to store data in.
The header file containing the HDF5 related classes.
const ReduceOperator mReduceOp
Reduction operator.
virtual void close()=0
Close stream (apply post-processing if necessary, flush data and close).
The header file containing the class for real matrices.
virtual void allocateMemory()
Allocate memory using proper memory alignment.
virtual void sample()=0
Sample data into buffer, apply reduction or flush to disk - based on a sensor mask.
virtual void postProcess()
Apply post-processing on the buffer and flush it to the file.
Store actual data (time series).
Class wrapping the HDF5 routines.
size_t mBufferSize
Buffer size.
The header file containing the class for 64b integer matrices.
const std::string MatrixName
Datatype for matrix names.
Hdf5File & mFile
Handle to HDF5 output file.
const RealMatrix & mSourceMatrix
Source matrix to be sampled.
virtual void reopen()=0
Reopen the output stream after restart.
float * mStoreBuffer
Temporary buffer for store - only if Buffer Reuse = false!
ReduceOperator
How to aggregate data.
BaseOutputStream & operator=(const BaseOutputStream &src)
Operator = not allowed (we don't want any data movements).
BaseOutputStream()=delete
Default constructor not allowed.
static constexpr size_t kChunkSize4MB
chunk size of 4MB in number of float elements.
Abstract base class for output data streams (sampled data).
virtual void create()=0
Create a HDF5 stream and allocate data for it.
virtual void checkpoint()=0
Checkpoint the stream.
bool mBufferReuse
if true, the container reuses another matrix as scratch place, e.g. Temp_1_RS3D, Temp_2_RS3D, Temp_3_RS3D.