/// \author Christian Finck
#include <TObject.h>
+#include <TMath.h>
class AliMUONLocalStruct : public TObject{
UShort_t GetY4() const {return (fData[3] >> 16) & 0xFFFF;}
UShort_t GetY3() const {return (fData[3]) & 0xFFFF;}
- Char_t GetId() const {return fData[4] >> 19 & 0xF;}
- Char_t GetDec() const {return fData[4] >> 15 & 0xF;}
- Char_t GetTriggerY() const {return fData[4] >> 14 & 0x1;}
- Char_t GetYPos() const {return fData[4] >> 10 & 0xF;}
- Char_t GetXDev() const {return fData[4] >> 5 & 0x1F;}
- Char_t GetXPos() const {return fData[4] & 0x1F;}
+ UChar_t GetId() const {return fData[4] >> 19 & 0xF;}
+ UChar_t GetDec() const {return fData[4] >> 15 & 0xF;}
+ UChar_t GetTriggerY() const {return fData[4] >> 14 & 0x1;}
+ UChar_t GetYPos() const {return fData[4] >> 10 & 0xF;}
+ UChar_t GetXDev() const {return fData[4] >> 5 & 0x1F;}
+ UChar_t GetXPos() const {return fData[4] & 0x1F;}
Int_t GetLpt() const {return (GetDec() & 0x3);}
Int_t GetHpt() const {return (GetDec() >> 2) & 0x3;}
UChar_t GetSwitch() const {return (fEOS >> 2) & 0x3FF;}
UChar_t GetComptXY() const {return fEOS & 3;}
- UShort_t GetXY1(Int_t n) const {return (n % 2 == 0) ?
- (fScaler[n] & 0xFFFF) : (fScaler[n] >> 16) & 0xFFFF;}
- UShort_t GetXY2(Int_t n) const {return (n % 2 == 0) ?
- (fScaler[8 + n] & 0xFFFF) : (fScaler[8 + n] >> 16) & 0xFFFF;}
- UShort_t GetXY3(Int_t n) const {return (n % 2 == 0) ?
- (fScaler[8*2 + n] & 0xFFFF) : (fScaler[8*2 + n] >> 16) & 0xFFFF;}
- UShort_t GetXY4(Int_t n) const {return (n % 2 == 0) ?
- (fScaler[8*3 + n] & 0xFFFF) : (fScaler[8*3 + n] >> 16) & 0xFFFF;}
+ UShort_t GetXY1(Int_t n) const {return (n % 2 == 0) ?
+ (fScaler[TMath::Nint(Float_t(n/2))] & 0xFFFF) :
+ (fScaler[TMath::Nint(Float_t(n/2))] >> 16) & 0xFFFF;}
+
+ UShort_t GetXY2(Int_t n) const {return (n % 2 == 0) ?
+ (fScaler[8 + TMath::Nint(Float_t(n/2))] & 0xFFFF) :
+ (fScaler[8 + TMath::Nint(Float_t(n/2))] >> 16) & 0xFFFF;}
+
+ UShort_t GetXY3(Int_t n) const {return (n % 2 == 0) ?
+ (fScaler[8*2 + TMath::Nint(Float_t(n/2))] & 0xFFFF) :
+ (fScaler[8*2 + TMath::Nint(Float_t(n/2))] >> 16) & 0xFFFF;}
+
+ UShort_t GetXY4(Int_t n) const {return (n % 2 == 0) ?
+ (fScaler[8*3 + TMath::Nint(Float_t(n/2))] & 0xFFFF) :
+ (fScaler[8*3 + TMath::Nint(Float_t(n/2))] >> 16) & 0xFFFF;}
UInt_t* GetScalers() {return &fL0;}
static const Int_t fgkLength; ///< local info length in word
static const Int_t fgkScalerLength; ///< scaler length in word
static const UInt_t fgkEndOfLocal; ///< end of local info word
- static const UInt_t fgkDisableWord; ///< Word for "empty" slots
+ static const UInt_t fgkDisableWord; ///< Word for "empty" slots
ClassDef(AliMUONLocalStruct,3)
};