Added autotool-support for building musrfit - some additional tests are needed, the old Makefiles are still around
This commit is contained in:
@@ -44,7 +44,7 @@ endif
|
||||
|
||||
# -- Linux
|
||||
ifeq ($(OS),LINUX)
|
||||
CXX = g++
|
||||
CXX = g++-4.2.4
|
||||
CXXFLAGS = -O3 -Wall -Wno-trigraphs -fPIC
|
||||
PMUSRPATH = ../include
|
||||
MNPATH = $(ROOTSYS)/include
|
||||
@@ -54,7 +54,7 @@ FFTW3PATH = /usr/include
|
||||
LEMPATH = ../external/TLemRunHeader
|
||||
PSIBINPATH = ../external/MuSR_software/Class_MuSR_PSI
|
||||
INCLUDES = -I$(PMUSRPATH) -I$(MNPATH) -I$(GSLPATH) -I$(BOOSTPATH) -I$(LEMPATH) -I$(PSIBINPATH) -I$(FFTW3PATH)
|
||||
LD = g++
|
||||
LD = g++-4.2.4
|
||||
LDFLAGS = -O
|
||||
SOFLAGS = -shared
|
||||
LEMLIB = libTLemRunHeader.so
|
||||
|
||||
@@ -34,10 +34,10 @@ endif
|
||||
|
||||
# -- Linux
|
||||
ifeq ($(OS),LINUX)
|
||||
CXX = g++
|
||||
CXX = g++-4.3.3
|
||||
CXXFLAGS = -Wall -Wno-trigraphs -fPIC
|
||||
INCLUDES = -I../include
|
||||
LD = g++
|
||||
LD = g++-4.3.3
|
||||
LDFLAGS = -g
|
||||
SOFLAGS = -O -shared
|
||||
endif
|
||||
|
||||
90
src/classes/Makefile.am
Normal file
90
src/classes/Makefile.am
Normal file
@@ -0,0 +1,90 @@
|
||||
## Process this file with automake to create Makefile.in
|
||||
|
||||
h_sources = \
|
||||
../include/PFitterFcn.h \
|
||||
../include/PFitter.h \
|
||||
../include/PFourier.h \
|
||||
../include/PFunctionGrammar.h \
|
||||
../include/PFunction.h \
|
||||
../include/PFunctionHandler.h \
|
||||
../include/PMsrHandler.h \
|
||||
../include/PMusrCanvas.h \
|
||||
../include/PMusr.h \
|
||||
../include/PMusrT0.h \
|
||||
../include/PRunAsymmetry.h \
|
||||
../include/PRunBase.h \
|
||||
../include/PRunDataHandler.h \
|
||||
../include/PRunListCollection.h \
|
||||
../include/PRunNonMusr.h \
|
||||
../include/PRunRRF.h \
|
||||
../include/PRunSingleHisto.h \
|
||||
../include/PStartupHandler.h \
|
||||
../include/PTheory.h \
|
||||
../include/PUserFcnBase.h
|
||||
|
||||
h_linkdef = \
|
||||
../include/PMusrCanvasLinkDef.h \
|
||||
../include/PMusrT0LinkDef.h \
|
||||
../include/PStartupHandlerLinkDef.h \
|
||||
../include/PUserFcnBaseLinkDef.h
|
||||
|
||||
dict_h_sources = \
|
||||
PMusrCanvasDict.h \
|
||||
PMusrT0Dict.h \
|
||||
PStartupHandlerDict.h \
|
||||
PUserFcnBaseDict.h
|
||||
|
||||
cpp_sources = \
|
||||
PFitter.cpp \
|
||||
PFitterFcn.cpp \
|
||||
PFourier.cpp \
|
||||
PFunction.cpp \
|
||||
PFunctionHandler.cpp \
|
||||
PMsrHandler.cpp \
|
||||
PMusrCanvas.cpp \
|
||||
PMusrT0.cpp \
|
||||
PRunAsymmetry.cpp \
|
||||
PRunBase.cpp \
|
||||
PRunDataHandler.cpp \
|
||||
PRunListCollection.cpp \
|
||||
PRunNonMusr.cpp \
|
||||
PRunRRF.cpp \
|
||||
PRunSingleHisto.cpp \
|
||||
PStartupHandler.cpp \
|
||||
PTheory.cpp \
|
||||
PUserFcnBase.cpp
|
||||
|
||||
dict_cpp_sources = \
|
||||
PMusrCanvasDict.cpp \
|
||||
PMusrT0Dict.cpp \
|
||||
PStartupHandlerDict.cpp \
|
||||
PUserFcnBaseDict.cpp
|
||||
|
||||
ext_source_dir = $(top_srcdir)/src/external/MuSR_software/Class_MuSR_PSI
|
||||
ext_h_sources = $(ext_source_dir)/MuSR_td_PSI_bin.h $(ext_source_dir)/tydefs.h
|
||||
ext_cpp_sources = $(ext_source_dir)/MuSR_td_PSI_bin.cpp
|
||||
|
||||
include_HEADERS = $(h_sources) $(ext_h_sources)
|
||||
noinst_HEADERS = $(h_linkdef) $(dict_h_sources)
|
||||
INCLUDES = -I$(top_srcdir)/src/include -I$(ext_source_dir) $(LEM_CFLAGS) $(FFTW3_CFLAGS) $(GSL_CFLAGS) $(BOOST_CFLAGS) $(ROOT_CFLAGS)
|
||||
AM_CXXFLAGS = -g -O3 -Wall -Wno-trigraphs
|
||||
|
||||
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources)
|
||||
AM_CPPFLAGS = -I@ROOTINCDIR@
|
||||
AM_LDFLAGS = -L@ROOTLIBDIR@
|
||||
CLEANFILES = *Dict.cpp *Dict.h *~ core
|
||||
|
||||
%Dict.cpp %Dict.h: ../include/%.h ../include/%LinkDef.h
|
||||
@ROOTCINT@ -v -f $*Dict.cpp -c -p $(INCLUDES) $(AM_CPPFLAGS) $^
|
||||
|
||||
lib_LTLIBRARIES = libPMusr.la
|
||||
|
||||
LIBADD = $(LEM_LIBS)
|
||||
|
||||
libPMusr_la_SOURCES = $(h_sources) $(cpp_sources) $(dict_h_sources) $(dict_cpp_sources) $(ext_h_sources) $(ext_cpp_sources)
|
||||
libPMusr_la_LIBADD = $(FFTW3_LIBS) $(GSL_LIBS) $(ROOT_LIBS)
|
||||
libPMusr_la_LDFLAGS = -version-info $(MUSR_LIBRARY_VERSION) -release $(MUSR_RELEASE)
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = PMusr.pc
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <limits>
|
||||
using namespace std;
|
||||
|
||||
#include <math.h>
|
||||
@@ -408,8 +409,11 @@ bool PFitter::ExecuteHesse()
|
||||
// create the hesse object
|
||||
ROOT::Minuit2::MnHesse hesse;
|
||||
|
||||
// specify maximal number of function calls
|
||||
unsigned int maxfcn = numeric_limits<unsigned int>::max();
|
||||
|
||||
// call hesse
|
||||
ROOT::Minuit2::MnUserParameterState mnState = hesse((*fFitterFcn), fMnUserParams);
|
||||
ROOT::Minuit2::MnUserParameterState mnState = hesse((*fFitterFcn), fMnUserParams, maxfcn);
|
||||
|
||||
if (!mnState.IsValid()) {
|
||||
cout << endl << "**WARNING** PFitter::ExecuteHesse(): Hesse encountered some problems!";
|
||||
@@ -453,7 +457,7 @@ bool PFitter::ExecuteMigrad()
|
||||
|
||||
// minimize
|
||||
// maxfcn is MINUIT2 Default maxfcn
|
||||
unsigned int maxfcn = (200 + 100*fParams.size() + 5*fParams.size()*fParams.size());
|
||||
unsigned int maxfcn = numeric_limits<unsigned int>::max();
|
||||
// tolerance = MINUIT2 Default tolerance
|
||||
double tolerance = 0.1;
|
||||
ROOT::Minuit2::FunctionMinimum min = migrad(maxfcn, tolerance);
|
||||
@@ -521,7 +525,7 @@ bool PFitter::ExecuteMinimize()
|
||||
|
||||
// minimize
|
||||
// maxfcn is MINUIT2 Default maxfcn
|
||||
unsigned int maxfcn = (200 + 100*fParams.size() + 5*fParams.size()*fParams.size());
|
||||
unsigned int maxfcn = numeric_limits<unsigned int>::max();
|
||||
//cout << endl << "maxfcn=" << maxfcn << endl;
|
||||
// tolerance = MINUIT2 Default tolerance
|
||||
double tolerance = 0.1;
|
||||
@@ -896,7 +900,7 @@ bool PFitter::ExecuteSimplex()
|
||||
|
||||
// minimize
|
||||
// maxfcn is 10*MINUIT2 Default maxfcn
|
||||
unsigned int maxfcn = 10*(200 + 100*fParams.size() + 5*fParams.size()*fParams.size());
|
||||
unsigned int maxfcn = numeric_limits<unsigned int>::max();
|
||||
// tolerance = MINUIT2 Default tolerance
|
||||
double tolerance = 0.1;
|
||||
ROOT::Minuit2::FunctionMinimum min = simplex(maxfcn, tolerance);
|
||||
|
||||
10
src/classes/PMusr.pc.in
Normal file
10
src/classes/PMusr.pc.in
Normal file
@@ -0,0 +1,10 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: PMusr
|
||||
Description: C++ shared library providing musr classes
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -l@GENERIC_LIBRARY_NAME@
|
||||
Cflags: -I${includedir}/@GENERIC_LIBRARY_NAME@ -I${libdir}/include
|
||||
Reference in New Issue
Block a user