]>
Commit | Line | Data |
---|---|---|
afa4418c | 1 | // XEmacs -*-C++-*- |
2 | // @(#) $Id: AliHLTTPCClusterFinderComponent.h 23318 2008-01-14 12:43:28Z hristov $ | |
3 | ||
4 | #ifndef ALIHLTTPCZEROSUPPRESSIONCOMPONENT_H | |
5 | #define ALIHLTTPCZEROSUPPRESSIONCOMPONENT_H | |
6 | ||
297174de | 7 | //* This file is property of and copyright by the ALICE HLT Project * |
8 | //* ALICE Experiment at CERN, All rights reserved. * | |
9 | //* See cxx source for full Copyright notice * | |
afa4418c | 10 | |
11 | /** @file AliHLTTPCZeroSuppressionComponent.h | |
12 | @author Kenneth Aamodt | |
13 | @date | |
14 | @brief Component for ZeroSuppression | |
15 | */ | |
16 | ||
afa4418c | 17 | #include "AliHLTProcessor.h" |
18 | #include "AliHLTTPCPad.h" | |
a74855c2 | 19 | #include "AliHLTDataTypes.h" |
afa4418c | 20 | |
21 | class AliHLTTPCDigitReader; | |
22 | ||
23 | /** | |
24 | * @class AliHLTTPCZeroSuppressionComponent | |
25 | * Implementation of the zero suppression component. | |
26 | * The component implements the interface methods of the @ref AliHLTProcessor. | |
27 | * It reads the data pad by pad and zerosuppress the data. The output is unpacked which is | |
28 | * sent to the clulsterfinder. | |
29 | * | |
30 | * The component has the following component arguments: | |
31 | * - adc-threshold ADC count threshold for zero suppression. | |
32 | * | |
33 | * - rms-threshold RMS threshold for zero suppression. | |
34 | * | |
35 | * - first-timebin The first timebin for zero suppression | |
36 | * | |
37 | * - last-timebin The last timebin for zero suppression | |
38 | * | |
39 | * - occupancy-limit Minimum number of timebins with signal | |
40 | * | |
41 | * - sort-pads Flag to switch on pad sorting(needed by the SORTED clusterfinder) | |
42 | * | |
297174de | 43 | * @ingroup alihlt_tpc_components |
afa4418c | 44 | */ |
45 | class AliHLTTPCZeroSuppressionComponent : public AliHLTProcessor | |
46 | { | |
47 | public: | |
48 | /** constructor */ | |
49 | AliHLTTPCZeroSuppressionComponent(); | |
50 | /** destructor */ | |
51 | virtual ~AliHLTTPCZeroSuppressionComponent(); | |
52 | ||
53 | // Public functions to implement AliHLTComponent's interface. | |
54 | // These functions are required for the registration process | |
55 | ||
9783a5cf | 56 | /** interface function, see AliHLTComponent for description */ |
afa4418c | 57 | const char* GetComponentID(); |
9783a5cf | 58 | /** interface function, see AliHLTComponent for description */ |
afa4418c | 59 | void GetInputDataTypes( vector<AliHLTComponentDataType>& list); |
9783a5cf | 60 | /** interface function, see AliHLTComponent for description */ |
afa4418c | 61 | AliHLTComponentDataType GetOutputDataType(); |
9783a5cf | 62 | /** interface function, see AliHLTComponent for description */ |
afa4418c | 63 | int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList); |
9783a5cf | 64 | /** interface function, see AliHLTComponent for description */ |
afa4418c | 65 | virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ); |
9783a5cf | 66 | /** interface function, see AliHLTComponent for description */ |
afa4418c | 67 | AliHLTComponent* Spawn(); |
68 | ||
69 | Int_t DeInitializePadArray(); | |
70 | void InitializePadArray(); | |
71 | protected: | |
72 | ||
73 | // Protected functions to implement AliHLTComponent's interface. | |
74 | // These functions provide initialization as well as the actual processing | |
75 | // capabilities of the component. | |
76 | ||
77 | int DoInit( int argc, const char** argv ); | |
78 | int DoDeinit(); | |
092a1374 | 79 | int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, |
afa4418c | 80 | AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, |
81 | AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks ); | |
afa4418c | 82 | using AliHLTProcessor::DoEvent; |
83 | ||
84 | private: | |
85 | ||
a74855c2 | 86 | /** copy constructor prohibited */ |
87 | AliHLTTPCZeroSuppressionComponent(const AliHLTTPCZeroSuppressionComponent&); | |
afa4418c | 88 | |
a74855c2 | 89 | /** assignment operator prohibited */ |
90 | AliHLTTPCZeroSuppressionComponent& operator=(const AliHLTTPCZeroSuppressionComponent&); | |
afa4418c | 91 | |
a74855c2 | 92 | /** the reader object for data decoding */ |
93 | AliHLTTPCDigitReader* fDigitReader; //!transient | |
afa4418c | 94 | |
a74855c2 | 95 | /** Vector of pointers to pad objects */ |
96 | typedef vector<AliHLTTPCPad*> AliHLTTPCPadVector; | |
97 | ||
98 | /** 2D vector of pointers to pad objects (vector of vectors)*/ | |
afa4418c | 99 | vector<AliHLTTPCPadVector> fRowPadVector; //! transient |
100 | ||
a74855c2 | 101 | /** Array containing number of pads in the different rows */ |
102 | Int_t* fNumberOfPadsInRow; //! transient | |
afa4418c | 103 | |
a74855c2 | 104 | /** Number of rows the patch has */ |
105 | Int_t fNumberOfRows; //! transient | |
afa4418c | 106 | |
a74855c2 | 107 | /** Current patch number */ |
afa4418c | 108 | UInt_t fCurrentPatch; //! transient |
a74855c2 | 109 | |
110 | /** First row in patch */ | |
afa4418c | 111 | UInt_t fFirstRow; //! transient |
a74855c2 | 112 | |
113 | /** Last row in patch */ | |
afa4418c | 114 | UInt_t fLastRow; //! transient |
115 | ||
a74855c2 | 116 | /** First timebin to include in zerosuppression */ |
117 | Int_t fStartTimeBin; //! transient | |
118 | ||
119 | /** Lasr timebin to include in zerosuppression */ | |
120 | Int_t fEndTimeBin; //! transient | |
121 | ||
122 | /** Number of timebins */ | |
123 | Int_t fNTimeBins; //! transient | |
124 | ||
125 | /** Number of RMS the signal has to be larger than */ | |
126 | Double_t fNRMSThreshold; //! transient | |
afa4418c | 127 | |
a74855c2 | 128 | /** Signal threshold (signal has to be greater than average + this number) */ |
129 | Int_t fSignalThreshold; //! transient | |
130 | ||
131 | /** Minimum number of signals to do zerosuppression */ | |
132 | Int_t fMinimumNumberOfSignals; //! transient | |
133 | ||
134 | /** OldRCUFormat flag */ | |
afa4418c | 135 | UInt_t fOldRCUFormat; //! transient |
a74855c2 | 136 | |
137 | /** Sort pads flag */ | |
afa4418c | 138 | Bool_t fSortPads; //! transient |
a74855c2 | 139 | |
140 | /** Flag to check if the 2d vector is initialized */ | |
afa4418c | 141 | Bool_t fVectorInitialized; //! transient |
142 | ||
a74855c2 | 143 | /** Value below average (useful for noisy pads to get the tails of a signal) */ |
afa4418c | 144 | Int_t fValueBelowAverage; //! transient |
a74855c2 | 145 | |
146 | /** Number of timebins to look left(decreasing time direction) for tails */ | |
afa4418c | 147 | Int_t fLeftTimeBin; //! transient |
a74855c2 | 148 | |
149 | /** Number of timebins to look right(increasing time direction) for tails */ | |
afa4418c | 150 | Int_t fRightTimeBin; //! transient |
a74855c2 | 151 | |
152 | /** Flag to switch on active pads selection */ | |
153 | Bool_t fGetActivePads; //! transient | |
154 | ||
3789100d | 155 | /** Flag to switch off data being sent to output */ |
156 | Bool_t fSkipSendingZSData; | |
157 | ||
158 | /** Flag to switch off hw list being sent to output */ | |
159 | Bool_t fSendHWList; | |
160 | ||
a74855c2 | 161 | /** Vector of active pad hardware addresses */ |
092a1374 | 162 | vector<AliHLTUInt16_t> fHwAddressList; //! transient |
a74855c2 | 163 | |
afa4418c | 164 | ClassDef(AliHLTTPCZeroSuppressionComponent, 0) |
165 | }; | |
166 | #endif |