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