Changeset 18954


Ignore:
Timestamp:
03/05/18 16:31:16 (7 years ago)
Author:
tbretz
Message:
Make use of the new values in fits::Column in List() to properly output everything
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/fitsdump.cc

    r18838 r18954  
    128128void FitsDumper::List()
    129129{
    130     const fits::Table::Keys    &fKeyMap = GetKeys();
    131130    const fits::Table::Columns &fColMap = GetColumns();
    132131
     132    cout << endl;
     133
    133134    cout << "\nFile: " << fFilename << "\n";
    134135
    135     cout << " " << fKeyMap.find("EXTNAME")->second.value << " [";
    136     cout << GetNumRows() << "]\n";
    137 
    138     for (auto it = fColMap.begin(); it != fColMap.end(); it++)
    139     {
    140         cout << "   " << it->first << "[" << it->second.num << "] (" << it->second.unit << ":" << ValueTypeToStr(it->second.type) << ") ";
    141         for (auto jt = fKeyMap.begin(); jt != fKeyMap.end(); jt++)
    142             if (jt->second.value == it->first)
    143                 cout << "/ " << jt->second.comment << endl;
     136    cout << " "  << Get<std::string>("EXTNAME", "");
     137    cout << " [" << GetNumRows() << "]\n";
     138
     139    for (const auto &it : fColMap)
     140    {
     141        cout << " " << setw(3)  << it.second.id;
     142        cout << "|" << setw(10) << ValueTypeToStr(it.second.type);
     143        cout << " " << it.first << "[" << it.second.num << "]";
     144        cout << " / " << it.second.comment;
     145        cout << " (" << it.second.unit << ")" << endl;
    144146    }
    145147
Note: See TracChangeset for help on using the changeset viewer.