]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
several coverity reports corrected in geometry
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 15 Oct 2010 14:03:13 +0000 (14:03 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 15 Oct 2010 14:03:13 +0000 (14:03 +0000)
EMCAL/AliEMCALEMCGeometry.cxx
EMCAL/AliEMCALGeoUtils.cxx
EMCAL/AliEMCALGeoUtils.h
EMCAL/AliEMCALShishKebabTrd1Module.cxx

index 07bbc8b338a195be01809b3f978ce6f0e8e6abd1..af45c686e9dcf6c882ce6dff808e1b6b34dad351 100644 (file)
@@ -91,6 +91,8 @@ AliEMCALEMCGeometry::AliEMCALEMCGeometry()
   // must be kept public for root persistency purposes, 
   // but should never be called by the outside world    
   fParSM[0]=0; fParSM[1]=0; fParSM[2]=0;
+  fEnvelop[0] = 0; fEnvelop[1] = 0; fEnvelop[2] = 0;
+  
   AliDebug(2, "AliEMCALEMCGeometry : default ctor ");
 }
 //______________________________________________________________________
@@ -195,6 +197,10 @@ AliEMCALEMCGeometry::AliEMCALEMCGeometry(const AliEMCALEMCGeometry& geom)
   fParSM[0]=geom.fParSM[0]; 
   fParSM[1]=geom.fParSM[1]; 
   fParSM[2]=geom.fParSM[2];
+  fEnvelop[0] = geom.fEnvelop[0]; 
+  fEnvelop[1] = geom.fEnvelop[1]; 
+  fEnvelop[2] = geom.fEnvelop[2];
+
 }
 
 //______________________________________________________________________
index ff5a4cbde877c0b4fde43f954b43d8d2815a5d20..c9d7194bb0f67d4dde84e76188ac0b10682f4089 100644 (file)
@@ -194,12 +194,12 @@ AliEMCALGeoUtils & AliEMCALGeoUtils::operator = (const AliEMCALGeoUtils  & /*rva
 AliEMCALGeoUtils::~AliEMCALGeoUtils(void)
 {
   // dtor
-  for(Int_t smod = 0 ; smod < fEMCGeometry->GetNumberOfSuperModules(); smod++){
-    if(fkSModuleMatrix[smod])
-       delete fkSModuleMatrix[smod] ;
-      fkSModuleMatrix[smod]=0 ;
-  }
-  if(fEMCGeometry){
+  if (fEMCGeometry){ 
+    for(Int_t smod = 0 ; smod < fEMCGeometry->GetNumberOfSuperModules(); smod++){
+      if(fkSModuleMatrix[smod])
+        delete fkSModuleMatrix[smod] ;
+        fkSModuleMatrix[smod]=0 ;
+    }
     delete fEMCGeometry; fEMCGeometry = 0 ;
   }
 }
index b9c0a8cb8b6a44c36d0f347bc401344a0f0c98c1..986b5c618b9a696a990fd0b3bd3af822b7b80433 100644 (file)
@@ -21,6 +21,7 @@ class TParticle ;
 
 // --- AliRoot header files ---
 #include "AliEMCALEMCGeometry.h"
+#include "AliEMCALGeoParams.h"
 class AliEMCALShishKebabTrd1Module;
 #include "AliLog.h"
 
@@ -216,7 +217,7 @@ protected:
 
   Int_t    fFastOR2DMap[48][64];        // FastOR 2D Map over full EMCal
        
-  TGeoHMatrix* fkSModuleMatrix[12] ; //Orientations of EMCAL super modules
+  TGeoHMatrix* fkSModuleMatrix[AliEMCALGeoParams::fgkEMCALModules] ; //Orientations of EMCAL super modules
 
        
   ClassDef(AliEMCALGeoUtils,1)       // EMCAL geometry class 
index 31e7b31c60c67d8bb93bf1dee7daf4b97e901a52..1358387acb7dfb06240dc39229f8c440e6bd3edc 100644 (file)
@@ -226,14 +226,15 @@ Bool_t AliEMCALShishKebabTrd1Module::GetParameters()
 {
   
   // Get needing module parameters from EMCAL geometry
-  TString sn(fGeometry->GetName()); // 2-Feb-05
-  sn.ToUpper();
+  
   if(!fGeometry) {
     Warning("GetParameters()"," No geometry ");
     return kFALSE; 
-  }
+  }  
+  
+  TString sn(fGeometry->GetName()); // 2-Feb-05
+  sn.ToUpper();
   
-
   fga        = (Double_t)fGeometry->GetEtaModuleSize();
   fgb        = (Double_t)fGeometry->GetLongModuleSize();
   fgangle    = Double_t(fGeometry->GetTrd1Angle())*TMath::DegToRad();