]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/ITS/AliHLTITSClusterFinderComponent.h
using '-release-memory' option for TPC clusterfinder
[u/mrichter/AliRoot.git] / HLT / ITS / AliHLTITSClusterFinderComponent.h
CommitLineData
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"
5f2721d5 23
3f61e9ce 24class AliHLTITSClusterFinderSPD;
a2a2a7ce 25class AliHLTITSClusterFinderSSD;
3f61e9ce 26
27
5f2721d5 28/**
6b7742a2 29 * @class AliHLTITSClusterFinderComponent
30 * HLT Component to run the ITS offline clusterfinders.
21de9ddd 31 *
32 * <h2>General properties:</h2>
33 *
6b7742a2 34 * Component ID: \b ITSClusterFinderSPD or ITSClusterFinderSDD or ITSClusterFinderSSD <br>
21de9ddd 35 * Library: \b libAliHLTITS.so <br>
36 * Input Data Types: <br>
6b7742a2 37 * kAliHLTDataTypeDDLRaw|kAliHLTDataOriginITSSPD or kAliHLTDataTypeDDLRaw|kAliHLTDataOriginITSSDD or kAliHLTDataTypeDDLRaw|kAliHLTDataOriginITSSD <br>
21de9ddd 38 *
39 * Output Data Types: <br>
6b7742a2 40 * kAliHLTDataTypeClusters|kAliHLTDataOriginITSSPD or kAliHLTDataTypeClusters|kAliHLTDataOriginITSSDD or kAliHLTDataTypeClusters|kAliHLTDataOriginITSSSD <br>
21de9ddd 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
5f2721d5 66 *
67 * @ingroup alihlt_its_components
68 */
6b7742a2 69class AliHLTITSClusterFinderComponent : public AliHLTProcessor
5f2721d5 70{
71 public:
6b7742a2 72 /**
73 * Defines for selecting clusterfinder for SPD, SDD or SSD.
74 */
75 enum {
76 kClusterFinderSPD,
77 kClusterFinderSDD,
78 kClusterFinderSSD
79 };
5f2721d5 80 /*
81 * ---------------------------------------------------------------------------------
82 * Constructor / Destructor
83 * ---------------------------------------------------------------------------------
84 */
85
6b7742a2 86 /** constructor
87 * @param mode input type see e.g. @ref kClusterFinderSPD
88 */
89 AliHLTITSClusterFinderComponent(int mode);
5f2721d5 90
91 /** destructor */
6b7742a2 92 virtual ~AliHLTITSClusterFinderComponent();
5f2721d5 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
5f2721d5 132 /** EventLoop */
a2a2a7ce 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 );
5f2721d5 141
a2a2a7ce 142 //Int_t DoEvent( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/);
6b7742a2 143
144 int Reconfigure(const char* cdbEntry, const char* chainId);
5f2721d5 145
146 using AliHLTProcessor::DoEvent;
147
148 ///////////////////////////////////////////////////////////////////////////////////
149
6b7742a2 150 private:
151 /** standard constructor prohibited */
152 AliHLTITSClusterFinderComponent();
5f2721d5 153 /** copy constructor prohibited */
6b7742a2 154 AliHLTITSClusterFinderComponent(const AliHLTITSClusterFinderComponent&);
5f2721d5 155 /** assignment operator prohibited */
6b7742a2 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);
5f2721d5 163 /*
164 * ---------------------------------------------------------------------------------
165 * Members - private
166 * ---------------------------------------------------------------------------------
167 */
168
6b7742a2 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 */
a2a2a7ce 175 Int_t fModeSwitch; // !
176 AliHLTComponentDataType fInputDataType; // !
177 AliHLTComponentDataType fOutputDataType; // !
178
179 Bool_t fUseOfflineFinder; // flag to use the offline clusterfinder
6b7742a2 180 Int_t fNModules; // total number of modules
181 Int_t fId; // ddl offset
182 Int_t fNddl; // number of ddl's
183
d293cef8 184 TClonesArray** fClusters; //!transient
185
5f2721d5 186 /** the reader object for data decoding */
5f2721d5 187
a2a2a7ce 188 AliRawReaderMemory* fRawReader; //!transient
5f2721d5 189 AliITSDetTypeRec* fDettype; //!transient
5f2721d5 190 AliITSgeom* fgeom; //!transient
5f2721d5 191 AliITSInitGeometry* fgeomInit; //!transient
6e34b293 192
3f61e9ce 193 AliHLTITSClusterFinderSPD *fSPD;
a2a2a7ce 194 AliHLTITSClusterFinderSSD *fSSD;
3f61e9ce 195
a2a2a7ce 196 /*
197 int fStatNEv;
3f61e9ce 198 double fStatTime;
199 double fStatTimeAll;
200 double fStatTimeC;
201 double fStatTimeAllC;
a2a2a7ce 202 */
3f61e9ce 203
6b7742a2 204 ClassDef(AliHLTITSClusterFinderComponent, 0)
5f2721d5 205
a2a2a7ce 206};
5f2721d5 207#endif