FACT++  1.0
void FitsDumper::ListHeader ( const string &  filename)
private

Definition at line 177 of file fitsdump.cc.

References fits::GetKeys(), zfits::GetNumRows(), and ListKeywords().

Referenced by Exec().

178 {
179  ostream fout(cout.rdbuf());
180 
181  ofstream sout;
182  if (filename!="-")
183  {
184  sout.open(filename);
185  if (!sout)
186  {
187  cerr << "Cannot open output stream " << filename << ": " << strerror(errno) << endl;
188  return;
189  }
190  fout.rdbuf(sout.rdbuf());
191  }
192 
193  const fits::Table::Keys &fKeyMap = GetKeys();
194 
195  fout << "\nTable: " << fKeyMap.find("EXTNAME")->second.value << " (rows=" << GetNumRows() << ")\n";
196  if (fKeyMap.find("COMMENT") != fKeyMap.end())
197  fout << "Comment: \t" << fKeyMap.find("COMMENT")->second.value << "\n";
198 
199  ListKeywords(fout);
200  fout << endl;
201 }
size_t GetNumRows() const
Definition: zfits.h:57
const Table::Keys & GetKeys() const
Definition: fits.h:1006
void ListKeywords(ostream &)
Definition: fitsdump.cc:147
std::map< std::string, Entry > Keys
Definition: fits.h:112

+ Here is the call graph for this function:

+ Here is the caller graph for this function: