]>
Commit | Line | Data |
---|---|---|
48265b32 | 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 | ||
21 | #include <iostream> | |
22 | #include <iomanip> | |
23 | #include <fstream> | |
24 | #include "TObject.h" | |
25 | #include "TNamed.h" | |
26 | #include "TH1.h" | |
27 | #include "TFile.h" | |
28 | #include "TLegend.h" | |
29 | #include "AliLog.h" | |
30 | ||
31 | using namespace std; | |
32 | ||
33 | class AliTPCMonitorMappingHandler: public TNamed { | |
34 | public: | |
35 | ||
36 | AliTPCMonitorMappingHandler(Char_t* name, Char_t* title); | |
37 | ~AliTPCMonitorMappingHandler(); | |
38 | ||
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); | |
56 | ||
57 | Int_t ReadFECMapping( char* u2ftestfile); | |
58 | void ReadfecHwMap( Int_t sector); | |
59 | void ReadfecGainMap( char* fecgainmap); | |
60 | ||
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); | |
68 | ||
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];} | |
72 | ||
73 | private: | |
74 | ||
75 | ||
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 | |
82 | ||
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 | |
86 | ||
87 | ClassDef(AliTPCMonitorMappingHandler,1); | |
88 | }; | |
89 | ||
90 | #endif |