Reworked Container structure and wrote template for n-dim Containers.

This commit is contained in:
Christian
2019-04-09 10:32:12 +02:00
parent e5d66411bb
commit b5a73da3b8
22 changed files with 43402 additions and 311 deletions
+11 -3
View File
@@ -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;