]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/HWCFemulator/AliHLTTPCHWCFEmulator.h
9f09cf8f3463577475ef0d0a8f8143387f011f00
[u/mrichter/AliRoot.git] / HLT / TPCLib / HWCFemulator / AliHLTTPCHWCFEmulator.h
1 #ifndef ALIHLTTPCHWCFEMULATOR_H
2 #define ALIHLTTPCHWCFEMULATOR_H
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 #include "AliHLTTPCHWCFExtractorUnit.h"
9 #include "AliHLTTPCHWCFProcessorUnit.h"
10 #include "AliHLTTPCHWCFMergerUnit.h"
11 #include "AliHLTTPCHWCFDivisionUnit.h"
12
13 class AliHLTTPCClusterMCData;
14 class AliHLTTPCClusterMCLabel;
15
16 //  @class   AliHLTTPCHWCFEmulator
17 //  @author Sergey Gorbunov <sergey.gorbunov@fias.uni-frankfurt.de>
18 //  @author Torsten Alt <talt@cern.ch> 
19 //  @brief  FPGA ClusterFinder Emulator for TPC
20 //  @note
21 //
22 class AliHLTTPCHWCFEmulator 
23 {
24  public:  
25
26   /** standard constructor */
27    AliHLTTPCHWCFEmulator();
28   
29   /** destructor */
30   virtual ~AliHLTTPCHWCFEmulator();
31    
32   /** initialisation 
33    */
34   void Init( const AliHLTUInt32_t *mapping, AliHLTUInt32_t configWord );
35   
36   /** Loops over all rows finding the clusters 
37    */
38   int FindClusters( const AliHLTUInt32_t *rawEvent,
39                     AliHLTUInt32_t rawEventSize32,
40                     AliHLTUInt32_t *output,
41                     AliHLTUInt32_t &outputSize32,
42                     const AliHLTTPCClusterMCLabel *mcLabels,
43                     AliHLTUInt32_t nMCLabels,
44                     AliHLTTPCClusterMCData *outputMC
45                     );
46
47   /* useful tools */
48
49   /** read the word written in big endian format (lowest byte first) 
50    */
51   static AliHLTUInt32_t ReadBigEndian( AliHLTUInt32_t word );
52
53   /** write a word in big endian format (least byte first) 
54    */
55   static  AliHLTUInt32_t WriteBigEndian( AliHLTUInt32_t word );
56
57   /** create configuration word 
58    **/
59   static AliHLTUInt32_t CreateConfiguration
60     ( bool doDeconvTime, bool doDeconvPad, bool doFlowControl,  
61       bool doSinglePadSuppression, bool bypassMerger, 
62       AliHLTUInt32_t clusterLowerLimit,AliHLTUInt32_t singleSeqLimit );
63  
64   /** create default configuration word 
65    **/
66   static AliHLTUInt32_t CreateDefaultConfiguration(){
67     return CreateConfiguration(0,0,0,1,0,0,0);
68   }
69   
70  private: 
71
72   /** copy constructor prohibited */
73   AliHLTTPCHWCFEmulator(const AliHLTTPCHWCFEmulator&);
74   /** assignment operator prohibited */
75   AliHLTTPCHWCFEmulator& operator=(const AliHLTTPCHWCFEmulator&);
76  
77   const AliHLTUInt32_t *fkMapping; //! mapping array
78   AliHLTTPCHWCFExtractorUnit fChannelExtractor; //! transient
79   AliHLTTPCHWCFProcessorUnit fChannelProcessor; //! transient
80   AliHLTTPCHWCFMergerUnit    fChannelMerger; //! transient
81   AliHLTTPCHWCFDivisionUnit  fDivisionUnit;   //! transient
82 };
83 #endif