]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Memory trashing in TOF reconstruction (P.Hristov)
authordecaro <decaro@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 16 Nov 2009 13:10:28 +0000 (13:10 +0000)
committerdecaro <decaro@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 16 Nov 2009 13:10:28 +0000 (13:10 +0000)
TOF/AliTOFtracker.cxx
TOF/AliTOFtrackerMI.cxx
TOF/AliTOFtrackerV1.cxx

index ab86a1ce5e80aa0ec5da2fc94e3f30222af8e9eb..d9302a4aa9d1d3685e3b773f1f6f8f1965f36c35 100644 (file)
@@ -783,7 +783,8 @@ Int_t AliTOFtracker::LoadClusters(TTree *cTree) {
 
   for (Int_t i=0; i<nc; i++) {
     AliTOFcluster *c=(AliTOFcluster*)clusters->UncheckedAt(i);
-    fClusters[i]=new AliTOFcluster(*c); fN++;
+//PH    fClusters[i]=new AliTOFcluster(*c); fN++;
+    fClusters[i]=c; fN++;
 
   // Fill Digits QA histos
  
@@ -834,7 +835,7 @@ void AliTOFtracker::UnloadClusters() {
   //This function unloads TOF clusters
   //--------------------------------------------------------------------
   for (Int_t i=0; i<fN; i++) {
-    delete fClusters[i];
+//PH    delete fClusters[i];
     fClusters[i] = 0x0;
   }
   fN=0;
index b5afa90dc32bc30c747f1f0061a1de8f426352ac..91b627877a777445c26b176987e209691af82fc2 100644 (file)
@@ -603,7 +603,8 @@ Int_t AliTOFtrackerMI::LoadClusters(TTree *cTree) {
   for (Int_t i=0; i<nc; i++) {
     AliTOFcluster *c=(AliTOFcluster*)clusters->UncheckedAt(i);
 
-    fClusters[i]=new AliTOFcluster(*c); fN++;
+//PH    fClusters[i]=new AliTOFcluster(*c); fN++;
+    fClusters[i]=c; fN++;
 
     //AliInfo(Form("%4i %4i  %f %f %f  %f %f   %2i %1i %2i %1i %2i",i, fClusters[i]->GetIndex(),fClusters[i]->GetZ(),fClusters[i]->GetR(),fClusters[i]->GetPhi(), fClusters[i]->GetTDC(),fClusters[i]->GetADC(),fClusters[i]->GetDetInd(0),fClusters[i]->GetDetInd(1),fClusters[i]->GetDetInd(2),fClusters[i]->GetDetInd(3),fClusters[i]->GetDetInd(4)));
     //AliInfo(Form("%i %f",i, fClusters[i]->GetZ()));
@@ -619,7 +620,7 @@ void AliTOFtrackerMI::UnloadClusters() {
   //This function unloads TOF clusters
   //--------------------------------------------------------------------
   for (Int_t i=0; i<fN; i++) {
-    delete fClusters[i];
+//PH    delete fClusters[i];
     fClusters[i] = 0x0;
   }
   fN=0;
index 1f911665e7ca4dd89a663184e522de53e50ac831..0c7e75828fff96a3743dea5941388eaa46f05c5a 100644 (file)
@@ -579,7 +579,8 @@ Int_t AliTOFtrackerV1::LoadClusters(TTree *cTree) {
 
   for (Int_t i=0; i<nc; i++) {
     AliTOFcluster *c=(AliTOFcluster*)clusters->UncheckedAt(i);
-    fClusters[i]=new AliTOFcluster(*c); fN++;
+//PH    fClusters[i]=new AliTOFcluster(*c); fN++;
+    fClusters[i]=c; fN++;
 
   // Fill Digits QA histos
  
@@ -629,7 +630,7 @@ void AliTOFtrackerV1::UnloadClusters() {
   //This function unloads TOF clusters
   //--------------------------------------------------------------------
   for (Int_t i=0; i<fN; i++) {
-    delete fClusters[i];
+//PH    delete fClusters[i];
     fClusters[i] = 0x0;
   }
   fN=0;