]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RAW/AliAltroMapping.h
cdaabc704006ba3821e5e22defa8001ecbc61617
[u/mrichter/AliRoot.git] / RAW / AliAltroMapping.h
1 #ifndef AliALTROMAPPING_H
2 #define AliALTROMAPPING_H
3 /* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 //////////////////////////////////////////////////////////
7 // Class used to setup the mapping of hardware adresses //
8 // in ALTRO to pad-rows and pad indeces.                //
9 // The mapping is defined in an external mapping files  //
10 // separately for TPC,PHOS and FMD.                     //
11 //////////////////////////////////////////////////////////
12
13 #include <TObject.h>
14
15 class AliAltroMapping: public TObject {
16  public:
17   AliAltroMapping(const char *mappingFile);
18   virtual ~AliAltroMapping();
19
20   AliAltroMapping(const AliAltroMapping& mapping);
21   AliAltroMapping& operator = (const AliAltroMapping& mapping);
22
23   Int_t GetHWAdress(Int_t padrow, Int_t pad) const;
24   Int_t GetPadRow(Int_t hwAdress) const;
25   Int_t GetPad(Int_t hwAdress) const;
26
27  private:
28   Bool_t ReadMapping(const char *mappingFile);
29
30   Int_t     fNumberOfChannels; // Number of ALTRO channels
31   Int_t     fMaxHWAdress;      // Maximum HW adress
32   Int_t     fMinPadRow;        // Minimum Index of pad-row
33   Int_t     fMaxPadRow;        // Maximum Index of pad-row
34   Int_t     fMaxPad;           // Maximum Index of pad inside row
35   Short_t **fMapping;          // Array which connects hardware adresses to pad and pad-row indeces
36   Short_t **fInvMapping;       // Inverse of fMapping
37
38   ClassDef(AliAltroMapping,0)  // Altro mapping handler class
39 };
40
41 #endif