Dump.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2009 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 #ifndef __dsp_Dump_h_
10 #define __dsp_Dump_h_
11 
12 #include "dsp/Sink.h"
13 #include "dsp/TimeSeries.h"
14 
15 #include "FilePtr.h"
16 
17 namespace dsp {
18 
20 
22  class Dump : public Sink<TimeSeries>
23  {
24  public:
25 
27  Dump (const char* name = "Dump");
28  ~Dump ();
29 
31  void set_output (FILE*);
32 
34  void set_output_binary (bool flag=true);
35 
37  void prepare ();
38 
40 
41  protected:
42 
44  void calculation ();
45 
46  FilePtr output;
47  bool binary;
48  };
49 
50 }
51 
52 #endif
53 
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
void prepare()
In binary mode, write an ASCII (DADA) header.
Definition: Dump.C:40
virtual void set_machine(const std::string &_m)
Set the instrument used to record signal.
Definition: Observation.h:192
void set_output(FILE *)
Set the output stream to which data will be dumped.
Definition: Dump.C:28
std::string name
Operation name.
Definition: Operation.h:153
Arrays of consecutive samples for each polarization and frequency channel.
Definition: TimeSeries.h:29
Defines the interface to operations that terminate on input.
Definition: Sink.h:26
Operation::Function get_function() const
Get the function classification of this operation.
Definition: Dump.h:49
Dumps TimeSeries data to file in either binary or ascii format.
Definition: Dump.h:27
void unload(char *header)
Write an ASCII header block.
Definition: ASCIIObservation.C:563
void set_output_binary(bool flag=true)
Set the flag to output binary data.
Definition: Dump.C:35
@ Structural
operations that process data
Definition: Operation.h:117
Parses Observation attributes from an ASCII header.
Definition: ASCIIObservation.h:29
Dump(const char *name="Dump")
Null constructor.
Definition: Dump.C:17
Function
The function of the operator.
Definition: Operation.h:113
void calculation()
Write to the open file descriptor.
Definition: Dump.C:68

Generated using doxygen 1.8.17