]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RAW/AliAltroMapping.h
remove the removal of galice.root
[u/mrichter/AliRoot.git] / RAW / AliAltroMapping.h
index cdaabc704006ba3821e5e22defa8001ecbc61617..d3c988b0d5036b5697724fc08379b3d0a28fc502 100644 (file)
 
 class AliAltroMapping: public TObject {
  public:
+  AliAltroMapping();
   AliAltroMapping(const char *mappingFile);
   virtual ~AliAltroMapping();
 
-  AliAltroMapping(const AliAltroMapping& mapping);
-  AliAltroMapping& operator = (const AliAltroMapping& mapping);
+  virtual Int_t GetHWAddress(Int_t padrow, Int_t pad, Int_t sector) = 0;
+  virtual Int_t GetPadRow(Int_t hwAddress) const = 0;
+  virtual Int_t GetPad(Int_t hwAddress) const = 0;
+  virtual Int_t GetSector(Int_t hwAddress) const = 0;
 
-  Int_t GetHWAdress(Int_t padrow, Int_t pad) const;
-  Int_t GetPadRow(Int_t hwAdress) const;
-  Int_t GetPad(Int_t hwAdress) const;
+ protected:
+  void           CloseMappingFile();
+  virtual Bool_t ReadMapping() = 0;
+  virtual Bool_t CreateInvMapping() = 0;
+
+  ifstream *fIn;               //! External mapping file
+  Int_t     fNumberOfChannels; // Number of ALTRO channels
+  Int_t     fMaxHWAddress;     // Maximum HW adress
+  Int_t     fMappingSize;      // Size of the mapping array, used by the streamer of derived classes
+  Short_t  *fMapping;          //[fMappingSize] Array which connects hardware adresses to detector element indices
 
  private:
-  Bool_t ReadMapping(const char *mappingFile);
+  Bool_t    OpenMappingFile(const char *mappingFile);
 
-  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
+  AliAltroMapping(const AliAltroMapping& mapping);
+  AliAltroMapping& operator = (const AliAltroMapping& mapping);
+
+  ClassDef(AliAltroMapping,4)  // Altro mapping handler class
 };
 
 #endif