GGS(GenericGEANT4Simulation)Software  2.7.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
GGSTGeoParams.h
Go to the documentation of this file.
1 /*
2  * GGSTGeoParams.h
3  *
4  * Created on: 28 Dec 2017
5  * Author: Nicola Mori
6  */
7 
10 #ifndef GGSTGEOPARAMS_H_
11 #define GGSTGEOPARAMS_H_
12 
13 #include "TObject.h"
14 
15 #include <map>
16 
18 class GGSTGeoParams : public TObject {
19 public:
20  // *********** SETTERS ***********
21 
22  // ***** Scalar geometry parameters *****
23 
28  void SetIntGeoParams(const std::map<std::string, int> &intGeoParams);
29 
34  void SetBoolGeoParams(const std::map<std::string, bool> &boolGeoParams);
35 
40  void SetRealGeoParams(const std::map<std::string, double> &realGeoParams);
41 
46  void SetStringGeoParams(const std::map<std::string, std::string> &stringGeoParams);
47 
48  // ***** Vector geometry parameters *****
49 
54  void SetVectIntGeoParams(const std::map<std::string, std::vector<int>> &vectIntGeoParams);
55 
60  void SetVectBoolGeoParams(const std::map<std::string, std::vector<bool>> &vectBoolGeoParams);
61 
66  void SetVectRealGeoParams(const std::map<std::string, std::vector<double>> &vectRealGeoParams);
67 
72  void SetVectStringGeoParams(const std::map<std::string, std::vector<std::string>> &vectStringGeoParams);
73 
74  // *********** GETTERS ***********
75 
76  // ***** Scalar geometry parameters *****
77 
84  int GetIntGeoParam(const std::string &name) const;
85 
92  bool GetBoolGeoParam(const std::string &name) const;
93 
100  double GetRealGeoParam(const std::string &name) const;
101 
108  std::string GetStringGeoParam(const std::string &name) const;
109 
110  // ***** Vector geometry parameters *****
111 
118  std::vector<int> GetVectIntGeoParam(const std::string &name) const;
119 
126  std::vector<bool> GetVectBoolGeoParam(const std::string &name) const;
127 
134  std::vector<double> GetVectRealGeoParam(const std::string &name) const;
135 
142  std::vector<std::string> GetVectStringGeoParam(const std::string &name) const;
143 
144  // *********** UTILITIES ***********
145 
157  bool AreSameParamsAs(const GGSTGeoParams &params) const;
158 
159 private:
160  std::map<std::string, int> _intGeoParams;
161  std::map<std::string, double> _realGeoParams;
162  std::map<std::string, std::string> _stringGeoParams;
163  std::map<std::string, bool> _boolGeoParams;
164  std::map<std::string, std::vector<int>> _vectIntGeoParams;
165  std::map<std::string, std::vector<double>> _vectRealGeoParams;
166  std::map<std::string, std::vector<std::string>> _vectStringGeoParams;
167  std::map<std::string, std::vector<bool>> _vectBoolGeoParams;
168 
169  ClassDef(GGSTGeoParams, 3)
170 };
171 
172 #endif /* GGSTGEOPARAMS_H_ */
bool GetBoolGeoParam(const std::string &name) const
Gets a boolean geometry parameter.
void SetVectBoolGeoParams(const std::map< std::string, std::vector< bool >> &vectBoolGeoParams)
Sets the vector-of-booleans geometry parameters.
std::vector< int > GetVectIntGeoParam(const std::string &name) const
Gets a vector-of-integers geometry parameter.
std::vector< bool > GetVectBoolGeoParam(const std::string &name) const
Gets a vector-of-booleans geometry parameter.
void SetStringGeoParams(const std::map< std::string, std::string > &stringGeoParams)
Sets the string geometry parameters.
bool AreSameParamsAs(const GGSTGeoParams &params) const
Compares two geometry parameter objects.
int GetIntGeoParam(const std::string &name) const
Gets an integer geometry parameter.
std::vector< double > GetVectRealGeoParam(const std::string &name) const
Gets a vector-of-reals geometry parameter.
void SetRealGeoParams(const std::map< std::string, double > &realGeoParams)
Sets the real geometry parameters.
std::vector< std::string > GetVectStringGeoParam(const std::string &name) const
Gets a vector-of-strings geometry parameter.
void SetVectRealGeoParams(const std::map< std::string, std::vector< double >> &vectRealGeoParams)
Sets the vector-of-reals geometry parameters.
std::string GetStringGeoParam(const std::string &name) const
Gets a string geometry parameter.
void SetVectStringGeoParams(const std::map< std::string, std::vector< std::string >> &vectStringGeoParams)
Sets the vector-of-strings geometry parameters.
Class for storing the geometry parameters on Root output file.
Definition: GGSTGeoParams.h:18
double GetRealGeoParam(const std::string &name) const
Gets a real geometry parameter.
void SetVectIntGeoParams(const std::map< std::string, std::vector< int >> &vectIntGeoParams)
Sets the vector-of-integers geometry parameters.
void SetBoolGeoParams(const std::map< std::string, bool > &boolGeoParams)
Sets the boolean geometry parameters.
void SetIntGeoParams(const std::map< std::string, int > &intGeoParams)
Sets the integer geometry parameters.