Reworked Container structure and wrote template for n-dim Containers.
This commit is contained in:
@@ -27,7 +27,7 @@ double getParameter(string parName) {
|
||||
if (parfile == "") {
|
||||
throw MyException("Parameter::getParameter: Environment variable parfile not defined.");
|
||||
}
|
||||
makePath(parpath);
|
||||
parpath = makePath(parpath);
|
||||
string loadFilePath = parpath + parfile;
|
||||
ifstream fileStream(loadFilePath);
|
||||
|
||||
@@ -67,6 +67,7 @@ double getParameter(string parName) {
|
||||
}
|
||||
|
||||
ss.clear();
|
||||
ss.str("");
|
||||
ss<<"Parameter::getParameter: Parameter not found in file.\n parName =\t"<<parName<<"\n loadFilePath = \t"<<loadFilePath;
|
||||
throw MyException(ss.str());
|
||||
}
|
||||
@@ -78,11 +79,11 @@ std::string getEnv (std::string envName) {
|
||||
return val == NULL ? std::string("") : std::string(val);
|
||||
}
|
||||
|
||||
void makePath (std::string &path) {
|
||||
string makePath (std::string path) {
|
||||
if (path.back() != '/') {
|
||||
path = path + '/';
|
||||
}
|
||||
return;
|
||||
return (path);
|
||||
}
|
||||
|
||||
bool checkIgnoreLine(std::string lineFromFile) {
|
||||
@@ -121,6 +122,13 @@ string getTimeString() {
|
||||
return(str);
|
||||
}
|
||||
|
||||
string getHomebase() {
|
||||
std::string file = __FILE__;
|
||||
file.erase(file.length()-13);
|
||||
return(file);
|
||||
}
|
||||
|
||||
|
||||
// Calculate Kinematic Relations
|
||||
double get_Ekin_eV_from_speed(double Speed_ms, double mass_eV) {
|
||||
double beta = Speed_ms/c_ms;
|
||||
|
||||
Reference in New Issue
Block a user