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