]>
Commit | Line | Data |
---|---|---|
33861fe0 | 1 | //-*- Mode: C++ -*- |
2 | // $Id$ | |
c012881c | 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 **/ | |
230b2bef | 37 | AliHLTUInt32_t *ReadMapping( int slice, int patch, const char *mappingFileName=0 ) const; |
c012881c | 38 | /** method returns default mapping for given patch **/ |
230b2bef | 39 | const AliHLTUInt32_t *GetMapping( int slice, int patch ); |
c012881c | 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 | ||
ba9bc1e2 | 49 | /** clean up */ |
50 | void ReleaseEventMemory(); | |
51 | ||
c012881c | 52 | |
53 | private: | |
54 | ||
230b2bef | 55 | static const int fgkNSlices = 36; // n patches in TPC |
c012881c | 56 | static const int fgkNPatches = 6; // n patches in TPC |
57 | ||
58 | /** copy constructor prohibited */ | |
59 | AliHLTTPCHWCFSupport(const AliHLTTPCHWCFSupport&); | |
60 | /** assignment operator prohibited */ | |
61 | AliHLTTPCHWCFSupport& operator=(const AliHLTTPCHWCFSupport&); | |
62 | ||
63 | /** add 10-bit data to the 32-bit word */ | |
64 | void Add10Word( AliHLTUInt32_t &nWords32, int &seek10, UInt_t data ); | |
65 | ||
230b2bef | 66 | AliHLTUInt32_t *fMapping[fgkNSlices][fgkNPatches]; // mapping arrays |
c012881c | 67 | AliHLTUInt32_t *fEventMemory; // memory for created event |
68 | AliHLTTPCClusterMCLabel *fEventMCMemory; // memory for MC labels | |
69 | }; | |
70 | ||
71 | #endif |