]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCmapper.h
Get rid of compiler warning
[u/mrichter/AliRoot.git] / TPC / AliTPCmapper.h
index 1f5bfff446c3c3273c4f56618501c54f66ab623b..b31111c8e74d08e2082aa12eebdf7e5044332d53 100644 (file)
@@ -3,38 +3,9 @@
 /* Copyright(c) 1998-2006, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-#include <TCint.h>
+#include <TObject.h>
 
-class AliTPCmapper{
-
-private:
-    enum {
-       kNrcu       = 6,
-       kNbranch    = 2,
-       kNfecMax    = 13,
-       kNaltro     = 8,
-       kNchannel   = 16,
-       kNpadrow    = 159,
-       kNpadMax    = 140,
-       kNaddrSize  = 20,
-       kNpadSector = 15488
-    };
-
-    Int_t fAddressToRow[kNrcu][kNbranch][kNfecMax][kNaltro][kNchannel];
-    Int_t fAddressToPad[kNrcu][kNbranch][kNfecMax][kNaltro][kNchannel];
-
-    Int_t fRowPadToRCU[kNpadrow][kNpadMax];
-    Int_t fRowPadToBranch[kNpadrow][kNpadMax];
-    Int_t fRowPadToFEC[kNpadrow][kNpadMax];
-    Int_t fRowPadToAltro[kNpadrow][kNpadMax];
-    Int_t fRowPadToChannel[kNpadrow][kNpadMax];
-
-    Int_t fPadsecToRow[kNpadSector];
-    Int_t fPadsecToPad[kNpadSector];
-
-    Int_t fRowPadToPadsec[kNpadrow][kNpadMax];
-
-    Char_t fMapfileName[255];
+class AliTPCmapper : public TObject{
 
 
 public:
@@ -47,55 +18,55 @@ public:
     Int_t ReadMapping();
 
 
-    Int_t GetRow(Int_t rcu, Int_t branch, Int_t fec, Int_t altro, Int_t channel){
+    Int_t GetRow(Int_t rcu, Int_t branch, Int_t fec, Int_t altro, Int_t channel) const{
        return fAddressToRow[rcu][branch][fec][altro][channel];}
 
-    Int_t GetPad(Int_t rcu, Int_t branch, Int_t fec, Int_t altro, Int_t channel){
+    Int_t GetPad(Int_t rcu, Int_t branch, Int_t fec, Int_t altro, Int_t channel) const {
        return fAddressToPad[rcu][branch][fec][altro][channel];}
 
-    Int_t GetPadSector(Int_t rcu, Int_t branch, Int_t fec, Int_t altro, Int_t channel){
+    Int_t GetPadSector(Int_t rcu, Int_t branch, Int_t fec, Int_t altro, Int_t channel) const {
        return fRowPadToPadsec[fAddressToPad[rcu][branch][fec][altro][channel]]
            [fAddressToPad[rcu][branch][fec][altro][channel]];}
 
 
-    Int_t GetRow(Int_t altroaddr);
+    Int_t GetRow(Int_t altroaddr) const;
 
-    Int_t GetPad(Int_t altroaddr);
+    Int_t GetPad(Int_t altroaddr) const;
 
-    Int_t GetPadFromPadSector(Int_t padsector){
+    Int_t GetPadFromPadSector(Int_t padsector) const{
        return fPadsecToPad[padsector];}
 
-    Int_t GetRowFromPadSector(Int_t padsector){
+    Int_t GetRowFromPadSector(Int_t padsector) const {
        return fPadsecToRow[padsector];}
 
-    Int_t GetPadSector(Int_t row,Int_t pad){
+    Int_t GetPadSector(Int_t row,Int_t pad) const{
        return fRowPadToPadsec[row][pad];}
 
-    Int_t GetPadsInRowS(Int_t row);
+    Int_t GetPadsInRowS(Int_t row) const;
 
-    Double_t GetPadXlocalS (Int_t row, Int_t pad);
-    Double_t GetPadXlocalS (Int_t padsector);
-    Double_t GetPadYlocalS (Int_t row, Int_t pad);
-    Double_t GetPadYlocalS (Int_t padsector);
-    Double_t GetPadXglobalS(Int_t row, Int_t pad, Int_t sector);
-    Double_t GetPadYglobalS(Int_t row, Int_t pad, Int_t sector);
-    Double_t GetPadWidthS  (Int_t row);
-    Double_t GetPadLengthS (Int_t row);
+    Double_t GetPadXlocalS (Int_t row, Int_t pad) const;
+    Double_t GetPadXlocalS (Int_t padsector) const;
+    Double_t GetPadYlocalS (Int_t row, Int_t pad) const;
+    Double_t GetPadYlocalS (Int_t padsector) const;
+    Double_t GetPadXglobalS(Int_t row, Int_t pad, Int_t sector) const;
+    Double_t GetPadYglobalS(Int_t row, Int_t pad, Int_t sector) const;
+    Double_t GetPadWidthS  (Int_t row) const;
+    Double_t GetPadLengthS (Int_t row) const;
 
 
-    Int_t GetRCUs(Int_t row, Int_t pad){
+    Int_t GetRCUs(Int_t row, Int_t pad) const{
        return fRowPadToRCU[row][pad];}
 
-    Int_t GetBranchS(Int_t row, Int_t pad){
+    Int_t GetBranchS(Int_t row, Int_t pad) const {
        return fRowPadToBranch[row][pad];}
 
-    Int_t GetFECs(Int_t row, Int_t pad){
+    Int_t GetFECs(Int_t row, Int_t pad) const {
        return fRowPadToFEC[row][pad];}
 
-    Int_t GetAltroS(Int_t row, Int_t pad){
+    Int_t GetAltroS(Int_t row, Int_t pad) const{
        return fRowPadToAltro[row][pad];}
 
-    Int_t GetChannelS(Int_t row, Int_t pad){
+    Int_t GetChannelS(Int_t row, Int_t pad) const {
        return fRowPadToChannel[row][pad];}
 
     void PrintRBFACinfo(Int_t row, Int_t pad);
@@ -103,36 +74,66 @@ public:
     void PrintAddressArray(Int_t row, Int_t pad);
 
 
-    Int_t GetAltroAddrwPatch(const Int_t row, const Int_t pad);
+    Int_t GetAltroAddrwPatch(Int_t row, Int_t pad) const;
 
-    Int_t GetAltroAddrwPatch(const Int_t padsector);
+    Int_t GetAltroAddrwPatch(Int_t padsector) const;
 
     //for aliroot compatibility (sector == roc)
-    Int_t GetPadsInRowS(Int_t row, Int_t sector){
+    Int_t GetPadsInRowS(Int_t row, Int_t sector) const {
        return GetPadsInRowS(row+(sector/36)*63);}
-    Double_t GetPadXlocal  (Int_t row, Int_t pad, Int_t sector){
+    Double_t GetPadXlocal  (Int_t row, Int_t pad, Int_t sector) const {
        return GetPadXlocalS(row+(sector/36)*63,pad);}
-    Double_t GetPadYlocal  (Int_t row, Int_t pad, Int_t sector){
+    Double_t GetPadYlocal  (Int_t row, Int_t pad, Int_t sector) const {
        return GetPadYlocalS(row+(sector/36)*63,pad);}
-    Double_t GetPadXglobal (Int_t row, Int_t pad, Int_t sector){
+    Double_t GetPadXglobal (Int_t row, Int_t pad, Int_t sector) const {
        return GetPadXlocalS(row+(sector/36)*63,pad);}
-    Double_t GetPadYglobal (Int_t row, Int_t pad, Int_t sector){
+    Double_t GetPadYglobal (Int_t row, Int_t pad, Int_t sector) const{
        return GetPadYlocalS(row+(sector/36)*63,pad);}
-    Int_t GetRCU(Int_t row, Int_t pad, Int_t sector){
+    Int_t GetRCU(Int_t row, Int_t pad, Int_t sector) const {
        return GetRCUs(row+(sector/36)*63,pad);}
-    Int_t GetBranch(Int_t row, Int_t pad, Int_t sector){
+    Int_t GetBranch(Int_t row, Int_t pad, Int_t sector) const {
        return GetBranchS(row+(sector/36)*63,pad);}
-    Int_t GetFEC(Int_t row, Int_t pad, Int_t sector){
+    Int_t GetFEC(Int_t row, Int_t pad, Int_t sector) const {
        return GetFECs(row+(sector/36)*63,pad);}
-    Int_t GetAltro(Int_t row, Int_t pad, Int_t sector){
+    Int_t GetAltro(Int_t row, Int_t pad, Int_t sector) const {
        return GetAltroS(row+(sector/36)*63,pad);}
-    Int_t GetChannel(Int_t row, Int_t pad, Int_t sector){
+    Int_t GetChannel(Int_t row, Int_t pad, Int_t sector) const {
        return GetChannelS(row+(sector/36)*63,pad);}
-    Double_t GetPadWidth   (Int_t row, Int_t sector){
+    Double_t GetPadWidth   (Int_t row, Int_t sector) const {
        return GetPadWidthS(row+(sector/36)*63);}
-    Double_t GetPadLength  (Int_t row, Int_t sector){
+    Double_t GetPadLength  (Int_t row, Int_t sector) const{
        return GetPadLengthS(row+(sector/36)*63);}
 
+private:
+    enum {
+       kNrcu       = 6,
+       kNbranch    = 2,
+       kNfecMax    = 13,
+       kNaltro     = 8,
+       kNchannel   = 16,
+       kNpadrow    = 159,
+       kNpadMax    = 140,
+       kNaddrSize  = 20,
+       kNpadSector = 15488
+    };
+
+    Int_t fAddressToRow[kNrcu][kNbranch][kNfecMax][kNaltro][kNchannel]; //fAddressToRow
+    Int_t fAddressToPad[kNrcu][kNbranch][kNfecMax][kNaltro][kNchannel]; //fAddressToPad
+
+    Int_t fRowPadToRCU[kNpadrow][kNpadMax]; //fRowPadToRCU
+    Int_t fRowPadToBranch[kNpadrow][kNpadMax]; //fRowPadToBranch
+    Int_t fRowPadToFEC[kNpadrow][kNpadMax];   //fRowPadToFEC
+    Int_t fRowPadToAltro[kNpadrow][kNpadMax]; // fRowPadToAltro
+    Int_t fRowPadToChannel[kNpadrow][kNpadMax]; //RowPadToChannel
+
+    Int_t fPadsecToRow[kNpadSector];  //PadsecToRow
+    Int_t fPadsecToPad[kNpadSector];  //PadsecToPad
+
+    Int_t fRowPadToPadsec[kNpadrow][kNpadMax]; //RowPadToPadsec
+
+    Char_t fMapfileName[255];                  //MapfileName
+
+
 
        ClassDef(AliTPCmapper,0)
 };