GEMC  2.2
Geant4 Monte-Carlo Framework
parameter_factory.h
Go to the documentation of this file.
1 #ifndef PARAMETER_FACTORY_H
2 #define PARAMETER_FACTORY_H
3 
4 // C++ headers
5 #include <map>
6 #include <iostream>
7 using namespace std;
8 
9 // gemc headers
10 #include "run_conditions.h"
11 #include "options.h"
12 #include "utils.h"
13 
14 
16 {
17  public:
18  virtual map<string, double> loadParameters(goptions, runConditions) = 0; // Pure Virtual Method to initialize the parameters
19  virtual ~parametersFactory(){}
20 
21  string factoryType;
22 
23  void initFactory(string ft)
24  {
25  cout << " > gemc Init: " << ft << " Parameters Factory is Initialized " << endl;
26  factoryType = ft;
27  }
28 };
29 
30 typedef parametersFactory *(*parameterFactoryInMap)(); // Define parameterFactoryInMap as a pointer to a function that returns a pointer
31 
32 parametersFactory *getParameterFactory(map<string, parameterFactoryInMap> *, string); // returns parameterFactory Function from Factory Map
33 
34 map<string, parameterFactoryInMap> registerParameterFactories(); // Registers parameterFactory in Factory Map
35 
36 map<string, string> getParametersMap(map<string, double>); // Return Parameter Map
37 
38 map<string, double> loadAllParameters(map<string, parameterFactoryInMap>, goptions, runConditions);
39 
40 
41 // from gtable to value
42 double get_par_value(gtable);
43 
44 // log parameters
45 void log_value(gtable, string);
46 
47 #endif
void log_value(gtable, string)
map< string, parameterFactoryInMap > registerParameterFactories()
Definition: utils.h:65
STL namespace.
map< string, string > getParametersMap(map< string, double >)
double get_par_value(gtable)
map< string, double > loadAllParameters(map< string, parameterFactoryInMap >, goptions, runConditions)
virtual ~parametersFactory()
void initFactory(string ft)
parametersFactory * getParameterFactory(map< string, parameterFactoryInMap > *, string)