Initialization in the default constructor. Correced deletion of TObjArrays
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 3 Feb 2004 14:56:14 +0000 (14:56 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 3 Feb 2004 14:56:14 +0000 (14:56 +0000)
TRD/AliTRDtracker.cxx
TRD/AliTRDtracker.h

index 5b0b9fe..2269cae 100644 (file)
@@ -70,6 +70,28 @@ const Int_t AliTRDtracker::fgkLastPlane = 17;
 
 
 //____________________________________________________________________
+AliTRDtracker::AliTRDtracker():AliTracker(),
+                              fGeom(0),
+                              fPar(0),
+                              fNclusters(0),
+                              fClusters(0),
+                              fNseeds(0),
+                              fSeeds(0),
+                              fNtracks(0),
+                              fTracks(0),
+                              fSY2corr(0),
+                              fSZ2corr(0),
+                              fTimeBinsPerPlane(0),
+                              fMaxGap(0),
+                              fVocal(kFALSE),
+                              fAddTRDseeds(kFALSE),
+                              fNoTilt(kFALSE)
+{
+  for(Int_t i=0;i<kTrackingSectors;i++) fTrSec[i]=0;
+  for(Int_t j=0;j<5;j++)
+    for(Int_t k=0;k<18;k++) fHoles[j][k]=kFALSE;
+} 
+//____________________________________________________________________
 AliTRDtracker::AliTRDtracker(const TFile *geomfile):AliTracker()
 {
   // 
@@ -185,9 +207,18 @@ AliTRDtracker::~AliTRDtracker()
   // Destructor of AliTRDtracker 
   //
 
-  delete fClusters;
-  delete fTracks;
-  delete fSeeds;
+  if (fClusters) {
+    fClusters->Delete();
+    delete fClusters;
+  }
+  if (fTracks) {
+    fTracks->Delete();
+    delete fTracks;
+  }
+  if (fSeeds) {
+    fSeeds->Delete();
+    delete fSeeds;
+  }
   delete fGeom;  
   delete fPar;  
 
index fbda72e..0b2f43c 100644 (file)
@@ -30,7 +30,7 @@ class AliTRDtracker : public AliTracker {
 
  public:
 
-  AliTRDtracker():AliTracker() {} 
+  AliTRDtracker();
   AliTRDtracker(const TFile *in);
   virtual ~AliTRDtracker();