DADAFile.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2005 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // dspsr/Kernel/Classes/dsp/DADAFile.h
10 
11 #ifndef __DADAFile_h
12 #define __DADAFile_h
13 
14 #include "dsp/File.h"
15 
16 namespace dsp {
17 
19  class DADAFile : public File
20  {
21 
22  public:
23 
25  DADAFile (const char* filename=0);
26 
28  bool is_valid (const char* filename) const;
29 
31  const char* get_header () const { return dada_header.c_str(); }
32 
33  protected:
34 
36  virtual void open_file (const char* filename);
37 
39  std::string get_header (const char* filename) const;
40 
42  mutable bool separate_header_file;
43 
45  std::string dada_header;
46  };
47 
48 }
49 
50 #endif // !defined(__DADAFile_h)
51 
uint64_t get_block_bytes() const
Get the total number of bytes in each block (header + data + tailer)
Definition: BlockSize.h:61
const char * get_header() const
Return the immutable DADA ASCII header loaded from filename.
Definition: DADAFile.h:41
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
bool separate_header_file
Flag set true when the header information is in a separate text file.
Definition: DADAFile.h:52
Loads BitSeries data from file.
Definition: File.h:38
virtual void open_file(const char *filename)
Open the file.
Definition: DADAFile.C:151
std::string dada_header
ASCII header loaded from file.
Definition: DADAFile.h:55
virtual void open(const char *filename)
Open the file.
Definition: File.C:120
Sizes of header, data, and tailer of data that are divided in blocks / frames / heaps.
Definition: BlockSize.h:24
DADAFile(const char *filename=0)
Construct and open file.
Definition: DADAFile.C:26
const float version
The baseband/dsp version number.
Definition: dsp.C:19
const std::string get_message() const
bool is_valid(const char *filename) const
Returns true if filename appears to name a valid DADA file.
Definition: DADAFile.C:113
Parses Observation attributes from an ASCII header.
Definition: ASCIIObservation.h:29

Generated using doxygen 1.8.17