source: trunk/src/STHeader.h@ 1431

Last change on this file since 1431 was 1030, checked in by mar637, 19 years ago

Various fixes to make >=gcc-3.4 compliant

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
RevLine 
[2]1//#---------------------------------------------------------------------------
[901]2//# STHeader.h: A container class for single dish integrations
[2]3//#---------------------------------------------------------------------------
4//# Copyright (C) 2004
[125]5//# ATNF
[2]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//#
[1030]29//# $Id:$
[2]30//#---------------------------------------------------------------------------
[901]31#ifndef STHEADER_H
32#define STHEADER_H
[2]33
[18]34#include <vector>
35
[81]36#include <casa/aips.h>
37#include <casa/BasicSL/String.h>
38#include <casa/Arrays/Vector.h>
[326]39#include <casa/Containers/Block.h>
40#include <measures/Measures/MDirection.h>
[2]41
[1030]42namespace casa {
43 template<class T> class Matrix;
44}
[2]45
[83]46namespace asap {
[2]47
[18]48
[901]49struct STHeader {
[838]50
[901]51 bool conformant(const STHeader& other);
[838]52
[125]53 casa::Int nchan;
54 casa::Int npol;
55 casa::Int nif;
56 casa::Int nbeam;
57 casa::String observer;
58 casa::String project;
59 casa::String obstype;
60 casa::String antennaname;
61 casa::Vector<casa::Double> antennaposition;
62 casa::Float equinox;
63 casa::String freqref;
64 casa::Double reffreq;
65 casa::Double bandwidth;
66 casa::Double utc;
[204]67 casa::String fluxunit;
68 casa::String epoch;
[905]69 casa::String poltype;
[18]70 void print() const ;
71};
72
[326]73class SDDataDesc {
74
75public:
76
[453]77 // Constructor
[326]78 SDDataDesc() : n_(0) {;}
79 ~SDDataDesc() {;}
80
[453]81 // Add an entry if source name and Integer ID (can be anything you
82 // like, such as FreqID) are unique. You can add secondary entries
83 // direction and another integer index which are just stored along
84 // with the the primary entries
85 casa::uInt addEntry(const casa::String& source, casa::uInt ID,
[754]86 const casa::MDirection& secDir, casa::uInt secID);
[326]87
[453]88 // Number of entries
[326]89 casa::Int length() const { return n_;}
[754]90
[453]91 // Get attributes
92 casa::String source(casa::uInt which) const {return source_[which];}
[396]93 casa::uInt ID(casa::uInt which) const {return ID_[which];}
94 casa::uInt secID(casa::uInt which) const {return secID_[which];}
[453]95 casa::MDirection secDir(casa::uInt which) const {return secDir_[which];}
[754]96
[453]97 // Summary
[326]98 void summary() const;
99
100private:
101 casa::uInt n_;
102 casa::Vector<casa::String> source_;
[396]103 casa::Vector<casa::uInt> ID_, secID_;
104 casa::Block<casa::MDirection> secDir_;
[453]105
[326]106 SDDataDesc(const SDDataDesc& other);
[349]107
[326]108};
109
[453]110
[2]111} // namespace
112#endif
Note: See TracBrowser for help on using the repository browser.