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 /////////////////////////////////////////////////////////////////////////
22 class AliTPCMonitorMappingHandler: public TNamed {
25 AliTPCMonitorMappingHandler(Char_t* name, Char_t* title);
26 AliTPCMonitorMappingHandler(const AliTPCMonitorMappingHandler &maphand);
27 AliTPCMonitorMappingHandler& operator= (const AliTPCMonitorMappingHandler& maphand);
29 ~AliTPCMonitorMappingHandler();
31 void ReadMapping(char* mapfile);
32 void ReadRowMappingGlob(char* fpathtoMappingRowfile) ;
33 Int_t GetNumOfChannels() const;
34 Int_t GetSizeofArray() const ;
35 Short_t* GetLine( Int_t channel) const;
36 Int_t GetIndex( Int_t channel) const;
37 Int_t GetPadRow( Int_t channel) const;
38 Int_t GetPad( Int_t channel) const;
39 Int_t GetConnector( Int_t channel) const;
40 Int_t GetPin( Int_t channel) const;
41 Int_t GetFEC( Int_t channel) const;
42 Int_t GetFECchannel( Int_t channel) const;
43 Int_t GetFECconnector( Int_t channel) const;
44 Int_t GetAltroChannel( Int_t channel) const;
45 Int_t GetAltro( Int_t channel) const;
46 Int_t GetPadAddInRow( Int_t row, Int_t pad);
47 Int_t GetNumofPads( Int_t row);
49 Int_t ReadFECMapping( char* u2ftestfile);
50 void ReadfecHwMap( Int_t sector);
51 void ReadfecGainMap( char* fecgainmap);
53 Int_t U2fGetBranch( Int_t fecnr) const;
54 Int_t U2fGetRCU( Int_t fecnr) const;
55 Int_t U2fGetFECinRCU( Int_t fecnr) const;
56 Int_t U2fGetFECinBranch(Int_t fecnr) const;
57 Int_t U2fGetSide( Int_t fecnr) const;
58 Int_t U2fGetSector( Int_t fecnr) const;
59 Int_t U2fGetFECnr( Int_t index) const;
61 Int_t GetFECfromHw(Int_t hw) const { return fMapHwFECglobal[hw][0];}
62 Int_t GetFECChfromHw(Int_t hw) const { return fMapHwFECglobal[hw][1];}
63 Float_t GetFECchGain(Int_t fec, Int_t ch) const { return fecGainMap[fec][ch];}
68 Int_t fnumofChannels; // Max number of channels
69 Int_t fmaxHWAdress; // Max value of hardware addresses
70 Int_t fsizeofArray; // Set to max value of hardware addresses
71 Short_t** fmapping; // global mapping array
72 Int_t** fmappingChannelinRow; // mapping of hardware addresses in one pad row
74 Short_t** fu2ftestmapping; // mapping of global FEC numbers in sectors (determined during installation with U2F card)
75 Int_t** fMapHwFECglobal; // mapping of global FEC numbers to hardware addresses in these FECs
76 Float_t** fecGainMap; // global gain calibration map
78 ClassDef(AliTPCMonitorMappingHandler,1);