TableHeader Class Reference

Public Member Functions

Private Member Functions

Private Attributes


Detailed Description

Simple class to write a standard HETDEX header of a table to `stdostream`


Constructor & Destructor Documentation

TableHeader::TableHeader (  )  [inline]

Constructor with no arguments

References argc, and argv.

TableHeader::~TableHeader (  )  [inline]

destructor

References clear_colums(), clear_messages(), and clear_versions().


Member Function Documentation

void TableHeader::set_argc_argv ( int  argc,
char *  argv[] 
) [inline]

set argc and argv. If given command line arguments printed out

Parameters:
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

Parameters:
versions,: vector of versions strings to print
void TableHeader::add_version ( std::string  version  )  [inline]

add `version` to `versions` vector

Parameters:
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

Parameters:
messages,: vector of message strings
void TableHeader::add_message ( std::string  message  )  [inline]

Messages written after the version but before the table content

Parameters:
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

Parameters:
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`

Parameters:
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]
void TableHeader::clear_colums (  )  [inline]
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`

Parameters:
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().


Field Documentation

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]
std::vector<std::string> TableHeader::messages [private]
std::vector<std::string> TableHeader::types [private]
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().


Generated on 4 Nov 2015 for CURE by  doxygen 1.6.1