Fixed a problem with the MUSRFITPATH-variable introduced recently for msr2data

This commit is contained in:
Bastian M. Wojek 2010-08-23 09:06:14 +00:00
parent d722b018c3
commit 30862e21d0
2 changed files with 16 additions and 11 deletions

View File

@ -18,7 +18,6 @@ NEW integration of a few external musrfit plug-ins into the standard build proce
NEW default estimates for 'data' and 'background' entries in RUN blocks
NEW directory with some msr- and data-files for quick testing of new musrfit installations
NEW option to musrt0: the key 'T' will set the t0 cursor to the maximum of the histogram
FIXED next attempt to fix the d-f-d (MUSR-115) issue
FIXED formatting of the ASCII fit output file for long parameter names (MUSR-142)
FIXED time window frame bug in musrview (MUSR-138)
FIXED calculation of LF relaxation functions for big static widths (MUSR-139)

View File

@ -502,13 +502,16 @@ int main(int argc, char *argv[])
// and do the fitting
if (!onlyInputCreation) {
// check if MUSRFITPATH is set, if not issue a warning
string path(getenv("MUSRFITPATH"));
if (path.empty()) {
cerr << endl << ">> msr2data: **WARNING** The MUSRFITPATH environment variable is not set!" << endl;
cerr << endl << ">> msr2data: **WARNING** Please set it or at least ensure that musrfit can be found on the PATH!" << endl;
} else {
string path;
try {
path = boost::lexical_cast<string>(getenv("MUSRFITPATH"));
path.append("/");
}
catch(boost::bad_lexical_cast &) {
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;
path = "";
}
ostringstream oss;
oss << path << "musrfit" << " " << strInfile.str() << " " << musrfitOptions;
cout << endl << ">> msr2data: **INFO** Calling " << oss.str() << endl;
@ -582,13 +585,16 @@ int main(int argc, char *argv[])
// and do the fitting
if (!onlyInputCreation) {
// check if MUSRFITPATH is set, if not issue a warning
string path(getenv("MUSRFITPATH"));
if (path.empty()) {
cerr << endl << ">> msr2data: **WARNING** The MUSRFITPATH environment variable is not set!" << endl;
cerr << endl << ">> msr2data: **WARNING** Please set it or at least ensure that musrfit can be found on the PATH!" << endl;
} else {
string path;
try {
path = boost::lexical_cast<string>(getenv("MUSRFITPATH"));
path.append("/");
}
catch(boost::bad_lexical_cast &) {
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;
path = "";
}
ostringstream oss;
oss << path << "musrfit" << " " << strInfile.str() << " " << musrfitOptions;
cout << endl << ">> msr2data: **INFO** Calling " << oss.str() << endl;