]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCClusterFinderComponent.h
Coding conventions
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCClusterFinderComponent.h
1 // @(#) $Id$
2
3 #ifndef ALIHLTTPCCLUSTERFINDERCOMPONENT_H
4 #define ALIHLTTPCCLUSTERFINDERCOMPONENT_H
5
6 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7  * See cxx source for full Copyright notice                               */
8
9 /** @file   AliHLTTPCClusterFinderComponent.h
10     @author Timm Steinbeck, Matthias Richter, Jochen Thaeder
11     @date   
12     @brief  The TPC cluster finder component.
13 */
14
15 #include "AliHLTProcessor.h"
16 #include "AliHLTTPCDefinitions.h"
17 #include "AliHLTTPCDigitReaderPacked.h"
18 #include "AliHLTTPCDigitReaderUnpacked.h"
19 #include "AliHLTTPCDigitReaderRaw.h"
20
21 class AliHLTTPCClusterFinder;
22
23 /**
24  * @class AliHLTTPCClusterFinderComponent
25  * Implementation of the cluster finder component.
26  * The component implements the interface methods of the @ref AliHLTProcessor.
27  * The actual cluster finding algorithm is implemented in @ref AliHLTTPCClusterFinder.
28  * The component can handle unpacked and packed data of different formats via the
29  * AliHLTTPCDigitReader implementations. Two components are registered, the
30  * TPCClusterFinderUnpacked and the TPCClusterFinderPacked. The latter one can
31  * instantiate different digit readers depending on the arguments.
32  * 
33  * The component has the following component arguments:
34  * - rawreadermode   the mode for the @ref AliHLTTPCDigitReaderRaw
35  * - adc-threshold   ADC count threshold for zero suppression, if <0 the base line
36  *                   calculation and subtraction is switched off
37  * - pp-run          set parameters specific to a pp run; currently this switches
38  *                   cluster deconvolution off for pp runs
39  *
40  * @ingroup alihlt_tpc
41  */
42 class AliHLTTPCClusterFinderComponent : public AliHLTProcessor
43     {
44     public:
45         /**
46          * constructor 
47          * @param packed    whether to use the packed or unpacked reader 
48          */
49         AliHLTTPCClusterFinderComponent(bool packed);
50         /** not a valid copy constructor, defined according to effective C++ style */
51         AliHLTTPCClusterFinderComponent(const AliHLTTPCClusterFinderComponent&);
52         /** not a valid assignment op, but defined according to effective C++ style */
53         AliHLTTPCClusterFinderComponent& operator=(const AliHLTTPCClusterFinderComponent&);
54         /** destructor */
55         virtual ~AliHLTTPCClusterFinderComponent();
56
57         // Public functions to implement AliHLTComponent's interface.
58         // These functions are required for the registration process
59
60   /** interface function, see @ref AliHLTComponent for description */
61   const char* GetComponentID();
62   /** interface function, see @ref AliHLTComponent for description */
63   void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
64   /** interface function, see @ref AliHLTComponent for description */
65   AliHLTComponentDataType GetOutputDataType();
66   /** interface function, see @ref AliHLTComponent for description */
67   virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
68   /** interface function, see @ref AliHLTComponent for description */
69   AliHLTComponent* Spawn();
70
71     protected:
72         
73         // Protected functions to implement AliHLTComponent's interface.
74         // These functions provide initialization as well as the actual processing
75         // capabilities of the component. 
76
77         int DoInit( int argc, const char** argv );
78         int DoDeinit();
79         int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, 
80                      AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, 
81                      AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
82         
83     private:
84         /** the cluster finder object */
85         AliHLTTPCClusterFinder* fClusterFinder;                                      //!transient
86         /** the reader object for data decoding */
87         AliHLTTPCDigitReader* fReader;                                               //!transient
88
89       bool fClusterDeconv;
90       float fXYClusterError;
91       float fZClusterError;
92       /**
93        * switch to indicated the reader
94        * use fPackedSwitch = true for packed inputtype "gkDDLPackedRawDataType"
95        * use fPackedSwitch = false for unpacked inputtype "gkUnpackedRawDataType"
96        */
97       Int_t fPackedSwitch;                                                           // see above
98       
99       ClassDef(AliHLTTPCClusterFinderComponent, 0)
100
101     };
102 #endif