]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCMonitorMappingHandler.h
Fixing coding violation problems (Haavard)
[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(Char_t* name, Char_t* title);
26     AliTPCMonitorMappingHandler(const  AliTPCMonitorMappingHandler &maphand);
27     AliTPCMonitorMappingHandler& operator= (const AliTPCMonitorMappingHandler& maphand);
28
29     ~AliTPCMonitorMappingHandler();
30     
31     void     ReadMapping(char* mapfile);
32     void     ReadRowMappingGlob(char* fpathtoMappingRowfile) ;
33     Int_t    GetNumOfChannels();
34     Int_t    GetSizeofArray();
35     Short_t* GetLine(          Int_t channel);
36     Int_t    GetIndex(         Int_t channel);
37     Int_t    GetPadRow(        Int_t channel);
38     Int_t    GetPad(           Int_t channel);
39     Int_t    GetConnector(     Int_t channel);
40     Int_t    GetPin(           Int_t channel);
41     Int_t    GetFEC(           Int_t channel);
42     Int_t    GetFECchannel(    Int_t channel);
43     Int_t    GetFECconnector(  Int_t channel);
44     Int_t    GetAltroChannel(  Int_t channel);
45     Int_t    GetAltro(         Int_t channel);
46     Int_t    GetPadAddInRow(   Int_t row, Int_t pad);
47     Int_t    GetNumofPads(     Int_t row);
48     
49     Int_t    ReadFECMapping(   char* u2ftestfile);
50     void     ReadfecHwMap(     Int_t sector);
51     void     ReadfecGainMap(   char* fecgainmap);
52      
53     Int_t    U2fGetBranch(     Int_t fecnr);
54     Int_t    U2fGetRCU(        Int_t fecnr);
55     Int_t    U2fGetFECinRCU(   Int_t fecnr);
56     Int_t    U2fGetFECinBranch(Int_t fecnr);
57     Int_t    U2fGetSide(       Int_t fecnr);
58     Int_t    U2fGetSector(     Int_t fecnr); 
59     Int_t    U2fGetFECnr(      Int_t index);
60     
61     Int_t    GetFECfromHw(Int_t hw)            { return fMapHwFECglobal[hw][0];}
62     Int_t    GetFECChfromHw(Int_t hw)          { return fMapHwFECglobal[hw][1];}
63     Float_t  GetFECchGain(Int_t fec, Int_t ch) { 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;                  // global  mapping array
72     Int_t**   fmappingChannelinRow;      // mapping of hardware addresses in one pad row
73     
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
77         
78     ClassDef(AliTPCMonitorMappingHandler,1);
79 };
80
81 #endif