hdf5FileWrite

class hdf5FileWrite : public kotekan::Stage

Stream a buffer to disk.

Buffers:

  • in_buf Buffer to write to disk.

    • Format: Any

    • Metadata: chord or N2

Metrics

  • kotekan_hdf5filewrite_write_time_seconds The write time to write out the last frame.

Author

Erik Schnetter

Param base_dir:

String. Directory to write into.

Param file_name:

String. Base filename to write.

Param prefix_hostname:

Bool. Prepend hostname to output file names. Default: true.

Param prefix_host_rank:

Bool. Prepend rank to output file names. Default: false.

Param frequency_pool_rank:

Int. This stage’s rank in the frequency pool.

Param frequency_pool_size:

Int. Number of stages in the frequency pool.

Param max_frames:

Int. Stop writing after this many frames, Default 0 = unlimited frames.

Param skip_writing:

Bool. Do not actually write anything. Default: false.

Param create_single_file:

Bool. Write all data to one single file.

Param write_x_frames:

Int. Write the first X out of every Y frames (see per_y_frames). Default: -1 (disabled).

Param per_y_frames:

Int. Period Y for frame decimation (see write_x_frames). Default: -1 (disabled).

Public Functions

inline hdf5FileWrite(kotekan::Config &config, const std::string &unique_name, kotekan::bufferContainer &buffer_container)
inline virtual ~hdf5FileWrite()
inline std::shared_ptr<File> create_file(const std::int64_t frame_counter) const
inline void write_chord(const std::uint8_t *const frame, const std::shared_ptr<const chordMetadata> &meta, const std::shared_ptr<const kotekan::GenericNDArray> &frame_desc, const std::int64_t frame_counter)

Create and write a file for a frame with chordMetadata.

Parameters:
  • full_path – The full path, including file name, for the file.

  • frame – uint8_t pointer to the frame data

  • meta – shared pointer to the chordMetadata object for this frame.

  • frame_desc – shared pointer to the NDarray description for this frame.

inline void write_n2(const N2FrameView &frame, const std::int64_t frame_counter)

Create and write a file for an N2FrameView.

Parameters:
  • full_path – The full path, including file name, for the file.

  • frame – An N2FrameView object for the frame to output.

inline RawPropertyList<PropertyType::DATASET_CREATE> make_chunked_props(const std::vector<size_t> &dims)

Build a property list for dataset creation that enables compression and chunking.

Parameters:

dims – The dataset dimensions.

Returns:

RawPropertyList<PropertyType::DATASET_CREATE> The property list.

inline virtual void main_thread() override

The main thread function for hdf5FileWrite.

This function is responsible for the main logic of the hdf5FileWrite class.