1 #ifndef ALIMUONLOCALSTRUCT_H
2 #define ALIMUONLOCALSTRUCT_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
9 /// \class AliMUONLocalStruct
10 /// \brief rawdata local card structure for trigger
12 // Author Christian Finck
17 class AliMUONLocalStruct : public TObject{
21 AliMUONLocalStruct(const AliMUONLocalStruct& event);
22 AliMUONLocalStruct& operator=(const AliMUONLocalStruct& event);
25 virtual ~AliMUONLocalStruct();
29 UInt_t GetData(Int_t n) const {return fData[n];}
32 UShort_t GetX2() const {return (fData[0] >> 16) & 0xFFFF;}
34 UShort_t GetX1() const {return (fData[0]) & 0xFFFF;}
36 UShort_t GetX4() const {return (fData[1] >> 16) & 0xFFFF;}
38 UShort_t GetX3() const {return (fData[1]) & 0xFFFF;}
41 UShort_t GetY2() const {return (fData[2] >> 16) & 0xFFFF;}
43 UShort_t GetY1() const {return (fData[2]) & 0xFFFF;}
45 UShort_t GetY4() const {return (fData[3] >> 16) & 0xFFFF;}
47 UShort_t GetY3() const {return (fData[3]) & 0xFFFF;}
50 UChar_t GetId() const {return fData[4] >> 19 & 0xF;}
52 UChar_t GetDec() const {return fData[4] >> 15 & 0xF;}
54 Bool_t GetTriggerY() const {return (fData[4] >> 14 & 0x1);}
56 UChar_t GetYPos() const {return fData[4] >> 10 & 0xF;}
58 UChar_t GetXDev() const {return fData[4] >> 5 & 0x1F;}
60 Bool_t GetTriggerX() const {return ((GetXDev() >> 4 & 0x1) && !(GetXDev() & 0xF));}
62 UChar_t GetXPos() const {return fData[4] & 0x1F;}
65 Int_t GetLpt() const {return (GetDec() & 0x3);}
67 Int_t GetHpt() const {return (GetDec() >> 2) & 0x3;}
70 void SetData(UInt_t d, Int_t n) {fData[n] = d;}
73 UInt_t* GetData() {return &fData[0];}
77 UInt_t GetL0() const {return fL0;}
78 /// Return local hold (dead time)
79 UInt_t GetHold() const {return fHold;}
80 /// Return local clock
81 UInt_t GetClock() const {return fClk;}
83 UChar_t GetSwitch() const {return (fEOS >> 2) & 0x3FF;}
85 UChar_t GetComptXY() const {return fEOS & 3;}
88 UShort_t GetXY1(Int_t n) const {return (n % 2 == 0) ?
89 (fScaler[TMath::Nint(Float_t(n/2))] & 0xFFFF) :
90 (fScaler[TMath::Nint(Float_t(n/2))] >> 16) & 0xFFFF;}
93 UShort_t GetXY2(Int_t n) const {return (n % 2 == 0) ?
94 (fScaler[8 + TMath::Nint(Float_t(n/2))] & 0xFFFF) :
95 (fScaler[8 + TMath::Nint(Float_t(n/2))] >> 16) & 0xFFFF;}
98 UShort_t GetXY3(Int_t n) const {return (n % 2 == 0) ?
99 (fScaler[8*2 + TMath::Nint(Float_t(n/2))] & 0xFFFF) :
100 (fScaler[8*2 + TMath::Nint(Float_t(n/2))] >> 16) & 0xFFFF;}
103 UShort_t GetXY4(Int_t n) const {return (n % 2 == 0) ?
104 (fScaler[8*3 + TMath::Nint(Float_t(n/2))] & 0xFFFF) :
105 (fScaler[8*3 + TMath::Nint(Float_t(n/2))] >> 16) & 0xFFFF;}
108 UInt_t* GetScalers() {return &fL0;}
111 /// Return scaler length in word
112 Int_t GetScalerLength() const {return fgkScalerLength;}
113 /// Return local info length in word
114 Int_t GetLength() const {return fgkLength;}
115 /// Return end of local info word
116 UInt_t GetEndOfLocal() const {return fgkEndOfLocal;}
117 /// Return Word for "empty" slots
118 UInt_t GetDisableWord() const {return fgkDisableWord;}
120 // set random numbers to fill variable
121 void SetScalersNumbers();
126 UInt_t fData[5]; ///< local data
128 // local card scalers
129 UInt_t fL0; ///< local L0
130 UInt_t fHold; ///< local hold (dead time)
131 UInt_t fClk; ///< local clock
133 UInt_t fLPtNTrig; ///< local low Pt no trigger
134 UInt_t fHPtNTrig; ///< local high Pt no trigger
136 UInt_t fLPtRTrig; ///< local low Pt right trigger
137 UInt_t fHPtRTrig; ///< local high Pt right trigger
139 UInt_t fLPtLTrig; ///< local low Pt left trigger
140 UInt_t fHPtLTrig; ///< local high Pt left trigger
142 UInt_t fLPtSTrig; ///< local low Pt straight trigger
143 UInt_t fHPtSTrig; ///< local high Pt straight trigger
145 UInt_t fScaler[8*4]; ///< local data
146 UInt_t fEOS; ///< contains switches conf. & flag for reading X (0) or Y (1) in fScaler
147 UInt_t fReset; ///< reset signal
149 static const Int_t fgkLength; ///< local info length in word
150 static const Int_t fgkScalerLength; ///< scaler length in word
151 static const UInt_t fgkEndOfLocal; ///< end of local info word
152 static const UInt_t fgkDisableWord; ///< Word for "empty" slots
154 ClassDef(AliMUONLocalStruct,3)