]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCTrackHitsV2.h
memory leak fixed in track reconstruction and obsolete code removed
[u/mrichter/AliRoot.git] / TPC / AliTPCTrackHitsV2.h
index 395f5f2e08c2ff01d5739e2a7487a92df2513143..305f430c22ada51f6616daf3f7b026887ab2623c 100644 (file)
@@ -12,7 +12,6 @@
 #include "TObject.h"
 
 class TClonesArray;
-class AliArrayS;
 class AliTPChit;
 class AliTPCTempHitInfoV2;
 class AliTPCCurrentHitV2;
@@ -26,9 +25,13 @@ class AliTrackHitsParamV2 : public TObject {
   friend class   AliTRDtrackHits;
 
 public:
-  
   AliTrackHitsParamV2();
+  AliTrackHitsParamV2(const AliTrackHitsParamV2 &hit):  TObject(hit)
+    {hit.Copy(*this);}
+  AliTrackHitsParamV2& operator = (const AliTrackHitsParamV2 &hit)
+     {hit.Copy(*this); return (*this);}
   ~AliTrackHitsParamV2();
+
  private:
   Int_t fTrackID; // ID of the track
   Short_t fVolumeID;// volume ID
@@ -42,41 +45,52 @@ public:
   Int_t   fNHits; //nuber of thits
   Short_t * fHitDistance; //[fNHits] array of hits distances
   Short_t * fCharge; //[fNHits] array of charges
-  static Int_t fgCounter1;
-  static Int_t fgCounter2;  
-  ClassDef(AliTrackHitsParamV2,1)  
-};
+  Short_t * fTime; //[fNHits] array of hits time
+  static Int_t fgCounter1; //First internal counter
+  static Int_t fgCounter2; // Second internal counter
 
+  void Copy(TObject &) const
+  {Error("Copy","Not Implemented");}
+
+  ClassDef(AliTrackHitsParamV2,2)  
+};
 
 
 class AliTPCTrackHitsV2 : public TObject {
   friend class AliTPCTempHitInfoV2;
+
 public:
   AliTPCTrackHitsV2(); 
   ~AliTPCTrackHitsV2();
+  AliTPCTrackHitsV2(const AliTPCTrackHitsV2 &hit):  TObject(hit)
+    {hit.Copy(*this);}
+  AliTPCTrackHitsV2& operator = (const AliTPCTrackHitsV2 &hit)
+     {hit.Copy(*this); return (*this);}
   void Clear();
   void AddHitKartez(Int_t volumeID, Int_t trackID, Double_t x, 
-                   Double_t y, Double_t z,Int_t q);
+                   Double_t y, Double_t z,Int_t q,Float_t time);
   void AddHit(Int_t volumeID, Int_t trackID, Double_t r, 
-             Double_t z, Double_t fi,Int_t q);
+             Double_t z, Double_t fi,Int_t q,Float_t time);
  
   Bool_t First(); //set current hit to first hit 
   Bool_t Next();  //set current hit to next
-  AliHit * GetHit();
+  AliHit * GetHit() const;
   AliTrackHitsParamV2 * GetParam();
 
   TClonesArray * GetArray(){return fArray;}
-  Int_t  GetEntriesFast() { return fSize;}
+  Int_t  GetEntriesFast() const { return fSize;}
   void SetHitPrecision(Double_t prec) {fPrecision=prec;}
   void SetStepPrecision(Double_t prec) {fStep=prec;}
   void SetMaxDistance(UInt_t distance) {fMaxDistance = distance;}
   Bool_t  FlushHitStack(Bool_t force=kTRUE);    //
   Int_t *  GetVolumes(){ return fVolumes;}
-  Int_t GetNVolumes(){return fNVolumes;}
+  Int_t GetNVolumes() const {return fNVolumes;}
+
 public:
   void AddVolume(Int_t volume); //add volumes to tthe list of volumes
   void FlushHitStack2(Int_t index1, Int_t index2);   //
- protected:
+
+protected:
   TClonesArray * fArray;  //array of compressed hits
   Int_t fSize;            //total number of hits in track
   Double_t fPrecision;  // required precision
@@ -89,9 +103,16 @@ public:
   AliHit * fHit;                     //! current hit information
   static const Double_t fgkPrecision;  //precision 
   static const Double_t fgkPrecision2;  //precision
-  static Int_t fgCounter1;
-  static Int_t fgCounter2;  
-  ClassDef(AliTPCTrackHitsV2,1) 
+  static const Double_t fgkTimePrecision;  //hit time precision 
+  static Int_t fgCounter1; // First internal counter
+  static Int_t fgCounter2; // Second internal counter
+
+private:
+  void Copy(TObject &) const
+  {Error("Copy","Not Implemented");}
+
+
+  ClassDef(AliTPCTrackHitsV2,2) 
 };
 
 struct AliTPCCurrentHitV2 {