]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coverty fixes from M.Nicassio
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 29 Apr 2011 07:57:38 +0000 (07:57 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 29 Apr 2011 07:57:38 +0000 (07:57 +0000)
PWG2/EVCHAR/AliAnalysisTaskSPDdNdEta.cxx
PWG2/EVCHAR/AliTrackletAlg.cxx

index 8258bfc7e6cf9fdb59764652da85553a191a884e..21b673e28d94f54f3862ec69d10fabd5f2187c2f 100644 (file)
@@ -203,6 +203,7 @@ void AliAnalysisTaskSPDdNdEta::UserCreateOutputObjects()
     else man->SetDefaultStorage("alien://Folder=/alice/data/2010/OCDB");
     man->SetRun(137161); 
     AliCDBEntry* obj = man->Get(AliCDBPath("GRP", "Geometry", "Data"));
+    if(!obj) AliFatal("Unable to load geometry from CDB!");
     AliGeomManager::SetGeometry((TGeoManager*) obj->GetObject());
     AliGeomManager::GetNalignable("ITS");
     AliGeomManager::ApplyAlignObjsFromCDB("ITS");
index 696fbe7f711c19bc5bb45bc1d78c2124a4342740..e74a7803c88b69c528fa36fbd9a2b2cff372b9a5 100644 (file)
@@ -688,6 +688,7 @@ void AliTrackletAlg::FindTracklets(const Float_t *vtx)
 
   delete[] partners;
   delete[] minDists;
+  delete[] associatedLay1;
 
   for (Int_t i=0; i<fNClustersLay1; i++)
     if (blacklist[i])
@@ -789,7 +790,8 @@ void AliTrackletAlg::LoadClusterArrays(TTree* itsClusterTree)
         if (idt==80) 
                    Printf("First Cl2 LoadClArr %f %f %f ",cluGlo[0],cluGlo[1],cluGlo[2]);*/
        new (clArr[nclLayer++]) AliITSRecPoint(*cluster);
-       nClustersInChip[ seg.GetChipFromLocal(0,cluster->GetDetLocalZ()) ]++; 
+        if (seg.GetChipFromLocal(0,cluster->GetDetLocalZ())>=0) 
+         nClustersInChip[ seg.GetChipFromLocal(0,cluster->GetDetLocalZ()) ]++; 
       }
       for(Int_t ifChip=5;ifChip--;) if (nClustersInChip[ifChip]) fNFiredChips[il]++;
     }
@@ -864,7 +866,8 @@ AliTrackletAlg::LoadClusterFiredChips(TTree* itsClusterTree) {
   
   AliITSsegmentationSPD seg;   
   AliITSRecPointContainer* rpcont=AliITSRecPointContainer::Instance();
-  TClonesArray* itsClusters=rpcont->FetchClusters(0,itsClusterTree);
+  TClonesArray* itsClusters=NULL;
+  rpcont->FetchClusters(0,itsClusterTree);
   if(!rpcont->IsSPDActive()){
     AliWarning("No SPD rec points found, multiplicity not calculated");
     return;
@@ -890,7 +893,8 @@ AliTrackletAlg::LoadClusterFiredChips(TTree* itsClusterTree) {
       // find the chip for the current cluster
       Float_t locz = cluster->GetDetLocalZ();
       Int_t iChip = seg.GetChipFromLocal(0,locz);
-      nClustersInChip[iChip]++; 
+      if (iChip>=0)
+        nClustersInChip[iChip]++; 
       
     }// end of cluster loop