source: trunk/src/STFiller.h@ 3149

Last change on this file since 3149 was 3106, checked in by Takeshi Nakazato, 8 years ago

New Development: No

JIRA Issue: No

Ready for Test: Yes/No

Interface Changes: Yes/No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...


Check-in asap modifications from Jim regarding casacore namespace conversion.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 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"
[2]26
[2658]27
[2]28class PKSreader;
[1819]29class NROReader;
[2]30
[83]31namespace asap {
[2]32
[805]33/**
34This class fills a Scantable from external data formats using the PKSReader class.
35
[846]36@brief A filler object for data import into Scantable
[805]37@author Malte Marquarding
38@date 2006/01/16
39@version 2.0a
40*/
[2658]41class STFiller {
[2]42public:
43
[846]44 /**
45 * Default constructor
46 */
[805]47 STFiller();
[2]48
[846]49
50 /**
51 * Constructor taking an existing Scantable to fill
52 * @param stbl
53 */
[3106]54 explicit STFiller(casacore::CountedPtr< Scantable > stbl);
[2]55
56
[805]57 /**
58 * A constructor for a filler with associated input file
59 * @param filename the input file (rpf,sdfite or ms)
60 * @param whichIF read a specific IF only (default -1 means all IFs)
61 * @param whichBeam read a specific beam only (default -1 means all beams)
62 */
[1353]63 explicit STFiller( const std::string& filename, int whichIF=-1,
[1819]64 int whichBeam=-1 );
[2]65
[846]66 /**
67 * Destructor
68 */
[996]69 virtual ~STFiller();
[717]70
[805]71 /**
72 * associate the Filler with a file on disk
73 * @param filename the input file (rpf,sdfite or ms)
74 * @param whichIF read a specific IF only (default -1 means all IFs)
75 * @param whichBeam read a specific beam only (default -1 means all beams)
76 * @exception AipsError Creation of PKSreader failed
77 */
[3106]78 void open( const std::string& filename, const std::string& antenna, int whichIF=-1, int whichBeam=-1, casacore::Bool getPt=casacore::False );
[805]79
80 /**
[846]81 * detach from file and clean up pointers
[805]82 */
83 void close( );
84
85 /**
86 * Read in "rows" from the source file attached with open()
87 * @return a status flag passed on by PKSreader
[846]88 *
89 * @li @c 0: ok
90 * @li >0: failed
[805]91 */
92 int read( );
93
[3106]94 casacore::CountedPtr<Scantable> getTable() const { return table_;}
[805]95
[1819]96 /**
97 * For NRO data
98 *
99 * 2008/11/11 Takeshi Nakazato
100 *
101 * openNRO : NRO version of open(), which performs to open file and
102 * read header data.
103 *
104 * readNRO : NRO version of read(), which performs to read scan
105 * records.
106 *
107 * fileCheck: Identify a type (NRO data or not) of filename_.
108 **/
109 void openNRO( int whichIF=-1, int whichBeam=-1 ) ;
110 int readNRO() ;
[3106]111 casacore::Bool fileCheck() ;
[1819]112
[1504]113 void setReferenceExpr(const std::string& rx) { refRx_ = rx; }
114
[2]115private:
[805]116
117 PKSreader* reader_;
[901]118 STHeader* header_;
[3106]119 casacore::String filename_;
120 casacore::CountedPtr< Scantable > table_;
121 casacore::Int nIF_, nBeam_, /* nPol_, nChan_,*/ nInDataRow;
122 casacore::uInt ifOffset_, beamOffset_;
123 casacore::Vector<casacore::Bool> haveXPol_;
124 casacore::String refRx_;
[1819]125 NROReader *nreader_ ;
[3106]126 casacore::Bool isNRO_ ;
[2]127};
128
[805]129} // namespace
130
[2]131#endif
Note: See TracBrowser for help on using the repository browser.