diff --git a/ChangeLog b/ChangeLog index f066907a..af6daf9b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -130,6 +130,8 @@ NEW 2015-02-13 first implementation of a standalone Fourier transform/plotter: A first simple minded lifetime correction is implemented as well. NEW 2015-02-04 Integration of libBNMR for fitting beta-NMR relaxation data into automake of musrfit. +NEW 2015-01-17 adding a branch for ROOT 6.x. This needs some minor adaptations due + to the new rootcint/rootclang and the stricter c++11. NEW 2014-12-18 first implementation of a GLOBAL block which allows to shorten a typical msr-file. Duplicate entries from the RUN blocks can be added here. Furthermore, the 'lifetimecorrection' flag is diff --git a/configure.ac b/configure.ac index dd64f8f2..e211ea63 100644 --- a/configure.ac +++ b/configure.ac @@ -1119,6 +1119,9 @@ case "${host_cpu}" in ;; esac +CXXFLAGS="-std=c++11 ${CXXFLAGS}" +AC_SUBST(CXXFLAGS) + LOCAL_BIN_CXXFLAGS="${CPUFLAGS} -Wall -Wno-trigraphs" LOCAL_LIB_CXXFLAGS="${LOCAL_BIN_CXXFLAGS}" LOCAL_PSIBIN_LIB_CXXFLAGS="${LOCAL_LIB_CXXFLAGS}" @@ -1143,7 +1146,7 @@ case "$host" in ;; *-*-darwin*) ARCH=DARWIN - LOCAL_PSIBIN_LIB_CXXFLAGS="${LOCAL_LIB_CXXFLAGS} -D__linux__" + LOCAL_PSIBIN_LIB_CXXFLAGS="${LOCAL_LIB_CXXFLAGS} -D_Darwin_" ;; *) ARCH=OTHERUNIX diff --git a/src/classes/Makefile.am b/src/classes/Makefile.am index 282772ff..f3020253 100644 --- a/src/classes/Makefile.am +++ b/src/classes/Makefile.am @@ -84,6 +84,14 @@ dict_cpp_sources = \ dict_cpp_sources_userFcn = \ PUserFcnBaseDict.cpp +pcmdir = $(libdir) +pcm_DATA = \ + PFourierCanvasDict_rdict.pcm \ + PMusrCanvasDict_rdict.pcm \ + PMusrT0Dict_rdict.pcm \ + PStartupHandlerDict_rdict.pcm \ + PUserFcnBaseDict_rdict.pcm + include_HEADERS = $(h_sources) $(h_sources_userFcn) noinst_HEADERS = $(h_linkdef) $(dict_h_sources) $(h_linkdef_userFcn) $(dict_h_sources_userFcn) @@ -92,7 +100,7 @@ AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS) BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources) $(dict_cpp_sources_userFcn) $(dict_h_sources_userFcn) AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@ -CLEANFILES = *Dict.cpp *Dict.h *~ core +CLEANFILES = *Dict.cpp *Dict.h *Dict* *~ core %Dict.cpp %Dict.h: ../include/%.h ../include/%LinkDef.h @ROOTCINT@ -v -f $*Dict.cpp -c -p $(AM_CPPFLAGS) $^ diff --git a/src/classes/PFourier.cpp b/src/classes/PFourier.cpp index 8e1ad423..72ac31e5 100644 --- a/src/classes/PFourier.cpp +++ b/src/classes/PFourier.cpp @@ -507,7 +507,7 @@ TH1F* PFourier::GetPhaseOptRealFourier(const TH1F *re, const TH1F *im, vectorGetXaxis(); + const TAxis *axis = re->GetXaxis(); Int_t minBin = 1; Int_t maxBin = axis->GetNbins(); diff --git a/src/classes/PRunAsymmetry.cpp b/src/classes/PRunAsymmetry.cpp index b385b87d..f86b13e2 100644 --- a/src/classes/PRunAsymmetry.cpp +++ b/src/classes/PRunAsymmetry.cpp @@ -757,8 +757,8 @@ Bool_t PRunAsymmetry::SubtractEstimatedBkg() beamPeriod = 0.0; // check if start and end are in proper order - UInt_t start[2] = {fRunInfo->GetBkgRange(0), fRunInfo->GetBkgRange(2)}; - UInt_t end[2] = {fRunInfo->GetBkgRange(1), fRunInfo->GetBkgRange(3)}; + Int_t start[2] = {fRunInfo->GetBkgRange(0), fRunInfo->GetBkgRange(2)}; + Int_t end[2] = {fRunInfo->GetBkgRange(1), fRunInfo->GetBkgRange(3)}; for (UInt_t i=0; i<2; i++) { if (end[i] < start[i]) { cout << endl << "PRunAsymmetry::SubtractEstimatedBkg(): end = " << end[i] << " > start = " << start[i] << "! Will swap them!"; diff --git a/src/classes/PRunAsymmetryRRF.cpp b/src/classes/PRunAsymmetryRRF.cpp index cd3f27e3..ba172879 100644 --- a/src/classes/PRunAsymmetryRRF.cpp +++ b/src/classes/PRunAsymmetryRRF.cpp @@ -746,8 +746,8 @@ Bool_t PRunAsymmetryRRF::SubtractEstimatedBkg() beamPeriod = 0.0; // check if start and end are in proper order - UInt_t start[2] = {fRunInfo->GetBkgRange(0), fRunInfo->GetBkgRange(2)}; - UInt_t end[2] = {fRunInfo->GetBkgRange(1), fRunInfo->GetBkgRange(3)}; + UInt_t start[2] = {(UInt_t)fRunInfo->GetBkgRange(0), (UInt_t)fRunInfo->GetBkgRange(2)}; + UInt_t end[2] = {(UInt_t)fRunInfo->GetBkgRange(1), (UInt_t)fRunInfo->GetBkgRange(3)}; for (UInt_t i=0; i<2; i++) { if (end[i] < start[i]) { cout << endl << "PRunAsymmetryRRF::SubtractEstimatedBkg(): end = " << end[i] << " > start = " << start[i] << "! Will swap them!"; diff --git a/src/dump_header.cpp b/src/dump_header.cpp index f6affbac..74d6a64b 100644 --- a/src/dump_header.cpp +++ b/src/dump_header.cpp @@ -929,13 +929,20 @@ int main(int argc, char *argv[]) } bool found_fln = false; - // 1st check if the file name is found in the current directory string pathFln(""); - pathFln = "./" + fileName; + // 1st check if the file name is the full path-file name and the file exists + pathFln = fileName; if (dump_file_exists(pathFln)) found_fln = true; - // 2nd check if file name is found in any default search paths if not already found in the current directory + // 2nd check if the file name is found in the current directory + if (!found_fln) { + pathFln = "./" + fileName; + if (dump_file_exists(pathFln)) + found_fln = true; + } + + // 3rd check if file name is found in any default search paths if not already found in the current directory if (!found_fln) { PStringVector pathList = startupHandler->GetDataPathList(); for (unsigned int i=0; i &par) const; diff --git a/src/external/libSpinValve/classes/Makefile.am b/src/external/libSpinValve/classes/Makefile.am index 544d7c39..ec4033e7 100644 --- a/src/external/libSpinValve/classes/Makefile.am +++ b/src/external/libSpinValve/classes/Makefile.am @@ -20,6 +20,11 @@ dict_cpp_sources = \ PStartupHandler_SVDict.cpp \ PSkewedLorentzianDict.cpp +pcmdir = $(libdir) +pcm_DATA = \ + PStartupHandler_SVDict_rdict.pcm \ + PSkewedLorentzianDict_rdict.pcm + include_HEADERS = $(h_sources) noinst_HEADERS = $(h_linkdef) $(dict_h_sources) diff --git a/src/external/libSpinValve/include/PSkewedLorentzian.h b/src/external/libSpinValve/include/PSkewedLorentzian.h index 92b14ecd..56ed8536 100644 --- a/src/external/libSpinValve/include/PSkewedLorentzian.h +++ b/src/external/libSpinValve/include/PSkewedLorentzian.h @@ -59,8 +59,8 @@ class PSkewedLorentzian : public PUserFcnBase UInt_t fNoOfFields; ///< number of sampling points in field around the Lorentzian peak Double_t fRange; ///< range in which the sampling points are placed, given in units of \beta(1\pm\Delta) - static const Double_t fDegToRad = 0.0174532925199432955; - static const Double_t fTwoPi = 6.28318530717958623; + constexpr static const Double_t fDegToRad = 0.0174532925199432955; + constexpr static const Double_t fTwoPi = 6.28318530717958623; // definition of the class for the ROOT dictionary ClassDef(PSkewedLorentzian, 1) diff --git a/src/external/libZFRelaxation/Makefile.am b/src/external/libZFRelaxation/Makefile.am index 287d097f..ef04d966 100644 --- a/src/external/libZFRelaxation/Makefile.am +++ b/src/external/libZFRelaxation/Makefile.am @@ -15,6 +15,9 @@ cpp_sources = \ dict_cpp_sources = \ ZFRelaxationDict.cpp +pcmdir = $(libdir) +pcm_DATA = ZFRelaxationDict_rdict.pcm + include_HEADERS = $(h_sources) noinst_HEADERS = $(h_linkdef) $(dict_h_sources) @@ -23,7 +26,7 @@ AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS) BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources) AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@ -CLEANFILES = *Dict.cpp *Dict.h *~ core +CLEANFILES = *Dict.cpp *Dict.h *Dict* *~ core %Dict.cpp %Dict.h: %.h %LinkDef.h @ROOTCINT@ -v -f $*Dict.cpp -c -p $(AM_CPPFLAGS) $^ diff --git a/src/msr2data.cpp b/src/msr2data.cpp index dac2a5ad..79a95b09 100644 --- a/src/msr2data.cpp +++ b/src/msr2data.cpp @@ -68,7 +68,7 @@ using namespace boost::algorithm; */ bool isNumber(const string &s) { - unsigned int number; + unsigned int number(0); try { number = boost::lexical_cast(s); return true; @@ -123,8 +123,10 @@ void msr2data_syntax() cout << endl << " the successive files are generated using the musrfit output from the preceding runs"; cout << endl << " msr-