Line data Source code
1 : //-*- Mode: C++ -*-
2 : // $Id$
3 : #ifndef ALIHLTTPCHWCFMERGERUNIT_H
4 : #define ALIHLTTPCHWCFMERGERUNIT_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 :
11 : #include "AliHLTTPCHWCFDataTypes.h"
12 :
13 :
14 : // @class AliHLTTPCHWCFMergerUnit
15 : // @author Sergey Gorbunov <sergey.gorbunov@fias.uni-frankfurt.de>
16 : // @author Torsten Alt <talt@cern.ch>
17 : // @brief Channel Merger unit of FPGA ClusterFinder Emulator for TPC
18 : // @brief ( see AliHLTTPCHWCFEmulator class )
19 : // @note
20 : //
21 : class AliHLTTPCHWCFMergerUnit
22 : {
23 : public:
24 :
25 : /** standard constructor */
26 : AliHLTTPCHWCFMergerUnit();
27 :
28 : /** destructor */
29 : ~AliHLTTPCHWCFMergerUnit();
30 :
31 : /** set debug level */
32 0 : void SetDebugLevel( int val ){ fDebug = val; }
33 :
34 : /** do cluster deconvolution in pad direction */
35 0 : void SetDeconvolution( bool val ){ fDeconvolute = val; }
36 :
37 : /** bypass the merger */
38 0 : void SetByPassMerger( bool val ){ fByPassMerger = val; }
39 :
40 : /** set max distance in timebins for matching fragments */
41 0 : void SetMatchDistance( unsigned int val ){ fMatchDistance = val; }
42 :
43 : /** update MeanTime value when merging fragments */
44 0 : void SetMatchTimeFollow( bool val ){ fMatchTimeFollow = val; }
45 :
46 : /** initialise */
47 : int Init();
48 :
49 : /** input stream of data */
50 : int InputStream( const AliHLTTPCHWCFClusterFragment *fragment );
51 :
52 : /** output stream of data */
53 : const AliHLTTPCHWCFClusterFragment *OutputStream();
54 :
55 : private:
56 :
57 : /** copy constructor prohibited */
58 : AliHLTTPCHWCFMergerUnit(const AliHLTTPCHWCFMergerUnit&);
59 : /** assignment operator prohibited */
60 : AliHLTTPCHWCFMergerUnit& operator=(const AliHLTTPCHWCFMergerUnit&);
61 :
62 : int fDebug; // debug level
63 : unsigned int fMatchDistance; // max distance in timebins for matching fragments
64 : bool fMatchTimeFollow; // update MeanTime value when merging fragments
65 : bool fDeconvolute; // do cluster deconvolution in pad direction
66 : bool fByPassMerger;// bypass the merger
67 : AliHLTTPCHWCFClusterFragment fInput; // current input
68 : AliHLTTPCHWCFClusterFragment fMemory[2][AliHLTTPCHWCFDefinitions::kMaxNTimeBins*2]; // memory for 2 channels
69 : AliHLTTPCHWCFClusterFragment *fSearchRange[2]; // search range array
70 : AliHLTTPCHWCFClusterFragment *fInsertRange[2]; // insert range array
71 : int fSearchStart[2]; // index of the first candidate in SR
72 : int fSearchEnd[2]; // index of end of SR
73 : int fInsertEnd[2]; // index of end of IR
74 : int fInsertRow[2]; // current row number in IR
75 : int fInsertPad[2]; // current pad number in IR
76 : };
77 :
78 : #endif
|