]>
Commit | Line | Data |
---|---|---|
2f09efe8 | 1 | #ifndef ALIHLTPHOSMAPPER_H |
2 | #define ALIHLTPHOSMAPPER_H | |
3 | ||
4 | /************************************************************************** | |
5 | * This file is property of and copyright by the Experimental Nuclear * | |
6 | * Physics Group, Dep. of Physics * | |
7 | * University of Oslo, Norway, 2006 * | |
8 | * * | |
9 | * Author: Per Thomas Hille perthi@fys.uio.no for the ALICE DCS Project. * | |
10 | * Contributors are mentioned in the code where appropriate. * | |
11 | * Please report bugs to perthi@fys.uio.no * | |
12 | * * | |
13 | * Permission to use, copy, modify and distribute this software and its * | |
14 | * documentation strictly for non-commercial purposes is hereby granted * | |
15 | * without fee, provided that the above copyright notice appears in all * | |
16 | * copies and that both the copyright notice and this permission notice * | |
17 | * appear in the supporting documentation. The authors make no claims * | |
18 | * about the suitability of this software for any purpose. It is * | |
19 | * provided "as is" without express or implied warranty. * | |
20 | **************************************************************************/ | |
21 | ||
22 | //#include "PhosFeeClient.h" | |
23 | ||
c37f821f | 24 | //#include "stdio.h" |
25 | //#include <iostream> | |
26 | #include <cstdlib> | |
2f09efe8 | 27 | #include <assert.h> |
c37f821f | 28 | //#include "AliHLTPHOSCommonDefs.h" |
29 | //#include "AliHLTPHOSConstants.h" | |
30 | #include "AliHLTPHOSBase.h" | |
2f09efe8 | 31 | |
32 | // PhosHLTConst | |
c37f821f | 33 | using namespace std; |
2f09efe8 | 34 | using namespace PhosHLTConst; |
35 | ||
c37f821f | 36 | class AliHLTPHOSMapper : public AliHLTPHOSBase |
2f09efe8 | 37 | { |
38 | public: | |
39 | AliHLTPHOSMapper(); | |
c37f821f | 40 | virtual ~AliHLTPHOSMapper(); |
41 | void InitAltroMapping(); | |
42 | ||
43 | ||
44 | struct altromap{ | |
45 | // int mod; | |
46 | int row; | |
47 | int col; | |
48 | int gain; | |
49 | // int rcu; | |
50 | // int branch; | |
51 | // int card; | |
52 | // int chip; | |
53 | // int chan; | |
54 | // int csp; | |
55 | // int num; | |
56 | // int hid; | |
57 | }; | |
58 | ||
59 | ||
60 | altromap *hw2geomapPtr; | |
61 | ||
62 | ||
63 | /* | |
2f09efe8 | 64 | struct FEE_CSP_MAP{ |
65 | int row; | |
66 | int col; | |
67 | int gain; | |
68 | int csp; | |
69 | int num; | |
70 | }; | |
c37f821f | 71 | */ |
2f09efe8 | 72 | |
c37f821f | 73 | /* |
2f09efe8 | 74 | struct ALTRO_GEO_MAP{ |
75 | int mod; | |
76 | int gain; | |
77 | int row; | |
78 | int col; | |
79 | int rcu; | |
80 | int branch; | |
81 | int card; | |
82 | int chip; | |
83 | int chan; | |
84 | int csp; | |
85 | int num; | |
86 | int hid; | |
87 | }; | |
c37f821f | 88 | */ |
2f09efe8 | 89 | |
c37f821f | 90 | // void AddCsp(int csp, int chip, int chHi, int chLo, int numHi, int numLo); |
2f09efe8 | 91 | |
92 | ||
93 | //Function to generate Active Channel List (ACL)for each of the four readout partitions | |
94 | //Of the Phos Module. The ACL register is 256x16 bit big. | |
b60bd496 | 95 | // void GenerateACL(int startZ, int endZ, int startX, int endX, int mID, int acl[RCUS_PER_MODULE][256], unsigned long int afl[RCUS_PER_MODULE]); |
2f09efe8 | 96 | |
c37f821f | 97 | // void InitAltroCspMapping(); |
2f09efe8 | 98 | |
99 | /* | |
100 | inline int Geo2hid(int mod, int gain, int row, int col); | |
101 | inline int Hid2mod(int hid); | |
102 | inline int Hid2gain(int hid); | |
103 | inline int Hid2row(int hid); | |
104 | inline int Hid2col(int hid); | |
105 | inline int ExtractHid(char *objName); | |
106 | ||
107 | inline void InitAltroMapping(int saveMapping); | |
108 | inline void PrintHistMapInfo(char *objName); | |
109 | */ | |
110 | ||
c37f821f | 111 | /* |
2f09efe8 | 112 | int Geo2hid(int mod, int gain, int row, int col); |
113 | int Hid2mod(int hid); | |
114 | int Hid2gain(int hid); | |
115 | int Hid2row(int hid); | |
116 | int Hid2col(int hid); | |
117 | int ExtractHid(char *objName); | |
118 | ||
119 | void InitAltroMapping(int saveMapping); | |
120 | void PrintHistMapInfo(char *objName); | |
121 | ||
b60bd496 | 122 | FEE_CSP_MAP CSP_MAP[N_ALTROS][N_ALTROCHANNELS]; |
123 | ALTRO_GEO_MAP ALTRO_MAP[N_MODULES*N_RCUS*N_BRANCHES*N_FEECS*N_ALTROS*N_ALTROCHANNELS]; | |
124 | int hdw2geo[N_MODULES][N_RCUS][N_BRANCHES][N_FEECS][N_ALTROS][N_ALTROCHANNELS]; | |
125 | int geo2hdw[N_MODULES][N_GAINS][ N_XCOLUMNS_MOD][N_ZROWS_MOD]; | |
c37f821f | 126 | */ |
2f09efe8 | 127 | |
128 | private: | |
129 | ||
130 | ||
131 | ||
132 | }; | |
133 | ||
134 | #endif |