]>
Commit | Line | Data |
---|---|---|
7dceaa9b | 1 | // -*- Mode: C++ -*- |
7e914051 | 2 | // $Id$ |
7dceaa9b | 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 | */ | |
31 | class AliHLTTPCMapping : public AliHLTLogging { | |
32 | public: | |
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 | */ | |
a74855c2 | 49 | UInt_t GetPad(UInt_t HWAddress) const; |
7dceaa9b | 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 | */ | |
a74855c2 | 56 | UInt_t GetRow(UInt_t HWAddress) const; |
7dceaa9b | 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 | |
a74855c2 | 67 | /** flag to check if mapping is done for patch 0 */ |
68 | static Bool_t fgMapping0IsDone; | |
69 | /** flag to check if mapping is done for patch 1 */ | |
70 | static Bool_t fgMapping1IsDone; | |
71 | /** flag to check if mapping is done for patch 2 */ | |
72 | static Bool_t fgMapping2IsDone; | |
73 | /** flag to check if mapping is done for patch 3 */ | |
74 | static Bool_t fgMapping3IsDone; | |
75 | /** flag to check if mapping is done for patch 4 */ | |
76 | static Bool_t fgMapping4IsDone; | |
77 | /** flag to check if mapping is done for patch 5 */ | |
78 | static Bool_t fgMapping5IsDone; | |
7dceaa9b | 79 | |
80 | ||
81 | /** size of mapping arrays */ | |
a74855c2 | 82 | static const UInt_t fgkMapping0Size=3200; // see above |
7dceaa9b | 83 | /** size of mapping array for patch 1 */ |
a74855c2 | 84 | static const UInt_t fgkMapping1Size=3584; // see above |
7dceaa9b | 85 | /** size of mapping array for patch 2 */ |
a74855c2 | 86 | static const UInt_t fgkMapping2Size=3200; // see above |
7dceaa9b | 87 | /** size of mapping array for patch 3 */ |
a74855c2 | 88 | static const UInt_t fgkMapping3Size=3328; // see above |
7dceaa9b | 89 | /** size of mapping array for patch 4 */ |
a74855c2 | 90 | static const UInt_t fgkMapping4Size=3328; // see above |
7dceaa9b | 91 | /** size of mapping array for patch 5 */ |
a74855c2 | 92 | static const UInt_t fgkMapping5Size=3328; // see above |
7dceaa9b | 93 | |
a74855c2 | 94 | /** row mapping array for patch 0 */ |
7dceaa9b | 95 | static UInt_t fgRowMapping0[fgkMapping0Size]; // see above |
a74855c2 | 96 | /** pad mapping array for patch 0 */ |
7dceaa9b | 97 | static UInt_t fgPadMapping0[fgkMapping0Size]; // see above |
a74855c2 | 98 | /** row mapping array for patch 1 */ |
7dceaa9b | 99 | static UInt_t fgRowMapping1[fgkMapping1Size]; // see above |
a74855c2 | 100 | /** pad mapping array for patch 1 */ |
7dceaa9b | 101 | static UInt_t fgPadMapping1[fgkMapping1Size]; // see above |
a74855c2 | 102 | /** row mapping array for patch 2 */ |
7dceaa9b | 103 | static UInt_t fgRowMapping2[fgkMapping2Size]; // see above |
a74855c2 | 104 | /** pad mapping array for patch 2 */ |
7dceaa9b | 105 | static UInt_t fgPadMapping2[fgkMapping2Size]; // see above |
a74855c2 | 106 | /** row mapping array for patch 3 */ |
7dceaa9b | 107 | static UInt_t fgRowMapping3[fgkMapping3Size]; // see above |
a74855c2 | 108 | /** pad mapping array for patch 3 */ |
7dceaa9b | 109 | static UInt_t fgPadMapping3[fgkMapping3Size]; // see above |
a74855c2 | 110 | /** row mapping array for patch 4 */ |
7dceaa9b | 111 | static UInt_t fgRowMapping4[fgkMapping4Size]; // see above |
a74855c2 | 112 | /** pad mapping array for patch 4 */ |
7dceaa9b | 113 | static UInt_t fgPadMapping4[fgkMapping4Size]; // see above |
a74855c2 | 114 | /** row mapping array for patch 5 */ |
7dceaa9b | 115 | static UInt_t fgRowMapping5[fgkMapping5Size]; // see above |
a74855c2 | 116 | /** pad mapping array for patch 5 */ |
7dceaa9b | 117 | static UInt_t fgPadMapping5[fgkMapping5Size]; // see above |
118 | ||
a74855c2 | 119 | /** current row mapping array */ |
120 | UInt_t *fCurrentRowMapping; //!transient | |
121 | /** current pad mapping array */ | |
122 | UInt_t *fCurrentPadMapping; //!transient | |
7dceaa9b | 123 | |
124 | /** Number of hardware adresses */ | |
a74855c2 | 125 | UInt_t fNHWAdd; // see above |
7dceaa9b | 126 | |
127 | /** Maximum number of hardware addresses */ | |
a74855c2 | 128 | UInt_t fMaxHWAdd; // see above |
7dceaa9b | 129 | |
130 | ClassDef(AliHLTTPCMapping, 0) | |
131 | }; | |
132 | #endif // ALIHLTTPCMAPPING_H |