12 if(parametersFactoryMap->find(parametersMethod) == parametersFactoryMap->end())
14 cout <<
" ** WARNING: " << parametersMethod <<
" NOT FOUND IN parameter Factory Map." << endl;
18 return (*parametersFactoryMap)[parametersMethod]();
23 map<string, parameterFactoryInMap> parameterFactoryMap;
31 return parameterFactoryMap;
37 map<string, string> parmap;
39 for(map<string, double>::iterator it = dataMap.begin(); it != dataMap.end(); it++)
41 string key =
"parameter " + it->first;
52 map<string, double> gParameters;
55 for(map<string, parameterFactoryInMap>::iterator it = parameterFactoryMap.begin(); it != parameterFactoryMap.end(); it++)
64 map<string, double> thisPMap = thisFactory->
loadParameters(go, rc);
67 for(map<string, double>::iterator ipar = thisPMap.begin(); ipar != thisPMap.end(); ipar++)
71 if(gParameters.find(ipar->first) != gParameters.end() &&
verbosity)
73 cout <<
" ** WARNING! Parameter " << ipar->first <<
" in factory " << it->first <<
" exists already! " << endl;
77 gParameters[ipar->first] = ipar->second;
89 string pvalue = gt.
data[1];
90 string punits = gt.
data[2];
96 cout <<
" > gemc " << factory <<
" Parameters: \"" + gt.
data[0] +
"\" loaded with value " + gt.
data[1] + gt.
data[2] +
". Description: " + gt.
data[3] << endl;
map< string, parameterFactoryInMap > registerParameterFactories()
double get_par_value(gtable gt)
parametersFactory * getParameterFactory(map< string, parameterFactoryInMap > *parametersFactoryMap, string parametersMethod)
map< string, double > loadAllParameters(map< string, parameterFactoryInMap > parameterFactoryMap, goptions go, runConditions rc)
double get_number(string v, int warn_no_unit)
Returns number with dimension from string, i.e. 100*cm.
map< string, string > getParametersMap(map< string, double > dataMap)
string stringify(double x)
map< string, aopt > optMap
Options map.
static parametersFactory * createParametersFactory()
static parametersFactory * createParametersFactory()
void initFactory(string ft)
virtual map< string, double > loadParameters(goptions, runConditions)=0
void log_value(gtable gt, string factory)