]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/TPCLib/tracking-ca/AliHLTTPCCATrack.h
bug fix: reconstruction crash when the output buffer size exceed
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCATrack.h
index c660262e249b9d84c019a0cecdc8665309456abb..2faefd778201b500a3b65a095794dd5668b77613 100644 (file)
@@ -1,43 +1,53 @@
 //-*- Mode: C++ -*-
 // @(#) $Id$
-
-//* This file is property of and copyright by the ALICE HLT Project        * 
-//* ALICE Experiment at CERN, All rights reserved.                         *
-//* See cxx source for full Copyright notice                               *
+// ************************************************************************
+// This file is property of and copyright by the ALICE HLT Project        *
+// ALICE Experiment at CERN, All rights reserved.                         *
+// See cxx source for full Copyright notice                               *
+//                                                                        *
+//*************************************************************************
 
 #ifndef ALIHLTTPCCATRACK_H
 #define ALIHLTTPCCATRACK_H
 
-
-#include "Rtypes.h"
-#include "AliHLTTPCCATrackPar.h"
+#include "AliHLTTPCCADef.h"
+#include "AliHLTTPCCATrackParam2.h"
 
 /**
  * @class ALIHLTTPCCAtrack
+ *
+ * The class describes the [partially] reconstructed TPC track [candidate].
+ * The class is dedicated for internal use by the AliHLTTPCCATracker algorithm.
+ * The track parameters at both ends are stored separately in the AliHLTTPCCAEndPoint class
  */
 class AliHLTTPCCATrack
 {
- public:
-  AliHLTTPCCATrack():fUsed(0),fNCells(0),fIFirstCell(0),fParam(){}
-
-  static bool CompareSize(const AliHLTTPCCATrack &t1, const AliHLTTPCCATrack &t2 ){
-    return t2.fNCells<t1.fNCells;
-  }
-
-  Bool_t &Used()              { return fUsed; }
-  Int_t  &NCells()            { return fNCells; }
-  Int_t &IFirstCell()         { return fIFirstCell; }
-  AliHLTTPCCATrackPar &Param(){ return fParam; }
-
- private:
-
-  Bool_t fUsed;       // flag for mark tracks used by the track merger
-  Int_t  fNCells;     // number of track cells
-  Int_t  fIFirstCell; // index of first cell reference in track->cell reference array
-  
-  AliHLTTPCCATrackPar fParam; // fitted track parameters
-
-  ClassDef(AliHLTTPCCATrack,1);
+  public:
+#if !defined(HLTCA_GPUCODE)
+    AliHLTTPCCATrack() : fAlive( 0 ), fFirstHitID( 0 ), fNHits( 0 ), fParam() {}
+    ~AliHLTTPCCATrack() {}
+#endif //!HLTCA_GPUCODE
+
+    GPUhd() bool Alive()               const { return fAlive; }
+    GPUhd() int  NHits()               const { return fNHits; }
+    GPUhd() int  FirstHitID()          const { return fFirstHitID; }
+    GPUhd() const AliHLTTPCCATrackParam2 &Param() const { return fParam; };
+
+    GPUhd() void SetAlive( bool v )               { fAlive = v; }
+    GPUhd() void SetNHits( int v )               { fNHits = v; }
+    GPUhd() void SetFirstHitID( int v )          { fFirstHitID = v; }
+    GPUhd() void SetParam( AliHLTTPCCATrackParam2 v ) { fParam = v; };
+
+  private:
+    bool fAlive;       // flag for mark tracks used by the track merger
+    int  fFirstHitID; // index of the first track cell in the track->cell pointer array
+    int  fNHits;      // number of track cells
+    AliHLTTPCCATrackParam2 fParam; // track parameters
+
+  private:
+    //void Dummy(); // to make rulechecker happy by having something in .cxx file
+
+    //ClassDef(AliHLTTPCCATrack,1)
 };
 
-#endif
+#endif //ALIHLTTPCCATRACK_H