]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking-ca/AliHLTTPCCATrackerFramework.h
reverting r40128 as it breaks backward compatibility
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCATrackerFramework.h
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"
16 #include "AliHLTTPCCASliceOutput.h"
17 #include "AliHLTLogging.h"
18 #include <iostream>
19
20 class AliHLTTPCCASliceOutput;
21 class AliHLTTPCCAClusterData;
22
23 class AliHLTTPCCATrackerFramework : AliHLTLogging
24 {
25 public:
26         AliHLTTPCCATrackerFramework(int allowGPU = 1);
27         ~AliHLTTPCCATrackerFramework();
28
29         int InitGPU(int sliceCount = 1, int forceDeviceID = -1);
30         int ExitGPU();
31         void SetGPUDebugLevel(int Level, std::ostream *OutFile = NULL, std::ostream *GPUOutFile = NULL);
32         int SetGPUTrackerOption(char* OptionName, int OptionValue) {return(fGPUTracker->SetGPUTrackerOption(OptionName, OptionValue));}
33         int SetGPUTracker(bool enable);
34
35         int InitializeSliceParam(int iSlice, AliHLTTPCCAParam &param);
36
37         GPUhd() const AliHLTTPCCASliceOutput::outputControlStruct* OutputControl() const { return fOutputControl; }
38         GPUhd() void SetOutputControl( AliHLTTPCCASliceOutput::outputControlStruct* val);
39
40         int ProcessSlices(int firstSlice, int sliceCount, AliHLTTPCCAClusterData* pClusterData, AliHLTTPCCASliceOutput** pOutput);
41         unsigned long long int* PerfTimer(int GPU, int iSlice, int iTimer);
42
43         int MaxSliceCount() const { return(fUseGPUTracker ? fGPUSliceCount : fCPUSliceCount); }
44         int GetGPUStatus() const { return(fGPUTrackerAvailable + fUseGPUTracker); }
45
46         const AliHLTTPCCAParam& Param(int iSlice) const { return(fCPUTrackers[iSlice].Param()); }
47         const AliHLTTPCCARow& Row(int iSlice, int iRow) const { return(fCPUTrackers[iSlice].Row(iRow)); }  //TODO: Should be changed to return only row parameters
48
49 private:
50   static const int fgkNSlices = 36;       //* N slices
51
52   bool fGPULibAvailable;        //Is the Library with the GPU code available at all?
53   bool fGPUTrackerAvailable; // Is the GPU Tracker Available?
54   bool fUseGPUTracker; // use the GPU tracker 
55   int fGPUDebugLevel;  // debug level for the GPU code
56   int fGPUSliceCount;   //How many slices to process parallel
57   AliHLTTPCCAGPUTracker* fGPUTracker;
58   void* fGPULib;
59
60   AliHLTTPCCASliceOutput::outputControlStruct* fOutputControl;
61
62   AliHLTTPCCATracker fCPUTrackers[fgkNSlices];
63   int fCPUSliceCount;
64
65   AliHLTTPCCATrackerFramework( const AliHLTTPCCATrackerFramework& );
66   AliHLTTPCCATrackerFramework &operator=( const AliHLTTPCCATrackerFramework& );
67
68   ClassDef( AliHLTTPCCATrackerFramework, 0 )
69
70 };
71
72 #endif //ALIHLTTPCCATRACKERFRAMEWORK_H