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;
39class MSSpectralWindow;
40class MSSpWindowColumns;
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{
88public:
89 // default ctor is not attached to a MS and hence is useless until attached
91
92 // attach this to a MS, marking fields in row which are explicitly handled here
93 SDSpWindowHandler(MeasurementSet &ms, Vector<Bool> &handledCols, const Record &row);
94
95 // copy ctor
97
99
100 // assignment operator, uses copy semantics
102
103 // attach to a MS, the handledCols and row arguments are ignored here
104 void attach(MeasurementSet &ms, Vector<Bool> &handledCols, const Record &row);
105
106 // reset internals given indicated row, use the same MS; just resets the id pointer
107 void resetRow(const Record &);
108
109 // fill - a circular buffer of last 100 spectral windows is checked
110 void fill(const Record &row, const Vector<Double> &frequency, Double refFrequency,
111 Double originalFreqDelt, Int freqRefType);
112
113 // get the current spWindow ID
115private:
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
133
134 // the next row number to use in the cached
136
137 // the maximum number of rows in the cache - currently this is 1000
139
140 // the current row number in the SPECTRAL_WINDOW table, i.e. the id
142
143 // fields possibly mined from the SDFITS row
144 // floating point fields that we can't be certain of their type
146
147 // fields from a previous life as a MS
151
152 // cleanup everything
153 void clearAll();
154
155 // clean up items related to the row
156 void clearRow();
157
158 // initialize everything
159 void initAll(MeasurementSet &ms, Vector<Bool> &handledCols, const Record &row);
160
161 // initialize the stuff dependent on the row
162 void initRow(Vector<Bool> &handledCols, const Record &row);
163};
164
165
166} //# NAMESPACE CASACORE - END
167
168#endif
169
170
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...
this file contains all the compiler specific defines
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