From cfccb30eb8ebc8bcdeae43940e2e0fe475d71d47 Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Wed, 1 Nov 2023 08:54:24 +0100 Subject: [PATCH] switched TGapIntegrals from raw -> smart pointers. --- .../libGapIntegrals/TGapIntegrals.cpp | 231 ++---------------- src/external/libGapIntegrals/TGapIntegrals.h | 80 ++---- 2 files changed, 51 insertions(+), 260 deletions(-) diff --git a/src/external/libGapIntegrals/TGapIntegrals.cpp b/src/external/libGapIntegrals/TGapIntegrals.cpp index 36c06122..8861700a 100644 --- a/src/external/libGapIntegrals/TGapIntegrals.cpp +++ b/src/external/libGapIntegrals/TGapIntegrals.cpp @@ -72,9 +72,7 @@ ClassImp(TFilmMagnetizationDWave) *

s wave gap integral */ TGapSWave::TGapSWave() { - TGapIntegral *gapint = new TGapIntegral(); - fGapIntegral = gapint; - gapint = nullptr; + fGapIntegral = std::make_unique(); fTemp.clear(); fTempIter = fTemp.end(); @@ -88,9 +86,7 @@ TGapSWave::TGapSWave() { *

point p wave gap integral */ TGapPointPWave::TGapPointPWave() { - TPointPWaveGapIntegralCuhre *gapint = new TPointPWaveGapIntegralCuhre(); - fGapIntegral = gapint; - gapint = nullptr; + fGapIntegral = std::make_unique(); fTemp.clear(); fTempIter = fTemp.end(); @@ -104,9 +100,7 @@ TGapPointPWave::TGapPointPWave() { *

line p wave gap integral */ TGapLinePWave::TGapLinePWave() { - TLinePWaveGapIntegralCuhre *gapint = new TLinePWaveGapIntegralCuhre(); - fGapIntegral = gapint; - gapint = nullptr; + fGapIntegral = std::make_unique(); fTemp.clear(); fTempIter = fTemp.end(); @@ -120,9 +114,7 @@ TGapLinePWave::TGapLinePWave() { *

*/ TGapDWave::TGapDWave() { - TDWaveGapIntegralCuhre *gapint = new TDWaveGapIntegralCuhre(); - fGapIntegral = gapint; - gapint = nullptr; + fGapIntegral = std::make_unique(); fTemp.clear(); fTempIter = fTemp.end(); @@ -136,9 +128,7 @@ TGapDWave::TGapDWave() { *

*/ TGapCosSqDWave::TGapCosSqDWave() { - TCosSqDWaveGapIntegralCuhre *gapint = new TCosSqDWaveGapIntegralCuhre(); - fGapIntegral = gapint; - gapint = nullptr; + fGapIntegral = std::make_unique(); fTemp.clear(); fTempIter = fTemp.end(); @@ -152,9 +142,7 @@ TGapCosSqDWave::TGapCosSqDWave() { *

*/ TGapSinSqDWave::TGapSinSqDWave() { - TSinSqDWaveGapIntegralCuhre *gapint = new TSinSqDWaveGapIntegralCuhre(); - fGapIntegral = gapint; - gapint = nullptr; + fGapIntegral = std::make_unique(); fTemp.clear(); fTempIter = fTemp.end(); @@ -168,9 +156,7 @@ TGapSinSqDWave::TGapSinSqDWave() { *

*/ TGapAnSWave::TGapAnSWave() { - TAnSWaveGapIntegralCuhre *gapint = new TAnSWaveGapIntegralCuhre(); - fGapIntegral = gapint; - gapint = nullptr; + fGapIntegral = std::make_unique(); fTemp.clear(); fTempIter = fTemp.end(); @@ -184,9 +170,7 @@ TGapAnSWave::TGapAnSWave() { *

*/ TGapNonMonDWave1::TGapNonMonDWave1() { - TNonMonDWave1GapIntegralCuhre *gapint = new TNonMonDWave1GapIntegralCuhre(); - fGapIntegral = gapint; - gapint = nullptr; + fGapIntegral = std::make_unique(); fTemp.clear(); fTempIter = fTemp.end(); @@ -200,9 +184,7 @@ TGapNonMonDWave1::TGapNonMonDWave1() { *

*/ TGapNonMonDWave2::TGapNonMonDWave2() { - TNonMonDWave2GapIntegralCuhre *gapint = new TNonMonDWave2GapIntegralCuhre(); - fGapIntegral = gapint; - gapint = nullptr; + fGapIntegral = std::make_unique(); fTemp.clear(); fTempIter = fTemp.end(); @@ -216,7 +198,7 @@ TGapNonMonDWave2::TGapNonMonDWave2() { *

*/ TLambdaSWave::TLambdaSWave() { - fLambdaInvSq = new TGapSWave(); + fLambdaInvSq = std::make_unique(); } //-------------------------------------------------------------------- @@ -224,7 +206,7 @@ TLambdaSWave::TLambdaSWave() { *

*/ TLambdaPointPWave::TLambdaPointPWave() { - fLambdaInvSq = new TGapPointPWave(); + fLambdaInvSq = std::make_unique(); } //-------------------------------------------------------------------- @@ -232,7 +214,7 @@ TLambdaPointPWave::TLambdaPointPWave() { *

*/ TLambdaLinePWave::TLambdaLinePWave() { - fLambdaInvSq = new TGapLinePWave(); + fLambdaInvSq = std::make_unique(); } //-------------------------------------------------------------------- @@ -240,7 +222,7 @@ TLambdaLinePWave::TLambdaLinePWave() { *

*/ TLambdaDWave::TLambdaDWave() { - fLambdaInvSq = new TGapDWave(); + fLambdaInvSq = std::make_unique(); } //-------------------------------------------------------------------- @@ -248,7 +230,7 @@ TLambdaDWave::TLambdaDWave() { *

*/ TLambdaAnSWave::TLambdaAnSWave() { - fLambdaInvSq = new TGapAnSWave(); + fLambdaInvSq = std::make_unique(); } //-------------------------------------------------------------------- @@ -256,7 +238,7 @@ TLambdaAnSWave::TLambdaAnSWave() { *

*/ TLambdaNonMonDWave1::TLambdaNonMonDWave1() { - fLambdaInvSq = new TGapNonMonDWave1(); + fLambdaInvSq = std::make_unique(); } //-------------------------------------------------------------------- @@ -264,7 +246,7 @@ TLambdaNonMonDWave1::TLambdaNonMonDWave1() { *

*/ TLambdaNonMonDWave2::TLambdaNonMonDWave2() { - fLambdaInvSq = new TGapNonMonDWave2(); + fLambdaInvSq = std::make_unique(); } //-------------------------------------------------------------------- @@ -272,7 +254,7 @@ TLambdaNonMonDWave2::TLambdaNonMonDWave2() { *

*/ TLambdaInvSWave::TLambdaInvSWave() { - fLambdaInvSq = new TGapSWave(); + fLambdaInvSq = std::make_unique(); } //-------------------------------------------------------------------- @@ -280,7 +262,7 @@ TLambdaInvSWave::TLambdaInvSWave() { *

*/ TLambdaInvPointPWave::TLambdaInvPointPWave() { - fLambdaInvSq = new TGapPointPWave(); + fLambdaInvSq = std::make_unique(); } //-------------------------------------------------------------------- @@ -288,7 +270,7 @@ TLambdaInvPointPWave::TLambdaInvPointPWave() { *

*/ TLambdaInvLinePWave::TLambdaInvLinePWave() { - fLambdaInvSq = new TGapLinePWave(); + fLambdaInvSq = std::make_unique(); } //-------------------------------------------------------------------- @@ -296,7 +278,7 @@ TLambdaInvLinePWave::TLambdaInvLinePWave() { *

*/ TLambdaInvDWave::TLambdaInvDWave() { - fLambdaInvSq = new TGapDWave(); + fLambdaInvSq = std::make_unique(); } //-------------------------------------------------------------------- @@ -304,7 +286,7 @@ TLambdaInvDWave::TLambdaInvDWave() { *

*/ TLambdaInvAnSWave::TLambdaInvAnSWave() { - fLambdaInvSq = new TGapAnSWave(); + fLambdaInvSq = std::make_unique(); } //-------------------------------------------------------------------- @@ -312,7 +294,7 @@ TLambdaInvAnSWave::TLambdaInvAnSWave() { *

*/ TLambdaInvNonMonDWave1::TLambdaInvNonMonDWave1() { - fLambdaInvSq = new TGapNonMonDWave1(); + fLambdaInvSq = std::make_unique(); } //-------------------------------------------------------------------- @@ -320,7 +302,7 @@ TLambdaInvNonMonDWave1::TLambdaInvNonMonDWave1() { *

*/ TLambdaInvNonMonDWave2::TLambdaInvNonMonDWave2() { - fLambdaInvSq = new TGapNonMonDWave2(); + fLambdaInvSq = std::make_unique(); } //-------------------------------------------------------------------- @@ -328,9 +310,6 @@ TLambdaInvNonMonDWave2::TLambdaInvNonMonDWave2() { *

*/ TGapSWave::~TGapSWave() { - delete fGapIntegral; - fGapIntegral = nullptr; - fTemp.clear(); fTempIter = fTemp.end(); fIntegralValues.clear(); @@ -343,9 +322,6 @@ TGapSWave::~TGapSWave() { *

*/ TGapPointPWave::~TGapPointPWave() { - delete fGapIntegral; - fGapIntegral = nullptr; - fTemp.clear(); fTempIter = fTemp.end(); fIntegralValues.clear(); @@ -358,9 +334,6 @@ TGapPointPWave::~TGapPointPWave() { *

*/ TGapLinePWave::~TGapLinePWave() { - delete fGapIntegral; - fGapIntegral = nullptr; - fTemp.clear(); fTempIter = fTemp.end(); fIntegralValues.clear(); @@ -373,9 +346,6 @@ TGapLinePWave::~TGapLinePWave() { *

*/ TGapDWave::~TGapDWave() { - delete fGapIntegral; - fGapIntegral = nullptr; - fTemp.clear(); fTempIter = fTemp.end(); fIntegralValues.clear(); @@ -388,9 +358,6 @@ TGapDWave::~TGapDWave() { *

*/ TGapCosSqDWave::~TGapCosSqDWave() { - delete fGapIntegral; - fGapIntegral = nullptr; - fTemp.clear(); fTempIter = fTemp.end(); fIntegralValues.clear(); @@ -403,9 +370,6 @@ TGapCosSqDWave::~TGapCosSqDWave() { *

*/ TGapSinSqDWave::~TGapSinSqDWave() { - delete fGapIntegral; - fGapIntegral = nullptr; - fTemp.clear(); fTempIter = fTemp.end(); fIntegralValues.clear(); @@ -418,9 +382,6 @@ TGapSinSqDWave::~TGapSinSqDWave() { *

*/ TGapAnSWave::~TGapAnSWave() { - delete fGapIntegral; - fGapIntegral = nullptr; - fTemp.clear(); fTempIter = fTemp.end(); fIntegralValues.clear(); @@ -433,9 +394,6 @@ TGapAnSWave::~TGapAnSWave() { *

*/ TGapNonMonDWave1::~TGapNonMonDWave1() { - delete fGapIntegral; - fGapIntegral = nullptr; - fTemp.clear(); fTempIter = fTemp.end(); fIntegralValues.clear(); @@ -448,9 +406,6 @@ TGapNonMonDWave1::~TGapNonMonDWave1() { *

*/ TGapNonMonDWave2::~TGapNonMonDWave2() { - delete fGapIntegral; - fGapIntegral = nullptr; - fTemp.clear(); fTempIter = fTemp.end(); fIntegralValues.clear(); @@ -458,133 +413,6 @@ TGapNonMonDWave2::~TGapNonMonDWave2() { fPar.clear(); } -//-------------------------------------------------------------------- -/** - *

- */ -TLambdaSWave::~TLambdaSWave() { - delete fLambdaInvSq; - fLambdaInvSq = nullptr; -} - -//-------------------------------------------------------------------- -/** - *

- */ -TLambdaPointPWave::~TLambdaPointPWave() { - delete fLambdaInvSq; - fLambdaInvSq = nullptr; -} - -//-------------------------------------------------------------------- -/** - *

- */ -TLambdaLinePWave::~TLambdaLinePWave() { - delete fLambdaInvSq; - fLambdaInvSq = nullptr; -} - -//-------------------------------------------------------------------- -/** - *

- */ -TLambdaDWave::~TLambdaDWave() { - delete fLambdaInvSq; - fLambdaInvSq = nullptr; -} - -//-------------------------------------------------------------------- -/** - *

- */ -TLambdaAnSWave::~TLambdaAnSWave() { - delete fLambdaInvSq; - fLambdaInvSq = nullptr; -} - -//-------------------------------------------------------------------- -/** - *

- */ -TLambdaNonMonDWave1::~TLambdaNonMonDWave1() { - delete fLambdaInvSq; - fLambdaInvSq = nullptr; -} - -//-------------------------------------------------------------------- -/** - *

- */ -TLambdaNonMonDWave2::~TLambdaNonMonDWave2() { - delete fLambdaInvSq; - fLambdaInvSq = nullptr; -} - -//-------------------------------------------------------------------- -/** - *

- */ -TLambdaInvSWave::~TLambdaInvSWave() { - delete fLambdaInvSq; - fLambdaInvSq = nullptr; -} - -//-------------------------------------------------------------------- -/** - *

- */ -TLambdaInvPointPWave::~TLambdaInvPointPWave() { - delete fLambdaInvSq; - fLambdaInvSq = nullptr; -} - -//-------------------------------------------------------------------- -/** - *

- */ -TLambdaInvLinePWave::~TLambdaInvLinePWave() { - delete fLambdaInvSq; - fLambdaInvSq = nullptr; -} - -//-------------------------------------------------------------------- -/** - *

- */ -TLambdaInvDWave::~TLambdaInvDWave() { - delete fLambdaInvSq; - fLambdaInvSq = nullptr; -} - -//-------------------------------------------------------------------- -/** - *

- */ -TLambdaInvAnSWave::~TLambdaInvAnSWave() { - delete fLambdaInvSq; - fLambdaInvSq = nullptr; -} - -//-------------------------------------------------------------------- -/** - *

- */ -TLambdaInvNonMonDWave1::~TLambdaInvNonMonDWave1() { - delete fLambdaInvSq; - fLambdaInvSq = nullptr; -} - -//-------------------------------------------------------------------- -/** - *

- */ -TLambdaInvNonMonDWave2::~TLambdaInvNonMonDWave2() { - delete fLambdaInvSq; - fLambdaInvSq = nullptr; -} - - //-------------------------------------------------------------------- /** *

prepare the needed parameters for the integration carried out in TGapIntegral. @@ -1685,18 +1513,7 @@ double TLambdaInvPowerLaw::operator()(double t, const std::vector &par) */ TFilmMagnetizationDWave::TFilmMagnetizationDWave() { - fLambdaInvSq = new TGapDWave(); - fPar.clear(); -} - -//-------------------------------------------------------------------- -/** - *

- */ -TFilmMagnetizationDWave::~TFilmMagnetizationDWave() -{ - delete fLambdaInvSq; - fLambdaInvSq = nullptr; + fLambdaInvSq = std::make_unique(); fPar.clear(); } diff --git a/src/external/libGapIntegrals/TGapIntegrals.h b/src/external/libGapIntegrals/TGapIntegrals.h index 69148941..b023cd7b 100644 --- a/src/external/libGapIntegrals/TGapIntegrals.h +++ b/src/external/libGapIntegrals/TGapIntegrals.h @@ -29,8 +29,9 @@ #ifndef _TGapIntegrals_H_ #define _TGapIntegrals_H_ -#include -#include +#include +#include +#include #include "PUserFcnBase.h" #include "BMWIntegrator.h" @@ -48,7 +49,7 @@ public: double operator()(double, const std::vector&) const; private: - TGapIntegral *fGapIntegral; + std::unique_ptr fGapIntegral; mutable std::vector fTemp; mutable std::vector::const_iterator fTempIter; mutable std::vector fIntegralValues; @@ -72,7 +73,7 @@ public: double operator()(double, const std::vector&) const; private: - TPointPWaveGapIntegralCuhre *fGapIntegral; + std::unique_ptr fGapIntegral; mutable std::vector fTemp; mutable std::vector::const_iterator fTempIter; mutable std::vector fIntegralValues; @@ -96,7 +97,7 @@ public: double operator()(double, const std::vector&) const; private: - TLinePWaveGapIntegralCuhre *fGapIntegral; + std::unique_ptr fGapIntegral; mutable std::vector fTemp; mutable std::vector::const_iterator fTempIter; mutable std::vector fIntegralValues; @@ -120,7 +121,7 @@ public: double operator()(double, const std::vector&) const; private: - TDWaveGapIntegralCuhre *fGapIntegral; + std::unique_ptr fGapIntegral; mutable std::vector fTemp; mutable std::vector::const_iterator fTempIter; mutable std::vector fIntegralValues; @@ -144,7 +145,7 @@ public: double operator()(double, const std::vector&) const; private: - TCosSqDWaveGapIntegralCuhre *fGapIntegral; + std::unique_ptr fGapIntegral; mutable std::vector fTemp; mutable std::vector::const_iterator fTempIter; mutable std::vector fIntegralValues; @@ -168,7 +169,7 @@ public: double operator()(double, const std::vector&) const; private: - TSinSqDWaveGapIntegralCuhre *fGapIntegral; + std::unique_ptr fGapIntegral; mutable std::vector fTemp; mutable std::vector::const_iterator fTempIter; mutable std::vector fIntegralValues; @@ -192,7 +193,7 @@ public: double operator()(double, const std::vector&) const; private: - TAnSWaveGapIntegralCuhre *fGapIntegral; + std::unique_ptr fGapIntegral; mutable std::vector fTemp; mutable std::vector::const_iterator fTempIter; mutable std::vector fIntegralValues; @@ -216,7 +217,7 @@ public: double operator()(double, const std::vector&) const; private: - TNonMonDWave1GapIntegralCuhre *fGapIntegral; + std::unique_ptr fGapIntegral; mutable std::vector fTemp; mutable std::vector::const_iterator fTempIter; mutable std::vector fIntegralValues; @@ -240,7 +241,7 @@ public: double operator()(double, const std::vector&) const; private: - TNonMonDWave2GapIntegralCuhre *fGapIntegral; + std::unique_ptr fGapIntegral; mutable std::vector fTemp; mutable std::vector::const_iterator fTempIter; mutable std::vector fIntegralValues; @@ -259,9 +260,6 @@ private: class TGapPowerLaw : public PUserFcnBase { public: - TGapPowerLaw() {} - virtual ~TGapPowerLaw() {} - double operator()(double, const std::vector&) const; private: @@ -276,9 +274,6 @@ private: class TGapDirtySWave : public PUserFcnBase { public: - TGapDirtySWave() {} - virtual ~TGapDirtySWave() {} - double operator()(double, const std::vector&) const; private: @@ -295,12 +290,11 @@ class TLambdaSWave : public PUserFcnBase { public: TLambdaSWave(); - virtual ~TLambdaSWave(); double operator()(double, const std::vector&) const; private: - TGapSWave *fLambdaInvSq; + std::unique_ptr fLambdaInvSq; ClassDef(TLambdaSWave,1) }; @@ -313,12 +307,11 @@ class TLambdaPointPWave : public PUserFcnBase { public: TLambdaPointPWave(); - virtual ~TLambdaPointPWave(); double operator()(double, const std::vector&) const; private: - TGapPointPWave *fLambdaInvSq; + std::unique_ptr fLambdaInvSq; ClassDef(TLambdaPointPWave,1) }; @@ -331,12 +324,11 @@ class TLambdaLinePWave : public PUserFcnBase { public: TLambdaLinePWave(); - virtual ~TLambdaLinePWave(); double operator()(double, const std::vector&) const; private: - TGapLinePWave *fLambdaInvSq; + std::unique_ptr fLambdaInvSq; ClassDef(TLambdaLinePWave,1) }; @@ -349,12 +341,11 @@ class TLambdaDWave : public PUserFcnBase { public: TLambdaDWave(); - virtual ~TLambdaDWave(); double operator()(double, const std::vector&) const; private: - TGapDWave *fLambdaInvSq; + std::unique_ptr fLambdaInvSq; ClassDef(TLambdaDWave,1) }; @@ -367,12 +358,11 @@ class TLambdaAnSWave : public PUserFcnBase { public: TLambdaAnSWave(); - virtual ~TLambdaAnSWave(); double operator()(double, const std::vector&) const; private: - TGapAnSWave *fLambdaInvSq; + std::unique_ptr fLambdaInvSq; ClassDef(TLambdaAnSWave,1) }; @@ -385,12 +375,11 @@ class TLambdaNonMonDWave1 : public PUserFcnBase { public: TLambdaNonMonDWave1(); - virtual ~TLambdaNonMonDWave1(); double operator()(double, const std::vector&) const; private: - TGapNonMonDWave1 *fLambdaInvSq; + std::unique_ptr fLambdaInvSq; ClassDef(TLambdaNonMonDWave1,1) }; @@ -403,12 +392,11 @@ class TLambdaNonMonDWave2 : public PUserFcnBase { public: TLambdaNonMonDWave2(); - virtual ~TLambdaNonMonDWave2(); double operator()(double, const std::vector&) const; private: - TGapNonMonDWave2 *fLambdaInvSq; + std::unique_ptr fLambdaInvSq; ClassDef(TLambdaNonMonDWave2,1) }; @@ -420,9 +408,6 @@ private: class TLambdaPowerLaw : public PUserFcnBase { public: - TLambdaPowerLaw() {} - virtual ~TLambdaPowerLaw() {} - double operator()(double, const std::vector&) const; private: @@ -438,12 +423,11 @@ class TLambdaInvSWave : public PUserFcnBase { public: TLambdaInvSWave(); - virtual ~TLambdaInvSWave(); double operator()(double, const std::vector&) const; private: - TGapSWave *fLambdaInvSq; + std::unique_ptr fLambdaInvSq; ClassDef(TLambdaInvSWave,1) }; @@ -456,12 +440,11 @@ class TLambdaInvPointPWave : public PUserFcnBase { public: TLambdaInvPointPWave(); - virtual ~TLambdaInvPointPWave(); double operator()(double, const std::vector&) const; private: - TGapPointPWave *fLambdaInvSq; + std::unique_ptr fLambdaInvSq; ClassDef(TLambdaInvPointPWave,1) }; @@ -474,12 +457,11 @@ class TLambdaInvLinePWave : public PUserFcnBase { public: TLambdaInvLinePWave(); - virtual ~TLambdaInvLinePWave(); double operator()(double, const std::vector&) const; private: - TGapLinePWave *fLambdaInvSq; + std::unique_ptr fLambdaInvSq; ClassDef(TLambdaInvLinePWave,1) }; @@ -492,12 +474,11 @@ class TLambdaInvDWave : public PUserFcnBase { public: TLambdaInvDWave(); - virtual ~TLambdaInvDWave(); double operator()(double, const std::vector&) const; private: - TGapDWave *fLambdaInvSq; + std::unique_ptr fLambdaInvSq; ClassDef(TLambdaInvDWave,1) }; @@ -510,12 +491,11 @@ class TLambdaInvAnSWave : public PUserFcnBase { public: TLambdaInvAnSWave(); - virtual ~TLambdaInvAnSWave(); double operator()(double, const std::vector&) const; private: - TGapAnSWave *fLambdaInvSq; + std::unique_ptr fLambdaInvSq; ClassDef(TLambdaInvAnSWave,1) }; @@ -528,12 +508,11 @@ class TLambdaInvNonMonDWave1 : public PUserFcnBase { public: TLambdaInvNonMonDWave1(); - virtual ~TLambdaInvNonMonDWave1(); double operator()(double, const std::vector&) const; private: - TGapNonMonDWave1 *fLambdaInvSq; + std::unique_ptr fLambdaInvSq; ClassDef(TLambdaInvNonMonDWave1,1) }; @@ -546,12 +525,11 @@ class TLambdaInvNonMonDWave2 : public PUserFcnBase { public: TLambdaInvNonMonDWave2(); - virtual ~TLambdaInvNonMonDWave2(); double operator()(double, const std::vector&) const; private: - TGapNonMonDWave2 *fLambdaInvSq; + std::unique_ptr fLambdaInvSq; ClassDef(TLambdaInvNonMonDWave2,1) }; @@ -563,9 +541,6 @@ private: class TLambdaInvPowerLaw : public PUserFcnBase { public: - TLambdaInvPowerLaw() {} - virtual ~TLambdaInvPowerLaw() {} - double operator()(double, const std::vector&) const; private: @@ -581,12 +556,11 @@ class TFilmMagnetizationDWave : public PUserFcnBase { public: TFilmMagnetizationDWave(); - virtual ~TFilmMagnetizationDWave(); double operator()(double, const std::vector&) const; private: - TGapDWave *fLambdaInvSq; + std::unique_ptr fLambdaInvSq; mutable std::vector fPar;