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, Kenneth Aamodt
13 @brief The TPC cluster finder component.
16 #include "AliHLTProcessor.h"
18 class AliHLTTPCClusterFinder;
19 class AliHLTTPCDigitReader;
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.
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
41 * @ingroup alihlt_tpc_components
43 class AliHLTTPCClusterFinderComponent : public AliHLTProcessor
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
53 /** real data, offline AliAltroRawStream used for data decoding */
55 /** Unpacked data of format AliHLTTPCUnpackedRawData */
56 kClusterFinderUnpacked,
57 /** real data, fast AliAltroDecoder used for data decoding */
63 * @param mode input type see e.g. @ref kClusterFinderUnpacked
65 AliHLTTPCClusterFinderComponent(int mode);
67 virtual ~AliHLTTPCClusterFinderComponent();
69 // Public functions to implement AliHLTComponent's interface.
70 // These functions are required for the registration process
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();
87 // Protected functions to implement AliHLTComponent's interface.
88 // These functions provide initialization as well as the actual processing
89 // capabilities of the component.
91 int DoInit( int argc, const char** argv );
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);
98 using AliHLTProcessor::DoEvent;
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
112 bool fClusterDeconv; //!transient
113 float fXYClusterError; //!transient
114 float fZClusterError; //!transient
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
121 Int_t fModeSwitch; // see above
124 * Reads the data the new unsorted way if true
127 Int_t fUnsorted; //!transient
130 * Patch number to be read, currently given as component argument,
131 * will be changed later.
133 Int_t fPatch; //!transient
136 * Switch to specify if one ship out a list of active pads.
137 * Used for the 2007 December run.
139 Int_t fGetActivePads; //!transient
141 ClassDef(AliHLTTPCClusterFinderComponent, 3)