The internal representation for a Defaults_Text object. More...
Public Member Functions | |
Defaults_Textrep (string file) | |
Constructor, construct a Defaults_Textrep instance from an ASCII text-file and command line arguments. More... | |
Defaults_Textrep (string file, int argc, char **argv) | |
Constructor, construct a Defaults_Textrep instance from an ASCII text-file. More... | |
string | get_val (string name) const |
Public Attributes | |
std::map< std::string, std::string > | _map |
Private Member Functions | |
void | doline (string l) |
void | process_args (int argc, char **argv) |
void | read_file (string file) |
The internal representation for a Defaults_Text object.
Definition at line 106 of file Defaults_Text.cc.
hitfit::Defaults_Textrep::Defaults_Textrep | ( | string | file | ) |
Constructor, construct a Defaults_Textrep instance from an ASCII text-file and command line arguments.
file | The name of the input ASCII file to read. See the header file for a description of the format for this and the argument list. Pass an empty string to skip reading a file. |
Definition at line 179 of file Defaults_Text.cc.
References read_file().
hitfit::Defaults_Textrep::Defaults_Textrep | ( | string | file, |
int | argc, | ||
char ** | argv | ||
) |
Constructor, construct a Defaults_Textrep instance from an ASCII text-file.
file | The name of the input ASCII file to read. See the header file for a description of the format for this and the argument list. Pass an empty string to skip reading a file. |
argc | The length of the argument list. |
argv | The argument list. |
Definition at line 194 of file Defaults_Text.cc.
References process_args(), and read_file().
|
private |
Helper function to process a line defining a single parameter.
l | The line to process. |
Definition at line 304 of file Defaults_Text.cc.
References _map, MessageLogger_cfi::cerr, dataset::name, AlCaHLTBitMon_QueryRunRegistry::string, digi_MixPreMix_cfi::strip, and heppy_batch::val.
Referenced by process_args(), and read_file().
string hitfit::Defaults_Textrep::get_val | ( | string | name | ) | const |
Look up parameter name and return its value.
name | The name of the parameter. |
Definition at line 277 of file Defaults_Text.cc.
References _map, MessageLogger_cfi::cerr, dataset::name, AlCaHLTBitMon_QueryRunRegistry::string, and heppy_batch::val.
Referenced by hitfit::Defaults_Text::get_bool(), hitfit::Defaults_Text::get_float(), hitfit::Defaults_Text::get_int(), and hitfit::Defaults_Text::get_string().
|
private |
Look for additional parameter settings in the argument list argc and argv and add the content to data.
argc | The length of the argument list. |
argv | The argument list. |
Definition at line 239 of file Defaults_Text.cc.
References dir2webdir::argc, doline(), i, and checklumidiff::l.
Referenced by Defaults_Textrep().
|
private |
Read parameters from ASCII text file file and add the content to data.
file | The ASCII text file to read. |
Definition at line 212 of file Defaults_Text.cc.
References MessageLogger_cfi::cerr, doline(), f, and checklumidiff::l.
Referenced by Defaults_Textrep().
std::map<std::string,std::string> hitfit::Defaults_Textrep::_map |
The data, maps from parameter names to values (which are stored as strings)
Definition at line 139 of file Defaults_Text.cc.
Referenced by doline(), hitfit::Defaults_Text::exists(), get_val(), and hitfit::operator<<().