From a7edb9d23222acfccf969a178add638172a061d1 Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Wed, 2 May 2018 13:24:54 +0200 Subject: [PATCH] added a musrfit cmd line flag which allows to check if NeXus support is enabled. --- src/musrfit.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/musrfit.cpp b/src/musrfit.cpp index f03c6952..c8f3e785 100644 --- a/src/musrfit.cpp +++ b/src/musrfit.cpp @@ -91,11 +91,13 @@ void musrfit_syntax() { cout << endl << "usage: musrfit [ [-k, --keep-mn2-ouput] [-c, --chisq-only] [-t, --title-from-data-file]"; cout << endl << " [-e, --estimateN0] [-p, --per-run-block-chisq]"; - cout << endl << " [--dump ] [--timeout ] | --version | --help"; + cout << endl << " [--dump ] [--timeout ] |"; + cout << endl << " --nexus-support | --version | --help"; cout << endl << " : msr input file"; cout << endl << " 'musrfit ' will execute musrfit"; cout << endl << " 'musrfit' or 'musrfit --help' will show this help"; cout << endl << " 'musrfit --version' will print the musrfit version"; + cout << endl << " 'musrfit --nexus-support' will print if NeXus support is available."; cout << endl << " -k, --keep-mn2-output: will rename the files MINUIT2.OUTPUT and "; cout << endl << " MINUIT2.root to -mn2.output and -mn2.root,"; cout << endl << " respectively,"; @@ -545,9 +547,14 @@ int main(int argc, char *argv[]) cout << endl << "musrfit git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << endl << endl; #endif return PMUSR_SUCCESS; - } - - if (!strcmp(argv[1], "--help")) { + } else if (!strcmp(argv[1], "--nexus-support")) { +#ifdef PNEXUS_ENABLED + cout << endl << ">> musrfit: NeXus support enabled." << endl << endl; +#else + cout << endl << ">> musrfit: NeXus support NOT enabled." << endl << endl; +#endif + return PMUSR_SUCCESS; + } else if (!strcmp(argv[1], "--help")) { show_syntax = true; } }