From e19f5a2dd3355151f4db64eb6a4aab4c710f7780 Mon Sep 17 00:00:00 2001 From: marian Date: Wed, 14 Nov 2007 18:38:31 +0000 Subject: [PATCH] Coding violation fixies (Marian) --- TPC/AliTPCLaserTracks.cxx | 14 ++++++++++---- TPC/AliTPCLaserTracks.h | 25 ++++++++++++------------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/TPC/AliTPCLaserTracks.cxx b/TPC/AliTPCLaserTracks.cxx index 26ebcecd7d6..da54ba9688e 100644 --- a/TPC/AliTPCLaserTracks.cxx +++ b/TPC/AliTPCLaserTracks.cxx @@ -327,6 +327,9 @@ void AliTPCLaserTracks::WriteTreeDesignData() //_______________________________________________________________________ TPolyLine3D* AliTPCLaserTracks::GetLine() { + // + // Make a polilyne object oout of the points + // if ( fNpoints ) return new TPolyLine3D(fNpoints,fXarr,fYarr,fZarr); return 0x0; @@ -335,7 +338,10 @@ TPolyLine3D* AliTPCLaserTracks::GetLine() //_______________________________________________________________________ TObjArray* AliTPCLaserTracks::GetLines(Char_t* file, Char_t *cuts) { - + // + // Read the input files with the laser track + // Make a array of polylines for visualization + TObjArray *array = new TObjArray; TFile *f = TFile::Open(file,"read"); @@ -446,7 +452,7 @@ AliTPCLaserTracks::~AliTPCLaserTracks() // // if ( fP ) delete fP; - if ( fXarr ) delete fXarr; - if ( fYarr ) delete fYarr; - if ( fZarr ) delete fZarr; + if ( fXarr ) delete [] fXarr; + if ( fYarr ) delete [] fYarr; + if ( fZarr ) delete [] fZarr; } diff --git a/TPC/AliTPCLaserTracks.h b/TPC/AliTPCLaserTracks.h index fd37b2699c0..c4f5b387bb4 100644 --- a/TPC/AliTPCLaserTracks.h +++ b/TPC/AliTPCLaserTracks.h @@ -8,12 +8,11 @@ //////////////////////////////////////////////////////////////////////////// class TString; -//class TPolyLine3D; +class TPolyLine3D; class TObjArray; class TGraph; class TVector3; -#include //////////////////////////////////////////////////////////////////////// // Class AliTPCLaserTracks @@ -27,17 +26,17 @@ public: AliTPCLaserTracks(const AliTPCLaserTracks ¶m); // copy constructor AliTPCLaserTracks &operator = (const AliTPCLaserTracks & param); - Int_t GetId() {return fId; } - Int_t GetSide() {return fSide; } - Int_t GetRod() {return fRod; } - Int_t GetBundle(){return fBundle; } - Int_t GetBeam() {return fBeam; } - - Double_t GetX() {return fX; } - Double_t GetY() {return fY; } - Double_t GetZ() {return fZ; } - Double_t GetPhi() {return fPhi; } - Double_t GetTheta(){return fTheta;} + Int_t GetId() const {return fId; } + Int_t GetSide() const {return fSide; } + Int_t GetRod() const {return fRod; } + Int_t GetBundle() const {return fBundle; } + Int_t GetBeam() const {return fBeam; } + + Double_t GetX() const {return fX; } + Double_t GetY() const {return fY; } + Double_t GetZ() const {return fZ; } + Double_t GetPhi() const {return fPhi; } + Double_t GetTheta() const{return fTheta;} TPolyLine3D *GetLine(); Int_t SetPoint(Int_t point, Double_t x, Double_t y, Double_t z); -- 2.43.0