fMinPadRow = 0x7fffffff;
fMaxPadRow = 0;
fMaxPad = 0;
- fMapping = new Short_t*[fMaxHWAdress+1];
- for (Int_t i = 0; i <= fMaxHWAdress; i++) {
+ fMapping = new Short_t*[fMaxHWAddress+1];
+ for (Int_t i = 0; i <= fMaxHWAddress; i++) {
fMapping[i] = new Short_t[2];
fMapping[i][0] = fMapping[i][1] = -1;
}
for(Int_t i = 0; i < fNumberOfChannels ; i++) { //5504 is size of irorc mapping at ther moment only for irorc
- Int_t hwAdress;
- if (!(*fIn >> hwAdress)) {
+ Int_t hwAddress;
+ if (!(*fIn >> hwAddress)) {
AliFatal("Syntax of the mapping file is wrong !");
return kFALSE;
}
- if (hwAdress > fMaxHWAdress) {
- AliFatal(Form("Hardware (ALTRO) adress (%d) outside the range (0 -> %d) !",hwAdress,fMaxHWAdress));
+ if (hwAddress > fMaxHWAddress) {
+ AliFatal(Form("Hardware (ALTRO) adress (%d) outside the range (0 -> %d) !",hwAddress,fMaxHWAddress));
return kFALSE;
}
Int_t padrow,pad;
return kFALSE;
}
- fMapping[hwAdress][0] = padrow;
- fMapping[hwAdress][1] = pad;
+ fMapping[hwAddress][0] = padrow;
+ fMapping[hwAddress][1] = pad;
if (padrow > fMaxPadRow) fMaxPadRow = padrow;
if (padrow < fMinPadRow) fMinPadRow = padrow;
for (Int_t j = 0; j <= fMaxPad; j++) fInvMapping[i][j] = -1;
}
- for(Int_t i = 0; i <= fMaxHWAdress; i++) {
+ for(Int_t i = 0; i <= fMaxHWAddress; i++) {
Int_t padrow = fMapping[i][0];
Int_t pad = fMapping[i][1];
if(padrow != -1 && pad != -1)
}
//_____________________________________________________________________________
-Int_t AliTPCAltroMapping::GetHWAdress(Int_t padrow, Int_t pad, Int_t /* sector */) const
+Int_t AliTPCAltroMapping::GetHWAddress(Int_t padrow, Int_t pad, Int_t /* sector */) const
{
// Get the content of the mapping array
// return -1 in case there is no hardware
AliWarning(Form("Index of pad (%d) outside the range (0 -> %d) !",pad,fMaxPad));
return -1;
}
- Int_t hwAdress = fInvMapping[padrow-fMinPadRow][pad];
- if (hwAdress == -1)
+ Int_t hwAddress = fInvMapping[padrow-fMinPadRow][pad];
+ if (hwAddress == -1)
AliWarning(Form("Hardware (ALTRO) adress is not defined for these pad-row (%d) and pad (%d) !",padrow,pad));
- return hwAdress;
+ return hwAddress;
}
//_____________________________________________________________________________
-Int_t AliTPCAltroMapping::GetPadRow(Int_t hwAdress) const
+Int_t AliTPCAltroMapping::GetPadRow(Int_t hwAddress) const
{
if (!fMapping) {
AliWarning("Mapping array was not initalized correctly !");
return -1;
}
- if (hwAdress > fMaxHWAdress) {
- AliWarning(Form("Hardware (ALTRO) adress (%d) outside the range (0 -> %d) !",hwAdress,fMaxHWAdress));
+ if (hwAddress > fMaxHWAddress) {
+ AliWarning(Form("Hardware (ALTRO) adress (%d) outside the range (0 -> %d) !",hwAddress,fMaxHWAddress));
return -1;
}
- Int_t padrow = fMapping[hwAdress][0];
+ Int_t padrow = fMapping[hwAddress][0];
if (padrow == -1)
- AliWarning(Form("Hardware (ALTRO) adress (%d) is not defined !",hwAdress));
+ AliWarning(Form("Hardware (ALTRO) adress (%d) is not defined !",hwAddress));
return padrow;
}
//_____________________________________________________________________________
-Int_t AliTPCAltroMapping::GetPad(Int_t hwAdress) const
+Int_t AliTPCAltroMapping::GetPad(Int_t hwAddress) const
{
if (!fMapping) {
AliWarning("Mapping array was not initalized correctly !");
return -1;
}
- if (hwAdress > fMaxHWAdress) {
- AliWarning(Form("Hardware (ALTRO) adress (%d) outside the range (0 -> %d) !",hwAdress,fMaxHWAdress));
+ if (hwAddress > fMaxHWAddress) {
+ AliWarning(Form("Hardware (ALTRO) adress (%d) outside the range (0 -> %d) !",hwAddress,fMaxHWAddress));
return -1;
}
- Int_t pad = fMapping[hwAdress][1];
+ Int_t pad = fMapping[hwAddress][1];
if (pad == -1)
- AliWarning(Form("Hardware (ALTRO) adress (%d) is not defined !",hwAdress));
+ AliWarning(Form("Hardware (ALTRO) adress (%d) is not defined !",hwAddress));
return pad;
}
//_____________________________________________________________________________
-Int_t AliTPCAltroMapping::GetSector(Int_t /* hwAdress */) const
+Int_t AliTPCAltroMapping::GetSector(Int_t /* hwAddress */) const
{
AliWarning("Sector index is not contained in the TPC altro mapping !");
return -1;
// allocated during the reading of the
// mapping file
if (fMapping) {
- for (Int_t i = 0; i <= fMaxHWAdress; i++) delete [] fMapping[i];
+ for (Int_t i = 0; i <= fMaxHWAddress; i++) delete [] fMapping[i];
delete [] fMapping;
}
AliTPCAltroMapping(const AliTPCAltroMapping& mapping);
AliTPCAltroMapping& operator = (const AliTPCAltroMapping& mapping);
- virtual Int_t GetHWAdress(Int_t padrow, Int_t pad, Int_t sector) const;
- virtual Int_t GetPadRow(Int_t hwAdress) const;
- virtual Int_t GetPad(Int_t hwAdress) const;
- virtual Int_t GetSector(Int_t hwAdress) const;
+ virtual Int_t GetHWAddress(Int_t padrow, Int_t pad, Int_t sector) const;
+ virtual Int_t GetPadRow(Int_t hwAddress) const;
+ virtual Int_t GetPad(Int_t hwAddress) const;
+ virtual Int_t GetSector(Int_t hwAddress) const;
protected:
virtual Bool_t ReadMapping();
Short_t **fMapping; // Array which connects hardware adresses to pad and pad-row indeces
Short_t **fInvMapping; // Inverse of fMapping
- ClassDef(AliTPCAltroMapping,0) // Altro mapping handler class
+ ClassDef(AliTPCAltroMapping,1) // Altro mapping handler class
};
#endif