Fix for memory leak in fClusters
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 19 May 2004 14:08:44 +0000 (14:08 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 19 May 2004 14:08:44 +0000 (14:08 +0000)
HLT/src/AliL3Evaluate.cxx

index b623335cd3c47999a65625dc4e0536d97cf57d0d..5ecb2e345d390b8847fc340c800b903182cf92d6 100644 (file)
@@ -197,6 +197,9 @@ AliL3Evaluate::~AliL3Evaluate()
   if(fMcId)    delete [] fMcId;
   if(fNtuppel) delete fNtuppel;
   if(fNtupleRes) delete fNtupleRes;
   if(fMcId)    delete [] fMcId;
   if(fNtuppel) delete fNtuppel;
   if(fNtupleRes) delete fNtupleRes;
+  for(Int_t s=0; s<=35; s++)
+    for(Int_t p=0; p<6; p++)
+      if(fClusters[s][p]) delete fClusters[s][p];
 }
 
 void AliL3Evaluate::AssignPIDs()
 }
 
 void AliL3Evaluate::AssignPIDs()
@@ -292,7 +295,7 @@ Float_t AliL3Evaluate::GetTrackPID(AliL3Track *track)
   for (i=nl; i<=nu; i++) trackDEdx += sampleDEdx[i];
   trackDEdx /= (nu-nl+1);
 
   for (i=nl; i<=nu; i++) trackDEdx += sampleDEdx[i];
   trackDEdx /= (nu-nl+1);
 
-  //  cout<<" PID: "<<nc<<" "<<nl<<" "<<nu<<" "<<trackDEdx<<endl;
+  //  cout<<" PID: "<<nc<<" "<<nl<<" "<<nu<<" "<<trackDEdx<<" "<<track->GetPt()<<endl;
   return trackDEdx;
 }
 
   return trackDEdx;
 }