1 #ifndef ALIMUONREGHEADER_H
2 #define ALIMUONREGHEADER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
9 /// \class AliMUONRegHeader
10 /// \brief MUON regional header for trigger
12 /// \author Christian Finck
15 #include <TClonesArray.h>
17 class AliMUONLocalStruct;
19 class AliMUONRegHeader : public TObject{
23 AliMUONRegHeader(const AliMUONRegHeader& event);
24 AliMUONRegHeader& operator=(const AliMUONRegHeader& event);
26 virtual ~AliMUONRegHeader();
28 UInt_t GetDarcWord() const {return fDarcWord;}
29 UInt_t GetWord() const {return fWord;}
30 UInt_t GetInput(Int_t n) const {return fInput[n];}
32 //MBZ:3,serialNb:5,Version:8,Id:4,MBZ:4,Out:8
33 Char_t GetSerialNb() const {return (Char_t)(fWord >> 24) & 0x1F;}
34 Char_t GetVersion() const {return (Char_t)(fWord >> 16) & 0xFF;}
35 Char_t GetId() const {return (Char_t)(fWord >> 12) & 0x0F;}
36 Char_t GetOutput() const {return (Char_t)(fWord) & 0xFF;}
38 void SetDarcWord(UInt_t w) {fDarcWord = w;}
39 void SetWord(UInt_t w) {fWord = w;}
40 void SetInput(UInt_t in, Int_t n) {fInput[n] = in;}
42 Int_t GetHeaderLength() const {return fgkHeaderLength;}
43 UInt_t GetEndOfReg() const {return fgkEndOfReg;}
46 UInt_t* GetHeader() {return &fDarcWord;}
49 UInt_t GetL0() const {return fL0;}
50 UInt_t GetClock() const {return fClk;}
51 const UInt_t* GetScaler() const {return fScaler;}
52 UInt_t GetHold() const {return fHold;}
54 UInt_t* GetScalers() {return &fL0;}
57 Int_t GetScalerLength() const {return fgkScalerLength;}
59 // set random numbers to fill variable
60 void SetScalersNumbers();
63 TClonesArray* GetLocalArray() const {return fLocalArray;}
66 Int_t GetLocalEntries() const {return fLocalArray->GetEntriesFast();}
69 AliMUONLocalStruct* GetLocalEntry(Int_t i) const {
70 return (AliMUONLocalStruct*)fLocalArray->At(i);}
73 void Clear(Option_t* opt);
78 UInt_t fDarcWord; ///< darc word
79 UInt_t fWord; ///< first reg word
80 UInt_t fInput[2]; ///< regional input
82 // regional card scalers
83 UInt_t fL0; ///< regional L0
84 UInt_t fClk; ///< regional clock
85 UInt_t fScaler[8]; ///< regional ouput
86 UInt_t fHold; ///< regional hold (dead time)
88 static const Int_t fgkScalerLength; ///< length of regional scaler in word
89 static const Int_t fgkHeaderLength; ///< header length in word
90 static const UInt_t fgkEndOfReg; ///< end of regional info word
92 TClonesArray* fLocalArray; ///< array of local structure
94 ClassDef(AliMUONRegHeader,3)