Ignore:
Timestamp:
10/10/12 14:29:17 (12 years ago)
Author:
Malte Marquarding
Message:

Ticket #199: Excised Logger::pushLog; now everything is using LogIO

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STWriter.cpp

    r2657 r2658  
    3838#include <casa/Utilities/CountedPtr.h>
    3939#include <casa/Utilities/Assert.h>
     40#include <casa/Logging/LogIO.h>
    4041
    4142#include <atnf/PKSIO/PKSrecord.h>
     
    321322    ++scanit;
    322323  }
    323   ostringstream oss;
    324   oss << "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
    327328  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
    332330  return 0;
    333331}
     
    380378}
    381379
    382 // For writing MS data, if there is the reference to
    383 // 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 }
    399380
    400381// get obsType string from SRCTYPE value
Note: See TracChangeset for help on using the changeset viewer.