Removed the user-function dependency on libPMusr
It should now be possible to build a static version of musrfit and shared libraries for the user functions. This is needed on systems which do not support linking static libraries to shared ones (like Cygwin). These changes still need to be tested on Cygwin, especially with user functions implementing the "global interface".
This commit is contained in:
@ -9,6 +9,7 @@ changes since 0.9.0
|
||||
FIXED Makefiles so that the NeXus support will not be built if it has not been enabled during the configure stage
|
||||
FIXED ASCII export from musrview in case of a Fourier-Power- or Fourier-Phase-difference plot
|
||||
FIXED bug in asymmetry fit with fixed background
|
||||
REMOVED the user-function dependency on libPMusr
|
||||
|
||||
musrfit 0.9.0 - changes since 0.8.0
|
||||
===================================
|
||||
|
@ -808,6 +808,6 @@ AC_CONFIG_FILES([Makefile \
|
||||
src/external/libGapIntegrals/Makefile \
|
||||
src/external/libCalcMeanFieldsLEM/Makefile \
|
||||
src/external/Nonlocal/Makefile \
|
||||
src/external/MagProximity/Makefile])
|
||||
src/external/MagProximity/Makefile])
|
||||
|
||||
AC_OUTPUT
|
||||
|
@ -21,7 +21,7 @@ h_sources = \
|
||||
../include/PRunSingleHisto.h \
|
||||
../include/PStartupHandler.h \
|
||||
../include/PTheory.h \
|
||||
../include/PUserFcnBase.h
|
||||
../include/PUserFcnBase.h
|
||||
|
||||
h_linkdef = \
|
||||
../include/PMusrCanvasLinkDef.h \
|
||||
@ -79,7 +79,7 @@ CLEANFILES = *Dict.cpp *Dict.h *~ core
|
||||
lib_LTLIBRARIES = libPMusr.la
|
||||
|
||||
libPMusr_la_SOURCES = $(h_sources) $(cpp_sources) $(dict_h_sources) $(dict_cpp_sources)
|
||||
libPMusr_la_LIBADD = $(LEM_LIBS) $(PSIBIN_LIBS) $(MUD_LIBS) $(PNEXUS_LIBS) $(FFTW3_LIBS) $(GSL_LIBS) $(ROOT_LIBS)
|
||||
libPMusr_la_LIBADD = $(LEM_LIBS) $(PSIBIN_LIBS) $(MUD_LIBS) $(PNEXUS_LIBS) $(FFTW3_LIBS) $(GSL_LIBS) $(ROOT_LIBS)
|
||||
libPMusr_la_LDFLAGS = -version-info $(MUSR_LIBRARY_VERSION) -release $(MUSR_RELEASE) $(AM_LDFLAGS)
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
|
2
src/external/MagProximity/Makefile.am
vendored
2
src/external/MagProximity/Makefile.am
vendored
@ -39,7 +39,7 @@ CLEANFILES = *Dict.cpp *Dict.h *~ core
|
||||
lib_LTLIBRARIES = libPMagProximityFitter.la
|
||||
|
||||
libPMagProximityFitter_la_SOURCES = $(h_sources) $(cpp_sources) $(dict_h_sources) $(dict_cpp_sources)
|
||||
libPMagProximityFitter_la_LIBADD = $(PMUSR_LIBS) $(FFTW3_LIBS) $(ROOT_LIBS)
|
||||
libPMagProximityFitter_la_LIBADD = $(FFTW3_LIBS) $(ROOT_LIBS)
|
||||
libPMagProximityFitter_la_LDFLAGS = -version-info $(PLUGIN_LIBRARY_VERSION) -release $(PLUGIN_RELEASE) $(AM_LDFLAGS)
|
||||
|
||||
## For the moment do not build pkgconfig files for musrfit plug-ins...
|
||||
|
2
src/external/Nonlocal/Makefile.am
vendored
2
src/external/Nonlocal/Makefile.am
vendored
@ -39,7 +39,7 @@ CLEANFILES = *Dict.cpp *Dict.h *~ core
|
||||
lib_LTLIBRARIES = libPNL_PippardFitter.la
|
||||
|
||||
libPNL_PippardFitter_la_SOURCES = $(h_sources) $(cpp_sources) $(dict_h_sources) $(dict_cpp_sources)
|
||||
libPNL_PippardFitter_la_LIBADD = $(PMUSR_LIBS) $(FFTW3_LIBS) $(ROOT_LIBS)
|
||||
libPNL_PippardFitter_la_LIBADD = $(FFTW3_LIBS) $(ROOT_LIBS)
|
||||
libPNL_PippardFitter_la_LDFLAGS = -version-info $(PLUGIN_LIBRARY_VERSION) -release $(PLUGIN_RELEASE) $(AM_LDFLAGS)
|
||||
|
||||
## For the moment do not build pkgconfig files for musrfit plug-ins...
|
||||
|
@ -32,7 +32,7 @@ CLEANFILES = *Dict.cpp *Dict.h *~ core
|
||||
lib_LTLIBRARIES = libCalcMeanFieldsLEM.la
|
||||
|
||||
libCalcMeanFieldsLEM_la_SOURCES = $(h_sources) $(cpp_sources) $(dict_h_sources) $(dict_cpp_sources)
|
||||
libCalcMeanFieldsLEM_la_LIBADD = $(BMWTOOLS_LIBS) $(FITPOFB_LIBS) $(PMUSR_LIBS) $(ROOT_LIBS)
|
||||
libCalcMeanFieldsLEM_la_LIBADD = $(BMWTOOLS_LIBS) $(FITPOFB_LIBS) $(ROOT_LIBS)
|
||||
libCalcMeanFieldsLEM_la_LDFLAGS = -version-info $(PLUGIN_LIBRARY_VERSION) -release $(PLUGIN_RELEASE) $(AM_LDFLAGS)
|
||||
|
||||
## For the moment do not build pkgconfig files for musrfit plug-ins...
|
||||
|
2
src/external/libFitPofB/classes/Makefile.am
vendored
2
src/external/libFitPofB/classes/Makefile.am
vendored
@ -50,7 +50,7 @@ CLEANFILES = *Dict.cpp *Dict.h *~ ../include/*~ core
|
||||
lib_LTLIBRARIES = libFitPofB.la
|
||||
|
||||
libFitPofB_la_SOURCES = $(h_sources) $(cpp_sources) $(dict_h_sources) $(dict_cpp_sources)
|
||||
libFitPofB_la_LIBADD = $(BMWTOOLS_LIBS) $(LEM_LIBS) $(PMUSR_LIBS) $(FFTW3_LIBS) $(ROOT_LIBS)
|
||||
libFitPofB_la_LIBADD = $(BMWTOOLS_LIBS) $(LEM_LIBS) $(FFTW3_LIBS) $(ROOT_LIBS)
|
||||
libFitPofB_la_LDFLAGS = -version-info $(PLUGIN_LIBRARY_VERSION) -release $(PLUGIN_RELEASE) $(AM_LDFLAGS)
|
||||
|
||||
## For the moment do not build pkgconfig files for musrfit plug-ins...
|
||||
|
2
src/external/libGapIntegrals/Makefile.am
vendored
2
src/external/libGapIntegrals/Makefile.am
vendored
@ -32,7 +32,7 @@ CLEANFILES = *Dict.cpp *Dict.h *~ core
|
||||
lib_LTLIBRARIES = libGapIntegrals.la
|
||||
|
||||
libGapIntegrals_la_SOURCES = $(h_sources) $(cpp_sources) $(dict_h_sources) $(dict_cpp_sources)
|
||||
libGapIntegrals_la_LIBADD = $(BMWTOOLS_LIBS) $(PMUSR_LIBS) $(GSL_LIBS) $(ROOT_LIBS) $(CUBA_LIBS)
|
||||
libGapIntegrals_la_LIBADD = $(BMWTOOLS_LIBS) $(GSL_LIBS) $(ROOT_LIBS) $(CUBA_LIBS)
|
||||
libGapIntegrals_la_LDFLAGS = -version-info $(PLUGIN_LIBRARY_VERSION) -release $(PLUGIN_RELEASE) $(AM_LDFLAGS)
|
||||
|
||||
## For the moment do not build pkgconfig files for musrfit plug-ins...
|
||||
|
2
src/external/libLFRelaxation/Makefile.am
vendored
2
src/external/libLFRelaxation/Makefile.am
vendored
@ -32,7 +32,7 @@ CLEANFILES = *Dict.cpp *Dict.h *~ core
|
||||
lib_LTLIBRARIES = libLFRelaxation.la
|
||||
|
||||
libLFRelaxation_la_SOURCES = $(h_sources) $(cpp_sources) $(dict_h_sources) $(dict_cpp_sources)
|
||||
libLFRelaxation_la_LIBADD = $(BMWTOOLS_LIBS) $(PMUSR_LIBS) $(FFTW3_LIBS) $(GSL_LIBS) $(ROOT_LIBS) $(CUBA_LIBS)
|
||||
libLFRelaxation_la_LIBADD = $(BMWTOOLS_LIBS) $(FFTW3_LIBS) $(GSL_LIBS) $(ROOT_LIBS) $(CUBA_LIBS)
|
||||
libLFRelaxation_la_LDFLAGS = -version-info $(PLUGIN_LIBRARY_VERSION) -release $(PLUGIN_RELEASE) $(AM_LDFLAGS)
|
||||
|
||||
## For the moment do not build pkgconfig files for musrfit plug-ins...
|
||||
|
18
src/external/nexus/PNeXus.cpp
vendored
18
src/external/nexus/PNeXus.cpp
vendored
@ -290,7 +290,7 @@ int PNeXus::ReadFile(const char *fileName)
|
||||
// read 'magnetic_field_vector' and 'coordinate_system' attribute
|
||||
if (!ErrorHandler(NXopendata(fFileHandle, "magnetic_field_vector"), PNEXUS_OPEN_DATA_ERROR, "couldn't open 'magnetic_field_vector' data in sample group!")) return NX_ERROR;
|
||||
int attLen = SIZE_INT32, attType = NX_INT32;
|
||||
if (!ErrorHandler(NXgetattr(fFileHandle, "available", &fSample.fMagneticFieldVectorAvailable, &attLen, &attType), PNEXUS_OPEN_DATA_ERROR, "couldn't open 'magnetic_field_vector available' data in sample group!")) return NX_ERROR;
|
||||
if (!ErrorHandler(NXgetattr(fFileHandle, const_cast<char*>("available"), &fSample.fMagneticFieldVectorAvailable, &attLen, &attType), PNEXUS_OPEN_DATA_ERROR, "couldn't open 'magnetic_field_vector available' data in sample group!")) return NX_ERROR;
|
||||
if (fSample.fMagneticFieldVectorAvailable) {
|
||||
if (!ErrorHandler(GetDoubleVectorData(fSample.fMagneticFieldVector), PNEXUS_GET_DATA_ERROR, "couldn't get 'magnetic_field_vector' data!")) return NX_ERROR;
|
||||
}
|
||||
@ -375,29 +375,29 @@ int PNeXus::ReadFile(const char *fileName)
|
||||
// get number of histos
|
||||
attLen = SIZE_INT32;
|
||||
attType = NX_INT32;
|
||||
if (!ErrorHandler(NXgetattr(fFileHandle, "number", &fData.fNumberOfHistos, &attLen, &attType), PNEXUS_OPEN_DATA_ERROR, "couldn't open 'number' data in histogram_data_1 group!")) return NX_ERROR;
|
||||
if (!ErrorHandler(NXgetattr(fFileHandle, const_cast<char*>("number"), &fData.fNumberOfHistos, &attLen, &attType), PNEXUS_OPEN_DATA_ERROR, "couldn't open 'number' data in histogram_data_1 group!")) return NX_ERROR;
|
||||
|
||||
// get histo length
|
||||
attLen = SIZE_INT32;
|
||||
attType = NX_INT32;
|
||||
if (!ErrorHandler(NXgetattr(fFileHandle, "length", &histoLength, &attLen, &attType), PNEXUS_OPEN_DATA_ERROR, "couldn't open 'number' data in histogram_data_1 group!")) return NX_ERROR;
|
||||
if (!ErrorHandler(NXgetattr(fFileHandle, const_cast<char*>("length"), &histoLength, &attLen, &attType), PNEXUS_OPEN_DATA_ERROR, "couldn't open 'number' data in histogram_data_1 group!")) return NX_ERROR;
|
||||
|
||||
// get t0
|
||||
attLen = SIZE_INT32;
|
||||
attType = NX_INT32;
|
||||
if (!ErrorHandler(NXgetattr(fFileHandle, "t0_bin", &ival, &attLen, &attType), PNEXUS_OPEN_DATA_ERROR, "couldn't open 't0_bin' data in histogram_data_1 group!")) return NX_ERROR;
|
||||
if (!ErrorHandler(NXgetattr(fFileHandle, const_cast<char*>("t0_bin"), &ival, &attLen, &attType), PNEXUS_OPEN_DATA_ERROR, "couldn't open 't0_bin' data in histogram_data_1 group!")) return NX_ERROR;
|
||||
fData.fT0.push_back(ival);
|
||||
|
||||
// get first good bin
|
||||
attLen = SIZE_INT32;
|
||||
attType = NX_INT32;
|
||||
if (!ErrorHandler(NXgetattr(fFileHandle, "first_good_bin", &ival, &attLen, &attType), PNEXUS_OPEN_DATA_ERROR, "couldn't open 'first_good_bin' data in histogram_data_1 group!")) return NX_ERROR;
|
||||
if (!ErrorHandler(NXgetattr(fFileHandle, const_cast<char*>("first_good_bin"), &ival, &attLen, &attType), PNEXUS_OPEN_DATA_ERROR, "couldn't open 'first_good_bin' data in histogram_data_1 group!")) return NX_ERROR;
|
||||
fData.fFirstGoodBin.push_back(ival);
|
||||
|
||||
// get last good bin
|
||||
attLen = SIZE_INT32;
|
||||
attType = NX_INT32;
|
||||
if (!ErrorHandler(NXgetattr(fFileHandle, "last_good_bin", &ival, &attLen, &attType), PNEXUS_OPEN_DATA_ERROR, "couldn't open 'last_good_bin' data in histogram_data_1 group!")) return NX_ERROR;
|
||||
if (!ErrorHandler(NXgetattr(fFileHandle, const_cast<char*>("last_good_bin"), &ival, &attLen, &attType), PNEXUS_OPEN_DATA_ERROR, "couldn't open 'last_good_bin' data in histogram_data_1 group!")) return NX_ERROR;
|
||||
fData.fLastGoodBin.push_back(ival);
|
||||
|
||||
// get data
|
||||
@ -460,7 +460,7 @@ int PNeXus::ReadFile(const char *fileName)
|
||||
if (!ErrorHandler(NXopendata(fFileHandle, "grouping"), PNEXUS_OPEN_DATA_ERROR, "couldn't open 'grouping' data in histogram_data_1 group!")) return NX_ERROR;
|
||||
attLen = SIZE_INT32;
|
||||
attType = NX_INT32;
|
||||
if (!ErrorHandler(NXgetattr(fFileHandle, "available", &ival, &attLen, &attType), PNEXUS_OPEN_DATA_ERROR, "couldn't open 'grouping available' data in histogram_data_1 group!")) return NX_ERROR;
|
||||
if (!ErrorHandler(NXgetattr(fFileHandle, const_cast<char*>("available"), &ival, &attLen, &attType), PNEXUS_OPEN_DATA_ERROR, "couldn't open 'grouping available' data in histogram_data_1 group!")) return NX_ERROR;
|
||||
if (ival) {
|
||||
vector<int> grouping;
|
||||
if (!ErrorHandler(GetIntVectorData(grouping), PNEXUS_GET_DATA_ERROR, "couldn't read 'grouping' data in histogram_data_1 group!")) return NX_ERROR;
|
||||
@ -474,7 +474,7 @@ int PNeXus::ReadFile(const char *fileName)
|
||||
if (!ErrorHandler(NXopendata(fFileHandle, "alpha"), PNEXUS_OPEN_DATA_ERROR, "couldn't open 'alpha' data in histogram_data_1 group!")) return NX_ERROR;
|
||||
attLen = SIZE_INT32;
|
||||
attType = NX_INT32;
|
||||
if (!ErrorHandler(NXgetattr(fFileHandle, "available", &ival, &attLen, &attType), PNEXUS_OPEN_DATA_ERROR, "couldn't open 'alpha available' data in histogram_data_1 group!")) return NX_ERROR;
|
||||
if (!ErrorHandler(NXgetattr(fFileHandle, const_cast<char*>("available"), &ival, &attLen, &attType), PNEXUS_OPEN_DATA_ERROR, "couldn't open 'alpha available' data in histogram_data_1 group!")) return NX_ERROR;
|
||||
if (ival) {
|
||||
if (!ErrorHandler(NXgetinfo(fFileHandle, &rank, dims, &type), PNEXUS_GET_META_INFO_ERROR, "couldn't get alpha info!")) return NX_ERROR;
|
||||
// calculate the needed size
|
||||
@ -1388,7 +1388,7 @@ void PNeXus::Init()
|
||||
* \param errCode will set the fErrorCode of the class
|
||||
* \param errMsg will set the fErrorMsg of the class
|
||||
*/
|
||||
bool PNeXus::ErrorHandler(NXstatus status, int errCode, string errMsg)
|
||||
bool PNeXus::ErrorHandler(NXstatus status, int errCode, const string &errMsg)
|
||||
{
|
||||
if (status != NX_OK) {
|
||||
fErrorCode = errCode;
|
||||
|
2
src/external/nexus/PNeXus.h
vendored
2
src/external/nexus/PNeXus.h
vendored
@ -299,7 +299,7 @@ class PNeXus {
|
||||
|
||||
virtual void Init();
|
||||
virtual void CleanUp();
|
||||
virtual bool ErrorHandler(NXstatus status, int errCode, string errMsg);
|
||||
virtual bool ErrorHandler(NXstatus status, int errCode, const string &errMsg);
|
||||
virtual NXstatus GetStringData(string &str);
|
||||
virtual NXstatus GetStringAttr(string attr, string &str);
|
||||
virtual int GetDataSize(int type);
|
||||
|
Reference in New Issue
Block a user