3 #ifndef ALIHLTITSCLUSTERFINDERCOMPONENT_H
4 #define ALIHLTITSCLUSTERFINDERCOMPONENT_H
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 *
10 /** @file AliHLTITSClusterFinderComponent.cxx
11 @author Gaute Øvrebekk <st05886@alf.uib.no>
13 @brief Component to run the offline clusterfinder.
16 #include "AliHLTProcessor.h"
17 #include "AliRawReaderMemory.h"
18 #include "AliITSDetTypeRec.h"
19 #include "AliITSgeom.h"
20 #include "AliITSInitGeometry.h"
21 #include "TClonesArray.h"
22 #include "AliHLTDataTypes.h"
24 #include "AliHLTComponentBenchmark.h"
26 class AliHLTITSClusterFinderSPD;
27 class AliHLTITSClusterFinderSSD;
31 * @class AliHLTITSClusterFinderComponent
32 * HLT Component to run the ITS offline clusterfinders.
34 * <h2>General properties:</h2>
36 * Component ID: \b ITSClusterFinderSPD or ITSClusterFinderSDD or ITSClusterFinderSSD <br>
37 * Library: \b libAliHLTITS.so <br>
38 * Input Data Types: <br>
39 * kAliHLTDataTypeDDLRaw|kAliHLTDataOriginITSSPD or kAliHLTDataTypeDDLRaw|kAliHLTDataOriginITSSDD or kAliHLTDataTypeDDLRaw|kAliHLTDataOriginITSSD <br>
41 * Output Data Types: <br>
42 * kAliHLTDataTypeClusters|kAliHLTDataOriginITSSPD or kAliHLTDataTypeClusters|kAliHLTDataOriginITSSDD or kAliHLTDataTypeClusters|kAliHLTDataOriginITSSSD <br>
44 * <h2>Mandatory arguments:</h2>
45 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
47 * <h2>Optional arguments:</h2>
48 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
50 * <h2>Configuration:</h2>
51 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
52 * \li -config1 <i> teststring </i> <br>
53 * a configuration argument with one parameter
55 * a configuration argument without parameters
57 * <h2>Default CDB entries:</h2>
60 * TRIGGER/SPD/PITConditions
63 * ITS/Calib/DriftSpeedSDD
65 * ITS/Calib/MapsTimeSDD
68 * ITS/Calib/BadChannelsSSD
71 * <h2>Performance:</h2>
74 * <h2>Memory consumption:</h2>
77 * <h2>Output size:</h2>
80 * @ingroup alihlt_its_components
82 class AliHLTITSClusterFinderComponent : public AliHLTProcessor
86 * Defines for selecting clusterfinder for SPD, SDD or SSD.
95 * ---------------------------------------------------------------------------------
96 * Constructor / Destructor
97 * ---------------------------------------------------------------------------------
101 * @param mode input type see e.g. @ref kClusterFinderSPD
103 AliHLTITSClusterFinderComponent(int mode);
106 virtual ~AliHLTITSClusterFinderComponent();
109 * ---------------------------------------------------------------------------------
110 * Public functions to implement AliHLTComponent's interface.
111 * These functions are required for the registration process
112 * ---------------------------------------------------------------------------------
115 /** interface function, see @ref AliHLTComponent for description */
116 const char* GetComponentID();
118 /** interface function, see @ref AliHLTComponent for description */
119 void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
121 /** interface function, see @ref AliHLTComponent for description */
122 AliHLTComponentDataType GetOutputDataType();
124 /** interface function, see @ref AliHLTComponent for description */
125 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
127 /** interface function, see @ref AliHLTComponent for description */
128 void GetOCDBObjectDescription( TMap* const targetMap);
130 /** interface function, see @ref AliHLTComponent for description */
131 AliHLTComponent* Spawn();
136 * ---------------------------------------------------------------------------------
137 * Protected functions to implement AliHLTComponent's interface.
138 * These functions provide initialization as well as the actual processing
139 * capabilities of the component.
140 * ---------------------------------------------------------------------------------
143 /** Initialization */
144 Int_t DoInit( int argc, const char** argv );
146 /** DeInitialization */
152 const AliHLTComponentEventData& evtData,
153 const AliHLTComponentBlockData* blocks,
154 AliHLTComponentTriggerData& /*trigData*/,
155 AliHLTUInt8_t* outputPtr,
156 AliHLTUInt32_t& size,
157 vector<AliHLTComponentBlockData>& outputBlocks );
159 //Int_t DoEvent( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/);
161 int Reconfigure(const char* cdbEntry, const char* chainId);
163 using AliHLTProcessor::DoEvent;
165 ///////////////////////////////////////////////////////////////////////////////////
168 /** standard constructor prohibited */
169 AliHLTITSClusterFinderComponent();
170 /** copy constructor prohibited */
171 AliHLTITSClusterFinderComponent(const AliHLTITSClusterFinderComponent&);
172 /** assignment operator prohibited */
173 AliHLTITSClusterFinderComponent& operator=(const AliHLTITSClusterFinderComponent&);
175 * Configure the component.
176 * Parse a string for the configuration arguments and set the component
179 int Configure(const char* arguments);
181 void RecPointToSpacePoint(AliHLTUInt8_t* outputPtr,AliHLTUInt32_t& size);
183 * ---------------------------------------------------------------------------------
185 * ---------------------------------------------------------------------------------
189 * switch to indicated the ClusterFinder
190 * use fModeSwitch = 0 for SPD
191 * use fModeSwitch = 1 for SDD
192 * use fModeSwitch = 2 for SSD
193 * use fModeSwitch = 3 for ClusterFinding on Digits (Full ITS)
195 Int_t fModeSwitch; // !
196 AliHLTComponentDataType fInputDataType; // !
197 AliHLTComponentDataType fOutputDataType; // !
199 Bool_t fUseOfflineFinder; // flag to use the offline clusterfinder
200 Int_t fNModules; // total number of modules
201 Int_t fId; // ddl offset
202 Int_t fNddl; // number of ddl's
204 /** the reader object for data decoding */
206 AliRawReaderMemory* fRawReader; //!transient
207 AliITSDetTypeRec* fDettype; //!transient
208 AliITSgeom* fgeom; //!transient
209 AliITSInitGeometry* fgeomInit; //!transient
211 AliHLTITSClusterFinderSPD *fSPD; //!transient
212 AliHLTITSClusterFinderSSD *fSSD; //!transient
214 TTree *tD; //!transient
215 TTree *tR; //!transient
217 Int_t fSPDNModules; //!transient
218 Int_t fSDDNModules; //!transient
219 Int_t fSSDNModules; //!transient
221 Int_t fFirstModule; //!transient
222 Int_t fLastModule; //!transient
224 std::vector<AliITSRecPoint> fclusters; //!transient
226 AliHLTComponentBenchmark fBenchmark;// benchmark
228 ClassDef(AliHLTITSClusterFinderComponent, 0)