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 *
8 //*************************************************************************
10 #ifndef ALIHLTTPCCATRACKERFRAMEWORK_H
11 #define ALIHLTTPCCATRACKERFRAMEWORK_H
13 #include "AliHLTTPCCATracker.h"
14 #include "AliHLTTPCCAGPUTracker.h"
15 #include "AliHLTTPCCAParam.h"
16 #include "AliHLTTPCCASliceOutput.h"
17 #include "AliHLTLogging.h"
21 class AliHLTTPCCASliceOutput;
22 class AliHLTTPCCAClusterData;
24 class AliHLTTPCCATrackerFramework : AliHLTLogging
26 #ifdef HLTCA_STANDALONE
27 friend int DrawGLScene();
31 AliHLTTPCCATrackerFramework(int allowGPU = 1, const char* GPU_Library = NULL, int GPUDeviceNum = -1);
32 ~AliHLTTPCCATrackerFramework();
34 int InitGPU(int sliceCount = 1, int forceDeviceID = -1);
36 void SetGPUDebugLevel(int Level, std::ostream *OutFile = NULL, std::ostream *GPUOutFile = NULL);
37 int SetGPUTrackerOption(char* OptionName, int OptionValue) {if (strcmp(OptionName, "GlobalTracking") == 0) fGlobalTracking = OptionValue;return(fGPUTracker->SetGPUTrackerOption(OptionName, OptionValue));}
38 int SetGPUTracker(bool enable);
40 int InitializeSliceParam(int iSlice, AliHLTTPCCAParam ¶m);
42 GPUhd() const AliHLTTPCCASliceOutput::outputControlStruct* OutputControl() const { return fOutputControl; }
43 GPUhd() void SetOutputControl( AliHLTTPCCASliceOutput::outputControlStruct* val);
45 int ProcessSlices(int firstSlice, int sliceCount, AliHLTTPCCAClusterData* pClusterData, AliHLTTPCCASliceOutput** pOutput);
46 unsigned long long int* PerfTimer(int GPU, int iSlice, int iTimer);
48 int MaxSliceCount() const { return(fUseGPUTracker ? (fGPUTrackerAvailable ? fGPUTracker->GetSliceCount() : 0) : fCPUSliceCount); }
49 int GetGPUStatus() const { return(fGPUTrackerAvailable + fUseGPUTracker); }
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
54 void SetKeepData(bool v) {fKeepData = v;}
56 AliHLTTPCCAGPUTracker* GetGPUTracker() {return(fGPUTracker);}
59 static const int fgkNSlices = 36; //* N slices
61 bool fGPULibAvailable; //Is the Library with the GPU code available at all?
62 bool fGPUTrackerAvailable; // Is the GPU Tracker Available?
63 bool fUseGPUTracker; // use the GPU tracker
64 int fGPUDebugLevel; // debug level for the GPU code
65 AliHLTTPCCAGPUTracker* fGPUTracker; //Pointer to GPU Tracker Object
66 void* fGPULib; //Pointer to GPU Library
68 AliHLTTPCCASliceOutput::outputControlStruct* fOutputControl;
70 AliHLTTPCCATracker fCPUTrackers[fgkNSlices];
71 static const int fCPUSliceCount = 36;
73 bool fKeepData; //Keep temporary data and do not free memory imediately, used for Standalone Debug Event Display
74 bool fGlobalTracking; //Use global tracking
76 AliHLTTPCCATrackerFramework( const AliHLTTPCCATrackerFramework& );
77 AliHLTTPCCATrackerFramework &operator=( const AliHLTTPCCATrackerFramework& );
79 ClassDef( AliHLTTPCCATrackerFramework, 0 )
83 #endif //ALIHLTTPCCATRACKERFRAMEWORK_H