From a467553bd12f46cb927aeb55321617b1af31de5d Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Sat, 17 Jan 2015 15:31:52 +0100 Subject: [PATCH] adding a branch for ROOT 6.x. This needs some minor adaptations due to the new rootcint/rootclang and the stricter c++11. --- ChangeLog | 2 ++ configure.ac | 2 +- src/classes/Makefile.am | 2 +- src/classes/PRunAsymmetry.cpp | 4 ++-- src/external/MuSR_software/Class_MuSR_PSI/Makefile.am | 1 - src/external/MuSR_software/Class_MuSR_PSI/MuSR_td_PSI_bin.cpp | 2 +- src/external/libPhotoMeissner/include/PPhotoMeissner.h | 4 ++-- src/external/libSpinValve/include/PSkewedLorentzian.h | 4 ++-- 8 files changed, 11 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index bcc8ab9b..ee40e460 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ changes since 0.13.0 =================================== +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 3f0a04f6..019a062c 100644 --- a/configure.ac +++ b/configure.ac @@ -1040,7 +1040,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 51283653..07ad5aeb 100644 --- a/src/classes/Makefile.am +++ b/src/classes/Makefile.am @@ -84,7 +84,7 @@ AM_LDFLAGS = $(LOCAL_LIB_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) $^ + @ROOTCINT@ -v -f $*Dict.cpp -c -p -I$(BOOST_INCLUDE) $(INCLUDES) $^ lib_LTLIBRARIES = libPUserFcnBase.la libPMusr.la diff --git a/src/classes/PRunAsymmetry.cpp b/src/classes/PRunAsymmetry.cpp index c04d2a73..03d1e45a 100644 --- a/src/classes/PRunAsymmetry.cpp +++ b/src/classes/PRunAsymmetry.cpp @@ -759,8 +759,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/external/MuSR_software/Class_MuSR_PSI/Makefile.am b/src/external/MuSR_software/Class_MuSR_PSI/Makefile.am index ce92e577..1856a2be 100644 --- a/src/external/MuSR_software/Class_MuSR_PSI/Makefile.am +++ b/src/external/MuSR_software/Class_MuSR_PSI/Makefile.am @@ -1,5 +1,4 @@ ## Process this file with automake to create Makefile.in -## $Id$ h_sources = MuSR_td_PSI_bin.h cpp_sources = MuSR_td_PSI_bin.cpp diff --git a/src/external/MuSR_software/Class_MuSR_PSI/MuSR_td_PSI_bin.cpp b/src/external/MuSR_software/Class_MuSR_PSI/MuSR_td_PSI_bin.cpp index 9065c4a6..aac7acbe 100644 --- a/src/external/MuSR_software/Class_MuSR_PSI/MuSR_td_PSI_bin.cpp +++ b/src/external/MuSR_software/Class_MuSR_PSI/MuSR_td_PSI_bin.cpp @@ -205,7 +205,7 @@ typedef long int Int32; #else /* other operating system */ /* 32 bit word length */ -#if (defined(_WIN32) || defined(__linux__) || defined(_WIN32GCC)) +#if (defined(_WIN32) || defined(__linux__) || defined(_Darwin_) || defined(_WIN32GCC)) typedef short Int16; typedef int Int32; #else diff --git a/src/external/libPhotoMeissner/include/PPhotoMeissner.h b/src/external/libPhotoMeissner/include/PPhotoMeissner.h index 4ac1cc65..071b2473 100644 --- a/src/external/libPhotoMeissner/include/PPhotoMeissner.h +++ b/src/external/libPhotoMeissner/include/PPhotoMeissner.h @@ -57,8 +57,8 @@ class PPhotoMeissner : public PUserFcnBase Bool_t fValid; ///< flag indicating if initialization went through smoothly - 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; Double_t InuMinus(const Double_t nu, const Double_t x) const; Double_t FieldFilm(const Double_t z, const vector &par) const; 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)