Fix array sizes.
[u/mrichter/AliRoot.git] / RAW / AliAltroMapping.h
CommitLineData
5802cf2d 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
15class AliAltroMapping: public TObject {
16 public:
cc934096 17 AliAltroMapping();
5802cf2d 18 AliAltroMapping(const char *mappingFile);
19 virtual ~AliAltroMapping();
20
cc934096 21 virtual Int_t GetHWAddress(Int_t padrow, Int_t pad, Int_t sector) const = 0;
22 virtual Int_t GetPadRow(Int_t hwAddress) const = 0;
23 virtual Int_t GetPad(Int_t hwAddress) const = 0;
24 virtual Int_t GetSector(Int_t hwAddress) const = 0;
16e29964 25
26 protected:
27 Bool_t OpenMappingFile(const char *mappingFile);
28 Bool_t CloseMappingFile();
29 virtual Bool_t ReadMapping() = 0;
30 virtual void DeleteMappingArrays() = 0;
31
8b9301f8 32 ifstream *fIn; //! External mapping file
5802cf2d 33 Int_t fNumberOfChannels; // Number of ALTRO channels
cc934096 34 Int_t fMaxHWAddress; // Maximum HW adress
44174d11 35 Int_t fMappingSize; // Maximum size of the mapping array, used by the streamer of derived classes
36 Int_t fInvMappingSize; // Maximum size of the inverse mapping arrays, used by the streamer of derived classes
37
38 private:
39 AliAltroMapping(const AliAltroMapping& mapping);
40 AliAltroMapping& operator = (const AliAltroMapping& mapping);
5802cf2d 41
44174d11 42 ClassDef(AliAltroMapping,3) // Altro mapping handler class
5802cf2d 43};
44
45#endif