]>
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 | ||
24 | #include "stdio.h" | |
25 | #include <iostream> | |
26 | #include <assert.h> | |
27 | #include "AliHLTPHOSCommonDefs.h" | |
28 | #include "AliHLTPHOSConstants.h" | |
29 | ||
30 | // PhosHLTConst | |
31 | using namespace PhosHLTConst; | |
32 | ||
33 | class AliHLTPHOSMapper | |
34 | { | |
35 | public: | |
36 | AliHLTPHOSMapper(); | |
37 | struct FEE_CSP_MAP{ | |
38 | int row; | |
39 | int col; | |
40 | int gain; | |
41 | int csp; | |
42 | int num; | |
43 | }; | |
44 | ||
45 | struct ALTRO_GEO_MAP{ | |
46 | int mod; | |
47 | int gain; | |
48 | int row; | |
49 | int col; | |
50 | int rcu; | |
51 | int branch; | |
52 | int card; | |
53 | int chip; | |
54 | int chan; | |
55 | int csp; | |
56 | int num; | |
57 | int hid; | |
58 | }; | |
59 | ||
60 | ||
61 | void AddCsp(int csp, int chip, int chHi, int chLo, int numHi, int numLo); | |
62 | ||
63 | ||
64 | //Function to generate Active Channel List (ACL)for each of the four readout partitions | |
65 | //Of the Phos Module. The ACL register is 256x16 bit big. | |
b60bd496 | 66 | // 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 | 67 | |
68 | void InitAltroCspMapping(); | |
69 | ||
70 | /* | |
71 | inline int Geo2hid(int mod, int gain, int row, int col); | |
72 | inline int Hid2mod(int hid); | |
73 | inline int Hid2gain(int hid); | |
74 | inline int Hid2row(int hid); | |
75 | inline int Hid2col(int hid); | |
76 | inline int ExtractHid(char *objName); | |
77 | ||
78 | inline void InitAltroMapping(int saveMapping); | |
79 | inline void PrintHistMapInfo(char *objName); | |
80 | */ | |
81 | ||
82 | int Geo2hid(int mod, int gain, int row, int col); | |
83 | int Hid2mod(int hid); | |
84 | int Hid2gain(int hid); | |
85 | int Hid2row(int hid); | |
86 | int Hid2col(int hid); | |
87 | int ExtractHid(char *objName); | |
88 | ||
89 | void InitAltroMapping(int saveMapping); | |
90 | void PrintHistMapInfo(char *objName); | |
91 | ||
b60bd496 | 92 | FEE_CSP_MAP CSP_MAP[N_ALTROS][N_ALTROCHANNELS]; |
93 | ALTRO_GEO_MAP ALTRO_MAP[N_MODULES*N_RCUS*N_BRANCHES*N_FEECS*N_ALTROS*N_ALTROCHANNELS]; | |
94 | int hdw2geo[N_MODULES][N_RCUS][N_BRANCHES][N_FEECS][N_ALTROS][N_ALTROCHANNELS]; | |
95 | int geo2hdw[N_MODULES][N_GAINS][ N_XCOLUMNS_MOD][N_ZROWS_MOD]; | |
2f09efe8 | 96 | |
97 | private: | |
98 | ||
99 | ||
100 | ||
101 | }; | |
102 | ||
103 | #endif |