Line data Source code
1 : //-*- Mode: C++ -*-
2 : // $Id$
3 : //* This file is property of and copyright by the ALICE HLT Project *
4 : //* ALICE Experiment at CERN, All rights reserved. *
5 : //* See cxx source for full Copyright notice *
6 :
7 : // @file AliHLTTPCHWCFSupport.h
8 : // @author Sergey Gorbunov <sergey.gorbunov@fias.uni-frankfurt.de>
9 : // @author Torsten Alt <talt@cern.ch>
10 : // @brief Input interfaces for FPGA ClusterFinder Emulator for TPC
11 : // @brief ( see AliHLTTPCHWCFEmulator class )
12 : // @note
13 :
14 : #ifndef ALIHLTTPCHWCFSUPPORT_H
15 : #define ALIHLTTPCHWCFSUPPORT_H
16 :
17 : #include "AliHLTLogging.h"
18 : #include "AliHLTTPCHWCFDataTypes.h"
19 :
20 : class AliHLTComponentBlockData;
21 :
22 : /**
23 : * @class AliHLTTPCHWCFSupport
24 : * The class creates input for the FPGA cluster finder emulator
25 : *
26 : * @ingroup alihlt_tpc_components
27 : */
28 : class AliHLTTPCHWCFSupport : public AliHLTLogging
29 : {
30 : public:
31 : /** constructor */
32 : AliHLTTPCHWCFSupport();
33 : /** destructor */
34 : virtual ~AliHLTTPCHWCFSupport();
35 :
36 : /** method to read mapping file **/
37 : AliHLTUInt32_t *ReadMapping( int slice, int patch, const char *mappingFileName=0 ) const;
38 : /** method returns default mapping for given patch **/
39 : const AliHLTUInt32_t *GetMapping( int slice, int patch );
40 :
41 : /** method creates raw event from the HLT data block, error flag returned **/
42 : int CreateRawEvent( const AliHLTComponentBlockData* block,
43 : const AliHLTUInt32_t *&rawEvent, AliHLTUInt32_t &rawEventSize32,
44 : const AliHLTTPCClusterMCLabel *&mcLabels, AliHLTUInt32_t &nMCLabels );
45 :
46 : /** method to check raw data */
47 : int CheckRawData( const AliHLTUInt32_t *buffer, unsigned long bufferSize32, int patch, int slice );
48 :
49 : /** clean up */
50 : void ReleaseEventMemory();
51 :
52 : // unload mapping from memory
53 : void UnloadMapping();
54 :
55 : /** set RCU2 flag (data is not split in two branches)
56 : **/
57 0 : void SetProcessingRCU2Data( bool b ){ fProcessingRCU2Data = b; }
58 :
59 : private:
60 :
61 : static const int fgkNSlices = 36; // n patches in TPC
62 : static const int fgkNPatches = 6; // n patches in TPC
63 :
64 : /** copy constructor prohibited */
65 : AliHLTTPCHWCFSupport(const AliHLTTPCHWCFSupport&);
66 : /** assignment operator prohibited */
67 : AliHLTTPCHWCFSupport& operator=(const AliHLTTPCHWCFSupport&);
68 :
69 : /** add 10-bit data to the 32-bit word */
70 : void Add10Word( AliHLTUInt32_t &nWords32, int &seek10, UInt_t data );
71 :
72 : Bool_t fProcessingRCU2Data; // processing of RCU2 data - no split in two input branches
73 :
74 : AliHLTUInt32_t *fMapping[fgkNSlices][fgkNPatches]; // mapping arrays
75 : AliHLTUInt32_t *fEventMemory; // memory for created event
76 : AliHLTTPCClusterMCLabel *fEventMCMemory; // memory for MC labels
77 : };
78 :
79 : #endif
|