ParallelBitSeries.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2023 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // dspsr/Kernel/Classes/dsp/ParallelBitSeries.h
10 
11 #ifndef __dsp_Kernel_Classes_ParallelBitSeries_h
12 #define __dsp_Kernel_Classes_ParallelBitSeries_h
13 
14 #include "dsp/BitSeries.h"
15 
16 namespace dsp {
17 
19  class ParallelBitSeries : public Observation
20  {
21 
22  public:
23 
26 
28  void resize (unsigned N);
29 
31  unsigned size () { return bitseries.size(); }
32  const unsigned size () const { return bitseries.size(); }
33 
35  BitSeries* at (unsigned i) { return bitseries.at(i); }
36  const BitSeries* at (unsigned i) const { return bitseries.at(i); }
37 
38  void set_memory (Memory*);
39  Memory* get_memory () { return memory; }
40 
42  unsigned get_request_offset () const;
43 
45  uint64_t get_request_ndat () const;
46 
48  int64_t get_input_sample (Input* input = 0) const;
49 
51  void copy_configuration (const Observation* copy);
52 
53  protected:
54 
55  std::vector< Reference::To<BitSeries> > bitseries;
56 
59  };
60 
61 } // namespace dsp
62 
63 #endif // !defined(__dsp_Kernel_Classes_ParallelBitSeries_h)
64 
Reference::To< Memory > memory
The memory manager.
Definition: ParallelBitSeries.h:68
unsigned size()
Return the number of BitSeries objects.
Definition: ParallelBitSeries.h:41
Pure virtual base class of all objects that can load BitSeries data.
Definition: Input.h:31
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
int64_t get_input_sample(Input *input=0) const
Return the sample offset from the start of the data source.
Definition: ParallelBitSeries.C:53
virtual void copy(const Observation *obs)
Same as operator= but takes a pointer.
Definition: Observation.h:57
void copy_configuration(const Observation *copy)
Copy the configuration of another Observation (not the data)
Definition: ParallelBitSeries.C:58
unsigned get_request_offset() const
Offset (owing to resolution) to the requested time sample.
Definition: ParallelBitSeries.C:43
Stores information about digital, band-limited, time-varying signals.
Definition: Observation.h:33
void resize(unsigned N)
Create and manage N BitSeries objects.
Definition: ParallelBitSeries.C:18
A container for storing digitized (generally not floating point) data
Definition: BitSeries.h:35
uint64_t get_request_ndat() const
Number of time samples requested.
Definition: ParallelBitSeries.C:48
ParallelBitSeries()
Constructor.
Definition: ParallelBitSeries.C:12
Pure virtual base class of objects that manage memory allocation and destruction.
Definition: Memory.h:23
BitSeries * at(unsigned i)
Get the ith BitSeries instance.
Definition: ParallelBitSeries.h:45

Generated using doxygen 1.8.17