X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TRD%2FAliTRDpoints.cxx;h=ec0f3c73d24628e54f171fb0fa9462f369f4bcc0;hb=38f7995967a97a3454410de3350f57ff5bae82dc;hp=e25ca2f108621747e6c1c1e8939f9ea4bc0a909d;hpb=e0d47c25c6de2c1d18508db99a65e77995ef2968;p=u%2Fmrichter%2FAliRoot.git diff --git a/TRD/AliTRDpoints.cxx b/TRD/AliTRDpoints.cxx index e25ca2f1086..ec0f3c73d24 100644 --- a/TRD/AliTRDpoints.cxx +++ b/TRD/AliTRDpoints.cxx @@ -33,37 +33,42 @@ ClassImp(AliTRDpoints) //_____________________________________________________________________________ -AliTRDpoints::AliTRDpoints():AliPoints() +AliTRDpoints::AliTRDpoints() + :AliPoints() + ,fNTRpoints(0) + ,fTRpolyMarker(0) { // // Default constructor // - fNTRpoints = 0; - fTRpolyMarker = 0; - } //_____________________________________________________________________________ -AliTRDpoints::AliTRDpoints(Int_t nhitsE, Int_t nhitsT):AliPoints(nhitsE) +AliTRDpoints::AliTRDpoints(Int_t nhitsE, Int_t nhitsT) + :AliPoints(nhitsE) + ,fNTRpoints(nhitsT) + ,fTRpolyMarker(0) { // // Standard constructor // - fNTRpoints = nhitsT; - fTRpolyMarker = 0; - } //_____________________________________________________________________________ -AliTRDpoints::AliTRDpoints(const AliTRDpoints &p):AliPoints(p) +AliTRDpoints::AliTRDpoints(const AliTRDpoints &p) + :AliPoints(p) + ,fNTRpoints(p.fNTRpoints) + ,fTRpolyMarker(0) { // // Copy contructor // - - ((AliTRDpoints &) p).Copy(*this); + + for (Int_t i = 0; i < 3*fNTRpoints; i++) { + ((AliTRDpoints &) p).fTRpoints[i] = fTRpoints[i]; + } } @@ -74,7 +79,10 @@ AliTRDpoints::~AliTRDpoints() // Default destructor // - if (fTRpolyMarker) delete fTRpolyMarker; + if (fTRpolyMarker) { + delete fTRpolyMarker; + fTRpolyMarker = 0; + } } @@ -113,7 +121,6 @@ void AliTRDpoints::Draw(Option_t *option) AliPoints::Draw(option); - //if (fTRpolyMarker) delete fTRpolyMarker; if (fNTRpoints) { fTRpolyMarker = new TPolyMarker3D(fNTRpoints,fTRpoints,29); fTRpolyMarker->SetMarkerColor(2); @@ -130,15 +137,14 @@ void AliTRDpoints::SetTRpoints(Int_t n, Float_t *coor) // Sets the number and the coordinates of the photon hits // - if (kNTRpoints >= 3 * n) { + if (kNTRpoints >= 3*n) { fNTRpoints = n; for (Int_t i = 0; i < 3*n; i++) { fTRpoints[i] = coor[i]; } } else { - printf("AliTRDpoints::SetTRpoints -- "); - printf("Boundary error: %d/%d\n",3*n,kNTRpoints); + AliError(Form("Boundary error: %d/%d\n",3*n,kNTRpoints)); } }