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