]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/AliHLTTPCZeroSuppressionComponent.h
code documantation and minor cleanup
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCZeroSuppressionComponent.h
CommitLineData
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
21class 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 */
45class 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
56 /** interface function, see @ref AliHLTComponent for description */
57 const char* GetComponentID();
58 /** interface function, see @ref AliHLTComponent for description */
59 void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
60 /** interface function, see @ref AliHLTComponent for description */
61 AliHLTComponentDataType GetOutputDataType();
62 /** interface function, see @ref AliHLTComponent for description */
63 int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
64 /** interface function, see @ref AliHLTComponent for description */
65 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
66 /** interface function, see @ref AliHLTComponent for description */
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();
79 int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
80 AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
81 AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
82
83 using AliHLTProcessor::DoEvent;
84
85 private:
86
a74855c2 87 /** copy constructor prohibited */
88 AliHLTTPCZeroSuppressionComponent(const AliHLTTPCZeroSuppressionComponent&);
afa4418c 89
a74855c2 90 /** assignment operator prohibited */
91 AliHLTTPCZeroSuppressionComponent& operator=(const AliHLTTPCZeroSuppressionComponent&);
afa4418c 92
a74855c2 93 /** the reader object for data decoding */
94 AliHLTTPCDigitReader* fDigitReader; //!transient
afa4418c 95
a74855c2 96 /** Vector of pointers to pad objects */
97 typedef vector<AliHLTTPCPad*> AliHLTTPCPadVector;
98
99 /** 2D vector of pointers to pad objects (vector of vectors)*/
afa4418c 100 vector<AliHLTTPCPadVector> fRowPadVector; //! transient
101
a74855c2 102 /** Array containing number of pads in the different rows */
103 Int_t* fNumberOfPadsInRow; //! transient
afa4418c 104
a74855c2 105 /** Number of rows the patch has */
106 Int_t fNumberOfRows; //! transient
afa4418c 107
a74855c2 108 /** Current patch number */
afa4418c 109 UInt_t fCurrentPatch; //! transient
a74855c2 110
111 /** First row in patch */
afa4418c 112 UInt_t fFirstRow; //! transient
a74855c2 113
114 /** Last row in patch */
afa4418c 115 UInt_t fLastRow; //! transient
116
a74855c2 117 /** First timebin to include in zerosuppression */
118 Int_t fStartTimeBin; //! transient
119
120 /** Lasr timebin to include in zerosuppression */
121 Int_t fEndTimeBin; //! transient
122
123 /** Number of timebins */
124 Int_t fNTimeBins; //! transient
125
126 /** Number of RMS the signal has to be larger than */
127 Double_t fNRMSThreshold; //! transient
afa4418c 128
a74855c2 129 /** Signal threshold (signal has to be greater than average + this number) */
130 Int_t fSignalThreshold; //! transient
131
132 /** Minimum number of signals to do zerosuppression */
133 Int_t fMinimumNumberOfSignals; //! transient
134
135 /** OldRCUFormat flag */
afa4418c 136 UInt_t fOldRCUFormat; //! transient
a74855c2 137
138 /** Sort pads flag */
afa4418c 139 Bool_t fSortPads; //! transient
a74855c2 140
141 /** Flag to check if the 2d vector is initialized */
afa4418c 142 Bool_t fVectorInitialized; //! transient
143
a74855c2 144 /** Value below average (useful for noisy pads to get the tails of a signal) */
afa4418c 145 Int_t fValueBelowAverage; //! transient
a74855c2 146
147 /** Number of timebins to look left(decreasing time direction) for tails */
afa4418c 148 Int_t fLeftTimeBin; //! transient
a74855c2 149
150 /** Number of timebins to look right(increasing time direction) for tails */
afa4418c 151 Int_t fRightTimeBin; //! transient
a74855c2 152
153 /** Flag to switch on active pads selection */
154 Bool_t fGetActivePads; //! transient
155
156 /** Vector of active pad hardware addresses */
157 vector<Int_t> fHwAddressList; //! transient
158
afa4418c 159 ClassDef(AliHLTTPCZeroSuppressionComponent, 0)
160 };
161#endif