]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking-ca/AliHLTTPCCATracklet.h
bug fix: reconstruction crash when the output buffer size exceed
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCATracklet.h
1 //-*- Mode: C++ -*-
2 // ************************************************************************
3 // This file is property of and copyright by the ALICE HLT Project        *
4 // ALICE Experiment at CERN, All rights reserved.                         *
5 // See cxx source for full Copyright notice                               *
6 //                                                                        *
7 //*************************************************************************
8
9 #ifndef ALIHLTTPCCATRACKLET_H
10 #define ALIHLTTPCCATRACKLET_H
11
12 #include "AliHLTTPCCADef.h"
13 #include "AliHLTTPCCATrackParam2.h"
14 #include "AliHLTTPCCAGPUConfig.h"
15
16 /**
17  * @class ALIHLTTPCCATracklet
18  *
19  * The class describes the reconstructed TPC track candidate.
20  * The class is dedicated for internal use by the AliHLTTPCCATracker algorithm.
21  */
22 class AliHLTTPCCATracklet
23 {
24   public:
25
26 #if !defined(HLTCA_GPUCODE)
27     AliHLTTPCCATracklet() : fNHits( 0 ), fFirstRow( 0 ), fLastRow( 0 ), fParam() {};
28     void Dummy() const ;
29     ~AliHLTTPCCATracklet() {}
30 #endif //!HLTCA_GPUCODE
31
32     GPUhd() int  NHits()                const { return fNHits;      }
33     GPUhd() int  FirstRow()             const { return fFirstRow;   }
34     GPUhd() int  LastRow()              const { return fLastRow;    }
35     GPUhd() const AliHLTTPCCATrackParam2 &Param() const { return fParam; }
36 #ifndef EXTERN_ROW_HITS
37     GPUhd() int  RowHit( int i )   const { return fRowHits[i];    }
38         GPUhd() const int* RowHits()    const                   { return(fRowHits); }
39     GPUhd() void SetRowHit( int irow, int ih )  { fRowHits[irow] = ih;    }
40 #endif //EXTERN_ROW_HITS
41
42     GPUhd() void SetNHits( int v )               {  fNHits = v;      }
43     GPUhd() void SetFirstRow( int v )            {  fFirstRow = v;   }
44     GPUhd() void SetLastRow( int v )             {  fLastRow = v;    }
45     GPUhd() void SetParam( const AliHLTTPCCATrackParam2 &v ) { fParam = v;      }
46
47   private:
48     int fNHits;                 // N hits
49     int fFirstRow;              // first TPC row
50     int fLastRow;               // last TPC row
51     AliHLTTPCCATrackParam2 fParam; // tracklet parameters
52 #ifndef EXTERN_ROW_HITS
53     int fRowHits[HLTCA_ROW_COUNT + 1];          // hit index for each TPC row
54 #endif //EXTERN_ROW_HITS
55 };
56
57 #endif //ALIHLTTPCCATRACKLET_H