Display the selected columns values VS time.
Perform the actual dump, based on the current parameters.
420 if (!filter.empty() && select.Compile(filter.c_str()))
421 throw runtime_error(
"Syntax Error: TFormula::Compile failed for '"+filter+
"'");
424 fout <<
"## --------------------------------------------------------------------------\n";
425 fout <<
"## Fits file: \t" <<
fFilename <<
'\n';
427 fout <<
"## File: \t" << filename <<
'\n';
428 fout <<
"## Table: \t" << fKeyMap.find(
"EXTNAME")->second.value <<
'\n';
429 fout <<
"## NumRows: \t" <<
GetNumRows() <<
'\n';
430 fout <<
"## Comment: \t" << ((fKeyMap.find(
"COMMENT") != fKeyMap.end()) ? fKeyMap.find(
"COMMENT")->second.value :
"") <<
'\n';
433 fout <<
"## Selection: \t" << select.GetExpFormula() <<
'\n';
435 fout <<
"## --------------------------------------------------------------------------\n";
437 fout <<
"## --------------------------------------------------------------------------\n";
441 for (
auto it=cols.begin(); it!=cols.end(); it++)
443 fout <<
"# " << it->name;
445 if (it->first==it->last)
448 fout <<
"[" << it->first <<
"]";
451 fout <<
"[" << it->first <<
":" << it->last <<
"]";
453 if (!it->col.unit.empty())
454 fout <<
": " << it->col.unit;
457 num += it->last-it->first+1;
464 vector<Double_t>
data(num+1);
467 const size_t last = limit ?
first + limit : size_t(-1);
471 const size_t row =
GetRow();
482 sout.precision(fout.precision());
483 sout.flags(fout.flags());
486 for (
auto it=cols.begin(); it!=cols.end(); it++, col++)
489 for (uint32_t
i=it->first; i<=it->last;
i++, p++)
491 if (col<format.size())
492 sout <<
Format(
"%"+format[col], *it,
i) <<
" ";
495 switch (it->col.type)
498 msg +=
reinterpret_cast<const char*
>(it->ptr)[
i];
501 sout << (unsigned int)reinterpret_cast<const unsigned char*>(it->ptr)[
i] <<
" ";
504 sout << reinterpret_cast<const bool*>(it->ptr)[
i] <<
" ";
507 sout << reinterpret_cast<const int16_t*>(it->ptr)[
i] <<
" ";
510 sout << reinterpret_cast<const int32_t*>(it->ptr)[
i] <<
" ";
513 sout << reinterpret_cast<const int64_t*>(it->ptr)[
i] <<
" ";
516 sout << reinterpret_cast<const float*>(it->ptr)[
i] <<
" ";
519 sout << reinterpret_cast<const double*>(it->ptr)[
i] <<
" ";
531 if (it->col.type==
'A')
532 sout <<
"'" << msg.c_str() <<
"' ";
535 if (!filter.empty() && select.EvalPar(0,
data.data())<0.5)
538 fout << sout.str() << endl;
size_t GetNumRows() const
string Format(const string &fmt, const double &val) const
int64_t first
Size of this column in the tile.
const Table::Keys & GetKeys() const
void ListKeywords(ostream &)
std::map< std::string, Entry > Keys
double GetDouble(const MyColumn &, size_t) const