Class SegmentProducer

Nested Relationships

Nested Types

Inheritance Relationships

Derived Types

Class Documentation

class SegmentProducer

Interface for reading blocks of voltage data and weights.

This pure virtual base class implements an interface to data+weights that can be from any source, including file (see FileSegmentProducer), artificial signal generator (see SegmentGenerator) or ring buffer (in principal)

Subclassed by ska::pst::common::BlockSegmentProducer, ska::pst::common::SegmentGenerator

Public Functions

virtual ~SegmentProducer() = default

Pure virtual destructor.

virtual const ska::pst::common::AsciiHeader &get_data_header() const = 0

Get the AsciiHeader that describes the data block stream.

Returns

const ska::pst::common::AsciiHeader& header of the data block stream

virtual const ska::pst::common::AsciiHeader &get_weights_header() const = 0

Get the AsciiHeader that describes the weights block stream.

Returns

const ska::pst::common::AsciiHeader& header of the weights block stream

virtual Segment next_segment() = 0

Get the next segment of data and weights.

The returned Segment contains the next blocks of data and weights. Each Block includes the base pointer of an array and the size, in bytes, of that array. End of data is indicated by a Block in which the pointers are set to nullptr and the sizes are set to zero.

class Segment

Container of data and weights blocks.

Public Functions

inline size_t get_obs_offset() const

The offset, in bytes, of the data block, from the start of the stream.

Public Members

BlockProducer::Block data

Data block.

BlockProducer::Block weights

Weights block.