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 */
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 //////////////////////////////////////////////////////////
15 class AliAltroMapping: public TObject {
17 AliAltroMapping(const char *mappingFile);
18 virtual ~AliAltroMapping();
20 AliAltroMapping(const AliAltroMapping& mapping);
21 AliAltroMapping& operator = (const AliAltroMapping& mapping);
23 virtual Int_t GetHWAdress(Int_t padrow, Int_t pad, Int_t sector) const = 0;
24 virtual Int_t GetPadRow(Int_t hwAdress) const = 0;
25 virtual Int_t GetPad(Int_t hwAdress) const = 0;
26 virtual Int_t GetSector(Int_t hwAdress) const = 0;
29 Bool_t OpenMappingFile(const char *mappingFile);
30 Bool_t CloseMappingFile();
31 virtual Bool_t ReadMapping() = 0;
32 virtual void DeleteMappingArrays() = 0;
34 ifstream *fIn; // External mapping file
35 Int_t fNumberOfChannels; // Number of ALTRO channels
36 Int_t fMaxHWAdress; // Maximum HW adress
38 ClassDef(AliAltroMapping,0) // Altro mapping handler class