From 660cf9e014abce6ad91318b55a616169f929cbc7 Mon Sep 17 00:00:00 2001 From: "Bastian M. Wojek" Date: Fri, 6 Jun 2008 09:24:20 +0000 Subject: [PATCH] TLondon1D now derives from PUserFcnBase --- .../TFitPofB-lib/classes/Makefile.TFitPofB | 6 ++- .../TFitPofB-lib/classes/TLondon1D.cpp | 50 +++++++++++-------- src/external/TFitPofB-lib/include/TLondon1D.h | 24 ++++----- 3 files changed, 45 insertions(+), 35 deletions(-) diff --git a/src/external/TFitPofB-lib/classes/Makefile.TFitPofB b/src/external/TFitPofB-lib/classes/Makefile.TFitPofB index 24b80cdb..89592882 100644 --- a/src/external/TFitPofB-lib/classes/Makefile.TFitPofB +++ b/src/external/TFitPofB-lib/classes/Makefile.TFitPofB @@ -8,9 +8,11 @@ ROOTCFLAGS = $(shell $(ROOTSYS)/bin/root-config --cflags) CXX = g++ CXXFLAGS = -g -Wall -Wno-trigraphs -fPIC +MUSRFITINCLUDE = ../../../include +#MUSRFITINCLUDE = /home/l_wojek/rep/analysis/musrfit/src/include LOCALINCLUDE = ../include ROOTINCLUDE = $(ROOTSYS)/include -INCLUDES = -I$(LOCALINCLUDE) -I$(ROOTINCLUDE) +INCLUDES = -I$(LOCALINCLUDE) -I$(MUSRFITINCLUDE) -I$(ROOTINCLUDE) LD = g++ LDFLAGS = -g SOFLAGS = -O -shared @@ -55,7 +57,7 @@ $(OBJS): %.o: %.cpp TLondon1DDict.cpp: ../include/TLondon1D.h ../include/TLondon1DLinkDef.h @echo "Generating dictionary $@..." - rootcint -f $@ -c -p $^ + rootcint -f $@ -c -p -I$(MUSRFITINCLUDE) $^ TFitPofBStartupHandlerDict.cpp: ../include/TFitPofBStartupHandler.h ../include/TFitPofBStartupHandlerLinkDef.h @echo "Generating dictionary $@..." diff --git a/src/external/TFitPofB-lib/classes/TLondon1D.cpp b/src/external/TFitPofB-lib/classes/TLondon1D.cpp index 5b72ee27..0946f6a2 100644 --- a/src/external/TFitPofB-lib/classes/TLondon1D.cpp +++ b/src/external/TFitPofB-lib/classes/TLondon1D.cpp @@ -5,7 +5,7 @@ Author: Bastian M. Wojek e-mail: bastian.wojek@psi.ch - 2008/06/03 + 2008/06/06 ***************************************************************************/ @@ -41,12 +41,14 @@ TLondon1D::~TLondon1D() { // creates (a pointer to) the TPofTCalc object (with the FFT plan) //------------------ -TLondon1D1L::TLondon1D1L(const vector &parNo, const vector &par) { +TLondon1D1L::TLondon1D1L(const vector &par) { // extract function parameters - for(unsigned int i(0); i &parNo, const vector // Parameters: all the parameters for the function to be fitted through TLondon1D1L //------------------ -double TLondon1D1L::Eval(double t, const vector &par) const { +double TLondon1D1L::operator()(double t, const vector &par) const { // check if any parameter has changed @@ -163,12 +165,14 @@ double TLondon1D1L::Eval(double t, const vector &par) const { // creates (a pointer to) the TPofTCalc object (with the FFT plan) //------------------ -TLondon1D2L::TLondon1D2L(const vector &parNo, const vector &par) : fLastTwoChanged(true) { +TLondon1D2L::TLondon1D2L(const vector &par) : fLastTwoChanged(true) { // extract function parameters - for(unsigned int i(0); i &parNo, const vector // Parameters: all the parameters for the function to be fitted through TLondon1D2L //------------------ -double TLondon1D2L::Eval(double t, const vector &par) const { +double TLondon1D2L::operator()(double t, const vector &par) const { // check if any parameter has changed @@ -299,12 +303,14 @@ double TLondon1D2L::Eval(double t, const vector &par) const { // creates (a pointer to) the TPofTCalc object (with the FFT plan) //------------------ -TLondon1D3L::TLondon1D3L(const vector &parNo, const vector &par) : fLastThreeChanged(true) { +TLondon1D3L::TLondon1D3L(const vector &par) : fLastThreeChanged(true) { // extract function parameters - for(unsigned int i(0); i &parNo, const vector // Parameters: all the parameters for the function to be fitted through TLondon1D3L //------------------ -double TLondon1D3L::Eval(double t, const vector &par) const { +double TLondon1D3L::operator()(double t, const vector &par) const { // check if any parameter has changed @@ -451,12 +457,14 @@ double TLondon1D3L::Eval(double t, const vector &par) const { // creates (a pointer to) the TPofTCalc object (with the FFT plan) //------------------ -TLondon1D3LS::TLondon1D3LS(const vector &parNo, const vector &par) : fLastThreeChanged(true) { +TLondon1D3LS::TLondon1D3LS(const vector &par) : fLastThreeChanged(true) { // extract function parameters - for(unsigned int i(0); i &parNo, const vector &par) const { +double TLondon1D3LS::operator()(double t, const vector &par) const { // check if any parameter has changed diff --git a/src/external/TFitPofB-lib/include/TLondon1D.h b/src/external/TFitPofB-lib/include/TLondon1D.h index 2ba699a4..5eb135b9 100644 --- a/src/external/TFitPofB-lib/include/TLondon1D.h +++ b/src/external/TFitPofB-lib/include/TLondon1D.h @@ -5,24 +5,24 @@ Author: Bastian M. Wojek e-mail: bastian.wojek@psi.ch - 2008/06/03 + 2008/06/06 ***************************************************************************/ #ifndef _TLondon1D_H_ #define _TLondon1D_H_ -#include "TObject.h" +#include "PUserFcnBase.h" #include "TPofTCalc.h" -class TLondon1D : public TObject { +class TLondon1D : public PUserFcnBase { public: // default conctructor only for the ROOT dictionary - DO NOT USE IT OTHERWISE! TLondon1D() : fCalcNeeded(true) {} virtual ~TLondon1D(); - virtual double Eval(double, const vector&) const = 0; + virtual double operator()(double, const vector&) const = 0; protected: mutable vector fPar; @@ -43,10 +43,10 @@ class TLondon1D1L : public TLondon1D { public: // default conctructor only for the ROOT dictionary - DO NOT USE IT OTHERWISE! TLondon1D1L() {} - TLondon1D1L(const vector& , const vector&); + TLondon1D1L(const vector&); ~TLondon1D1L() {} - double Eval(double, const vector&) const; + double operator()(double, const vector&) const; ClassDef(TLondon1D1L,1) }; @@ -56,10 +56,10 @@ class TLondon1D2L : public TLondon1D { public: // default conctructor only for the ROOT dictionary - DO NOT USE IT OTHERWISE! TLondon1D2L() : fLastTwoChanged(true) {} - TLondon1D2L(const vector& , const vector&); + TLondon1D2L(const vector&); ~TLondon1D2L() {} - double Eval(double, const vector&) const; + double operator()(double, const vector&) const; private: mutable bool fLastTwoChanged; @@ -72,10 +72,10 @@ class TLondon1D3L : public TLondon1D { public: // default conctructor only for the ROOT dictionary - DO NOT USE IT OTHERWISE! TLondon1D3L() : fLastThreeChanged(true) {} - TLondon1D3L(const vector& , const vector&); + TLondon1D3L(const vector&); ~TLondon1D3L() {} - double Eval(double, const vector&) const; + double operator()(double, const vector&) const; private: mutable bool fLastThreeChanged; @@ -89,10 +89,10 @@ class TLondon1D3LS : public TLondon1D { public: // default conctructor only for the ROOT dictionary - DO NOT USE IT OTHERWISE! TLondon1D3LS() : fLastThreeChanged(true) {} - TLondon1D3LS(const vector& , const vector&); + TLondon1D3LS(const vector&); ~TLondon1D3LS() {} - double Eval(double, const vector&) const; + double operator()(double, const vector&) const; private: mutable bool fLastThreeChanged;