]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fix for #68917: Improper usage of TClonesArrays in ITS -- 2
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 2 Aug 2011 13:03:20 +0000 (13:03 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 2 Aug 2011 13:03:20 +0000 (13:03 +0000)
ITS/AliITSRecPointContainer.cxx
ITS/AliITSRecPointContainer.h
ITS/AliITSReconstructor.h
STEER/STEER/AliReconstructor.h

index e2180111b608bfa516fcf401d39e18c8c0263fc9..333a7759f282951a0340d6f2e0e03316b8b634c1 100644 (file)
@@ -244,6 +244,15 @@ AliITSRecPointContainer* AliITSRecPointContainer::Instance(const AliITSRecoParam
   return fgInstance;
 }
 
+//______________________________________________________________________
+void AliITSRecPointContainer::Destroy(){
+  // deletes the singleton
+  if(fgInstance){
+    delete fgInstance;
+    fgInstance = NULL;
+  }
+}
+
 //______________________________________________________________________
 void AliITSRecPointContainer::Reset(){
   // Resets the status of the object
index c80bbfe06ceb4da7b95c278ae46c34cf6976f31a..c83289cefe80f721a55b8f18391dc0802f15915b 100644 (file)
@@ -28,6 +28,7 @@ class AliITSRecPointContainer : public TObject {
   Int_t GetNumberOfModules() const {return fActualSize; }
 
   static AliITSRecPointContainer* Instance(const AliITSRecoParam *ptr=NULL);
+  static void Destroy();
   void PrepareToRead(){if(fNextEvent<0){fNextEvent=0;} else {++fNextEvent;}}
   TClonesArray* FetchClusters(Int_t mod, TTree* tR);
   TClonesArray* FetchClusters(Int_t mod, TTree* tR,Int_t cureve);
index 7fe058591fdd810e164f3394d8f50fb7607791fb..38c8e021115d2eecf8331817ca9d152bac2a867b 100644 (file)
@@ -13,6 +13,7 @@
 #include "AliReconstructor.h"
 #include "AliITSRecoParam.h"
 #include "AliITSDetTypeRec.h"
+#include "AliITSRecPointContainer.h"
 class AliESDpid;
 class AliITSgeom;
 class AliTracker;
@@ -38,6 +39,7 @@ public:
   virtual void         FillESD(AliRawReader* /*rawReader*/, TTree* clustersTree, 
                               AliESDEvent* esd) const
   {FillESD((TTree*)NULL, clustersTree, esd);}
+  virtual void Terminate() const {AliITSRecPointContainer::Destroy();}
   void ResetRecPoints() {fDetTypeRec->ResetRecPoints();}
 
   static const AliITSRecoParam* GetRecoParam() { return dynamic_cast<const AliITSRecoParam*>(AliReconstructor::GetRecoParam(0)); }
index 4c63b21efa647c1e7af0b662e7bbb5db8f5c3823..b3f12f3189b90248f5869975e45359b47301401b 100644 (file)
@@ -70,6 +70,7 @@ public:
 
   virtual void FillEventTimeWithTOF(AliESDEvent *, AliESDpid *)
     {return;}
+  virtual void Terminate() const {return; }
 
 private: