clear debug cluster array after each tracklet fill
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 13 May 2010 08:27:42 +0000 (08:27 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 13 May 2010 08:27:42 +0000 (08:27 +0000)
PWG1/TRD/AliTRDresolution.cxx

index 8ecad2d..a79ceaa 100644 (file)
@@ -398,7 +398,10 @@ TH1* AliTRDresolution::PlotCluster(const AliTRDtrackV1 *track)
       else AliDebug(1, "Cl exchange container missing. Activate by calling \"InitExchangeContainers()\"");
 
       if(DebugLevel()>=1){
-        if(!clInfoArr) clInfoArr=new TObjArray(AliTRDseedV1::kNclusters);
+        if(!clInfoArr){ 
+          clInfoArr=new TObjArray(AliTRDseedV1::kNclusters);
+          clInfoArr->SetOwner(kFALSE);
+        }
         clInfoArr->Add(clInfo);
       }
     }
@@ -407,8 +410,10 @@ TH1* AliTRDresolution::PlotCluster(const AliTRDtrackV1 *track)
         <<"status="  << status
         <<"clInfo.=" << clInfoArr
         << "\n";
+      clInfoArr->Clear();
     }
   }
+  if(clInfoArr) delete clInfoArr;
   return (TH3S*)arr->At(0);
 }
 
@@ -1068,7 +1073,10 @@ TH1* AliTRDresolution::PlotMC(const AliTRDtrackV1 *track)
       if(fMCcl) fMCcl->Add(clInfo);
       else AliDebug(1, "MCcl exchange container missing. Activate by calling \"InitExchangeContainers()\"");
       if(DebugLevel()>=5){ 
-        if(!clInfoArr) clInfoArr=new TObjArray(AliTRDseedV1::kNclusters);
+        if(!clInfoArr){ 
+          clInfoArr=new TObjArray(AliTRDseedV1::kNclusters);
+          clInfoArr->SetOwner(kFALSE);
+        }
         clInfoArr->Add(clInfo);
       }
     }