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