]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCClusterFinderComponent.h
changes by Kenneth
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCClusterFinderComponent.h
1 // @(#) $Id$
2
3 #ifndef ALIHLTTPCCLUSTERFINDERCOMPONENT_H
4 #define ALIHLTTPCCLUSTERFINDERCOMPONENT_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   AliHLTTPCClusterFinderComponent.h
11     @author Timm Steinbeck, Matthias Richter, Jochen Thaeder
12     @date   
13     @brief  The TPC cluster finder component.
14 */
15
16 // see below for class documentation
17 // or
18 // refer to README to build package
19 // or
20 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
21
22 #include "AliHLTProcessor.h"
23
24 class AliHLTTPCClusterFinder;
25 class AliHLTTPCDigitReader;
26
27 /**
28  * @class AliHLTTPCClusterFinderComponent
29  * Implementation of the cluster finder component.
30  * The component implements the interface methods of the @ref AliHLTProcessor.
31  * The actual cluster finding algorithm is implemented in @ref AliHLTTPCClusterFinder.
32  * The component can handle unpacked and packed data of different formats via the
33  * AliHLTTPCDigitReader implementations. Two components are registered, the
34  * TPCClusterFinderUnpacked and the TPCClusterFinderPacked. The latter one can
35  * instantiate different digit readers depending on the arguments.
36  * 
37  * The component has the following component arguments:
38  * - rawreadermode   the mode for the @ref AliHLTTPCDigitReaderRaw, use -2 if using unsorted
39  * - adc-threshold   ADC count threshold for zero suppression, if <0 the base line
40  *                   calculation and subtraction is switched off
41  * - pp-run          set parameters specific to a pp run; currently this switches
42  *                   cluster deconvolution off for pp runs (not true for unsorted reading)
43  * - unsorted        if 1 the data will be read unsorted in to a PadArray object. This should
44  *                   only be done on patch level since it use a lot of memory
45  * - patch           specify on which patch to resd the data unsorted
46  *
47  * @ingroup alihlt_tpc_components
48  */
49 class AliHLTTPCClusterFinderComponent : public AliHLTProcessor
50     {
51     public:
52       /**
53        * Defines for the cluster finder type.
54        * The cluster finders can work on different formats of input data,
55        * the AliHLTTPCDigitReader interface provides a transparent way to
56        * read the data.
57        */
58       enum {
59         /** real data, offline AliAltroRawStream used for data decoding */
60         kClusterFinderPacked,
61         /** Unpacked data of format AliHLTTPCUnpackedRawData */
62         kClusterFinderUnpacked,
63         /** real data, fast AliAltroDecoder used for data decoding */
64         kClusterFinderDecoder
65       };
66
67         /**
68          * constructor 
69          * @param mode    input type see e.g. @ref kClusterFinderUnpacked
70          */
71         AliHLTTPCClusterFinderComponent(int mode);
72         /** destructor */
73         virtual ~AliHLTTPCClusterFinderComponent();
74
75         // Public functions to implement AliHLTComponent's interface.
76         // These functions are required for the registration process
77
78   /** interface function, see @ref AliHLTComponent for description */
79   const char* GetComponentID();
80   /** interface function, see @ref AliHLTComponent for description */
81   void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
82   /** interface function, see @ref AliHLTComponent for description */
83   AliHLTComponentDataType GetOutputDataType();
84   /** interface function, see @ref AliHLTComponent for description */
85   int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
86   /** interface function, see @ref AliHLTComponent for description */
87   virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
88   /** interface function, see @ref AliHLTComponent for description */
89   AliHLTComponent* Spawn();
90
91     protected:
92         
93         // Protected functions to implement AliHLTComponent's interface.
94         // These functions provide initialization as well as the actual processing
95         // capabilities of the component. 
96
97         int DoInit( int argc, const char** argv );
98         int DoDeinit();
99         int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, 
100                      AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, 
101                      AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
102         int Reconfigure(const char* cdbEntry, const char* chainId);
103         
104         using AliHLTProcessor::DoEvent;
105
106     private:
107         /** standard constructor prohibited */
108         AliHLTTPCClusterFinderComponent();
109         /** copy constructor prohibited */
110         AliHLTTPCClusterFinderComponent(const AliHLTTPCClusterFinderComponent&);
111         /** assignment operator prohibited */
112         AliHLTTPCClusterFinderComponent& operator=(const AliHLTTPCClusterFinderComponent&);
113         /** the cluster finder object */
114         AliHLTTPCClusterFinder* fClusterFinder;                                      //!transient
115         /** the reader object for data decoding */
116         AliHLTTPCDigitReader* fReader;                                               //!transient
117
118         bool fClusterDeconv; //!transient
119         float fXYClusterError; //!transient
120         float fZClusterError; //!transient
121         /**
122          * switch to indicated the reader
123          * use fModeSwitch = 0 for packed inputtype "gkDDLPackedRawDataType"
124          * use fModeSwitch = 1 for unpacked inputtype "gkUnpackedRawDataType"
125          * use fModeSwitch = 2 for packed inputtype "gkDDLPackedRawDataType" with new digit reader
126          */
127         Int_t fModeSwitch;                                                           // see above
128       
129         /*
130          * Reads the data the new unsorted way if true
131          *
132          */
133         Int_t fUnsorted;                                                               //!transient
134
135         /*
136          * Patch number to be read, currently given as component argument,
137          * will be changed later.
138          */
139         Int_t fPatch;                                                                  //!transient
140
141         /*
142          * Switch to specify if one ship out a list of active pads.
143          * Used for the 2007 December run. 
144          */
145         Int_t fGetActivePads;                                                          //!transient
146
147         ClassDef(AliHLTTPCClusterFinderComponent, 3)
148
149 };
150 #endif