GGS(GenericGEANT4Simulation)Software  2.7.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
GGSParameters.h
Go to the documentation of this file.
1 /*
2  * GGSParameters.h
3  *
4  * Created on: 21 May 2020
5  * Author: Nicola Mori
6  */
7 
10 #ifndef GGSPARAMETERS_H_
11 #define GGSPARAMETERS_H_
12 
13 #include <map>
14 #include <string>
15 #include <vector>
16 
30 public:
32  GGSParameters();
33 
35  GGSParameters(GGSParameters &&params);
36 
43  template <typename T> void SetParam(const std::string &name, T value);
44 
51  template <class T> T GetParam(const std::string &name) const;
52 
53  // *********** UTILITIES ***********
54 
66  bool AreSameParamsAs(const GGSParameters &params) const;
67 
74 
75 private:
76  std::map<std::string, int> _intParams;
77  std::map<std::string, double> _doubleParams;
78  std::map<std::string, std::string> _stringParams;
79  std::map<std::string, bool> _boolParams;
80  std::map<std::string, std::vector<int>> _vectIntParams;
81  std::map<std::string, std::vector<double>> _vectDoubleParams;
82  std::map<std::string, std::vector<std::string>> _vectStringParams;
83  std::map<std::string, std::vector<bool>> _vectBoolParams;
84 };
85 
86 #endif /* GGSPARAMETERS_H_ */
bool AreSameParamsAs(const GGSParameters &params) const
Compares two parameter objects.
T GetParam(const std::string &name) const
Gets a parameter.
void SetParam(const std::string &name, T value)
Sets a parameter.
Class for storing parameters.
Definition: GGSParameters.h:29
GGSParameters & operator=(const GGSParameters &rhs)
Assignment operator.
GGSParameters()
Default constructor.