]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCMonitorMappingHandler.h
svn ci AliTPCtrackerMI.cxx AliTPCRecoParam.cxx AliTPCRecoParam.h
[u/mrichter/AliRoot.git] / TPC / AliTPCMonitorMappingHandler.h
1 #ifndef ALITPCMONITORMAPPINGHANDLER_H
2 #define ALITPCMONITORMAPPINGHANDLER_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */
8
9 ////////////////////////////////////////////////////////////////////////
10 ////
11 //// AliTPCMonitorMappingHandler class
12 ////
13 //// Class for handling mapping information TPC  
14 ////  
15 //// Authors: Roland Bramm, 
16 ////          Stefan Kniege, IKF, Frankfurt
17 ////       
18 /////////////////////////////////////////////////////////////////////////
19
20 #include "TNamed.h" 
21
22 class AliTPCMonitorMappingHandler:   public TNamed {
23  public:
24     
25     AliTPCMonitorMappingHandler(const Char_t* name, const Char_t* title);
26     AliTPCMonitorMappingHandler(const  AliTPCMonitorMappingHandler &maphand);
27     AliTPCMonitorMappingHandler& operator= (const AliTPCMonitorMappingHandler& maphand);
28
29     ~AliTPCMonitorMappingHandler();
30     
31     void     ReadMapping(const char* mapfile);
32     void     ReadRowMappingGlob(const char* fpathtoMappingRowfile) ;
33     Int_t    GetNumOfChannels() const;
34     Int_t    GetSizeofArray() const ;
35     const 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);
48     
49     Int_t    ReadFECMapping(   const char* u2ftestfile);
50     void     ReadfecHwMap(     Int_t sector);
51     void     ReadfecGainMap(   const char* fecgainmap);
52      
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;
60     
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];}
64     
65  private:
66     
67  
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[24000][11];         // global  mapping array
72     Int_t   fmappingChannelinRow[159][150];  // mapping of hardware addresses in one pad row
73     
74     Short_t fu2ftestmapping[7000][8];  // mapping of global FEC numbers in sectors (determined during installation with U2F card)
75     Int_t   fMapHwFECglobal[24000][2]; // mapping of global FEC numbers to hardware addresses in these FECs
76     Float_t fecGainMap[7000][128];     // global gain calibration map
77         
78     ClassDef(AliTPCMonitorMappingHandler,1);
79 };
80
81 #endif