From: hristov Date: Thu, 22 Mar 2007 11:47:02 +0000 (+0000) Subject: Cleanup method, persisten data members (Haavard) X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=8625679afc2e953a2ae45441818c5aba7f535bfb;p=u%2Fmrichter%2FAliRoot.git Cleanup method, persisten data members (Haavard) --- diff --git a/STEER/AliSplineFit.cxx b/STEER/AliSplineFit.cxx index 9e200df179d..a7d0c2df068 100644 --- a/STEER/AliSplineFit.cxx +++ b/STEER/AliSplineFit.cxx @@ -13,8 +13,6 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* $Id$ */ - //------------------------------------------------------------------------- // Implementation of the AliSplineFit class // The class performs a spline fit on an incoming TGraph. The graph is @@ -91,6 +89,7 @@ AliSplineFit::AliSplineFit(const AliSplineFit& source) : fX[i] = source.fX[i]; fY0[i] = source.fY0[i]; fY1[i] = source.fY1[i]; + fChi2I[i] = source.fChi2I[i]; } } AliSplineFit& AliSplineFit::operator=(const AliSplineFit& source){ @@ -1001,3 +1000,15 @@ void AliSplineFit::Test(Int_t npoints, Int_t ntracks, Float_t snoise){ } delete pcstream; } + +void AliSplineFit::Cleanup(){ + // + // deletes extra information to reduce amount of information stored on the data + // base + + delete fGraph; fGraph=0; + delete fParams; fParams=0; + delete fCovars; fCovars=0; + delete [] fIndex; fIndex=0; + delete [] fChi2I; fChi2I=0; +} diff --git a/STEER/AliSplineFit.h b/STEER/AliSplineFit.h index b82b6293f65..374a0fd04af 100644 --- a/STEER/AliSplineFit.h +++ b/STEER/AliSplineFit.h @@ -30,6 +30,7 @@ class AliSplineFit : public TObject { void SplineFit(Int_t nder); void MakeSmooth(TGraph * graph, Float_t ratio, char * type); void Update(TSpline3 *spline, Int_t nknots); + void Cleanup(); Int_t GetKnots() const {return fN;} Double_t* GetX() const {return fX;} Double_t* GetY0() const {return fY0;} @@ -63,17 +64,17 @@ class AliSplineFit : public TObject { Int_t fN0; // number of knots in iteration 0 TClonesArray *fParams; // object array of parameters in knots TClonesArray *fCovars; // object array of covariance in knots - Int_t *fIndex; // [fN0] index of point corresponding to knot + Int_t *fIndex; //[fN0] index of point corresponding to knot static TLinearFitter* fitterStatic(); // static fitter to save processing time // // // Int_t fN; // number of knots after compression Double_t fChi2; // chi2 per degree of freedom - Double_t *fX; // [fN] - xknot value - Double_t *fY0; // [fN] - y value at X - Double_t *fY1; // [fN] - y derivative value at X - Double_t *fChi2I; // [fN] - chi2 on interval - ClassDef(AliSplineFit, 0); + Double_t *fX; //[fN] - xknot value + Double_t *fY0; //[fN] - y value at X + Double_t *fY1; //[fN] - y derivative value at X + Double_t *fChi2I; //[fN] - chi2 on interval + ClassDef(AliSplineFit, 1); }; #endif