4 #ifndef ALIHLTTPCHWCFDATAREVERTERCOMPONENT_H
5 #define ALIHLTTPCHWCFDATAREVERTERCOMPONENT_H
7 //* This file is property of and copyright by the ALICE HLT Project *
8 //* ALICE Experiment at CERN, All rights reserved. *
9 //* See cxx source for full Copyright notice *
11 /// @file AliHLTTPCHWCFDataReverterComponent.h
12 /// @author Kenneth Aamodt
14 /// @brief Component for reverting data for the HW clusterfinder
17 #include "AliHLTProcessor.h"
18 #include "AliHLTTPCPad.h"
19 #include "AliHLTDataTypes.h"
21 class AliHLTTPCDigitReader;
22 class AliHLTTPCMapping;
25 * @class AliHLTTPCHWCFDataReverterComponent
26 * Implementation of the zero suppression component.
27 * The component implements the interface methods of the @ref AliHLTProcessor.
29 * The component orders the data in the format the Hardware ClusterFinder
30 * expects, and revert the 40 bit altro words.
32 * The component has the following component arguments:
34 * @ingroup alihlt_tpc_components
36 class AliHLTTPCHWCFDataReverterComponent : public AliHLTProcessor
40 AliHLTTPCHWCFDataReverterComponent();
42 virtual ~AliHLTTPCHWCFDataReverterComponent();
44 // Public functions to implement AliHLTComponent's interface.
45 // These functions are required for the registration process
47 /** interface function, see AliHLTComponent for description */
48 const char* GetComponentID();
49 /** interface function, see AliHLTComponent for description */
50 void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
51 /** interface function, see AliHLTComponent for description */
52 AliHLTComponentDataType GetOutputDataType();
53 /** interface function, see AliHLTComponent for description */
54 int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
55 /** interface function, see AliHLTComponent for description */
56 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
57 /** interface function, see AliHLTComponent for description */
58 AliHLTComponent* Spawn();
60 Int_t DeInitializePadArray();
61 void InitializePadArray();
65 // Protected functions to implement AliHLTComponent's interface.
66 // These functions provide initialization as well as the actual processing
67 // capabilities of the component.
69 int DoInit( int argc, const char** argv );
71 int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
72 AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
73 AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
74 using AliHLTProcessor::DoEvent;
78 /** copy constructor prohibited */
79 AliHLTTPCHWCFDataReverterComponent(const AliHLTTPCHWCFDataReverterComponent&);
81 /** assignment operator prohibited */
82 AliHLTTPCHWCFDataReverterComponent& operator=(const AliHLTTPCHWCFDataReverterComponent&);
84 /** the reader object for data decoding */
85 AliHLTTPCDigitReader* fDigitReader; //!transient
87 /** Vector of pointers to pad objects */
88 typedef vector<AliHLTTPCPad*> AliHLTTPCPadVector;
90 /** 2D vector of pointers to pad objects (vector of vectors)*/
91 vector<AliHLTTPCPadVector> fRowPadVector; //! transient
93 /** Array containing number of pads in the different rows */
94 Int_t* fNumberOfPadsInRow; //! transient
96 /** Array containing the index f forst pad on row with hwaddress > 2048 */
97 Int_t* fFirstPadHigh; //! transient
99 /** Number of rows the patch has */
100 Int_t fNumberOfRows; //! transient
102 /** Current patch number */
103 UInt_t fCurrentPatch; //! transient
105 /** First row in patch */
106 UInt_t fFirstRow; //! transient
108 /** Last row in patch */
109 UInt_t fLastRow; //! transient
111 /** Number of timebins */
112 Int_t fNTimeBins; //! transient
114 /** Flag to check if the 2d vector is initialized */
115 Bool_t fVectorInitialized; //! transient
117 /** pointer to mapping object */
118 AliHLTTPCMapping *fMapping;
120 /** Flag to check if one should interleave the data */
123 ClassDef(AliHLTTPCHWCFDataReverterComponent, 0)