3 #ifndef ALIHLTTPCHWCFEMULATOR_H
4 #define ALIHLTTPCHWCFEMULATOR_H
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 *
10 #include "AliHLTTPCHWCFExtractorUnit.h"
11 #include "AliHLTTPCHWCFPeakFinderUnit.h"
12 #include "AliHLTTPCHWCFProcessorUnit.h"
13 #include "AliHLTTPCHWCFMergerUnit.h"
14 #include "AliHLTTPCHWCFDivisionUnit.h"
16 class AliHLTTPCClusterMCData;
17 class AliHLTTPCClusterMCLabel;
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
25 class AliHLTTPCHWCFEmulator
29 /** standard constructor */
30 AliHLTTPCHWCFEmulator();
33 virtual ~AliHLTTPCHWCFEmulator();
35 /** set debug level */
36 void SetDebugLevel( int val ){ fDebug = val; }
40 void Init( const AliHLTUInt32_t *mapping, AliHLTUInt32_t configWord1, AliHLTUInt32_t configWord2 );
42 /** Loops over all rows finding the clusters
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
55 /** read the word written in big endian format (lowest byte first)
57 static AliHLTUInt32_t ReadBigEndian( AliHLTUInt32_t word );
59 /** write a word in big endian format (least byte first)
61 static AliHLTUInt32_t WriteBigEndian( AliHLTUInt32_t word );
63 /** create configuration word
65 static void CreateConfiguration
66 ( bool doDeconvTime, bool doDeconvPad, bool doFlowControl,
67 bool doSinglePadSuppression, bool bypassMerger,
68 AliHLTUInt32_t clusterLowerLimit,AliHLTUInt32_t singleSeqLimit,
69 AliHLTUInt32_t mergerDistance, bool useTimeBinWindow, AliHLTUInt32_t chargeFluctuation, bool useTimeFollow,
70 AliHLTUInt32_t &configWord1, AliHLTUInt32_t &configWord2 );
72 /** create default configuration word
74 static void CreateDefaultConfiguration( AliHLTUInt32_t &configWord1, AliHLTUInt32_t &configWord2 ){
75 CreateConfiguration(0,0,0,1,0,0,0, 3, 1, 0, 1, configWord1, configWord2 );
80 /** copy constructor prohibited */
81 AliHLTTPCHWCFEmulator(const AliHLTTPCHWCFEmulator&);
82 /** assignment operator prohibited */
83 AliHLTTPCHWCFEmulator& operator=(const AliHLTTPCHWCFEmulator&);
85 int fDebug; // debug level
86 const AliHLTUInt32_t *fkMapping; //! mapping array
87 AliHLTTPCHWCFExtractorUnit fChannelExtractor; //! transient
88 AliHLTTPCHWCFPeakFinderUnit fPeakFinderUnit; //! transient
89 AliHLTTPCHWCFProcessorUnit fChannelProcessor; //! transient
90 AliHLTTPCHWCFMergerUnit fChannelMerger; //! transient
91 AliHLTTPCHWCFDivisionUnit fDivisionUnit; //! transient