]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONPreClusterFinder.h
Fixing clustering(s) memory leaks
[u/mrichter/AliRoot.git] / MUON / AliMUONPreClusterFinder.h
index 7ca9b559e1ad0dc46b6fdcd738e4e6e084b6cd36..3d5254e42903240f900530396a437f56bce489b5 100644 (file)
@@ -18,6 +18,9 @@
 #ifndef ALI_MP_AREA_H
 #  include "AliMpArea.h"
 #endif
 #ifndef ALI_MP_AREA_H
 #  include "AliMpArea.h"
 #endif
+#ifndef ROOT_TClonesArray
+#  include <TClonesArray.h>
+#endif
 
 class TStopwatch;
 class AliMUONPad;
 
 class TStopwatch;
 class AliMUONPad;
@@ -48,13 +51,20 @@ private:
   
   AliMUONPad* GetNextPad(Int_t cathode) const;
 
   
   AliMUONPad* GetNextPad(Int_t cathode) const;
 
+  /// Whether we should stop working...
+  virtual Bool_t ShouldAbort() const { return fShouldAbort; }
+  
+  AliMUONCluster* NewCluster();
+  void RemoveCluster(AliMUONCluster* cluster);
+  
 private:
 private:
-  TClonesArray* fClusters; //!< the clusters we've found (owner)
+  TClonesArray fClusters; //!< the clusters we've found (owner)
   TClonesArray** fPads; //!< the pads corresponding to the digits (not owner)
   Int_t fDetElemId; //!< which DE we're considering
   AliMpArea fArea; //!< area into which to consider pads to *start* a cluster
   TClonesArray** fPads; //!< the pads corresponding to the digits (not owner)
   Int_t fDetElemId; //!< which DE we're considering
   AliMpArea fArea; //!< area into which to consider pads to *start* a cluster
+  Bool_t fShouldAbort; //!< to indicate clustering should stop right now
   
   
-  ClassDef(AliMUONPreClusterFinder,2) // A basic pre-cluster finder
+  ClassDef(AliMUONPreClusterFinder,4) // A basic pre-cluster finder
 };
 
 #endif
 };
 
 #endif