CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
trivialParser.h
Go to the documentation of this file.
1 
6 #ifndef trivialParser_h
7 #define trivialParser_h
8 
9 #include <string>
10 #include <map>
11 #include <fstream>
12 
14 {
15  public :
16 
18  explicit trivialParser (std::string configFile) ;
20  double getVal (std::string name) ;
21 
22  private :
23 
25  std::map <std::string,double> m_config ;
26 
27  private :
28 
30  void parse (std::string configFile) ;
32  void print (std::string prefix = "") ;
34  std::string getNextLine (std::ifstream & input) ;
36  void eraseSpaces (std::string & word) ;
37 
38 } ;
39 
40 #endif
std::map< std::string, double > m_config
container for the output
Definition: trivialParser.h:25
void print(std::string prefix="")
print the read params
double getVal(std::string name)
return the value for that parameter
trivialParser(std::string configFile)
ctor
Definition: trivialParser.cc:6
void parse(std::string configFile)
parse the cfg file
tuple input
Definition: collect_tpl.py:10
std::string getNextLine(std::ifstream &input)
returns the next not commented line
void eraseSpaces(std::string &word)
get rid of spaces