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