1 #ifndef ALITPCMONITORMAPPINGHANDLER_H
2 #define ALITPCMONITORMAPPINGHANDLER_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 ////////////////////////////////////////////////////////////////////////
11 // AliTPCMonitorMappingHandler class
13 // Class for handling mapping information TPC
15 // Authors: Roland Bramm,
16 // Stefan Kniege, IKF, Frankfurt
18 /////////////////////////////////////////////////////////////////////////
33 class AliTPCMonitorMappingHandler: public TNamed {
36 AliTPCMonitorMappingHandler(Char_t* name, Char_t* title);
37 ~AliTPCMonitorMappingHandler();
39 void ReadMapping(char* mapfile);
40 void ReadRowMappingGlob(char* fpathtoMappingRowfile) ;
41 Int_t GetNumOfChannels();
42 Int_t GetSizeofArray();
43 Short_t* GetLine( Int_t channel);
44 Int_t GetIndex( Int_t channel);
45 Int_t GetPadRow( Int_t channel);
46 Int_t GetPad( Int_t channel);
47 Int_t GetConnector( Int_t channel);
48 Int_t GetPin( Int_t channel);
49 Int_t GetFEC( Int_t channel);
50 Int_t GetFECchannel( Int_t channel);
51 Int_t GetFECconnector( Int_t channel);
52 Int_t GetAltroChannel( Int_t channel);
53 Int_t GetAltro( Int_t channel);
54 Int_t GetPadAddInRow( Int_t row, Int_t pad);
55 Int_t GetNumofPads( Int_t row);
57 Int_t ReadFECMapping( char* u2ftestfile);
58 void ReadfecHwMap( Int_t sector);
59 void ReadfecGainMap( char* fecgainmap);
61 Int_t U2fGetBranch( Int_t fecnr);
62 Int_t U2fGetRCU( Int_t fecnr);
63 Int_t U2fGetFECinRCU( Int_t fecnr);
64 Int_t U2fGetFECinBranch(Int_t fecnr);
65 Int_t U2fGetSide( Int_t fecnr);
66 Int_t U2fGetSector( Int_t fecnr);
67 Int_t U2fGetFECnr( Int_t index);
69 Int_t GetFECfromHw(Int_t hw) { return fMapHwFECglobal[hw][0];}
70 Int_t GetFECChfromHw(Int_t hw) { return fMapHwFECglobal[hw][1];}
71 Float_t GetFECchGain(Int_t fec, Int_t ch) { return fecGainMap[fec][ch];}
76 Int_t fnumofChannels; // Max number of channels
77 Int_t fmaxHWAdress; // Max value of hardware addresses
78 Int_t fsizeofArray; // Set to max value of hardware addresses
79 Short_t** fmapping; // global mapping array
80 Short_t* fmappingRow; // mapping array in one row of the file
81 Int_t** fmappingChannelinRow; // mapping of hardware addresses in one pad row
83 Short_t** fu2ftestmapping; // mapping of global FEC numbers in sectors (determined during installation with U2F card)
84 Int_t** fMapHwFECglobal; // mapping of global FEC numbers to hardware addresses in these FECs
85 Float_t** fecGainMap; // global gain calibration map
87 ClassDef(AliTPCMonitorMappingHandler,1);