GGS(GenericGEANT4Simulation)Software  2.7.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
GGSInputParser.h
Go to the documentation of this file.
1 /*
2  * GGSInputParser.h
3  *
4  * Created on: 2010-11-02
5  * Author: Emiliano Mocchiutti
6  */
7 
10 #ifndef GGSINPUTPARSER_H
11 #define GGSINPUTPARSER_H
12 #include <iostream>
13 #include <stdio.h>
14 #include <stdlib.h>
15 #include <string>
16 #include <vector>
17 
27 public:
33  static GGSInputParser &GetInstance();
34 
42  void ReadInput(std::string fileName, int *argc, std::string *argv);
43 
51  void ReadInput(std::string fileName);
52 
53  const std::string &GetParameter(std::string parameterName);
54 
55  bool GetFlag(std::string flagName);
56 
57  void Report();
58 
59 protected:
60 private:
63 
65  ~GGSInputParser();
66 
67  std::string _configFileName;
68  std::vector<std::pair<std::string, std::string>> _parameters;
69  static const std::string _nullValue;
70 };
71 
72 #endif // GGSINPUTPARSER_H
static GGSInputParser & GetInstance()
Get instance of the singleton.
void ReadInput(std::string fileName, int *argc, std::string *argv)
Reads configuration file.
Class needed to parse configuration file.