source: branches/alma/src/STFiller.h@ 1410

Last change on this file since 1410 was 1388, checked in by TakTsutsumi, 17 years ago

merged from NRAO version of ASAP2.1 with ALMA specific modifications

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
RevLine 
[805]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
[2]14
15#include <vector>
16#include <string>
17
[81]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>
[2]23
[805]24#include "Scantable.h"
[901]25#include "STHeader.h"
[894]26#include "Logger.h"
[2]27
28class PKSreader;
29
[83]30namespace asap {
[2]31
[805]32/**
33This class fills a Scantable from external data formats using the PKSReader class.
34
[846]35@brief A filler object for data import into Scantable
[805]36@author Malte Marquarding
37@date 2006/01/16
38@version 2.0a
39*/
[890]40class STFiller : public Logger {
[2]41public:
42
[846]43 /**
44 * Default constructor
45 */
[805]46 STFiller();
[2]47
[846]48
49 /**
50 * Constructor taking an existing Scantable to fill
51 * @param stbl
52 */
[1353]53 explicit STFiller(casa::CountedPtr< Scantable > stbl);
[2]54
55
[805]56 /**
57 * A constructor for a filler with associated input file
58 * @param filename the input file (rpf,sdfite or ms)
59 * @param whichIF read a specific IF only (default -1 means all IFs)
60 * @param whichBeam read a specific beam only (default -1 means all beams)
61 */
[1353]62 explicit STFiller( const std::string& filename, int whichIF=-1,
[805]63 int whichBeam=-1 );
[2]64
[846]65 /**
66 * Destructor
67 */
[996]68 virtual ~STFiller();
[717]69
[805]70 /**
71 * associate the Filler with a file on disk
72 * @param filename the input file (rpf,sdfite or ms)
73 * @param whichIF read a specific IF only (default -1 means all IFs)
74 * @param whichBeam read a specific beam only (default -1 means all beams)
75 * @exception AipsError Creation of PKSreader failed
76 */
77 void open( const std::string& filename, int whichIF=-1, int whichBeam=-1 );
78
79 /**
[846]80 * detach from file and clean up pointers
[805]81 */
82 void close( );
83
84 /**
85 * Read in "rows" from the source file attached with open()
86 * @return a status flag passed on by PKSreader
[846]87 *
88 * @li @c 0: ok
89 * @li >0: failed
[805]90 */
91 int read( );
92
93 casa::CountedPtr<Scantable> getTable() const { return table_;}
94
[2]95private:
[805]96
97 PKSreader* reader_;
[901]98 STHeader* header_;
[125]99 casa::String filename_;
[805]100 casa::CountedPtr< Scantable > table_;
[1388]101 casa::Int nIF_, nBeam_, nPol_, nChan_, nInDataRow;
[805]102 casa::uInt ifOffset_, beamOffset_;
[1060]103 casa::Vector<casa::Bool> haveXPol_;
[2]104};
105
[805]106} // namespace
107
[2]108#endif
Note: See TracBrowser for help on using the repository browser.