Memory leak fixes:
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Apr 2010 09:42:48 +0000 (09:42 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Apr 2010 09:42:48 +0000 (09:42 +0000)
TriggerTRU: delete of Int_t* idx[][] mising.
Reconstructor: delete of trigger TClonesArray, not only array->Delete()
TriggerBoard: delete of fPatched TClonesArray in dtor not only fPatched->Delete()
Loader: Change tree->GetEvent by branch->GetEntry, in case it helps

EMCAL/AliEMCALLoader.cxx
EMCAL/AliEMCALReconstructor.cxx
EMCAL/AliEMCALTriggerBoard.cxx
EMCAL/AliEMCALTriggerTRU.cxx

index 672a788..f110375 100644 (file)
@@ -235,7 +235,8 @@ Int_t AliEMCALLoader::GetEvent()
      TBranch * branchH = treeH->GetBranch(fDetectorName);
      branchH->SetAddress(&tempArr);
      for (Int_t iEnt = 0; iEnt < nEnt; iEnt++) {
-       treeH->GetEntry(iEnt);
+       //treeH->GetEntry(iEnt);
+          branchH->GetEntry(iEnt);
        Int_t nHit = tempArr->GetEntriesFast();
        for (Int_t iHit = 0; iHit < nHit; iHit++) {
         new ((*fHits)[index]) AliEMCALHit(*((AliEMCALHit*)tempArr->At(iHit)));
@@ -258,7 +259,8 @@ Int_t AliEMCALLoader::GetEvent()
        fSDigits->Clear();
      }
      branchS->SetAddress(&fSDigits);
-     treeS->GetEvent(0);
+        branchS->GetEntry(0);
+     //treeS->GetEvent(0);
    }
    
    // Digits
@@ -270,7 +272,8 @@ Int_t AliEMCALLoader::GetEvent()
        fDigits->Clear();
      }
      branchD->SetAddress(&fDigits);
-     treeD->GetEvent(0);
+        branchD->GetEntry(0);
+     //treeD->GetEvent(0);
    }
 
    // RecPoints
@@ -282,7 +285,8 @@ Int_t AliEMCALLoader::GetEvent()
        fRecPoints->Clear();
      }
      branchR->SetAddress(&fRecPoints);
-     treeR->GetEvent(0);
+     //treeR->GetEvent(0);
+        branchR->GetEntry(0);
    }
    
    return 0;
index b031002..462f395 100644 (file)
@@ -184,7 +184,8 @@ void AliEMCALReconstructor::Reconstruct(TTree* digitsTree, TTree* clustersTree)
   fgTriggerProcessor->Digits2Trigger(trgDigits, treeV0, trgData);
        
   trgDigits->Delete();
-       
+  delete       trgDigits;
+
   if(fgDigitsArr && fgDigitsArr->GetEntries()) {
 
     fgClusterizer->SetInput(digitsTree);
index 9a2a7bb..246f305 100644 (file)
@@ -96,7 +96,8 @@ AliEMCALTriggerBoard::~AliEMCALTriggerBoard()
    delete [] fRegion; fRegion = 0x0;
    delete []    fMap;    fMap = 0x0;
    
-       fPatches->Delete();
+   if(fPatches)fPatches->Delete();
+   delete fPatches;
 }
 
 //_______________
index dc6b366..666cea7 100644 (file)
@@ -320,6 +320,8 @@ Int_t AliEMCALTriggerTRU::L0v1()
                                
                                nP++; // all FOR in the patch must have seen a max
                        }
+                       
+                       delete [] idx;
                }
                
                if ( !nP )