3 #include "../ScopeDefines.h"
23 typedef std::vector<uint16_t>::iterator
iterator;
26 std::vector<uint16_t>
data;
34 DaqChunk(
const uint32_t& _perchannel,
const uint32_t& _nchannels,
const uint32_t& _area);
42 virtual void Downsample(
const uint32_t& _factor);
45 virtual void Scale(
const double& _factor);
49 uint32_t Area()
const {
return area; }
50 uint32_t NChannels()
const {
return nchannels; }
51 uint32_t PerChannel()
const {
return perchannel; }
52 iterator GetLastMapped(
const uint32_t& _channel)
const {
return lastmapped[_channel]; }
57 void SetLastMapped(
const uint32_t& _channel,
const iterator& _last) { lastmapped[_channel] = _last; }
62 typedef std::shared_ptr<DaqChunk> DaqChunkPtr;
64 typedef std::vector<DaqChunkPtr> DaqAreaChunks;
66 typedef std::shared_ptr<DaqAreaChunks> DaqAreaChunksPtr;
std::vector< iterator > lastmapped
Iterators to positions that was last mapped.
std::vector< uint16_t >::iterator iterator
Iterator over the data vector.
uint32_t perchannel
Number of samples per channel.
const uint32_t area
Area of the DaqChunk.
std::vector< uint16_t > data
The data vector.
A DaqChunk contains data from all channels sequentially.
DaqChunk(const uint32_t &_perchannel, const uint32_t &_nchannels, const uint32_t &_area)
virtual void Downsample(const uint32_t &_factor)
Downsamples by averaging _factor samples.
virtual ~DaqChunk()
Virtual destructor here, to be prepared for derived classes.
virtual void Scale(const double &_factor)
Multiplies every sample by _factor.
const uint32_t nchannels
Number of channels in that area/DaqChunk.