casa
$Rev:20696$
|
00001 //# VLARCA: 00002 //# Copyright (C) 1999 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be addressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# 00027 //# $Id$ 00028 00029 #ifndef NRAO_VLARCA_H 00030 #define NRAO_VLARCA_H 00031 00032 #include <casa/aips.h> 00033 #include <casa/IO/ByteSource.h> 00034 00035 #include <casa/namespace.h> 00036 //# Forward Declarations 00037 00038 // <summary></summary> 00039 00040 // <use visibility=export> 00041 00042 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos=""> 00043 // </reviewed> 00044 00045 // <prerequisite> 00046 // <li> SomeClass 00047 // <li> SomeOtherClass 00048 // <li> some concept 00049 // </prerequisite> 00050 // 00051 // <etymology> 00052 // </etymology> 00053 // 00054 // <synopsis> 00055 // </synopsis> 00056 // 00057 // <example> 00058 // </example> 00059 // 00060 // <motivation> 00061 // </motivation> 00062 // 00063 // <templating arg=T> 00064 // <li> 00065 // <li> 00066 // </templating> 00067 // 00068 // <thrown> 00069 // <li> 00070 // <li> 00071 // </thrown> 00072 // 00073 // <todo asof="yyyy/mm/dd"> 00074 // <li> add this feature 00075 // <li> fix this bug 00076 // <li> start discussion of this possible extension 00077 // </todo> 00078 00079 class VLARCA 00080 { 00081 public: 00082 // The default constructor creates an unusable object 00083 VLARCA(); 00084 00085 // Initialise this RCA from the given BytesSource (which must contain a VLA 00086 // logical record), and must be readable & seekable. 00087 VLARCA(ByteSource& record); 00088 00089 // The copy constructor uses copy semantics 00090 VLARCA(const VLARCA& other); 00091 00092 // The destructor is trivial; 00093 ~VLARCA(); 00094 00095 // The assignment constructor uses copy semantics 00096 VLARCA& operator=(const VLARCA& other); 00097 00098 // attach to the specified ByteSource 00099 void attach(ByteSource& record); 00100 00101 // return the length of this logical record 00102 uInt length() const; 00103 00104 // return the revision of this logical record 00105 uInt revision() const; 00106 00107 // return the position (in bytes) of the start of the SDA, from the 00108 // beginning of the logical record. 00109 uInt SDAOffset() const; 00110 00111 // return the position (in bytes) of the start of the specified ADA, from the 00112 // beginning of the logical record. 00113 uInt ADAOffset(uInt which) const; 00114 00115 // return the number of antennas in the sub-array that this logical record 00116 // contains data for. 00117 uInt nAntennas() const; 00118 00119 // return the position (in bytes) of the start of the specified CDA, from the 00120 // beginning of the logical record. 00121 uInt CDAOffset(uInt which) const; 00122 00123 // return the number of bytes in the header of a baseline record in the 00124 // specified CDA 00125 uInt CDAHeaderBytes(uInt which) const; 00126 00127 // return the number of bytes in the baseline record, including the header in 00128 // the specified CDA 00129 uInt CDABaselineBytes(uInt which) const; 00130 00131 // return the time in Modified Julian Days that is the reference point for 00132 // the times given in this record. 00133 uInt obsDay() const; 00134 00135 private: 00136 //# Contains a logical record 00137 mutable ByteSource itsRecord; 00138 }; 00139 #endif 00140 00141