SDFieldHandler.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_SDFIELDHANDLER_H
00030 #define MS_SDFIELDHANDLER_H
00031
00032 #include <casacore/casa/aips.h>
00033 #include <casacore/casa/Containers/RecordField.h>
00034
00035 namespace casacore {
00036
00037
00038 class MeasurementSet;
00039 class MSField;
00040 class MSFieldColumns;
00041 class String;
00042 class Record;
00043 class ColumnsIndex;
00044
00045 template <class T> class Vector;
00046 template <class T> class Matrix;
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
00090 class SDFieldHandler
00091 {
00092 public:
00093
00094 SDFieldHandler();
00095
00096
00097 SDFieldHandler(MeasurementSet &ms, Vector<Bool> &handledCols, const Record &row);
00098
00099
00100 SDFieldHandler(const SDFieldHandler &other);
00101
00102 ~SDFieldHandler() {clearAll();}
00103
00104
00105 SDFieldHandler &operator=(const SDFieldHandler &other);
00106
00107
00108 void attach(MeasurementSet &ms, Vector<Bool> &handledCols, const Record &row);
00109
00110
00111 void resetRow(const Record &row);
00112
00113
00114
00115
00116 void fill(const Record &row, const String &name, Int directionRefType,
00117 const Matrix<Double> &directionPoly, Double time, Int sourceId);
00118
00119
00120 Int fieldId() {return rownr_p;}
00121 private:
00122 MSField *msField_p;
00123 MSFieldColumns *msFieldCols_p;
00124
00125 Int rownr_p;
00126
00127
00128 RORecordFieldPtr<Int> fieldIdField_p;
00129 RORecordFieldPtr<String> codeField_p, nameField_p;
00130 RORecordFieldPtr<Double> timeField_p;
00131 RORecordFieldPtr<Array<Double> > delayDirField_p, delayDirRateField_p,
00132 phaseDirField_p, phaseDirRateField_p, referenceDirField_p,
00133 referenceDirRateField_p;
00134 RORecordFieldPtr<Bool> flagRowField_p;
00135
00136 ColumnsIndex *index_p;
00137 RecordFieldPtr<String> nameKey_p;
00138 RecordFieldPtr<Int> sourceIdKey_p;
00139 RecordFieldPtr<Double> timeKey_p;
00140
00141
00142 void clearAll();
00143
00144 void clearRow();
00145
00146
00147 void initAll(MeasurementSet &ms, Vector<Bool> &handledCols, const Record &row);
00148
00149
00150 void initRow(Vector<Bool> &handledCols, const Record &row);
00151 };
00152
00153
00154 }
00155
00156 #endif
00157
00158