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"
19 class AliHLTTPCCASliceOutput;
20 class AliHLTTPCCAClusterData;
22 class AliHLTTPCCATrackerFramework
25 AliHLTTPCCATrackerFramework(int autoTryGPU = 1) :
26 fGPUTrackerAvailable(false), fUseGPUTracker(false), fGPUDebugLevel(0), fGPUSliceCount(0), fGPUTracker(), fOutputControl( NULL ), fCPUSliceCount(fgkNSlices)
30 fUseGPUTracker = (fGPUTrackerAvailable= (fGPUTracker.InitGPU() == 0));
31 fGPUSliceCount = fGPUTrackerAvailable ? fGPUTracker.GetSliceCount() : 0;
34 ~AliHLTTPCCATrackerFramework()
37 int InitGPU(int sliceCount = 1, int forceDeviceID = -1);
39 void SetGPUDebugLevel(int Level, std::ostream *OutFile = NULL, std::ostream *GPUOutFile = NULL);
40 int SetGPUTrackerOption(char* OptionName, int OptionValue) {return(fGPUTracker.SetGPUTrackerOption(OptionName, OptionValue));}
41 int SetGPUTracker(bool enable);
43 int InitializeSliceParam(int iSlice, AliHLTTPCCAParam ¶m);
45 GPUhd() const AliHLTTPCCASliceOutput::outputControlStruct* OutputControl() const { return fOutputControl; }
46 GPUhd() void SetOutputControl( AliHLTTPCCASliceOutput::outputControlStruct* val);
48 int ProcessSlices(int firstSlice, int sliceCount, AliHLTTPCCAClusterData* pClusterData, AliHLTTPCCASliceOutput** pOutput);
49 unsigned long long int* PerfTimer(int GPU, int iSlice, int iTimer);
51 int MaxSliceCount() const { return(fUseGPUTracker ? fGPUSliceCount : fCPUSliceCount); }
52 int GetGPUStatus() const { return(fGPUTrackerAvailable + fUseGPUTracker); }
54 const AliHLTTPCCAParam& Param(int iSlice) const { return(fCPUTrackers[iSlice].Param()); }
55 const AliHLTTPCCARow& Row(int iSlice, int iRow) const { return(fCPUTrackers[iSlice].Row(iRow)); } //TODO: Should be changed to return only row parameters
58 static const int fgkNSlices = 36; //* N slices
60 bool fGPUTrackerAvailable; // Is the GPU Tracker Available?
61 bool fUseGPUTracker; // use the GPU tracker
62 int fGPUDebugLevel; // debug level for the GPU code
63 int fGPUSliceCount; //How many slices to process parallel
64 AliHLTTPCCAGPUTracker fGPUTracker;
66 AliHLTTPCCASliceOutput::outputControlStruct* fOutputControl;
68 AliHLTTPCCATracker fCPUTrackers[fgkNSlices];
71 AliHLTTPCCATrackerFramework( const AliHLTTPCCATrackerFramework& );
72 AliHLTTPCCATrackerFramework &operator=( const AliHLTTPCCATrackerFramework& );