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