1 #ifndef ALIHLTPHOSMAPPER_H
2 #define ALIHLTPHOSMAPPER_H
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 *
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 *
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 **************************************************************************/
22 //#include "PhosFeeClient.h"
28 //#include "AliHLTPHOSCommonDefs.h"
29 //#include "AliHLTPHOSConstants.h"
30 #include "AliHLTPHOSBase.h"
34 using namespace PhosHLTConst;
36 class AliHLTPHOSMapper : public AliHLTPHOSBase
40 virtual ~AliHLTPHOSMapper();
41 void InitAltroMapping();
60 altromap *hw2geomapPtr;
90 // void AddCsp(int csp, int chip, int chHi, int chLo, int numHi, int numLo);
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.
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]);
97 // void InitAltroCspMapping();
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);
107 inline void InitAltroMapping(int saveMapping);
108 inline void PrintHistMapInfo(char *objName);
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);
119 void InitAltroMapping(int saveMapping);
120 void PrintHistMapInfo(char *objName);
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];