OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
|
#include <GenerateOpalSimulation.h>
Public Member Functions | |
GenerateOpalSimulation (std::string tmplFile, std::string varDictionary, std::map< std::string, std::string > userValues) | |
~GenerateOpalSimulation () | |
void | writeInputFile (std::string outputFile) |
Private Member Functions | |
void | fillDictionary () |
void | scale (std::string name, std::string *value) |
Helper method to scale variable if necessary. More... | |
Private Attributes | |
std::string | tmplFile_ |
template filename More... | |
std::string | varDictionary_ |
data filename More... | |
std::map< std::string, std::string > | dictionary_ |
holds parsed template data More... | |
std::map< std::string, double > | scaleVars_ |
holds all variables that need scaling More... | |
Definition at line 49 of file GenerateOpalSimulation.h.
|
inline |
Sets up the scaled variables and fills the dictionary with content of data file.
[in] | tmplFile | filename of template file |
[in] | varDictionary | filename of data file |
[in] | userValues | template variables specified by the optimizer |
Definition at line 61 of file GenerateOpalSimulation.h.
References dictionary_, fillDictionary(), scaleVars_, tmplFile_, and varDictionary_.
|
inline |
Definition at line 75 of file GenerateOpalSimulation.h.
References dictionary_, and scaleVars_.
|
inlineprivate |
Parses the data file and insert all values into the dictionary.
The data file needs to conform to the specification:
In some cases the simple parser may fail, the characters scanned when splitting data rows are
' ', \t
Definition at line 145 of file GenerateOpalSimulation.h.
References dictionary_, endl(), Hypervolume::fs, scale(), and varDictionary_.
Referenced by GenerateOpalSimulation().
|
inlineprivate |
Helper method to scale variable if necessary.
Definition at line 198 of file GenerateOpalSimulation.h.
References name, and scaleVars_.
Referenced by fillDictionary().
|
inline |
Replace all template variables in template file with corresponding values from the dictionary and write file to disk
[in] | outputFile | write resulting input file to this file |
Definition at line 86 of file GenerateOpalSimulation.h.
References dictionary_, endl(), and tmplFile_.
|
private |
holds parsed template data
Definition at line 128 of file GenerateOpalSimulation.h.
Referenced by fillDictionary(), GenerateOpalSimulation(), writeInputFile(), and ~GenerateOpalSimulation().
|
private |
holds all variables that need scaling
Definition at line 130 of file GenerateOpalSimulation.h.
Referenced by GenerateOpalSimulation(), scale(), and ~GenerateOpalSimulation().
|
private |
template filename
Definition at line 124 of file GenerateOpalSimulation.h.
Referenced by GenerateOpalSimulation(), and writeInputFile().
|
private |
data filename
Definition at line 126 of file GenerateOpalSimulation.h.
Referenced by fillDictionary(), and GenerateOpalSimulation().