Merged master into beta-NMR

This commit is contained in:
Zaher Salman 2019-02-19 08:43:38 +01:00
commit dcfa461537
22 changed files with 213 additions and 32 deletions

View File

@ -24,13 +24,18 @@ set (CPACK_SET_DESTDIR "OFF")
set (CPACK_PACKAGE_RELOCATABLE "true")
if (${CPACK_GENERATOR} STREQUAL "RPM")
set(CPACK_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
set(CPACK_PACKAGING_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
set (CPACK_RPM_PACKAGE_REQUIRES "root >= 6.14.08")
set (CPACK_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
set (CPACK_PACKAGING_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
set (CPACK_RPM_FILE_NAME "RPM-DEFAULT")
set (CPACK_RPM_PACKAGE_RELEASE "1")
# next variable for RHEL, CentOS, Fedfora
set (CPACK_RPM_PACKAGE_RELEASE_DIST "")
set (CPACK_RPM_PACKAGE_LICENSE "GPLv2")
set (CPACK_RPM_PACKAGE_VENDOR "Paul Scherrer Institute - LMU - LEM")
set (CPACK_RPM_CHANGELOG_FILE "@PROJECT_SOURCE_DIR@/cmake/ChangeLogRPM")
set (CPACK_RPM_POST_INSTALL_SCRIPT_FILE "@PROJECT_SOURCE_DIR@/cmake/post_install.sh")
set (CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE "@PROJECT_SOURCE_DIR@/cmake/post_uninstall.sh")
endif ()
if (${CPACK_GENERATOR} STREQUAL "DEB")

12
cmake/post_install.sh Normal file
View File

@ -0,0 +1,12 @@
#!/bin/bash
echo " >> musrfit post install script started ..."
# test if nemu-x86_64.conf does not exist
if [ ! -f "/etc/ld.so.conf.d/nemu-x86_64.conf" ]
then
echo "/usr/local/lib" >> /etc/ld.so.conf.d/nemu-x86_64.conf
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/nemu-x86_64.conf
fi
/sbin/ldconfig

5
cmake/post_uninstall.sh Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
echo " >> musrfit post uninstall script started ..."
/sbin/ldconfig

View File

@ -2,35 +2,41 @@
#--- generate necessary dictionaries ------------------------------------------
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
set(PREFIX_INC ${CMAKE_INSTALL_PREFIX}/include)
root_generate_dictionary(
PFourierCanvasDict
-I${FFTW3_INCLUDE_DIR} ${MUSRFIT_INC}/PFourierCanvas.h
-I${FFTW3_INCLUDE_DIR} -I${MUSRFIT_INC} -I${PREFIX_INC} PFourierCanvas.h
LINKDEF ${MUSRFIT_INC}/PFourierCanvasLinkDef.h
OPTIONS -inlineInputHeader
MODULE PFourierCanvas
)
root_generate_dictionary(
PMusrCanvasDict
-I${Boost_INCLUDE_DIR} -I${FFTW3_INCLUDE_DIR} ${MUSRFIT_INC}/PMusrCanvas.h
-I${Boost_INCLUDE_DIR} -I${FFTW3_INCLUDE_DIR} -I${MUSRFIT_INC} -I${PREFIX_INC} PMusrCanvas.h
LINKDEF ${MUSRFIT_INC}/PMusrCanvasLinkDef.h
OPTIONS -inlineInputHeader
MODULE PMusrCanvas
)
root_generate_dictionary(
PMusrT0Dict
-I${Boost_INCLUDE_DIR} -I${FFTW3_INCLUDE_DIR} ${MUSRFIT_INC}/PMusrT0.h
-I${Boost_INCLUDE_DIR} -I${FFTW3_INCLUDE_DIR} -I${MUSRFIT_INC} -I${PREFIX_INC} PMusrT0.h
LINKDEF ${MUSRFIT_INC}/PMusrT0LinkDef.h
OPTIONS -inlineInputHeader
MODULE PMusrT0
)
root_generate_dictionary(
PStartupHandlerDict
-I${FFTW3_INCLUDE_DIR} ${MUSRFIT_INC}/PStartupHandler.h
-I${FFTW3_INCLUDE_DIR} -I${MUSRFIT_INC} -I${PREFIX_INC} PStartupHandler.h
LINKDEF ${MUSRFIT_INC}/PStartupHandlerLinkDef.h
OPTIONS -inlineInputHeader
MODULE PStartupHandler
)
root_generate_dictionary(
PUserFcnBaseDict
-I${FFTW3_INCLUDE_DIR} ${MUSRFIT_INC}/PUserFcnBase.h
-I${FFTW3_INCLUDE_DIR} -I${MUSRFIT_INC} -I${PREFIX_INC} PUserFcnBase.h
LINKDEF ${MUSRFIT_INC}/PUserFcnBaseLinkDef.h
OPTIONS -inlineInputHeader
MODULE PUserFcnBase
)
@ -161,15 +167,31 @@ install(
)
#--- install headers ----------------------------------------------------------
#--- only install headers needed for classes with dictionary
install(
FILES ${MUSRFIT_INC}/PFourierCanvas.h
FILES ${MUSRFIT_INC}/PFitterFcn.h
${MUSRFIT_INC}/PFitter.h
${MUSRFIT_INC}/PFourierCanvas.h
${MUSRFIT_INC}/PFourier.h
${MUSRFIT_INC}/PFunctionGrammar.h
${MUSRFIT_INC}/PFunction.h
${MUSRFIT_INC}/PFunctionHandler.h
${MUSRFIT_INC}/PMsr2Data.h
${MUSRFIT_INC}/PMsrHandler.h
${MUSRFIT_INC}/PMusrCanvas.h
${MUSRFIT_INC}/PMusr.h
${MUSRFIT_INC}/PMusrT0.h
${MUSRFIT_INC}/PPrepFourier.h
${MUSRFIT_INC}/PRunAsymmetry.h
${MUSRFIT_INC}/PRunAsymmetryRRF.h
${MUSRFIT_INC}/PRunBase.h
${MUSRFIT_INC}/PRunDataHandler.h
${MUSRFIT_INC}/PRunListCollection.h
${MUSRFIT_INC}/PRunMuMinus.h
${MUSRFIT_INC}/PRunNonMusr.h
${MUSRFIT_INC}/PRunSingleHisto.h
${MUSRFIT_INC}/PRunSingleHistoRRF.h
${MUSRFIT_INC}/PStartupHandler.h
${MUSRFIT_INC}/PTheory.h
${MUSRFIT_INC}/PUserFcnBase.h
DESTINATION include
)

View File

@ -3,12 +3,13 @@
#--- generate necessary dictionaries ------------------------------------------
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
set(CUBA_INC ${CMAKE_SOURCE_DIR}/src/external/libCuba/src)
set(PREFIX_INC ${CMAKE_INSTALL_PREFIX}/include)
root_generate_dictionary(
BMWStartupHandlerDict
-I${MUSRFIT_INC}
BMWStartupHandler.h
-I${MUSRFIT_INC} -I${PREFIX_INC} BMWStartupHandler.h
LINKDEF BMWStartupHandlerLinkDef.h
OPTIONS -inlineInputHeader
MODULE BMWStartupHandler
)

View File

@ -2,20 +2,27 @@
#--- generate necessary dictionaries ------------------------------------------
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
set(PREFIX_INC ${CMAKE_INSTALL_PREFIX}/include)
root_generate_dictionary(
PMagProximityFitterDict
-I${FFTW3_INCLUDE_DIR}
-I${MUSRFIT_INC}
-I${CMAKE_CURRENT_SOURCE_DIR}
-I${PREFIX_INC}
PMagProximityFitter.h
LINKDEF PMagProximityFitterLinkDef.h
OPTIONS -inlineInputHeader
MODULE PMagProximityFitter
)
root_generate_dictionary(
PMPStartupHandlerDict
-I${MUSRFIT_INC}
-I${CMAKE_CURRENT_SOURCE_DIR}
-I${PREFIX_INC}
PMPStartupHandler.h
LINKDEF PMPStartupHandlerLinkDef.h
OPTIONS -inlineInputHeader
MODULE PMPStartupHandler
)

View File

@ -1,8 +1,14 @@
# - TMusrRunHeader library ----------------------------------------------------
#--- generate necessary dictionaries ------------------------------------------
set(MUSRROOT_INC ${CMAKE_SOURCE_DIR}/src/external/MusrRoot)
set(PREFIX_INC ${CMAKE_INSTALL_PREFIX}/include)
root_generate_dictionary(
TMusrRunHeaderDict TMusrRunHeader.h LINKDEF TMusrRunHeaderLinkDef.h
TMusrRunHeaderDict
-I${MUSRROOT_INC} -I${PREFIX_INC} TMusrRunHeader.h
LINKDEF TMusrRunHeaderLinkDef.h
OPTIONS -inlineInputHeader
MODULE TMusrRunHeader
)

View File

@ -2,17 +2,29 @@
#--- generate necessary dictionaries ------------------------------------------
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
set(NONLOCAL_INC ${CMAKE_SOURCE_DIR}/src/external/Nonlocal)
set(PREFIX_INC ${CMAKE_INSTALL_PREFIX}/include)
root_generate_dictionary(
PNL_PippardFitterDict
-I${FFTW3_INCLUDE_DIR}
-I${MUSRFIT_INC}
-I${MUSRFIT_INC}
-I${NONLOCAL_INC}
-I${CMAKE_CURRENT_SOURCE_DIR}
-I${PREFIX_INC}
PNL_PippardFitter.h
LINKDEF PNL_PippardFitterLinkDef.h
OPTIONS -inlineInputHeader
MODULE PNL_PippardFitter
)
root_generate_dictionary(
PNL_StartupHandlerDict PNL_StartupHandler.h LINKDEF PNL_StartupHandlerLinkDef.h
PNL_StartupHandlerDict
-I${NONLOCAL_INC}
-I${CMAKE_CURRENT_SOURCE_DIR}
-I${PREFIX_INC}
PNL_StartupHandler.h
LINKDEF PNL_StartupHandlerLinkDef.h
OPTIONS -inlineInputHeader
MODULE PNL_StartupHandler
)
@ -38,7 +50,7 @@ target_include_directories(
PNL_PippardFitter BEFORE PRIVATE
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
$<BUILD_INTERFACE:${MUSRFIT_INC}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
)
#--- set target properties, e.g. version --------------------------------------
@ -64,7 +76,8 @@ install(
#--- install PNL_PippardFitter header -----------------------------------------
install(
FILES
FILES
PNonlocal.h
PNL_PippardFitter.h
PNL_RgeHandler.h
PNL_StartupHandler.h

View File

@ -1,12 +1,21 @@
# -TLemRunHeader library ------------------------------------------------------
#--- generate necessary dictionaries ------------------------------------------
set(TLEMRUNHEADER_INC ${CMAKE_SOURCE_DIR}/src/external/TLemRunHeader)
set(PREFIX_INC ${CMAKE_INSTALL_PREFIX}/include)
root_generate_dictionary(
TLemRunHeaderDict TLemRunHeader.h LINKDEF TLemRunHeaderLinkDef.h
TLemRunHeaderDict
-I${TLEMRUNHEADER_INC} -I${PREFIX_INC} TLemRunHeader.h
LINKDEF TLemRunHeaderLinkDef.h
OPTIONS -inlineInputHeader
MODULE TLemRunHeader
)
root_generate_dictionary(
TLemStatsDict TLemStats.h LINKDEF TLemStatsLinkDef.h
TLemStatsDict
-I${TLEMRUNHEADER_INC} -I${PREFIX_INC} TLemStats.h
LINKDEF TLemStatsLinkDef.h
OPTIONS -inlineInputHeader
MODULE TLemStats
)

View File

@ -5,13 +5,13 @@ add_subdirectory(libLineProfile)
#--- generate necessary dictionaries ------------------------------------------
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
set(PREFIX_INC ${CMAKE_INSTALL_PREFIX}/include)
root_generate_dictionary(
TBNMRDict
-I${FFTW3_INCLUDE_DIR}
-I${MUSRFIT_INC}
TBNMR.h
-I${FFTW3_INCLUDE_DIR} -I${MUSRFIT_INC} -I${PREFIX_INC} TBNMR.h
LINKDEF TBNMRLinkDef.h
OPTIONS -inlineInputHeader
MODULE TBNMR
)

View File

@ -4,15 +4,13 @@
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
set(BMW_TOOLS_INC ${CMAKE_SOURCE_DIR}/src/external/BMWtools)
set(POFB_INC ${CMAKE_SOURCE_DIR}/src/external/libFitPofB/include)
set(PREFIX_INC ${CMAKE_INSTALL_PREFIX}/include)
root_generate_dictionary(
TCalcMeanFieldsLEMDict
-I${FFTW3_INCLUDE_DIR}
-I${MUSRFIT_INC}
-I${BMW_TOOLS_INC}
-I${POFB_INC}
TCalcMeanFieldsLEM.h
-I${FFTW3_INCLUDE_DIR} -I${MUSRFIT_INC} -I${BMW_TOOLS_INC} -I${POFB_INC} -I${PREFIX_INC} TCalcMeanFieldsLEM.h
LINKDEF TCalcMeanFieldsLEMLinkDef.h
OPTIONS -inlineInputHeader
MODULE TCalcMeanFieldsLEM
)

View File

@ -4,6 +4,7 @@
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
set(BMW_TOOLS_INC ${CMAKE_SOURCE_DIR}/src/external/BMWtools)
set(POFB_INC ${CMAKE_SOURCE_DIR}/src/external/libFitPofB/include)
set(PREFIX_INC ${CMAKE_INSTALL_PREFIX}/include)
root_generate_dictionary(
TLondon1DDict
@ -12,8 +13,10 @@ root_generate_dictionary(
-I${BMW_TOOLS_INC}
-I${POFB_INC}
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
-I${PREFIX_INC}
TLondon1D.h
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/../include/TLondon1DLinkDef.h
OPTIONS -inlineInputHeader
MODULE TLondon1D
)
root_generate_dictionary(
@ -23,8 +26,10 @@ root_generate_dictionary(
-I${BMW_TOOLS_INC}
-I${POFB_INC}
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
-I${PREFIX_INC}
TVortex.h
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/../include/TVortexLinkDef.h
OPTIONS -inlineInputHeader
MODULE TVortex
)
root_generate_dictionary(
@ -34,8 +39,10 @@ root_generate_dictionary(
-I${BMW_TOOLS_INC}
-I${POFB_INC}
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
-I${PREFIX_INC}
TSkewedGss.h
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/../include/TSkewedGssLinkDef.h
OPTIONS -inlineInputHeader
MODULE TSkewedGss
)

View File

@ -3,14 +3,17 @@
#--- generate necessary dictionaries ------------------------------------------
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
set(BMW_TOOLS_INC ${CMAKE_SOURCE_DIR}/src/external/BMWtools)
set(PREFIX_INC ${CMAKE_INSTALL_PREFIX}/include)
root_generate_dictionary(
TGapIntegralsDict
-I${FFTW3_INCLUDE_DIR}
-I${MUSRFIT_INC}
-I${BMW_TOOLS_INC}
-I${PREFIX_INC}
TGapIntegrals.h
LINKDEF TGapIntegralsLinkDef.h
OPTIONS -inlineInputHeader
MODULE TGapIntegrals
)

View File

@ -3,14 +3,17 @@
#--- generate necessary dictionaries ------------------------------------------
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
set(BMW_TOOLS_INC ${CMAKE_SOURCE_DIR}/src/external/BMWtools)
set(PREFIX_INC ${CMAKE_INSTALL_PREFIX}/include)
root_generate_dictionary(
TLFRelaxationDict
-I${FFTW3_INCLUDE_DIR}
-I${MUSRFIT_INC}
-I${BMW_TOOLS_INC}
-I${PREFIX_INC}
TLFRelaxation.h
LINKDEF TLFRelaxationLinkDef.h
OPTIONS -inlineInputHeader
MODULE TLFRelaxation
)

View File

@ -2,6 +2,7 @@
#--- generate necessary dictionaries ------------------------------------------
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
set(PREFIX_INC ${CMAKE_INSTALL_PREFIX}/include)
root_generate_dictionary(
PPhotoMeissnerDict
@ -10,16 +11,20 @@ root_generate_dictionary(
-I${ROOT_INCLUDE_DIRS}
-I${MUSRFIT_INC}
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
-I${PREFIX_INC}
PPhotoMeissner.h
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/../include/PPhotoMeissnerLinkDef.h
OPTIONS -inlineInputHeader
MODULE PPhotoMeissner
)
root_generate_dictionary(
PStartupHandler_PMDict
-I${MUSRFIT_INC}
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
-I${PREFIX_INC}
PStartupHandler_PM.h
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/../include/PStartupHandler_PMLinkDef.h
OPTIONS -inlineInputHeader
MODULE PStartupHandler_PM
)

View File

@ -2,21 +2,26 @@
#--- generate necessary dictionaries ------------------------------------------
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
set(PREFIX_INC ${CMAKE_INSTALL_PREFIX}/include)
root_generate_dictionary(
PSkewedLorentzianDict
-I${FFTW3_INCLUDE_DIR}
-I${MUSRFIT_INC}
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
-I${PREFIX_INC}
PSkewedLorentzian.h
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/../include/PSkewedLorentzianLinkDef.h
OPTIONS -inlineInputHeader
MODULE PSkewedLorentzian
)
root_generate_dictionary(
PStartupHandler_SVDict
-I${CMAKE_CURRENT_SOURCE_DIR}/../include
-I${PREFIX_INC}
PStartupHandler_SV.h
LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/../include/PStartupHandler_SVLinkDef.h
OPTIONS -inlineInputHeader
MODULE PStartupHandler_SV
)

View File

@ -3,14 +3,17 @@
#--- generate necessary dictionaries ------------------------------------------
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
set(BMW_TOOLS_INC ${CMAKE_SOURCE_DIR}/src/external/BMWtools)
set(PREFIX_INC ${CMAKE_INSTALL_PREFIX}/include)
root_generate_dictionary(
ZFRelaxationDict
-I${FFTW3_INCLUDE_DIR}
-I${MUSRFIT_INC}
-I${BMW_TOOLS_INC}
-I${PREFIX_INC}
ZFRelaxation.h
LINKDEF ZFRelaxationLinkDef.h
OPTIONS -inlineInputHeader
MODULE ZFRelaxation
)

View File

@ -25,21 +25,27 @@ set ( PLOT_DIR
${CMAKE_CURRENT_BINARY_DIR}
)
set(PREFIX_INC ${CMAKE_INSTALL_PREFIX}/include)
#--- generate necessary dictionaries ------------------------------------------
root_generate_dictionary(
PMuppCanvasDict
-I${CMAKE_CURRENT_SOURCE_DIR}
-I${CMAKE_CURRENT_SOURCE_DIR}/..
-I${PREFIX_INC}
PMuppCanvas.h
LINKDEF PMuppCanvasLinkDef.h
OPTIONS -inlineInputHeader
MODULE PMuppCanvas
)
root_generate_dictionary(
PMuppStartupHandlerDict
-I${CMAKE_CURRENT_SOURCE_DIR}
-I${CMAKE_CURRENT_SOURCE_DIR}/..
-I${PREFIX_INC}
PMuppStartupHandler.h
LINKDEF PMuppStartupHandlerLinkDef.h
OPTIONS -inlineInputHeader
MODULE PMuppStartupHandler
)
@ -71,3 +77,21 @@ if (APPLE)
else (APPLE)
install(TARGETS mupp_plot DESTINATION bin)
endif (APPLE)
#--- install root pcm's and rootmaps ------------------------------------------
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/libPMuppCanvas_rdict.pcm
${CMAKE_CURRENT_BINARY_DIR}/libPMuppCanvas.rootmap
${CMAKE_CURRENT_BINARY_DIR}/libPMuppStartupHandler_rdict.pcm
${CMAKE_CURRENT_BINARY_DIR}/libPMuppStartupHandler.rootmap
DESTINATION lib
)
#--- install headers ----------------------------------------------------------
install(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/../mupp.h
${CMAKE_CURRENT_SOURCE_DIR}/mupp_plot.h
${CMAKE_CURRENT_SOURCE_DIR}/PMuppCanvas.h
${CMAKE_CURRENT_SOURCE_DIR}/PMuppStartupHandler.h
DESTINATION include
)

View File

@ -3093,8 +3093,31 @@ void PTextEdit::getTheme()
fDarkToolBarIcon = false; // needed for ubuntu dark since there the menu icons are dark, however the toolbar icons are plain!
QString str = QIcon::themeName();
qDebug() << "debug> theme name=" << str << endl;
qDebug() << "debug> str=" << str << endl;
if (str.isEmpty()) { // this is ugly and eventually needs to be fixed in a more coherent way
str = QProcessEnvironment::systemEnvironment().value("HOME", QString("??"));
str += "/.kde4/share/config/kdeglobals";
if (QFile::exists(str)) {
QFile fln(str);
fln.open(QIODevice::ReadOnly | QIODevice::Text);
QTextStream fin(&fln);
QString line("");
bool done = false;
while (!fin.atEnd() && !done) {
line = fin.readLine();
if (line.contains("ColorScheme")) {
if (line.contains("dark", Qt::CaseInsensitive)) {
fDarkTheme = true;
fDarkToolBarIcon = true;
}
done = true;
}
}
fln.close();
}
return;
}
if (str.contains("dark", Qt::CaseInsensitive)) {
fDarkTheme = true;

View File

@ -90,12 +90,13 @@ void musrfit_syntax()
cout << endl << "usage: musrfit [<msr-file> [-k, --keep-mn2-ouput] [-c, --chisq-only] [-t, --title-from-data-file]";
cout << endl << " [-e, --estimateN0] [-p, --per-run-block-chisq]";
cout << endl << " [--dump <type>] [--timeout <timeout_tag>] |";
cout << endl << " --nexus-support | --version | --help";
cout << endl << " --nexus-support | --show-dynamic-path | --version | --help";
cout << endl << " <msr-file>: msr input file";
cout << endl << " 'musrfit <msr-file>' 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 << " 'musrfit --show-dynamic-path' will print the internal dynamic library search paths.";
cout << endl << " -k, --keep-mn2-output: will rename the files MINUIT2.OUTPUT and ";
cout << endl << " MINUIT2.root to <msr-file>-mn2.output and <msr-file>-mn2.root,";
cout << endl << " respectively,";
@ -456,6 +457,11 @@ int main(int argc, char *argv[])
return PMUSR_WRONG_STARTUP_SYNTAX;
}
// add default shared library path /usr/local/lib if not already persent
const char *dsp = gSystem->GetDynamicPath();
if (strstr(dsp, "/usr/local/lib") == NULL)
gSystem->AddDynamicPath("/usr/local/lib");
if (argc == 2) {
if (!strcmp(argv[1], "--version")) {
#ifdef HAVE_CONFIG_H
@ -468,9 +474,13 @@ int main(int argc, char *argv[])
#ifdef PNEXUS_ENABLED
cout << endl << ">> musrfit: NeXus support enabled." << endl << endl;
#else
cout << endl << ">> musrfit: NeXus support NOT enabled." << endl << endl;
cout << endl << "musrfit: NeXus support NOT enabled." << endl << endl;
#endif
return PMUSR_SUCCESS;
} else if (!strcmp(argv[1], "--show-dynamic-path")) {
cout << endl << "musrfit: internal dynamic search paths for shared libraries/root dictionaries:";
cout << endl << " '" << gSystem->GetDynamicPath() << "'" << endl << endl;
return PMUSR_SUCCESS;
} else if (!strcmp(argv[1], "--help")) {
show_syntax = true;
}

View File

@ -57,7 +57,7 @@ using namespace std;
void musrt0_syntax()
{
cout << endl << "usage: musrt0 <msr-file> [{--getT0FromPromptPeak | -g} [<firstGoodBinOffset>]]";
cout << endl << " [--timeout <timeout>] | --version | --help";
cout << endl << " [--timeout <timeout>] | --show-dynamic-path | --version | --help";
cout << endl << " <msr-file>: msr input file";
cout << endl << " --getT0FromPromptPeak, -g with <firstGoodBinOffset>:";
cout << endl << " will, in non-interactive mode estimate the t0's from the prompt peak";
@ -72,6 +72,7 @@ void musrt0_syntax()
cout << endl << " 180 sec if not already done so.";
cout << endl << " 'musrt0' or 'musrt0 --help' will show this help";
cout << endl << " 'musrt0 --version' will print the musrt0 version";
cout << endl << " 'musrt0 --show-dynamic-path' dumps the dynamic search paths and exit.";
cout << endl << endl;
}
@ -228,6 +229,11 @@ Int_t main(Int_t argc, Char_t *argv[])
return PMUSR_SUCCESS;
}
// add default shared library path /usr/local/lib if not already persent
const char *dsp = gSystem->GetDynamicPath();
if (strstr(dsp, "/usr/local/lib") == NULL)
gSystem->AddDynamicPath("/usr/local/lib");
memset(filename, '\0', sizeof(filename));
for (int i=1; i<argc; i++) {
if (!strcmp(argv[i], "--version")) {
@ -238,8 +244,12 @@ Int_t main(Int_t argc, Char_t *argv[])
#endif
return PMUSR_SUCCESS;
} else if (!strcmp(argv[i], "--help")) {
show_syntax = true;
break;
musrt0_syntax();
return PMUSR_SUCCESS;
} else if (!strcmp(argv[i], "--show-dynamic-path")) {
cout << endl << "musrt0: internal dynamic search paths for shared libraries/root dictionaries:";
cout << endl << " '" << gSystem->GetDynamicPath() << "'" << endl << endl;
return PMUSR_SUCCESS;
} else if (strstr(argv[i], ".msr")) { // check for filename
if (strlen(filename) == 0) {
strcpy(filename, argv[i]);

View File

@ -62,6 +62,7 @@ void musrview_syntax()
cout << endl << " Options:";
cout << endl << " --help : display this help and exit.";
cout << endl << " --version : output version information and exit.";
cout << endl << " --show-dynamic-path : dumps the dynamic search paths and exit.";
cout << endl << " -f, --fourier: will directly present the Fourier transform of the <msr-file>.";
cout << endl << " -a, --avg: will directly present the averaged data/Fourier of the <msr-file>.";
cout << endl << " --<graphic-format-extension>: ";
@ -111,6 +112,11 @@ int main(int argc, char *argv[])
memset(fileName, '\0', sizeof(fileName));
// add default shared library path /usr/local/lib if not already persent
const char *dsp = gSystem->GetDynamicPath();
if (strstr(dsp, "/usr/local/lib") == NULL)
gSystem->AddDynamicPath("/usr/local/lib");
// check input arguments
if (argc == 1) {
musrview_syntax();
@ -132,6 +138,10 @@ int main(int argc, char *argv[])
cout << endl << "musrview git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << endl << endl;
#endif
return PMUSR_SUCCESS;
} else if (!strcmp(argv[i], "--show-dynamic-path")) {
cout << endl << "musrview: internal dynamic search paths for shared libraries/root dictionaries:";
cout << endl << " '" << gSystem->GetDynamicPath() << "'" << endl << endl;
return PMUSR_SUCCESS;
} else if (!strcmp(argv[i], "--help")) {
show_syntax = true;
break;