Changeset 2658 for trunk/src/STWriter.cpp
- Timestamp:
- 10/10/12 14:29:17 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STWriter.cpp
r2657 r2658 38 38 #include <casa/Utilities/CountedPtr.h> 39 39 #include <casa/Utilities/Assert.h> 40 #include <casa/Logging/LogIO.h> 40 41 41 42 #include <atnf/PKSIO/PKSrecord.h> … … 321 322 ++scanit; 322 323 } 323 ostringstream oss;324 os s << "STWriter: wrote " << count << " rows to " << filename;325 pushLog(String(oss));326 324 LogIO os( casa::LogOrigin("STWriter")); 325 os << "STWriter: wrote " << count << " rows to " << filename 326 << casa::LogIO::POST; 327 327 328 writer_->close(); 328 //if MS2 delete POINTING table exists and copy the one in the keyword 329 if ( format_ == "MS2" ) { 330 replacePtTab(table, filename); 331 } 329 332 330 return 0; 333 331 } … … 380 378 } 381 379 382 // For writing MS data, if there is the reference to383 // original pointing table it replace it by it.384 void STWriter::replacePtTab (const Table& tab, const std::string& fname)385 {386 String oldPtTabName = fname;387 oldPtTabName.append("/POINTING");388 if ( tab.keywordSet().isDefined("POINTING") ) {389 String PointingTab = tab.keywordSet().asString("POINTING");390 if ( Table::isReadable(PointingTab) ) {391 Table newPtTab(PointingTab, Table::Old);392 newPtTab.copy(oldPtTabName, Table::New);393 ostringstream oss;394 oss << "STWriter: copied " <<PointingTab << " to " << fname;395 pushLog(String(oss));396 }397 }398 }399 380 400 381 // get obsType string from SRCTYPE value
Note: See TracChangeset
for help on using the changeset viewer.