source: trunk/src/SDReader.h@ 27

Last change on this file since 27 was 18, checked in by mmarquar, 20 years ago

Moved SDHeader from SDReader to SDConatiner. Added header to SDMemTable. Added access funtions to nif,nbema,npol,nchan

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
RevLine 
[2]1//#---------------------------------------------------------------------------
2//# SDReader.h: A class to read single dish spectra from SDFITS, RPFITS
3//#---------------------------------------------------------------------------
4//# Copyright (C) 2004
5//# Malte Marquarding, ATNF
6//#
7//# This program is free software; you can redistribute it and/or modify it
8//# under the terms of the GNU General Public License as published by the Free
9//# Software Foundation; either version 2 of the License, or (at your option)
10//# any later version.
11//#
12//# This program is distributed in the hope that it will be useful, but
13//# WITHOUT ANY WARRANTY; without even the implied warranty of
14//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
15//# Public License for more details.
16//#
17//# You should have received a copy of the GNU General Public License along
18//# with this program; if not, write to the Free Software Foundation, Inc.,
19//# 675 Massachusetts Ave, Cambridge, MA 02139, USA.
20//#
21//# Correspondence concerning this software should be addressed as follows:
22//# Internet email: Malte.Marquarding@csiro.au
23//# Postal address: Malte Marquarding,
24//# Australia Telescope National Facility,
25//# P.O. Box 76,
26//# Epping, NSW, 2121,
27//# AUSTRALIA
28//#
29//# $Id:
30//#---------------------------------------------------------------------------
31#ifndef _SDREADER_H_
32#define _SDREADER_H_
33
34#include <vector>
35#include <string>
36
37#include <aips/aips.h>
38#include <aips/iostream.h>
39#include <aips/iomanip.h>
40#include <aips/Utilities/CountedPtr.h>
41#include <aips/Utilities/String.h>
42#include <aips/Arrays/Vector.h>
43
44#include "SDMemTable.h"
[18]45#include "SDContainer.h"
[2]46
47class PKSreader;
48
49namespace atnf_sd {
50
51class SDReader {
52public:
53 SDReader();
54 SDReader(CountedPtr<SDMemTable> tbl);
55 virtual ~SDReader();
56
57 void open(const std::string& filename);
58 int read(const std::vector<int>& seq);
59
60 CountedPtr<SDMemTable> getTable() const { return table_;}
61
62 void reset();
63
64 std::vector<int> pseudoHeader() const {
65 std::vector<int> v;
66 v.push_back(nBeam_);v.push_back(nIF_);
67 v.push_back(nChan_);v.push_back(nPol_);
68 return v;
69 }
70
71protected:
72
73private:
[16]74 Int nBeam_,nIF_,nPol_,nChan_;
[2]75 PKSreader* reader_;
76 SDHeader header_;
77 CountedPtr<SDMemTable> table_;
78 String filename_;
79 uInt cursor_;
80 Double timestamp_;
81};
82
83}// namespace
84#endif
Note: See TracBrowser for help on using the repository browser.