- Timestamp:
- 02/28/06 10:51:28 (19 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Scantable.cpp
r847 r852 61 61 62 62 Scantable::Scantable(Table::TableType ttype) : 63 type_(ttype), 64 freqTable_(ttype), 65 focusTable_(ttype), 66 weatherTable_(ttype), 67 tcalTable_(ttype), 68 moleculeTable_(ttype) 63 type_(ttype) 69 64 { 70 65 setupMainTable(); 66 freqTable_ = STFrequencies(*this); 71 67 table_.rwKeywordSet().defineTable("FREQUENCIES", freqTable_.table()); 68 weatherTable_ = STWeather(*this); 72 69 table_.rwKeywordSet().defineTable("WEATHER", weatherTable_.table()); 70 focusTable_ = STFocus(*this); 73 71 table_.rwKeywordSet().defineTable("FOCUS", focusTable_.table()); 72 tcalTable_ = STTcal(*this); 74 73 table_.rwKeywordSet().defineTable("TCAL", tcalTable_.table()); 74 moleculeTable_ = STMolecules(*this); 75 75 table_.rwKeywordSet().defineTable("MOLECULES", moleculeTable_.table()); 76 76 setupHistoryTable(); 77 77 setupFitTable(); 78 historyTable_ = table_.keywordSet().asTable("HISTORY"); 79 fitTable_ = table_.keywordSet().asTable("FITS"); 80 cout << "DEBUG" << endl; 78 81 79 82 originalTable_ = table_; 80 83 attach(); 84 cout << "debug" << endl; 81 85 } 82 86 83 87 Scantable::Scantable(const std::string& name, Table::TableType ttype) : 84 type_(ttype), 85 freqTable_(ttype) 88 type_(ttype) 86 89 { 87 90 Table tab(name); … … 92 95 } 93 96 if ( type_ == Table::Memory ) 94 table_ = tab.copyToMemoryTable( "dummy");97 table_ = tab.copyToMemoryTable(generateName()); 95 98 else 96 99 table_ = tab; 97 100 freqTable_ = STFrequencies(table_.keywordSet().asTable("FREQUENCIES")); 101 focusTable_ = STFocus(table_.keywordSet().asTable("FOCUS")); 102 weatherTable_ = STWeather(table_.keywordSet().asTable("WEATHER")); 103 tcalTable_ = STTcal(table_.keywordSet().asTable("TCAL")); 104 moleculeTable_ = STMolecules(table_.keywordSet().asTable("MOLECULES")); 98 105 originalTable_ = table_; 99 106 attach(); … … 105 112 // with or without data 106 113 if (clear) { 107 table_ = TableCopy::makeEmptyMemoryTable(String( "dummy"), other.table_,108 True);109 } else { 110 table_ = other.table_.copyToMemoryTable(String( "dummy"));114 table_ = TableCopy::makeEmptyMemoryTable(String(generateName()), 115 other.table_, True); 116 } else { 117 table_ = other.table_.copyToMemoryTable(String(generateName())); 111 118 } 112 119 … … 181 188 182 189 // Now create Table SetUp from the description. 183 SetupNewTable aNewTab("dummy", td, Table::New); 184 table_ = Table(aNewTab, Table::Memory, 0); 185 190 SetupNewTable aNewTab(generateName(), td, Table::New); 191 table_ = Table(aNewTab, type_, 0); 186 192 originalTable_ = table_; 187 193 … … 213 219 void Scantable::attach() 214 220 { 215 historyTable_ = table_.keywordSet().asTable("HISTORY");216 fitTable_ = table_.keywordSet().asTable("FITS");217 218 221 timeCol_.attach(table_, "TIME"); 219 222 srcnCol_.attach(table_, "SRCNAME"); … … 785 788 } 786 789 790 std::vector< unsigned int > asap::Scantable::rownumbers( ) const 791 { 792 std::vector<unsigned int> stlout; 793 Vector<uInt> vec = table_.rowNumbers(); 794 vec.tovector(stlout); 795 return stlout; 796 } 797 787 798 }//namespace asap -
trunk/src/Scantable.h
r847 r852 175 175 void flag(); 176 176 177 /** 178 * Return a list of row numbers with respect to the original table. 179 * @return a lsi of rownumbers with respect to the original table 180 */ 181 std::vector<unsigned int> rownumbers() const; 182 177 183 178 184 /**
Note:
See TracChangeset
for help on using the changeset viewer.