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();
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 SetWord(UInt_t w) {fWord = w;}
39 void SetInput(UInt_t in, Int_t n) {fInput[n] = in;}
41 Int_t GetHeaderLength() const {return fgkHeaderLength;}
42 UInt_t GetEndOfReg() const {return fgkEndOfReg;}
45 UInt_t* GetHeader() {return &fWord;}
48 UInt_t GetL0() const {return fL0;}
49 UInt_t GetClock() const {return fClk;}
50 const UInt_t* GetScaler() const {return fScaler;}
51 UInt_t GetHold() const {return fHold;}
53 UInt_t* GetScalers() {return &fL0;}
56 Int_t GetScalerLength() const {return fgkScalerLength;}
58 // set random numbers to fill variable
59 void SetScalersNumbers();
62 TClonesArray* GetLocalArray() const {return fLocalArray;}
65 Int_t GetLocalEntries() const {return fLocalArray->GetEntriesFast();}
68 AliMUONLocalStruct* GetLocalEntry(Int_t i) const {
69 return (AliMUONLocalStruct*)fLocalArray->At(i);}
72 void Clear(Option_t* opt);
77 UInt_t fWord; // first word
78 UInt_t fInput[2]; // regional input
80 // regional card scalers
81 UInt_t fL0; // regional L0
82 UInt_t fClk; // regional clock
83 UInt_t fScaler[8]; // regional ouput
84 UInt_t fHold; // regional hold (dead time)
86 static const Int_t fgkScalerLength; // length of regional scaler in word
87 static const Int_t fgkHeaderLength; // header length in word
88 static const UInt_t fgkEndOfReg; // end of regional info word
90 TClonesArray* fLocalArray; // array of local structure
92 ClassDef(AliMUONRegHeader,3)