Simple class to write a standard HETDEX header of a table to `stdostream`
TableHeader::~TableHeader | ( | ) | [inline] |
destructor
References clear_colums(), clear_messages(), and clear_versions().
void TableHeader::set_argc_argv | ( | int | argc, | |
char * | argv[] | |||
) | [inline] |
set argc and argv. If given command line arguments printed out
argc,: | integer, number of command line arguments | |
argv,: | list of command line arguments |
Referenced by main().
void TableHeader::set_versions | ( | std::vector< std::string > | versions | ) | [inline] |
set the list of version to be printed
versions,: | vector of versions strings to print |
void TableHeader::add_version | ( | std::string | version | ) | [inline] |
add `version` to `versions` vector
version,: | version string |
References versions.
Referenced by copy_org_models(), fit_initial_dist(), main(), and refit_models().
void TableHeader::pop_version | ( | ) | [inline] |
pop back the last element of `versions`
References versions.
Referenced by copy_org_models(), fit_initial_dist(), and refit_models().
void TableHeader::set_messages | ( | std::vector< std::string > | messages | ) | [inline] |
Messages written after the version but before the table content
messages,: | vector of message strings |
void TableHeader::add_message | ( | std::string | message | ) | [inline] |
Messages written after the version but before the table content
message,: | message string |
References messages.
Referenced by copy_org_models(), fit_distortion(), fit_fibermodel(), fit_initial_dist(), fit_with_trace(), main(), refit_models(), and write_reference_files().
void TableHeader::set_columns | ( | std::vector< std::string > | types, | |
std::vector< std::string > | units, | |||
std::vector< std::string > | labels, | |||
std::vector< std::string > | explanations | |||
) |
The header of the table must have the following quantities listed Column Type Units Label Explanations
types,: | strings with the types of the columns | |
units,: | strings with the units of the quantities in the columns | |
labels,: | short labels of the colums | |
explanation,: | long explanation of the columns |
The header of the table must have the following quantities listed Column Type Units Label Explanations types, units, labels and explanations must have the same size
Referenced by fit_distortion(), fit_fibermodel(), fit_initial_dist(), fit_with_trace(), main(), refit_models(), and write_reference_files().
void TableHeader::write_header | ( | std::ostream & | os, | |
const std::string & | filename | |||
) |
Function to write a the full header to `stdostream`
os,: | `stdostream` where to write | |
filename,: | name of the file where to write (leave empty or "stdout" if to standard output) |
Function to write a the full header to `stdostream`
References argc, argv, messages, types, versions, write_cmd_line(), and write_table_header().
Referenced by copy_org_models(), fit_distortion(), fit_fibermodel(), fit_initial_dist(), fit_with_trace(), main(), refit_models(), and write_reference_files().
void TableHeader::clear_versions | ( | ) | [inline] |
Clear the versions, messages and column vectors for future use/cleanup
References versions.
Referenced by ~TableHeader().
void TableHeader::clear_messages | ( | ) | [inline] |
References messages.
Referenced by copy_org_models(), fit_distortion(), fit_fibermodel(), fit_initial_dist(), fit_with_trace(), refit_models(), write_reference_files(), and ~TableHeader().
void TableHeader::clear_colums | ( | ) | [inline] |
References explanations, labels, types, and units.
Referenced by fit_distortion(), fit_fibermodel(), fit_initial_dist(), fit_with_trace(), refit_models(), write_reference_files(), and ~TableHeader().
void TableHeader::write_table_header | ( | std::ostream & | os, | |
const std::string & | filename | |||
) | [private] |
Function to write a piece of the standard HETDEX table header into `stdostream`
os,: | `stdostream` where to write | |
filename,: | name of the file where to write (leave empty or "stdout" if to standard output) |
Function to write a piece of the standard HETDEX table header into `stdostream`
References comp_string_size(), explanations, labels, types, and units.
Referenced by write_header().
int TableHeader::argc [private] |
Referenced by TableHeader(), and write_header().
char** TableHeader::argv [private] |
Referenced by TableHeader(), and write_header().
std::vector<std::string> TableHeader::versions [private] |
Referenced by add_version(), clear_versions(), pop_version(), and write_header().
std::vector<std::string> TableHeader::messages [private] |
Referenced by add_message(), clear_messages(), and write_header().
std::vector<std::string> TableHeader::types [private] |
Referenced by clear_colums(), write_header(), and write_table_header().
std::vector<std::string> TableHeader::units [private] |
Referenced by clear_colums(), and write_table_header().
std::vector<std::string> TableHeader::labels [private] |
Referenced by clear_colums(), and write_table_header().
std::vector<std::string> TableHeader::explanations [private] |
Referenced by clear_colums(), and write_table_header().