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