source: trunk/src/STFiller.h @ 805

Last change on this file since 805 was 805, checked in by mar637, 18 years ago

Code replacemnts after the rename

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1//
2// C++ Interface: STFiller
3//
4// Description:
5//
6//
7// Author: Malte Marquarding <asap@atnf.csiro.au>, (C) 2006
8//
9// Copyright: See COPYING file that comes with this distribution
10//
11//
12#ifndef STFILLER_H
13#define STFILLER_H
14
15#include <vector>
16#include <string>
17
18#include <casa/aips.h>
19#include <casa/iostream.h>
20#include <casa/Utilities/CountedPtr.h>
21#include <casa/BasicSL/String.h>
22#include <casa/Arrays/Vector.h>
23
24#include "Scantable.h"
25#include "SDContainer.h"
26#include "SDLog.h"
27
28class PKSreader;
29
30namespace asap {
31
32/**
33This class fills a Scantable from external data formats using the PKSReader class.
34
35@author   Malte Marquarding
36@date     2006/01/16
37@version  2.0a
38*/
39class STFiller : public SDLog {
40public:
41
42  STFiller();
43
44  STFiller(casa::CountedPtr< Scantable > stbl);
45
46
47  /**
48    * A constructor for a filler with associated input file
49    * @param filename the input file (rpf,sdfite or ms)
50    * @param whichIF read a specific IF only (default -1 means all IFs)
51    * @param whichBeam read a specific beam only (default -1 means all beams)
52    */
53  STFiller( const std::string& filename, int whichIF=-1,
54                  int whichBeam=-1 );
55
56  ~STFiller();
57
58  /**
59   * associate the Filler with a file on disk
60   * @param filename the input file (rpf,sdfite or ms)
61   * @param whichIF read a specific IF only (default -1 means all IFs)
62   * @param whichBeam read a specific beam only (default -1 means all beams)
63   * @exception AipsError Creation of PKSreader failed
64   */
65  void open( const std::string& filename, int whichIF=-1, int whichBeam=-1 );
66
67  /**
68   * detatch from file
69   */
70  void close( );
71
72  /**
73   * Read in "rows" from the source file attached with open()
74   * @return a status flag passed on by PKSreader
75   */
76  int read( );
77
78  casa::CountedPtr<Scantable> getTable() const { return table_;}
79
80private:
81
82  PKSreader* reader_;
83  SDHeader* header_;
84  casa::String filename_;
85  casa::CountedPtr< Scantable > table_;
86  casa::Int nIF_, nBeam_, nPol_, nChan_;
87  casa::uInt ifOffset_, beamOffset_;
88  casa::Bool haveXPol_;
89};
90
91} // namespace
92
93#endif
Note: See TracBrowser for help on using the repository browser.