FACT++  1.0
void FitsDumper::List ( )
private

Lists all columns of an open file.

Definition at line 126 of file fitsdump.cc.

References fFilename, fits::GetColumns(), fits::GetKeys(), zfits::GetNumRows(), and ValueTypeToStr().

Referenced by Exec().

127 {
128  const fits::Table::Keys &fKeyMap = GetKeys();
129  const fits::Table::Columns &fColMap = GetColumns();
130 
131  cout << "\nFile: " << fFilename << "\n";
132 
133  cout << " " << fKeyMap.find("EXTNAME")->second.value << " [";
134  cout << GetNumRows() << "]\n";
135 
136  for (auto it = fColMap.begin(); it != fColMap.end(); it++)
137  {
138  cout << " " << it->first << "[" << it->second.num << "] (" << it->second.unit << ":" << ValueTypeToStr(it->second.type) << ") ";
139  for (auto jt = fKeyMap.begin(); jt != fKeyMap.end(); jt++)
140  if (jt->second.value == it->first)
141  cout << "/ " << jt->second.comment << endl;
142  }
143 
144  cout << endl;
145 }
string fFilename
Definition: fitsdump.cc:67
std::map< std::string, Column > Columns
Definition: fits.h:113
string ValueTypeToStr(char type) const
Definition: fitsdump.cc:109
size_t GetNumRows() const
Definition: zfits.h:57
const Table::Keys & GetKeys() const
Definition: fits.h:1006
std::map< std::string, Entry > Keys
Definition: fits.h:112
const Table::Columns & GetColumns() const
Definition: fits.h:1004

+ Here is the call graph for this function:

+ Here is the caller graph for this function: