3 #ifndef ALIHLTTPCHWCFMERGERUNIT_H
4 #define ALIHLTTPCHWCFMERGERUNIT_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 *
11 #include "AliHLTTPCHWCFDataTypes.h"
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 )
21 class AliHLTTPCHWCFMergerUnit
25 /** standard constructor */
26 AliHLTTPCHWCFMergerUnit();
29 ~AliHLTTPCHWCFMergerUnit();
31 /** set debug level */
32 void SetDebugLevel( int val ){ fDebug = val; }
34 /** do cluster deconvolution in pad direction */
35 void SetDeconvolution( bool val ){ fDeconvolute = val; }
37 /** bypass the merger */
38 void SetByPassMerger( bool val ){ fByPassMerger = val; }
40 /** set max distance in timebins for matching fragments */
41 void SetMatchDistance( unsigned int val ){ fMatchDistance = val; }
43 /** update MeanTime value when merging fragments */
44 void SetMatchTimeFollow( bool val ){ fMatchTimeFollow = val; }
49 /** input stream of data */
50 int InputStream( const AliHLTTPCHWCFClusterFragment *fragment );
52 /** output stream of data */
53 const AliHLTTPCHWCFClusterFragment *OutputStream();
57 /** copy constructor prohibited */
58 AliHLTTPCHWCFMergerUnit(const AliHLTTPCHWCFMergerUnit&);
59 /** assignment operator prohibited */
60 AliHLTTPCHWCFMergerUnit& operator=(const AliHLTTPCHWCFMergerUnit&);
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