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