]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RAW/AliAltroMapping.h
Putting the ALTRO mapping in RAW as a base class. TPC,PHOS and FMD mapping classes...
[u/mrichter/AliRoot.git] / RAW / AliAltroMapping.h
index cdaabc704006ba3821e5e22defa8001ecbc61617..4082d58067380b5ae6f5248a703bf49f8ce2eb6a 100644 (file)
@@ -20,20 +20,20 @@ class AliAltroMapping: public TObject {
   AliAltroMapping(const AliAltroMapping& mapping);
   AliAltroMapping& operator = (const AliAltroMapping& mapping);
 
-  Int_t GetHWAdress(Int_t padrow, Int_t pad) const;
-  Int_t GetPadRow(Int_t hwAdress) const;
-  Int_t GetPad(Int_t hwAdress) const;
-
- private:
-  Bool_t ReadMapping(const char *mappingFile);
-
+  virtual Int_t GetHWAdress(Int_t padrow, Int_t pad, Int_t sector) const = 0;
+  virtual Int_t GetPadRow(Int_t hwAdress) const = 0;
+  virtual Int_t GetPad(Int_t hwAdress) const = 0;
+  virtual Int_t GetSector(Int_t hwAdress) const = 0;
+
+ protected:
+  Bool_t OpenMappingFile(const char *mappingFile);
+  Bool_t CloseMappingFile();
+  virtual Bool_t ReadMapping() = 0;
+  virtual void   DeleteMappingArrays() = 0;
+
+  ifstream *fIn;               // External mapping file
   Int_t     fNumberOfChannels; // Number of ALTRO channels
   Int_t     fMaxHWAdress;      // Maximum HW adress
-  Int_t     fMinPadRow;        // Minimum Index of pad-row
-  Int_t     fMaxPadRow;        // Maximum Index of pad-row
-  Int_t     fMaxPad;           // Maximum Index of pad inside row
-  Short_t **fMapping;          // Array which connects hardware adresses to pad and pad-row indeces
-  Short_t **fInvMapping;       // Inverse of fMapping
 
   ClassDef(AliAltroMapping,0)  // Altro mapping handler class
 };