]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSGeoUtils.cxx
added plotting versus refmult and modified some classes to not stream
[u/mrichter/AliRoot.git] / PHOS / AliPHOSGeoUtils.cxx
index 7d70510ee8e375cdfc39446bc2fb6fd496ebd869..9dd7af523f1003656e32cc4f11be7725c0dd8966 100644 (file)
@@ -150,9 +150,13 @@ AliPHOSGeoUtils::~AliPHOSGeoUtils(void)
     delete fMisalArray; fMisalArray=0 ;
   }
 
-  delete [] fStripMatrix;
-  delete [] fEMCMatrix;
-  delete [] fCPVMatrix;
+  for(Int_t mod=0; mod<5; mod++){
+    delete fEMCMatrix[mod] ;
+    for(Int_t istrip=0; istrip<224; istrip++)
+      delete fStripMatrix[mod][istrip];
+    delete fCPVMatrix[mod];
+    delete fPHOSMatrix[mod];
+  }
 }
 //____________________________________________________________________________
 Bool_t AliPHOSGeoUtils::AbsToRelNumbering(Int_t absId, Int_t * relid) const
@@ -625,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){