CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Private Member Functions
hitfit::Defaults_Textrep Class Reference

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)
 

Detailed Description

The internal representation for a Defaults_Text object.

Definition at line 106 of file Defaults_Text.cc.

Constructor & Destructor Documentation

hitfit::Defaults_Textrep::Defaults_Textrep ( string  file)

Constructor, construct a Defaults_Textrep instance from an ASCII text-file and command line arguments.

Parameters
fileThe 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.

hitfit::Defaults_Textrep::Defaults_Textrep ( string  file,
int  argc,
char **  argv 
)

Constructor, construct a Defaults_Textrep instance from an ASCII text-file.

Parameters
fileThe 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.
argcThe length of the argument list.
argvThe argument list.

Definition at line 194 of file Defaults_Text.cc.

Member Function Documentation

void hitfit::Defaults_Textrep::doline ( string  l)
private

Helper function to process a line defining a single parameter.

Parameters
lThe line to process.

Definition at line 304 of file Defaults_Text.cc.

string hitfit::Defaults_Textrep::get_val ( string  name) const

Look up parameter name and return its value.

Parameters
nameThe name of the parameter.
Return:
The value of the parameter in C++ string format.

Definition at line 277 of file Defaults_Text.cc.

void hitfit::Defaults_Textrep::process_args ( int  argc,
char **  argv 
)
private

Look for additional parameter settings in the argument list argc and argv and add the content to data.

Parameters
argcThe length of the argument list.
argvThe argument list.

Definition at line 239 of file Defaults_Text.cc.

void hitfit::Defaults_Textrep::read_file ( string  file)
private

Read parameters from ASCII text file file and add the content to data.

Parameters
fileThe ASCII text file to read.

Definition at line 212 of file Defaults_Text.cc.

Member Data Documentation

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.