CalTable.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 CALIBRATION_CALTABLE_H
00030 #define CALIBRATION_CALTABLE_H
00031
00032 #include <casa/aips.h>
00033 #include <tables/Tables/Table.h>
00034 #include <tables/TaQL/ExprNode.h>
00035 #include <casa/Containers/Record.h>
00036 #include <casa/Utilities/Sort.h>
00037 #include <synthesis/CalTables/CalTableDesc.h>
00038 #include <synthesis/CalTables/CalMainRecord.h>
00039 #include <synthesis/CalTables/CalDescRecord.h>
00040 #include <synthesis/CalTables/CalHistRecord.h>
00041
00042 namespace casa {
00043
00044
00045
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 class CalTable
00082 {
00083 public:
00084
00085 CalTable();
00086 virtual ~CalTable();
00087
00088
00089
00090 CalTable (const String& tableName, CalTableDesc& ctableDesc,
00091 Table::TableOption access = Table::New);
00092
00093
00094
00095 CalTable (const String& tableName, Table::TableOption access = Table::Old);
00096
00097
00098 CalTable (const Table& table);
00099
00100
00101 CalTable (const CalTable& other);
00102
00103
00104 CalTable& operator= (const CalTable& other);
00105
00106
00107 CalTable sort (const Block <String>& columnNames,
00108 Sort::Order order = Sort::Ascending,
00109 Sort::Option option = Sort::HeapSort);
00110
00111
00112 void sort2 (const Block <String>& columnNames,
00113 Sort::Order order = Sort::Ascending,
00114 Sort::Option option = Sort::HeapSort);
00115
00116
00117 CalTable select (const String& calSelect);
00118
00119
00120 void select2 (const String& calSelect);
00121
00122
00123 Int nRowMain() const;
00124 Int nRowDesc() const;
00125 Int nRowHistory() const;
00126
00127
00128 void addRowMain (uInt nrrow = 1, Bool initialize = False)
00129 {itsMainTable->addRow(nrrow, initialize);};
00130 void addRowDesc (uInt nrrow = 1, Bool initialize = False)
00131 {itsDescTable->addRow(nrrow, initialize);};
00132 void addRowHistory (uInt nrrow = 1, Bool initialize = False)
00133 {itsHistoryTable->addRow(nrrow, initialize);};
00134
00135
00136 Record getRowMain (const Int& jrow);
00137 Record getRowDesc (const Int& jrow);
00138 Record getRowHistory (const Int& jrow);
00139
00140
00141 void putRowMain (const Int& jrow, CalMainRecord& tableRec);
00142 void putRowDesc (const Int& jrow, CalDescRecord& tableRec);
00143 void putRowHistory (const Int& jrow, CalHistoryRecord& tableRec);
00144
00145
00146 virtual Int maxAntenna();
00147
00148
00149 Int numberTimeSlots (const Double& fracError);
00150
00151
00152 void rowsPerCalDescId(Vector<Int>& rowspercdi);
00153
00154 protected:
00155
00156 void createCalTable (const String& tableName, CalTableDesc& ctableDesc,
00157 Table::TableOption access = Table::New);
00158
00159
00160 void openCalTable (const String& tableName,
00161 Table::TableOption access = Table::Old);
00162
00163
00164 Table& calMainAsTable() {return *itsMainTable;};
00165 Table& calDescAsTable() {return *itsDescTable;};
00166 Table& calHistoryAsTable() {return *itsHistoryTable;};
00167 const Table& calMainAsTable() const {return *itsMainTable;};
00168 const Table& calDescAsTable() const {return *itsDescTable;};
00169 const Table& calHistoryAsTable() const {return *itsHistoryTable;};
00170
00171
00172
00173 friend class ROCalMainColumns;
00174 friend class CalMainColumns;
00175 friend class ROCalDescColumns;
00176 friend class CalDescColumns;
00177 friend class ROCalHistoryColumns;
00178 friend class CalHistoryColumns;
00179
00180 private:
00181
00182 Table* itsMainTable;
00183
00184
00185 Table* itsDescTable;
00186 Table* itsHistoryTable;
00187 };
00188
00189
00190 }
00191
00192 #endif
00193