Mark5File.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2005 by Haydon Knight
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 #ifndef __Mark5File_h
10 #define __Mark5File_h
11 
12 #include "dsp/BlockFile.h"
13 
14 namespace dsp {
15 
17  class Mark5File : public BlockFile
18  {
19  public:
20 
22  Mark5File (const char* filename=0, const char* headername=0);
23 
25  ~Mark5File ();
26 
28  bool is_valid (const char* filename) const;
29 
30  protected:
31 
32  friend class Mark5Unpacker;
33  friend class Mark5TwoBitCorrection;
34 
36  void open_file (const char* filename);
37 
39  void reopen ();
40 
41  int64_t load_bytes (unsigned char* buffer, uint64_t nbytes);
42 
43  int64_t seek_bytes (uint64_t bytes);
44 
45  void* stream;
46 
47  uint64_t reopen_seek;
48 
49  };
50 
51 }
52 
53 #endif // !defined(__Mark5File_h)
~Mark5File()
Destructor.
Definition: Mark5File.C:36
unsigned resolution
Time sample resolution of the data source.
Definition: Input.h:178
Converts Mark5 data from 2-bit digitized to floating point values.
Definition: Mark5TwoBitCorrection.h:26
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
static bool can_do(const Observation *observation)
Return true if Mark5TwoBitCorrection can convert the Observation.
Definition: Mark5TwoBitCorrection.C:21
Loads BitSeries data from a file organized in blocks.
Definition: BlockFile.h:25
int64_t load_bytes(unsigned char *buffer, uint64_t nbytes)
Definition: Mark5File.C:259
bool is_valid(const char *filename) const
Returns true if filename is a valid Mk5 file.
Definition: Mark5File.C:41
void open_file(const char *filename)
Open the file.
Definition: Mark5File.C:63
Interface to Walter Brisken's upacker for Mark5 VLBA/Mark4 files.
Definition: Mark5Unpacker.h:22
Mark5File(const char *filename=0, const char *headername=0)
Construct and open file
Definition: Mark5File.C:30
void reopen()
Reopen the file.
Definition: Mark5File.C:380
int64_t seek_bytes(uint64_t bytes)
Set the file pointer to the absolute number of sampled data bytes.
Definition: Mark5File.C:368

Generated using doxygen 1.8.17