Changeset 2111


Ignore:
Timestamp:
04/06/11 18:21:14 (14 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed:

Test Programs: sdlist unit tests

Put in Release Notes: No

Module(s): scantable

Description:

Put header summarizing part of code Scantable::summary to a new function Scantable::headerSummary.
The function is accessible from python level using scantable._list_header()


Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Scantable.cpp

    r2094 r2111  
    958958}
    959959
    960 std::string Scantable::summary( bool verbose )
     960
     961std::string Scantable::headerSummary( bool verbose )
    961962{
    962963  // Format header info
     964//   STHeader sdh;
     965//   sdh = getHeader();
     966//   sdh.print();
    963967  ostringstream oss;
    964   oss << endl;
    965   oss << asap::SEPERATOR << endl;
    966   oss << " Scan Table Summary" << endl;
    967   oss << asap::SEPERATOR << endl;
    968968  oss.flags(std::ios_base::left);
    969969  oss << setw(15) << "Beams:" << setw(4) << nbeam() << endl
     
    10081008  oss << setw(15) << "Abcissa:" << getAbcissaLabel(0) << endl;
    10091009  oss << selector_.print() << endl;
     1010  /// @todo implement verbose mode
     1011  return String(oss);
     1012}
     1013
     1014std::string Scantable::summary( bool verbose )
     1015{
     1016  ostringstream oss;
    10101017  oss << endl;
     1018  oss << asap::SEPERATOR << endl;
     1019  oss << " Scan Table Summary" << endl;
     1020  oss << asap::SEPERATOR << endl;
     1021
     1022  // Format header info
     1023  oss << headerSummary(verbose);
     1024  oss << endl;
     1025
    10111026  // main table
    10121027  String dirtype = "Position ("
    10131028                  + getDirectionRefString()
    10141029                  + ")";
     1030  oss.flags(std::ios_base::left);
    10151031  oss << setw(5) << "Scan" << setw(15) << "Source"
    10161032      << setw(10) << "Time" << setw(18) << "Integration"
  • trunk/src/Scantable.h

    r2094 r2111  
    371371    { historyTable_.append(otherhist); }
    372372
     373  std::string headerSummary(bool verbose=false);
    373374  std::string summary(bool verbose=false);
    374375  //std::string getTime(int whichrow=-1, bool showdate=true) const;
  • trunk/src/ScantableWrapper.h

    r2094 r2111  
    218218  }
    219219
     220  std::string listHeader(bool verbose=false) const {
     221    return table_->headerSummary(verbose);
     222  }
     223
    220224  std::vector<std::string> getHistory()const
    221225    { return table_->getHistory(); }
  • trunk/src/python_Scantable.cpp

    r2047 r2111  
    119119    .def("_summary",  &ScantableWrapper::summary,
    120120         (boost::python::arg("verbose")=true) )
     121    .def("_list_header",  &ScantableWrapper::listHeader,
     122         (boost::python::arg("verbose")=true) )
    121123    //.def("_getrestfreqs",  &ScantableWrapper::getRestFrequencies)
    122124    .def("_getrestfreqs",  &ScantableWrapper::getRestFrequency)
Note: See TracChangeset for help on using the changeset viewer.