SingleFile.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 #ifndef __dsp_Kernel_Classes_SingleFile_h
10 #define __dsp_Kernel_Classes_SingleFile_h
11 
12 #include "dsp/ParallelInput.h"
13 
14 namespace dsp {
15 
17  class SingleFile : public ParallelInput
18  {
19  public:
20  SingleFile ();
21  ~SingleFile ();
22 
24  bool matches (const std::string& descriptor) const override;
25 
27  void open (const std::string& descriptor) override;
28 
30  void load (ParallelBitSeries*) override;
31 
33  uint64_t get_block_size () const override;
35  void set_block_size (uint64_t _size) override;
36 
38  uint64_t get_overlap () const override;
40  void set_overlap (uint64_t _overlap) override;
41 
43  unsigned get_resolution () const override;
44  };
45 
46 }
47 
48 #endif // !defined(__dsp_Kernel_Classes_SingleFile_h)
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
static File * create(const char *filename)
Return a pointer to a new instance of the appropriate sub-class.
Definition: File.C:67
void set_overlap(uint64_t _overlap) override
Set the number of time samples by which consecutive blocks overlap.
Definition: SingleFile.C:99
void copy_configuration(const Observation *copy)
Copy the configuration of another Observation (not the data)
Definition: ParallelBitSeries.C:58
uint64_t get_block_size() const override
Return the number of time samples to load on each load_block.
Definition: SingleFile.C:81
bool matches(const std::string &descriptor) const override
Return true if descriptor describes a file that can be opened.
Definition: SingleFile.C:39
Checks for expected string in a data file.
Definition: Expect.h:17
virtual void load(ParallelBitSeries *)
Load BitSeries data.
Definition: ParallelInput.C:105
void set_block_size(uint64_t _size) override
Set the number of time samples to load on each load_block.
Definition: SingleFile.C:87
void load(ParallelBitSeries *) override
Load BitSeries data.
Definition: SingleFile.C:71
uint64_t get_overlap() const override
Return the number of time samples by which consecutive blocks overlap.
Definition: SingleFile.C:93
unsigned get_resolution() const override
Get the time sample resolution of the data source.
Definition: SingleFile.C:106
Manages an array of BitSeries to be process in parallel.
Definition: ParallelBitSeries.h:24
BitSeries * at(unsigned i)
Get the ith BitSeries instance.
Definition: ParallelBitSeries.h:45
void open(const std::string &descriptor) override
Open the file.
Definition: SingleFile.C:54

Generated using doxygen 1.8.17