]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RAW/AliAltroMapping.h
Fixes for #95580 Problem with trigger selection in Raw Reco
[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>
52d2af54 14using std::ifstream;
5802cf2d 15
16class AliAltroMapping: public TObject {
17 public:
cc934096 18 AliAltroMapping();
5802cf2d 19 AliAltroMapping(const char *mappingFile);
20 virtual ~AliAltroMapping();
21
573322da 22 virtual Int_t GetHWAddress(Int_t padrow, Int_t pad, Int_t sector) = 0;
cc934096 23 virtual Int_t GetPadRow(Int_t hwAddress) const = 0;
24 virtual Int_t GetPad(Int_t hwAddress) const = 0;
25 virtual Int_t GetSector(Int_t hwAddress) const = 0;
16e29964 26
27 protected:
573322da 28 void CloseMappingFile();
16e29964 29 virtual Bool_t ReadMapping() = 0;
573322da 30 virtual Bool_t CreateInvMapping() = 0;
16e29964 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
573322da 35 Int_t fMappingSize; // Size of the mapping array, used by the streamer of derived classes
36 Short_t *fMapping; //[fMappingSize] Array which connects hardware adresses to detector element indices
44174d11 37
38 private:
573322da 39 Bool_t OpenMappingFile(const char *mappingFile);
40
44174d11 41 AliAltroMapping(const AliAltroMapping& mapping);
42 AliAltroMapping& operator = (const AliAltroMapping& mapping);
5802cf2d 43
573322da 44 ClassDef(AliAltroMapping,4) // Altro mapping handler class
5802cf2d 45};
46
47#endif