33 #ifndef CUBOID_OUTPUT_STREAM_H 34 #define CUBOID_OUTPUT_STREAM_H 70 float* bufferToReuse =
nullptr);
102 virtual void close();
128 template<BaseOutputStream::ReduceOperator reduceOp>
The class for real matrices.
std::vector< CuboidInfo > mCuboidsInfo
vector keeping handles and positions of all cuboids.
virtual ~CuboidOutputStream()
Destructor.
virtual void flushBufferToFile()
Flush the buffer to the file.
CuboidOutputStream()=delete
Default constructor not allowed.
const IndexMatrix & mSensorMask
Sensor mask to sample data.
virtual void sample()
Sample data into buffer and apply reduction, or flush to disk - based on a sensor mask...
void sampleAggregated()
Sample aggregated values.
virtual void close()
Close stream (apply post-processing if necessary, flush data and close).
CuboidOutputStream & operator=(const CuboidOutputStream &)=delete
operator= is not allowed.
hid_t mGroup
Handle to a HDF5 dataset.
Class wrapping the HDF5 routines.
hid_t cuboidId
Id of the dataset storing the given cuboid.
const std::string MatrixName
Datatype for matrix names.
size_t mSampledTimeStep
Timestep to store (N/A for aggregated).
virtual void checkpoint()
Checkpoint the stream and close.
virtual void postProcess()
Apply post-processing on the buffer and flush it to the file.
virtual void create()
Create a HDF5 stream and allocate data for it.
size_t startingPossitionInBuffer
Having a single buffer for all cuboids, where this one starts.
ReduceOperator
How to aggregate data.
virtual hid_t createCuboidDataset(const size_t cuboidIdx)
Create a new dataset for a given cuboid specified by index (order).
virtual void reopen()
Reopen the output stream after restart and reload data.
The header file of the class saving RealMatrix data into the output HDF5 file.
This structure information about a HDF5 dataset (one cuboid).
The class for 64b unsigned integers (indices). It is used for linear and cuboid corners masks to get ...
Abstract base class for output data streams (sampled data).
Output stream for quantities sampled by a cuboid corner sensor mask.