SDObservationHandler.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_SDOBSERVATIONHANDLER_H
00030 #define MS_SDOBSERVATIONHANDLER_H
00031
00032 #include <casacore/casa/aips.h>
00033 #include <casacore/casa/Containers/RecordField.h>
00034 #include <casacore/tables/Tables/ScalarColumn.h>
00035
00036 namespace casacore {
00037
00038
00039 class ColumnsIndex;
00040 class MeasurementSet;
00041 class MSObservation;
00042 class MSObservationColumns;
00043 class Record;
00044 class String;
00045
00046 template <class T> class Vector;
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 SDObservationHandler
00091 {
00092 public:
00093
00094 SDObservationHandler();
00095
00096
00097
00098 SDObservationHandler(MeasurementSet &ms, Vector<Bool> &handledCols, const Record &row);
00099
00100
00101 SDObservationHandler(const SDObservationHandler &other);
00102
00103 ~SDObservationHandler() {clearAll();}
00104
00105
00106 SDObservationHandler &operator=(const SDObservationHandler &other);
00107
00108
00109 void attach(MeasurementSet &ms, Vector<Bool> &handledCols, const Record &row);
00110
00111
00112 void resetRow(const Record &row);
00113
00114
00115 void fill(const Record &row, const String &telescopeName, const Vector<Double> &timeRange);
00116
00117
00118 Int observationId() {return rownr_p;}
00119
00120
00121 void updateTimeRange(const Vector<Double> &timeRange);
00122 private:
00123 ColumnsIndex *index_p;
00124 RecordFieldPtr<String> telescopeKey_p, observerKey_p, projectKey_p, ns_obsidKey_p;
00125 RecordFieldPtr<Double> releaseDateKey_p;
00126 RecordFieldPtr<Bool> flagRowKey_p;
00127
00128 MSObservation *msObs_p;
00129 MSObservationColumns *msObsCols_p;
00130
00131 Int rownr_p;
00132
00133 ScalarColumn<String> nsObsIdCol_p;
00134
00135
00136 RORecordFieldPtr<String> observer_p, projid_p, obsid_p;
00137 RORecordFieldPtr<Double> releaseDate_p;
00138 RORecordFieldPtr<Bool> flagRow_p;
00139 RORecordFieldPtr<Array<Double> > timeRange_p;
00140
00141
00142 void clearAll();
00143
00144
00145 void clearRow();
00146
00147
00148 void initAll(MeasurementSet &ms, Vector<Bool> &handledCols, const Record &row);
00149
00150
00151 void initRow(Vector<Bool> &handledCols, const Record &row);
00152
00153
00154 void makeIndex();
00155 };
00156
00157
00158 }
00159
00160 #endif
00161
00162