3 #ifndef ALIHLTTPCHWCFDATAREVERTERCOMPONENT_H
4 #define ALIHLTTPCHWCFDATAREVERTERCOMPONENT_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 AliHLTTPCHWCFDataReverterComponent.h
11 @author Kenneth Aamodt
13 @brief Component for reverting data for the HW clusterfinder
16 #include "AliHLTProcessor.h"
17 #include "AliHLTTPCPad.h"
18 #include "AliHLTDataTypes.h"
20 class AliHLTTPCDigitReader;
21 class AliHLTTPCMapping;
24 * @class AliHLTTPCHWCFDataReverterComponent
25 * Implementation of the zero suppression component.
26 * The component implements the interface methods of the @ref AliHLTProcessor.
28 * The component orders the data in the format the Hardware ClusterFinder
29 * expects, and revert the 40 bit altro words.
31 * The component has the following component arguments:
33 * @ingroup alihlt_tpc_components
35 class AliHLTTPCHWCFDataReverterComponent : public AliHLTProcessor
39 AliHLTTPCHWCFDataReverterComponent();
41 virtual ~AliHLTTPCHWCFDataReverterComponent();
43 // Public functions to implement AliHLTComponent's interface.
44 // These functions are required for the registration process
46 /** interface function, see AliHLTComponent for description */
47 const char* GetComponentID();
48 /** interface function, see AliHLTComponent for description */
49 void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
50 /** interface function, see AliHLTComponent for description */
51 AliHLTComponentDataType GetOutputDataType();
52 /** interface function, see AliHLTComponent for description */
53 int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
54 /** interface function, see AliHLTComponent for description */
55 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
56 /** interface function, see AliHLTComponent for description */
57 AliHLTComponent* Spawn();
59 Int_t DeInitializePadArray();
60 void InitializePadArray();
64 // Protected functions to implement AliHLTComponent's interface.
65 // These functions provide initialization as well as the actual processing
66 // capabilities of the component.
68 int DoInit( int argc, const char** argv );
70 int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
71 AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
72 AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
73 using AliHLTProcessor::DoEvent;
77 /** copy constructor prohibited */
78 AliHLTTPCHWCFDataReverterComponent(const AliHLTTPCHWCFDataReverterComponent&);
80 /** assignment operator prohibited */
81 AliHLTTPCHWCFDataReverterComponent& operator=(const AliHLTTPCHWCFDataReverterComponent&);
83 /** the reader object for data decoding */
84 AliHLTTPCDigitReader* fDigitReader; //!transient
86 /** Vector of pointers to pad objects */
87 typedef vector<AliHLTTPCPad*> AliHLTTPCPadVector;
89 /** 2D vector of pointers to pad objects (vector of vectors)*/
90 vector<AliHLTTPCPadVector> fRowPadVector; //! transient
92 /** Array containing number of pads in the different rows */
93 Int_t* fNumberOfPadsInRow; //! transient
95 /** Array containing the index f forst pad on row with hwaddress > 2048 */
96 Int_t* fFirstPadHigh; //! transient
98 /** Number of rows the patch has */
99 Int_t fNumberOfRows; //! transient
101 /** Current patch number */
102 UInt_t fCurrentPatch; //! transient
104 /** First row in patch */
105 UInt_t fFirstRow; //! transient
107 /** Last row in patch */
108 UInt_t fLastRow; //! transient
110 /** Number of timebins */
111 Int_t fNTimeBins; //! transient
113 /** Flag to check if the 2d vector is initialized */
114 Bool_t fVectorInitialized; //! transient
116 /** pointer to mapping object */
117 AliHLTTPCMapping *fMapping;
119 /** Flag to check if one should interleave the data */
122 ClassDef(AliHLTTPCHWCFDataReverterComponent, 0)