Ignore:
Timestamp:
08/07/09 15:49:27 (15 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-729, CAS-1147

Ready to Release: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No?

Module(s): Module Names change impacts.

Description: Describe your changes here...

Use LogIO instead of std::cout and std::cerr.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/alma/src/STHeader.cpp

    r1603 r1616  
    3737#include <casa/Arrays/IPosition.h>
    3838#include <casa/Quanta/MVTime.h>
     39#include <casa/Logging/LogIO.h>
    3940
    40 
     41#include <sstream>
    4142
    4243#include "STDefs.h"
     
    7980  MVTime mvt(this->utc);
    8081  mvt.setFormat(MVTime::YMD);
    81   cout << "Observer: " << this->observer << endl
    82        << "Project: " << this->project << endl
    83        << "Obstype: " << this->obstype << endl
    84        << "Antenna: " << this->antennaname << endl
    85        << "Ant. Position: " << this->antennaposition << endl
    86        << "Equinox: " << this->equinox << endl
    87        << "Freq. ref.: " << this->freqref << endl
    88        << "Ref. frequency: " << this->reffreq << endl
    89        << "Bandwidth: "  << this->bandwidth << endl
    90        << "Time (utc): "
    91        << mvt
    92        << endl;
     82//   cout << "Observer: " << this->observer << endl
     83//        << "Project: " << this->project << endl
     84//        << "Obstype: " << this->obstype << endl
     85//        << "Antenna: " << this->antennaname << endl
     86//        << "Ant. Position: " << this->antennaposition << endl
     87//        << "Equinox: " << this->equinox << endl
     88//        << "Freq. ref.: " << this->freqref << endl
     89//        << "Ref. frequency: " << this->reffreq << endl
     90//        << "Bandwidth: "  << this->bandwidth << endl
     91//        << "Time (utc): "
     92//        << mvt
     93//        << endl;
     94  LogIO os( LogOrigin( "STHeader", "print()", WHERE ) ) ;
     95  os << "Observer: " << this->observer << endl
     96     << "Project: " << this->project << endl
     97     << "Obstype: " << this->obstype << endl
     98     << "Antenna: " << this->antennaname << endl
     99     << "Ant. Position: " << this->antennaposition << endl
     100     << "Equinox: " << this->equinox << endl
     101     << "Freq. ref.: " << this->freqref << endl
     102     << "Ref. frequency: " << this->reffreq << endl
     103     << "Bandwidth: "  << this->bandwidth << endl
     104     << "Time (utc): "
     105     << mvt
     106     << LogIO::POST ;
    93107  //setprecision(10) << this->utc << endl;
    94108}
     
    129143{
    130144   if (n_>0) {
    131       cerr << "Source    ID" << endl;
    132       for (uInt i=0; i<n_; i++) {
    133          cout << setw(11) << source_(i) << ID_(i) << endl;
    134       }
     145//       cerr << "Source    ID" << endl;
     146//       for (uInt i=0; i<n_; i++) {
     147//          cout << setw(11) << source_(i) << ID_(i) << endl;
     148     LogIO os( LogOrigin( "SDDataDesc", "summary()", WHERE ) ) ;
     149     ostringstream oss ;
     150     oss << "Source    ID" << endl;
     151     for (uInt i=0; i<n_; i++) {
     152       oss << setw(11) << source_(i) << ID_(i) << endl;
     153     }
     154     os << oss.str() << LogIO::POST ;
    135155   }
    136156}
Note: See TracChangeset for help on using the changeset viewer.