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 * - 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
40 * @ingroup alihlt_tpc_components
42 class AliHLTTPCClusterFinderComponent : public AliHLTProcessor
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
52 /** real data, offline AliAltroRawStream used for data decoding */
54 /** Unpacked data of format AliHLTTPCUnpackedRawData */
55 kClusterFinderUnpacked,
56 /** real data, fast AliAltroDecoder used for data decoding */
62 * @param mode input type see e.g. @ref kClusterFinderUnpacked
64 AliHLTTPCClusterFinderComponent(int mode);
66 virtual ~AliHLTTPCClusterFinderComponent();
68 // Public functions to implement AliHLTComponent's interface.
69 // These functions are required for the registration process
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();
86 // Protected functions to implement AliHLTComponent's interface.
87 // These functions provide initialization as well as the actual processing
88 // capabilities of the component.
90 int DoInit( int argc, const char** argv );
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);
97 using AliHLTProcessor::DoEvent;
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
111 bool fClusterDeconv; //!transient
112 float fXYClusterError; //!transient
113 float fZClusterError; //!transient
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
120 Int_t fModeSwitch; // see above
123 * Reads the data the new unsorted way if true
126 Int_t fUnsorted; //!transient
129 * Patch number to be read, currently given as component argument,
130 * will be changed later.
132 Int_t fPatch; //!transient
135 * Switch to specify if one ship out a list of active pads.
136 * Used for the 2007 December run.
138 Int_t fGetActivePads; //!transient
140 ClassDef(AliHLTTPCClusterFinderComponent, 3)