]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONPreClusterFinder.cxx
Go from pointer to ifstream to ifstream.
[u/mrichter/AliRoot.git] / MUON / AliMUONPreClusterFinder.cxx
index 1badcb0be30abfa8118a1bcefa97155cf7cc6b0f..cbbadf62bb901259bc1f006a37d5be161141b49e 100644 (file)
@@ -116,27 +116,28 @@ AliMUONPreClusterFinder::AddPad(AliMUONCluster& cluster, AliMUONPad* pad)
     return;
   }
   
-  cluster.AddPad(*pad);
+  AliMUONPad* addedPad = cluster.AddPad(*pad);
   
   Int_t cathode = pad->Cathode();
   TObjArray& padArray = *fPads[cathode];
   // WARNING: this Remove method uses the AliMUONPad::IsEqual if that method is
   // present (otherwise just compares pointers) : so that one must be correct
   // if implemented !
-  padArray.Remove(pad);
- // TObject* o = padArray.Remove(pad); 
+  TObject* o = padArray.Remove(pad);
 //  if (!o)
 //  {
 //    AliFatal("Oups. Could not remove pad from pads to consider. Aborting as anyway "
 //             " we'll get an infinite loop. Please check the AliMUONPad::IsEqual method"
 //             " as the first suspect for failed remove");
 //  }  
+  delete o;
+  
   TIter next(&padArray);
   AliMUONPad* testPad;
 
   while ( ( testPad = static_cast<AliMUONPad*>(next())))
   {
-    if ( AliMUONPad::AreNeighbours(*testPad,*pad) )
+    if ( AliMUONPad::AreNeighbours(*testPad,*addedPad) )
     {
       AddPad(cluster,testPad);
     }