]>
Commit | Line | Data |
---|---|---|
71d7c760 | 1 | // @(#) $Id$ |
2 | ||
3 | #ifndef ALIHLTTPCCLUSTERFINDERCOMPONENT_H | |
4 | #define ALIHLTTPCCLUSTERFINDERCOMPONENT_H | |
a38a7850 | 5 | |
01f43166 | 6 | /* This file is property of and copyright by the ALICE HLT Project * |
7 | * ALICE Experiment at CERN, All rights reserved. * | |
71d7c760 | 8 | * See cxx source for full Copyright notice */ |
9 | ||
de554e07 | 10 | /** @file AliHLTTPCClusterFinderComponent.h |
11 | @author Timm Steinbeck, Matthias Richter, Jochen Thaeder | |
12 | @date | |
13 | @brief The TPC cluster finder component. | |
14 | */ | |
71d7c760 | 15 | |
e67b0680 | 16 | // see below for class documentation |
17 | // or | |
18 | // refer to README to build package | |
19 | // or | |
20 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
21 | ||
71d7c760 | 22 | #include "AliHLTProcessor.h" |
71d7c760 | 23 | |
a38a7850 | 24 | class AliHLTTPCClusterFinder; |
01f43166 | 25 | class AliHLTTPCPadArray; |
e67b0680 | 26 | class AliHLTTPCDigitReader; |
71d7c760 | 27 | |
84645eb0 | 28 | /** |
29 | * @class AliHLTTPCClusterFinderComponent | |
30 | * Implementation of the cluster finder component. | |
31 | * The component implements the interface methods of the @ref AliHLTProcessor. | |
32 | * The actual cluster finding algorithm is implemented in @ref AliHLTTPCClusterFinder. | |
de554e07 | 33 | * The component can handle unpacked and packed data of different formats via the |
34 | * AliHLTTPCDigitReader implementations. Two components are registered, the | |
35 | * TPCClusterFinderUnpacked and the TPCClusterFinderPacked. The latter one can | |
36 | * instantiate different digit readers depending on the arguments. | |
84645eb0 | 37 | * |
38 | * The component has the following component arguments: | |
01f43166 | 39 | * - rawreadermode the mode for the @ref AliHLTTPCDigitReaderRaw, use -2 if using unsorted |
84645eb0 | 40 | * - adc-threshold ADC count threshold for zero suppression, if <0 the base line |
41 | * calculation and subtraction is switched off | |
42 | * - pp-run set parameters specific to a pp run; currently this switches | |
01f43166 | 43 | * cluster deconvolution off for pp runs (not true for unsorted reading) |
44 | * - unsorted if 1 the data will be read unsorted in to a PadArray object. This should | |
45 | * only be done on patch level since it use a lot of memory | |
46 | * - patch specify on which patch to resd the data unsorted | |
84645eb0 | 47 | * |
2efb85be | 48 | * @ingroup alihlt_tpc_components |
84645eb0 | 49 | */ |
71d7c760 | 50 | class AliHLTTPCClusterFinderComponent : public AliHLTProcessor |
51 | { | |
52 | public: | |
2efb85be | 53 | /** |
54 | * Defines for the cluster finder type. | |
55 | * The cluster finders can work on different formats of input data, | |
56 | * the AliHLTTPCDigitReader interface provides a transparent way to | |
57 | * read the data. | |
58 | */ | |
59 | enum { | |
60 | /** real data, offline AliAltroRawStream used for data decoding */ | |
61 | kClusterFinderPacked, | |
62 | /** Unpacked data of format AliHLTTPCUnpackedRawData */ | |
63 | kClusterFinderUnpacked, | |
64 | /** real data, fast AliAltroDecoder used for data decoding */ | |
65 | kClusterFinderDecoder | |
66 | }; | |
67 | ||
74c73e5a | 68 | /** |
69 | * constructor | |
2efb85be | 70 | * @param mode input type see e.g. @ref kClusterFinderUnpacked |
74c73e5a | 71 | */ |
8252a538 | 72 | AliHLTTPCClusterFinderComponent(int mode); |
74c73e5a | 73 | /** destructor */ |
71d7c760 | 74 | virtual ~AliHLTTPCClusterFinderComponent(); |
75 | ||
76 | // Public functions to implement AliHLTComponent's interface. | |
77 | // These functions are required for the registration process | |
78 | ||
5df0cbb9 | 79 | /** interface function, see @ref AliHLTComponent for description */ |
80 | const char* GetComponentID(); | |
81 | /** interface function, see @ref AliHLTComponent for description */ | |
82 | void GetInputDataTypes( vector<AliHLTComponentDataType>& list); | |
83 | /** interface function, see @ref AliHLTComponent for description */ | |
84 | AliHLTComponentDataType GetOutputDataType(); | |
85 | /** interface function, see @ref AliHLTComponent for description */ | |
64defa03 | 86 | int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList); |
87 | /** interface function, see @ref AliHLTComponent for description */ | |
5df0cbb9 | 88 | virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ); |
89 | /** interface function, see @ref AliHLTComponent for description */ | |
90 | AliHLTComponent* Spawn(); | |
a655eae3 | 91 | |
71d7c760 | 92 | protected: |
93 | ||
94 | // Protected functions to implement AliHLTComponent's interface. | |
95 | // These functions provide initialization as well as the actual processing | |
96 | // capabilities of the component. | |
97 | ||
98 | int DoInit( int argc, const char** argv ); | |
99 | int DoDeinit(); | |
8ede8717 | 100 | int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, |
101 | AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, | |
102 | AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks ); | |
c3cda394 | 103 | int Reconfigure(const char* cdbEntry, const char* chainId); |
71d7c760 | 104 | |
5d2abf3b | 105 | using AliHLTProcessor::DoEvent; |
106 | ||
71d7c760 | 107 | private: |
2efb85be | 108 | /** standard constructor prohibited */ |
109 | AliHLTTPCClusterFinderComponent(); | |
a1dbf058 | 110 | /** copy constructor prohibited */ |
111 | AliHLTTPCClusterFinderComponent(const AliHLTTPCClusterFinderComponent&); | |
112 | /** assignment operator prohibited */ | |
113 | AliHLTTPCClusterFinderComponent& operator=(const AliHLTTPCClusterFinderComponent&); | |
db16520a | 114 | /** the cluster finder object */ |
2a083ac4 | 115 | AliHLTTPCClusterFinder* fClusterFinder; //!transient |
db16520a | 116 | /** the reader object for data decoding */ |
2a083ac4 | 117 | AliHLTTPCDigitReader* fReader; //!transient |
71d7c760 | 118 | |
e67b0680 | 119 | bool fClusterDeconv; //!transient |
120 | float fXYClusterError; //!transient | |
121 | float fZClusterError; //!transient | |
2a083ac4 | 122 | /** |
123 | * switch to indicated the reader | |
8252a538 | 124 | * use fModeSwitch = 0 for packed inputtype "gkDDLPackedRawDataType" |
125 | * use fModeSwitch = 1 for unpacked inputtype "gkUnpackedRawDataType" | |
126 | * use fModeSwitch = 2 for packed inputtype "gkDDLPackedRawDataType" with new digit reader | |
2a083ac4 | 127 | */ |
8252a538 | 128 | Int_t fModeSwitch; // see above |
a38a7850 | 129 | |
01f43166 | 130 | /* |
131 | * Reads the data the new unsorted way if true | |
132 | * | |
133 | */ | |
134 | Int_t fUnsorted; //!transient | |
135 | ||
136 | /* | |
137 | * Patch number to be read, currently given as component argument, | |
138 | * will be changed later. | |
139 | */ | |
140 | Int_t fPatch; //!transient | |
141 | ||
b1c46961 | 142 | /* |
143 | * Switch to specify if one ship out a list of active pads. | |
144 | * Used for the 2007 December run. | |
145 | */ | |
146 | Int_t fGetActivePads; //!transient | |
147 | ||
01f43166 | 148 | /* |
149 | * Pointer to a PadArray object containing a double array of all the pads in | |
150 | * the current patch. | |
151 | */ | |
152 | AliHLTTPCPadArray * fPadArray; //!transient | |
153 | ||
b1c46961 | 154 | ClassDef(AliHLTTPCClusterFinderComponent, 2) |
71d7c760 | 155 | |
156 | }; | |
157 | #endif |