Slight improvement when an empty MUSRFITPATH environment variable is set

This commit is contained in:
Bastian M. Wojek
2011-02-22 19:26:31 +00:00
parent c048dc4553
commit 9624e5171f
4 changed files with 20 additions and 4 deletions

View File

@ -1305,13 +1305,16 @@ bool PMsr2Data::PrepareGlobalInputFile(unsigned int tempRun, const string &msrOu
// and do the fitting
// check if MUSRFITPATH is set, if not issue a warning
string path("");
bool pathSet(false);
char *pathPtr(getenv("MUSRFITPATH"));
if (pathPtr) {
path = boost::lexical_cast<string>(pathPtr);
if (!path.empty()) {
pathSet = true;
path.append("/");
}
} else {
}
if (!pathSet) {
cerr << endl << ">> msr2data: **WARNING** The MUSRFITPATH environment variable is not set!";
cerr << endl << ">> msr2data: **WARNING** Please set it or at least ensure that musrfit can be found on the PATH!" << endl;
}