casacore
Loading...
Searching...
No Matches
SDSpWinHandler.h
Go to the documentation of this file.
1// # SDSpWindowFiller.h: fills the SPECTRAL_WINDOW table for the SDFITS filler
2// # Copyright (C) 2000,2001,2002
3// # Associated Universities, Inc. Washington DC, USA.
4// #
5// # This library is free software; you can redistribute it and/or modify it
6// # under the terms of the GNU Library General Public License as published by
7// # the Free Software Foundation; either version 2 of the License, or (at your
8// # option) any later version.
9// #
10// # This library is distributed in the hope that it will be useful, but WITHOUT
11// # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12// # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13// # License for more details.
14// #
15// # You should have received a copy of the GNU Library General Public License
16// # along with this library; if not, write to the Free Software Foundation,
17// # Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18// #
19// # Correspondence concerning AIPS++ should be addressed as follows:
20// # Internet email: casa-feedback@nrao.edu.
21// # Postal address: AIPS++ Project Office
22// # National Radio Astronomy Observatory
23// # 520 Edgemont Road
24// # Charlottesville, VA 22903-2475 USA
25
26#ifndef MS_SDSPWINHANDLER_H
27#define MS_SDSPWINHANDLER_H
28
29#include <casacore/casa/aips.h>
30#include <casacore/casa/Arrays/Vector.h>
31#include <casacore/casa/Containers/RecordField.h>
32#include <casacore/tables/Tables/TableColumn.h>
33
34namespace casacore { // # NAMESPACE CASACORE - BEGIN
35
36// # Forward Declarations
37class ColumnsIndex;
38class MeasurementSet;
41class Record;
42class Table;
43
44// <summary>
45// </summary>
46
47// <use visibility=local> or <use visibility=export>
48
49// <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
50// </reviewed>
51
52// <prerequisite>
53// <li> SomeClass
54// <li> SomeOtherClass
55// <li> some concept
56// </prerequisite>
57//
58// <etymology>
59// </etymology>
60//
61// <synopsis>
62// </synopsis>
63//
64// <example>
65// </example>
66//
67// <motivation>
68// </motivation>
69//
70// <templating arg=T>
71// <li>
72// <li>
73// </templating>
74//
75// <thrown>
76// <li>
77// <li>
78// </thrown>
79//
80// <todo asof="yyyy/mm/dd">
81// <li> add this feature
82// <li> fix this bug
83// <li> start discussion of this possible extension
84// </todo>
85
87 public:
88 // default ctor is not attached to a MS and hence is useless until attached
90
91 // attach this to a MS, marking fields in row which are explicitly handled here
92 SDSpWindowHandler(MeasurementSet &ms, Vector<Bool> &handledCols, const Record &row);
93
94 // copy ctor
96
98
99 // assignment operator, uses copy semantics
101
102 // attach to a MS, the handledCols and row arguments are ignored here
103 void attach(MeasurementSet &ms, Vector<Bool> &handledCols, const Record &row);
104
105 // reset internals given indicated row, use the same MS; just resets the id pointer
106 void resetRow(const Record &);
107
108 // fill - a circular buffer of last 100 spectral windows is checked
109 void fill(const Record &row, const Vector<Double> &frequency, Double refFrequency,
110 Double originalFreqDelt, Int freqRefType);
111
112 // get the current spWindow ID
113 Int spWindowId() { return rownr_p; }
114
115 private:
122 // the cache table is the one that is indexed
124 // temporary table to hold the fields we are indexing on, can't index on array column
128
129 // the columns in the cache table
132
133 // the next row number to use in the cached
135
136 // the maximum number of rows in the cache - currently this is 1000
138
139 // the current row number in the SPECTRAL_WINDOW table, i.e. the id
141
142 // fields possibly mined from the SDFITS row
143 // floating point fields that we can't be certain of their type
145
146 // fields from a previous life as a MS
149
150 // cleanup everything
151 void clearAll();
152
153 // clean up items related to the row
154 void clearRow();
155
156 // initialize everything
157 void initAll(MeasurementSet &ms, Vector<Bool> &handledCols, const Record &row);
158
159 // initialize the stuff dependent on the row
160 void initRow(Vector<Bool> &handledCols, const Record &row);
161};
162
163} // namespace casacore
164
165#endif
Read-Only access to an individual field from a Record.
RecordFieldPtr< Bool > flagRowKey_p
MSSpWindowColumns * msSpWinCols_p
Table * theCache_p
temporary table to hold the fields we are indexing on, can't index on array column
RecordFieldPtr< Int > netSidebandKey_p
void initAll(MeasurementSet &ms, Vector< Bool > &handledCols, const Record &row)
initialize everything
RecordFieldPtr< Int > nchanKey_p
RecordFieldPtr< Int > ifConvChainKey_p
void clearAll()
cleanup everything
SDSpWindowHandler()
default ctor is not attached to a MS and hence is useless until attached
RORecordFieldPtr< Int > ifConvChainField_p
SDSpWindowHandler(const SDSpWindowHandler &other)
copy ctor
void initRow(Vector< Bool > &handledCols, const Record &row)
initialize the stuff dependent on the row
RORecordFieldPtr< Int > spWinIdField_p
fields from a previous life as a MS
void resetRow(const Record &)
reset internals given indicated row, use the same MS; just resets the id pointer
uInt nextCacheRow_p
the next row number to use in the cached
void attach(MeasurementSet &ms, Vector< Bool > &handledCols, const Record &row)
attach to a MS, the handledCols and row arguments are ignored here
MSSpectralWindow * msSpWin_p
void clearRow()
clean up items related to the row
RecordFieldPtr< Int > freqRefTypeKey_p
RecordFieldPtr< Int > freqGroupKey_p
TableColumn idCol_p
the columns in the cache table
RORecordFieldPtr< Int > netSidebandField_p
ColumnsIndex * index_p
the cache table is the one that is indexed
RORecordFieldPtr< Bool > flagRowField_p
Int spWindowId()
get the current spWindow ID
void fill(const Record &row, const Vector< Double > &frequency, Double refFrequency, Double originalFreqDelt, Int freqRefType)
fill - a circular buffer of last 100 spectral windows is checked
RORecordFieldPtr< Int > freqGroupField_p
uInt cacheSize_p
the maximum number of rows in the cache - currently this is 1000
SDSpWindowHandler(MeasurementSet &ms, Vector< Bool > &handledCols, const Record &row)
attach this to a MS, marking fields in row which are explicitly handled here
Int rownr_p
the current row number in the SPECTRAL_WINDOW table, i.e.
SDSpWindowHandler & operator=(const SDSpWindowHandler &other)
assignment operator, uses copy semantics
Int bandwidField_p
fields possibly mined from the SDFITS row floating point fields that we can't be certain of their typ...
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
unsigned int uInt
Definition aipstype.h:49
int Int
Definition aipstype.h:48
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
double Double
Definition aipstype.h:53