SDSpWinHandler.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef MS_SDSPWINHANDLER_H
00030 #define MS_SDSPWINHANDLER_H
00031
00032 #include <casacore/casa/aips.h>
00033 #include <casacore/casa/Arrays/Vector.h>
00034 #include <casacore/casa/Containers/RecordField.h>
00035 #include <casacore/tables/Tables/TableColumn.h>
00036
00037 namespace casacore {
00038
00039
00040 class ColumnsIndex;
00041 class MeasurementSet;
00042 class MSSpectralWindow;
00043 class MSSpWindowColumns;
00044 class Record;
00045 class Table;
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089 class SDSpWindowHandler
00090 {
00091 public:
00092
00093 SDSpWindowHandler();
00094
00095
00096 SDSpWindowHandler(MeasurementSet &ms, Vector<Bool> &handledCols, const Record &row);
00097
00098
00099 SDSpWindowHandler(const SDSpWindowHandler &other);
00100
00101 ~SDSpWindowHandler() {clearAll();}
00102
00103
00104 SDSpWindowHandler &operator=(const SDSpWindowHandler &other);
00105
00106
00107 void attach(MeasurementSet &ms, Vector<Bool> &handledCols, const Record &row);
00108
00109
00110 void resetRow(const Record &);
00111
00112
00113 void fill(const Record &row, const Vector<Double> &frequency, Double refFrequency,
00114 Double originalFreqDelt, Int freqRefType);
00115
00116
00117 Int spWindowId() {return rownr_p;}
00118 private:
00119 RecordFieldPtr<Int> nchanKey_p, freqRefTypeKey_p, ifConvChainKey_p,
00120 freqGroupKey_p, netSidebandKey_p;
00121 Vector<Double> fNCache_p, f0Cache_p, bwCache_p;
00122 Double *fNCachePtr_p, *f0CachePtr_p, *bwCachePtr_p;
00123 Bool deleteItFN_p, deleteItF0_p, deleteItBw_p;
00124 RecordFieldPtr<Bool> flagRowKey_p;
00125
00126 ColumnsIndex *index_p;
00127
00128 Table *theCache_p;
00129 MSSpectralWindow *msSpWin_p;
00130 MSSpWindowColumns *msSpWinCols_p;
00131
00132
00133 TableColumn idCol_p, nchanCol_p, freqRefTypeCol_p,
00134 freqresCol_p, ifConvChainCol_p,
00135 freqGroupCol_p, netSidebandCol_p, flagRowCol_p;
00136
00137
00138 uInt nextCacheRow_p;
00139
00140
00141 uInt cacheSize_p;
00142
00143
00144 Int rownr_p;
00145
00146
00147
00148 Int bandwidField_p, freqresField_p;
00149
00150
00151 RORecordFieldPtr<Int> spWinIdField_p, ifConvChainField_p, freqGroupField_p,
00152 netSidebandField_p;
00153 RORecordFieldPtr<Bool> flagRowField_p;
00154
00155
00156 void clearAll();
00157
00158
00159 void clearRow();
00160
00161
00162 void initAll(MeasurementSet &ms, Vector<Bool> &handledCols, const Record &row);
00163
00164
00165 void initRow(Vector<Bool> &handledCols, const Record &row);
00166 };
00167
00168
00169 }
00170
00171 #endif
00172
00173