From 79b175e13032b0135803768d187f020ba99bee9d Mon Sep 17 00:00:00 2001 From: prsnko Date: Fri, 2 Jul 2010 16:11:13 +0000 Subject: [PATCH] Use copy of GeoMatrix instead of pointer --- PHOS/AliPHOSGeoUtils.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/PHOS/AliPHOSGeoUtils.cxx b/PHOS/AliPHOSGeoUtils.cxx index 4d0cc3df6f3..9dd7af523f1 100644 --- a/PHOS/AliPHOSGeoUtils.cxx +++ b/PHOS/AliPHOSGeoUtils.cxx @@ -155,7 +155,7 @@ AliPHOSGeoUtils::~AliPHOSGeoUtils(void) for(Int_t istrip=0; istrip<224; istrip++) delete fStripMatrix[mod][istrip]; delete fCPVMatrix[mod]; - // delete fPHOSMatrix[mod]; + delete fPHOSMatrix[mod]; } } //____________________________________________________________________________ @@ -629,7 +629,10 @@ const TGeoHMatrix * AliPHOSGeoUtils::GetMatrixForPHOS(Int_t mod)const { void AliPHOSGeoUtils::SetMisalMatrix(const TGeoHMatrix * m, Int_t mod){ //Fills pointers to geo matrixes - fPHOSMatrix[mod]=m ; + if(fPHOSMatrix[mod]){ //have been set already. Can not be changed any more + return ; + } + fPHOSMatrix[mod]= new TGeoHMatrix(*m) ; //If module does not exist, make sure all its matrices are zero if(m==NULL){ -- 2.39.3