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