]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/HWCFemulator/AliHLTTPCHWCFExtractorUnit.h
deconvolution and timebin window algorithms are changed to match the hardware impleme...
[u/mrichter/AliRoot.git] / HLT / TPCLib / HWCFemulator / AliHLTTPCHWCFExtractorUnit.h
CommitLineData
33861fe0 1//-*- Mode: C++ -*-
2// $Id$
c012881c 3#ifndef ALIHLTTPCHWCFEXTRACTORUNIT_H
4#define ALIHLTTPCHWCFEXTRACTORUNIT_H
5//* This file is property of and copyright by the ALICE HLT Project *
6//* ALICE Experiment at CERN, All rights reserved. *
7//* See cxx source for full Copyright notice *
8
9// @file AliHLTTPCHWCFExtractorUnit.h
10// @author Sergey Gorbunov <sergey.gorbunov@fias.uni-frankfurt.de>
11// @author Torsten Alt <talt@cern.ch>
12// @brief Channel Extractor unit of FPGA ClusterFinder Emulator for TPC
13// @brief ( see AliHLTTPCHWCFEmulator class )
14// @note
15
16#include "AliHLTDataTypes.h"
17#include "AliHLTTPCHWCFDataTypes.h"
18
19class AliHLTTPCHWCFExtractorUnit
20{
21 public:
22
23 /** standard constructor */
24 AliHLTTPCHWCFExtractorUnit();
25
26 /** destructor */
27 ~AliHLTTPCHWCFExtractorUnit();
28
29 /** initialisation **/
30 int Init( const AliHLTUInt32_t *mapping, const AliHLTTPCClusterMCLabel *mcLabels, AliHLTUInt32_t nMCLabels );
31
32 /** input stream of data **/
33 int InputStream( AliHLTUInt32_t word );
34
35 /** input "end of data" signal **/
36 int InputEndOfData();
37
38 /** output stream of data **/
39 const AliHLTTPCHWCFBunch *OutputStream();
40
41 private:
42
43 enum AliHLTTPCHWCFExtractorStatus{ kReadingData, kReadingRCU, kFinishing, kStop };
44 enum AliHLTTPCHWCFExtractorInputStatus{ kEmpty, kData, kEndOfData };
45
46 /** copy constructor prohibited */
47 AliHLTTPCHWCFExtractorUnit(const AliHLTTPCHWCFExtractorUnit&);
48 /** assignment operator prohibited */
49 AliHLTTPCHWCFExtractorUnit& operator=(const AliHLTTPCHWCFExtractorUnit&);
50
51 AliHLTTPCHWCFExtractorStatus fStatus; // status of the unit
52 AliHLTUInt32_t fInput; // current input
53 AliHLTTPCHWCFExtractorInputStatus fInputStatus; // input status
54
55 const AliHLTUInt32_t *fkMapping; // mapping array
56 AliHLTTPCHWCFBunch fMemory[2]; // memory for current bunch and pending output
57 AliHLTTPCHWCFBunch *fBunch; // current bunch
58 bool fPendingOutput; // is there something in the output buffer
59
60 AliHLTInt32_t fChannelNumWordsLeft; // n 10-bit words left in the channel
61 AliHLTInt32_t fBunchNumWordsLeft;// n 10-bit words left in the bunch
97aca268 62 AliHLTInt32_t fBunchCurrentTime; // timebin of the curent signal
c012881c 63
64 const AliHLTTPCClusterMCLabel *fkMCLabels; // pointer to mc labels
65 AliHLTUInt32_t fNMCLabels; // N mc labels
66 AliHLTUInt32_t fCurrentMCLabel; // mc label to read next
67};
68
69#endif