645 vector<string> names(cols);
646 names.insert(names.begin(), filter);
652 vector<TFormula> form(names.size());
654 auto ifo = form.begin();
655 for (
auto it=names.begin(); it!=names.end(); it++, ifo++)
657 if (!it->empty() && ifo->Compile(it->c_str()))
658 throw runtime_error(
"Syntax Error: TFormula::Compile failed for '"+*it+
"'");
663 fout <<
"## --------------------------------------------------------------------------\n";
664 fout <<
"## Fits file: \t" <<
fFilename <<
'\n';
666 fout <<
"## File: \t" << filename <<
'\n';
667 fout <<
"## Table: \t" << fKeyMap.find(
"EXTNAME")->second.value <<
'\n';
668 fout <<
"## NumRows: \t" <<
GetNumRows() <<
'\n';
669 fout <<
"## Comment: \t" << ((fKeyMap.find(
"COMMENT") != fKeyMap.end()) ? fKeyMap.find(
"COMMENT")->second.value :
"") <<
'\n';
670 fout <<
"## --------------------------------------------------------------------------\n";
672 fout <<
"## --------------------------------------------------------------------------\n";
675 fout <<
"## Selection: " << form[0].GetExpFormula() <<
"\n##\n";
678 for (
auto it=vec.begin(); it!=vec.end(); it++, num++)
680 fout <<
"## [" << num <<
"] = " << it->name;
682 if (it->first==it->last)
685 fout <<
"[" << it->first <<
"]";
688 fout <<
"[" << it->first <<
":" << it->last <<
"]";
690 if (!it->col.unit.empty())
691 fout <<
": " << it->col.unit;
695 fout <<
"## --------------------------------------------------------------------------\n";
699 for (
auto it=form.begin()+1; it!=form.end(); it++)
700 fout <<
" \"" << it->GetExpFormula() <<
"\"";
701 fout <<
"\n#" << endl;
705 vector<Double_t>
data(vec.size()+1);
707 const size_t last = limit ?
first + limit : size_t(-1);
711 const size_t row =
GetRow();
716 for (
auto it=vec.begin(); it!=vec.end(); it++, p++)
721 if (!filter.empty() && form[0].EvalPar(0,
data.data())<0.5)
724 for (
auto iform=form.begin()+1; iform!=form.end(); iform++)
725 fout << iform->EvalPar(0,
data.data()) <<
" ";
size_t GetNumRows() 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
vector< MyColumn > InitColumnsRoot(vector< string > &list)
double GetDouble(const MyColumn &, size_t) const