3 #ifndef ALIHLTTPCCLUSTERFINDERCOMPONENT_H
4 #define ALIHLTTPCCLUSTERFINDERCOMPONENT_H
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 */
10 /** @file AliHLTTPCClusterFinderComponent.h
11 @author Timm Steinbeck, Matthias Richter, Jochen Thaeder
13 @brief The TPC cluster finder component.
16 // see below for class documentation
18 // refer to README to build package
20 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
22 #include "AliHLTProcessor.h"
24 class AliHLTTPCClusterFinder;
25 class AliHLTTPCDigitReader;
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.
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
47 * @ingroup alihlt_tpc_components
49 class AliHLTTPCClusterFinderComponent : public AliHLTProcessor
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
59 /** real data, offline AliAltroRawStream used for data decoding */
61 /** Unpacked data of format AliHLTTPCUnpackedRawData */
62 kClusterFinderUnpacked,
63 /** real data, fast AliAltroDecoder used for data decoding */
69 * @param mode input type see e.g. @ref kClusterFinderUnpacked
71 AliHLTTPCClusterFinderComponent(int mode);
73 virtual ~AliHLTTPCClusterFinderComponent();
75 // Public functions to implement AliHLTComponent's interface.
76 // These functions are required for the registration process
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();
93 // Protected functions to implement AliHLTComponent's interface.
94 // These functions provide initialization as well as the actual processing
95 // capabilities of the component.
97 int DoInit( int argc, const char** argv );
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);
104 using AliHLTProcessor::DoEvent;
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
118 bool fClusterDeconv; //!transient
119 float fXYClusterError; //!transient
120 float fZClusterError; //!transient
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
127 Int_t fModeSwitch; // see above
130 * Reads the data the new unsorted way if true
133 Int_t fUnsorted; //!transient
136 * Patch number to be read, currently given as component argument,
137 * will be changed later.
139 Int_t fPatch; //!transient
142 * Switch to specify if one ship out a list of active pads.
143 * Used for the 2007 December run.
145 Int_t fGetActivePads; //!transient
147 ClassDef(AliHLTTPCClusterFinderComponent, 3)