]>
Commit | Line | Data |
---|---|---|
b22af1bf | 1 | //-*- Mode: C++ -*- |
2 | // @(#) $Id: AliHLTTPCCATracker.h 33907 2009-07-23 13:52:49Z sgorbuno $ | |
3 | // ************************************************************************ | |
4 | // This file is property of and copyright by the ALICE HLT Project * | |
5 | // ALICE Experiment at CERN, All rights reserved. * | |
6 | // See cxx source for full Copyright notice * | |
7 | // * | |
8 | //************************************************************************* | |
9 | ||
10 | #ifndef ALIHLTTPCCATRACKERFRAMEWORK_H | |
11 | #define ALIHLTTPCCATRACKERFRAMEWORK_H | |
12 | ||
13 | #include "AliHLTTPCCATracker.h" | |
14 | #include "AliHLTTPCCAGPUTracker.h" | |
15 | #include "AliHLTTPCCAParam.h" | |
d4594e7d | 16 | #include "AliHLTTPCCASliceOutput.h" |
31649d4b | 17 | #include "AliHLTLogging.h" |
b22af1bf | 18 | #include <iostream> |
e4818148 | 19 | #include <string.h> |
b22af1bf | 20 | |
21 | class AliHLTTPCCASliceOutput; | |
22 | class AliHLTTPCCAClusterData; | |
23 | ||
31649d4b | 24 | class AliHLTTPCCATrackerFramework : AliHLTLogging |
b22af1bf | 25 | { |
f0bada7f | 26 | #ifdef HLTCA_STANDALONE |
27 | friend int DrawGLScene(); | |
28 | #endif | |
29 | ||
b22af1bf | 30 | public: |
10dd8017 | 31 | AliHLTTPCCATrackerFramework(int allowGPU = 1, const char* GPU_Library = NULL, int GPUDeviceNum = -1); |
31649d4b | 32 | ~AliHLTTPCCATrackerFramework(); |
b22af1bf | 33 | |
34 | int InitGPU(int sliceCount = 1, int forceDeviceID = -1); | |
35 | int ExitGPU(); | |
36 | void SetGPUDebugLevel(int Level, std::ostream *OutFile = NULL, std::ostream *GPUOutFile = NULL); | |
e4818148 | 37 | int SetGPUTrackerOption(char* OptionName, int OptionValue) {if (strcmp(OptionName, "GlobalTracking") == 0) fGlobalTracking = OptionValue;return(fGPUTracker->SetGPUTrackerOption(OptionName, OptionValue));} |
b22af1bf | 38 | int SetGPUTracker(bool enable); |
39 | ||
40 | int InitializeSliceParam(int iSlice, AliHLTTPCCAParam ¶m); | |
41 | ||
d4594e7d | 42 | GPUhd() const AliHLTTPCCASliceOutput::outputControlStruct* OutputControl() const { return fOutputControl; } |
43 | GPUhd() void SetOutputControl( AliHLTTPCCASliceOutput::outputControlStruct* val); | |
44 | ||
98512261 | 45 | int ProcessSlices(int firstSlice, int sliceCount, AliHLTTPCCAClusterData* pClusterData, AliHLTTPCCASliceOutput** pOutput); |
b22af1bf | 46 | unsigned long long int* PerfTimer(int GPU, int iSlice, int iTimer); |
47 | ||
1e63725a | 48 | int MaxSliceCount() const { return(fUseGPUTracker ? (fGPUTrackerAvailable ? fGPUTracker->GetSliceCount() : 0) : fCPUSliceCount); } |
b22af1bf | 49 | int GetGPUStatus() const { return(fGPUTrackerAvailable + fUseGPUTracker); } |
50 | ||
51 | const AliHLTTPCCAParam& Param(int iSlice) const { return(fCPUTrackers[iSlice].Param()); } | |
52 | const AliHLTTPCCARow& Row(int iSlice, int iRow) const { return(fCPUTrackers[iSlice].Row(iRow)); } //TODO: Should be changed to return only row parameters | |
53 | ||
f0bada7f | 54 | void SetKeepData(bool v) {fKeepData = v;} |
55 | ||
2fba026d | 56 | AliHLTTPCCAGPUTracker* GetGPUTracker() {return(fGPUTracker);} |
57 | ||
b22af1bf | 58 | private: |
59 | static const int fgkNSlices = 36; //* N slices | |
60 | ||
31649d4b | 61 | bool fGPULibAvailable; //Is the Library with the GPU code available at all? |
b22af1bf | 62 | bool fGPUTrackerAvailable; // Is the GPU Tracker Available? |
63 | bool fUseGPUTracker; // use the GPU tracker | |
64 | int fGPUDebugLevel; // debug level for the GPU code | |
f0bada7f | 65 | AliHLTTPCCAGPUTracker* fGPUTracker; //Pointer to GPU Tracker Object |
66 | void* fGPULib; //Pointer to GPU Library | |
b22af1bf | 67 | |
d4594e7d | 68 | AliHLTTPCCASliceOutput::outputControlStruct* fOutputControl; |
69 | ||
b22af1bf | 70 | AliHLTTPCCATracker fCPUTrackers[fgkNSlices]; |
1e63725a | 71 | static const int fCPUSliceCount = 36; |
b22af1bf | 72 | |
f0bada7f | 73 | bool fKeepData; //Keep temporary data and do not free memory imediately, used for Standalone Debug Event Display |
e4818148 | 74 | bool fGlobalTracking; //Use global tracking |
f0bada7f | 75 | |
b22af1bf | 76 | AliHLTTPCCATrackerFramework( const AliHLTTPCCATrackerFramework& ); |
77 | AliHLTTPCCATrackerFramework &operator=( const AliHLTTPCCATrackerFramework& ); | |
78 | ||
31649d4b | 79 | ClassDef( AliHLTTPCCATrackerFramework, 0 ) |
80 | ||
b22af1bf | 81 | }; |
82 | ||
31649d4b | 83 | #endif //ALIHLTTPCCATRACKERFRAMEWORK_H |