]>
Commit | Line | Data |
---|---|---|
6e34b293 | 1 | //-*- Mode: C++ -*- |
2 | // $Id$ | |
6b7742a2 | 3 | #ifndef ALIHLTITSCLUSTERFINDERCOMPONENT_H |
4 | #define ALIHLTITSCLUSTERFINDERCOMPONENT_H | |
5f2721d5 | 5 | |
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 * | |
9 | ||
6b7742a2 | 10 | /** @file AliHLTITSClusterFinderComponent.cxx |
5f2721d5 | 11 | @author Gaute Øvrebekk <st05886@alf.uib.no> |
12 | @date | |
13 | @brief Component to run the offline clusterfinder. | |
14 | */ | |
15 | ||
16 | #include "AliHLTProcessor.h" | |
17 | #include "AliRawReaderMemory.h" | |
5f2721d5 | 18 | #include "AliITSDetTypeRec.h" |
5f2721d5 | 19 | #include "AliITSgeom.h" |
20 | #include "AliITSInitGeometry.h" | |
d293cef8 | 21 | #include "TClonesArray.h" |
a2a2a7ce | 22 | #include "AliHLTDataTypes.h" |
618f422f | 23 | #include "TTree.h" |
57a4102f | 24 | #include "AliHLTComponentBenchmark.h" |
8e5edf3c | 25 | #include "AliITSRecPoint.h" |
5f2721d5 | 26 | |
3f61e9ce | 27 | class AliHLTITSClusterFinderSPD; |
a2a2a7ce | 28 | class AliHLTITSClusterFinderSSD; |
8e5edf3c | 29 | class AliHLTITSClusterData; |
3f61e9ce | 30 | |
5f2721d5 | 31 | /** |
6b7742a2 | 32 | * @class AliHLTITSClusterFinderComponent |
33 | * HLT Component to run the ITS offline clusterfinders. | |
21de9ddd | 34 | * |
35 | * <h2>General properties:</h2> | |
36 | * | |
6b7742a2 | 37 | * Component ID: \b ITSClusterFinderSPD or ITSClusterFinderSDD or ITSClusterFinderSSD <br> |
21de9ddd | 38 | * Library: \b libAliHLTITS.so <br> |
39 | * Input Data Types: <br> | |
6b7742a2 | 40 | * kAliHLTDataTypeDDLRaw|kAliHLTDataOriginITSSPD or kAliHLTDataTypeDDLRaw|kAliHLTDataOriginITSSDD or kAliHLTDataTypeDDLRaw|kAliHLTDataOriginITSSD <br> |
21de9ddd | 41 | * |
42 | * Output Data Types: <br> | |
6b7742a2 | 43 | * kAliHLTDataTypeClusters|kAliHLTDataOriginITSSPD or kAliHLTDataTypeClusters|kAliHLTDataOriginITSSDD or kAliHLTDataTypeClusters|kAliHLTDataOriginITSSSD <br> |
21de9ddd | 44 | * |
45 | * <h2>Mandatory arguments:</h2> | |
46 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
47 | * | |
48 | * <h2>Optional arguments:</h2> | |
49 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
50 | * | |
51 | * <h2>Configuration:</h2> | |
52 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
53 | * \li -config1 <i> teststring </i> <br> | |
54 | * a configuration argument with one parameter | |
55 | * \li -config2 <br> | |
56 | * a configuration argument without parameters | |
57 | * | |
58 | * <h2>Default CDB entries:</h2> | |
2bd1335e | 59 | * ITS/Calib/SPDNoisy |
60 | * ITS/Calib/SPDDead | |
61 | * TRIGGER/SPD/PITConditions | |
62 | * ITS/Calib/CalibSDD | |
63 | * ITS/Calib/RespSDD | |
64 | * ITS/Calib/DriftSpeedSDD | |
65 | * ITS/Calib/DDLMapSDD | |
66 | * ITS/Calib/MapsTimeSDD | |
67 | * ITS/Calib/NoiseSSD | |
68 | * ITS/Calib/GainSSD | |
69 | * ITS/Calib/BadChannelsSSD | |
70 | * GRP/CTP/Scalers | |
21de9ddd | 71 | * |
72 | * <h2>Performance:</h2> | |
73 | * TODO | |
74 | * | |
75 | * <h2>Memory consumption:</h2> | |
76 | * TODO | |
77 | * | |
78 | * <h2>Output size:</h2> | |
79 | * TODO | |
5f2721d5 | 80 | * |
81 | * @ingroup alihlt_its_components | |
82 | */ | |
6b7742a2 | 83 | class AliHLTITSClusterFinderComponent : public AliHLTProcessor |
5f2721d5 | 84 | { |
85 | public: | |
6b7742a2 | 86 | /** |
87 | * Defines for selecting clusterfinder for SPD, SDD or SSD. | |
88 | */ | |
89 | enum { | |
90 | kClusterFinderSPD, | |
91 | kClusterFinderSDD, | |
618f422f | 92 | kClusterFinderSSD, |
93 | kClusterFinderDigits | |
6b7742a2 | 94 | }; |
5f2721d5 | 95 | /* |
96 | * --------------------------------------------------------------------------------- | |
97 | * Constructor / Destructor | |
98 | * --------------------------------------------------------------------------------- | |
99 | */ | |
100 | ||
6b7742a2 | 101 | /** constructor |
102 | * @param mode input type see e.g. @ref kClusterFinderSPD | |
103 | */ | |
104 | AliHLTITSClusterFinderComponent(int mode); | |
5f2721d5 | 105 | |
106 | /** destructor */ | |
6b7742a2 | 107 | virtual ~AliHLTITSClusterFinderComponent(); |
5f2721d5 | 108 | |
109 | /* | |
110 | * --------------------------------------------------------------------------------- | |
111 | * Public functions to implement AliHLTComponent's interface. | |
112 | * These functions are required for the registration process | |
113 | * --------------------------------------------------------------------------------- | |
114 | */ | |
115 | ||
116 | /** interface function, see @ref AliHLTComponent for description */ | |
117 | const char* GetComponentID(); | |
118 | ||
119 | /** interface function, see @ref AliHLTComponent for description */ | |
120 | void GetInputDataTypes( vector<AliHLTComponentDataType>& list); | |
121 | ||
122 | /** interface function, see @ref AliHLTComponent for description */ | |
123 | AliHLTComponentDataType GetOutputDataType(); | |
124 | ||
125 | /** interface function, see @ref AliHLTComponent for description */ | |
126 | virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ); | |
127 | ||
6eb9783a | 128 | /** interface function, see @ref AliHLTComponent for description */ |
129 | void GetOCDBObjectDescription( TMap* const targetMap); | |
130 | ||
5f2721d5 | 131 | /** interface function, see @ref AliHLTComponent for description */ |
132 | AliHLTComponent* Spawn(); | |
133 | ||
134 | protected: | |
135 | ||
136 | /* | |
137 | * --------------------------------------------------------------------------------- | |
138 | * Protected functions to implement AliHLTComponent's interface. | |
139 | * These functions provide initialization as well as the actual processing | |
140 | * capabilities of the component. | |
141 | * --------------------------------------------------------------------------------- | |
142 | */ | |
143 | ||
144 | /** Initialization */ | |
145 | Int_t DoInit( int argc, const char** argv ); | |
146 | ||
147 | /** DeInitialization */ | |
148 | Int_t DoDeinit(); | |
149 | ||
5f2721d5 | 150 | /** EventLoop */ |
a2a2a7ce | 151 | |
152 | Int_t DoEvent( | |
153 | const AliHLTComponentEventData& evtData, | |
154 | const AliHLTComponentBlockData* blocks, | |
155 | AliHLTComponentTriggerData& /*trigData*/, | |
156 | AliHLTUInt8_t* outputPtr, | |
157 | AliHLTUInt32_t& size, | |
158 | vector<AliHLTComponentBlockData>& outputBlocks ); | |
5f2721d5 | 159 | |
a2a2a7ce | 160 | //Int_t DoEvent( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/); |
6b7742a2 | 161 | |
162 | int Reconfigure(const char* cdbEntry, const char* chainId); | |
6eb9783a | 163 | |
5f2721d5 | 164 | using AliHLTProcessor::DoEvent; |
165 | ||
166 | /////////////////////////////////////////////////////////////////////////////////// | |
167 | ||
6b7742a2 | 168 | private: |
169 | /** standard constructor prohibited */ | |
170 | AliHLTITSClusterFinderComponent(); | |
5f2721d5 | 171 | /** copy constructor prohibited */ |
6b7742a2 | 172 | AliHLTITSClusterFinderComponent(const AliHLTITSClusterFinderComponent&); |
5f2721d5 | 173 | /** assignment operator prohibited */ |
6b7742a2 | 174 | AliHLTITSClusterFinderComponent& operator=(const AliHLTITSClusterFinderComponent&); |
175 | /** | |
176 | * Configure the component. | |
177 | * Parse a string for the configuration arguments and set the component | |
178 | * properties. | |
179 | */ | |
180 | int Configure(const char* arguments); | |
618f422f | 181 | |
182 | void RecPointToSpacePoint(AliHLTUInt8_t* outputPtr,AliHLTUInt32_t& size); | |
8e5edf3c | 183 | void RecpointToOutput(AliHLTITSClusterData *outputClusters, AliITSRecPoint *recpoint, int &clustIdx); |
5f2721d5 | 184 | /* |
185 | * --------------------------------------------------------------------------------- | |
186 | * Members - private | |
187 | * --------------------------------------------------------------------------------- | |
188 | */ | |
189 | ||
6b7742a2 | 190 | /** |
191 | * switch to indicated the ClusterFinder | |
192 | * use fModeSwitch = 0 for SPD | |
193 | * use fModeSwitch = 1 for SDD | |
194 | * use fModeSwitch = 2 for SSD | |
618f422f | 195 | * use fModeSwitch = 3 for ClusterFinding on Digits (Full ITS) |
6b7742a2 | 196 | */ |
a2a2a7ce | 197 | Int_t fModeSwitch; // ! |
198 | AliHLTComponentDataType fInputDataType; // ! | |
199 | AliHLTComponentDataType fOutputDataType; // ! | |
200 | ||
201 | Bool_t fUseOfflineFinder; // flag to use the offline clusterfinder | |
6b7742a2 | 202 | Int_t fNModules; // total number of modules |
203 | Int_t fId; // ddl offset | |
204 | Int_t fNddl; // number of ddl's | |
205 | ||
5f2721d5 | 206 | /** the reader object for data decoding */ |
5f2721d5 | 207 | |
a2a2a7ce | 208 | AliRawReaderMemory* fRawReader; //!transient |
5f2721d5 | 209 | AliITSDetTypeRec* fDettype; //!transient |
5f2721d5 | 210 | AliITSgeom* fgeom; //!transient |
5f2721d5 | 211 | AliITSInitGeometry* fgeomInit; //!transient |
618f422f | 212 | |
213 | AliHLTITSClusterFinderSPD *fSPD; //!transient | |
214 | AliHLTITSClusterFinderSSD *fSSD; //!transient | |
6e34b293 | 215 | |
618f422f | 216 | TTree *tD; //!transient |
217 | TTree *tR; //!transient | |
3f61e9ce | 218 | |
01ef1bd4 | 219 | Int_t fSPDNModules; //!transient |
220 | Int_t fSDDNModules; //!transient | |
221 | Int_t fSSDNModules; //!transient | |
222 | ||
223 | Int_t fFirstModule; //!transient | |
224 | Int_t fLastModule; //!transient | |
8e5edf3c | 225 | Int_t fnClusters; //!transient |
01ef1bd4 | 226 | |
618f422f | 227 | std::vector<AliITSRecPoint> fclusters; //!transient |
57a4102f | 228 | |
229 | AliHLTComponentBenchmark fBenchmark;// benchmark | |
3f61e9ce | 230 | |
6b7742a2 | 231 | ClassDef(AliHLTITSClusterFinderComponent, 0) |
5f2721d5 | 232 | |
a2a2a7ce | 233 | }; |
5f2721d5 | 234 | #endif |