TPC mapping class added; new digit reader based on fast ALTRO decoder implemented...
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCMapping.h
CommitLineData
7dceaa9b 1// -*- Mode: C++ -*-
2// $Id: AliHLTTPCDigitReaderRaw.cxx 22518 2007-11-26 23:19:47Z richterm $
3
4#ifndef ALIHLTTPCMAPPING_H
5#define ALIHLTTPCMAPPING_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 */
9
10/** @file AliHLTTPCMapping.h
11 @author Kenneth Aamodt
12 @date
13 @brief Mapping class for TPC.
14*/
15
16// see below for class documentation
17// or
18// refer to README to build package
19// or
20// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
21
22#include "AliHLTLogging.h"
23
24/**
25 * @class AliHLTTPCMapping
26 * This is a mapping class for the TPC. It contains the mappping for all six partitions in static arrays.
27 * This ensures that the asci files containing the mapping numbers is only read once per partition.
28 * The only two methods interesting for the users are GetPad(hwaddress) and GetRow(hwaddress).
29 * @ingroup alihlt_tpc
30 */
31class AliHLTTPCMapping : public AliHLTLogging {
32public:
33 /** standard constructor */
34 AliHLTTPCMapping(UInt_t patch);
35
36 /** standard destructor */
37 virtual ~AliHLTTPCMapping();
38
39 /**
40 * Create mapping for the given patch.
41 */
42 void InitializeMap(UInt_t patch);
43
44 /**
45 * Get the pad number belonging to hardware address.
46 * @param HWAddress The hardware address of the given pad
47 * @return Pad number of given HWAddress
48 */
49 UInt_t GetPad(UInt_t HWAddress);
50
51 /**
52 * Get the row number belonging to hardware address.
53 * @param HWAddress The hardware address of the given pad you are on.
54 * @return Row number of hardware address (Pad).
55 */
56 UInt_t GetRow(UInt_t HWAddress);
57
58 private:
59 /** standard constructor prohibited, pad no always required */
60 AliHLTTPCMapping();
61 /** copy constructor prohibited */
62 AliHLTTPCMapping(const AliHLTTPCMapping&);
63 /** assignment operator prohibited */
64 AliHLTTPCMapping& operator=(const AliHLTTPCMapping&);
65
66 //Flags to check if mapping is done for the six patches
67 static Bool_t fMapping0IsDone;
68 static Bool_t fMapping1IsDone;
69 static Bool_t fMapping2IsDone;
70 static Bool_t fMapping3IsDone;
71 static Bool_t fMapping4IsDone;
72 static Bool_t fMapping5IsDone;
73
74
75 /** size of mapping arrays */
76 static const Int_t fgkMapping0Size=3200; // see above
77 /** size of mapping array for patch 1 */
78 static const Int_t fgkMapping1Size=3584; // see above
79 /** size of mapping array for patch 2 */
80 static const Int_t fgkMapping2Size=3200; // see above
81 /** size of mapping array for patch 3 */
82 static const Int_t fgkMapping3Size=3328; // see above
83 /** size of mapping array for patch 4 */
84 static const Int_t fgkMapping4Size=3328; // see above
85 /** size of mapping array for patch 5 */
86 static const Int_t fgkMapping5Size=3328; // see above
87
88 /** mapping arrays for patch 0 */
89 static UInt_t fgRowMapping0[fgkMapping0Size]; // see above
90 static UInt_t fgPadMapping0[fgkMapping0Size]; // see above
91 /** mapping arrays for patch 1 */
92 static UInt_t fgRowMapping1[fgkMapping1Size]; // see above
93 static UInt_t fgPadMapping1[fgkMapping1Size]; // see above
94 /** mapping arrays for patch 2 */
95 static UInt_t fgRowMapping2[fgkMapping2Size]; // see above
96 static UInt_t fgPadMapping2[fgkMapping2Size]; // see above
97 /** mapping arrays for patch 3 */
98 static UInt_t fgRowMapping3[fgkMapping3Size]; // see above
99 static UInt_t fgPadMapping3[fgkMapping3Size]; // see above
100 /** mapping arrays for patch 4 */
101 static UInt_t fgRowMapping4[fgkMapping4Size]; // see above
102 static UInt_t fgPadMapping4[fgkMapping4Size]; // see above
103 /** mapping arrays for patch 5 */
104 static UInt_t fgRowMapping5[fgkMapping5Size]; // see above
105 static UInt_t fgPadMapping5[fgkMapping5Size]; // see above
106
107 /** current mapping array */
108 UInt_t *fCurrentRowMapping; //!transient
109 UInt_t *fCurrentPadMapping; //!transient
110
111 /** Number of hardware adresses */
112 UInt_t fNHWAdd; // see above
113
114 /** Maximum number of hardware addresses */
115 UInt_t fMaxHWAdd; // see above
116
117 ClassDef(AliHLTTPCMapping, 0)
118};
119#endif // ALIHLTTPCMAPPING_H