]>
Commit | Line | Data |
---|---|---|
32def6aa | 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 */ | |
5 | ||
6 | /*$Id$*/ | |
7 | ||
8 | /// \ingroup raw | |
9 | /// \class AliMUONRegHeader | |
10 | /// \brief MUON regional header for trigger | |
11 | /// | |
12 | /// \author Christian Finck | |
13 | ||
14 | #include <TObject.h> | |
15 | #include <TClonesArray.h> | |
16 | ||
17 | class AliMUONLocalStruct; | |
18 | ||
19 | class AliMUONRegHeader : public TObject{ | |
20 | ||
21 | public: | |
22 | AliMUONRegHeader(); | |
23 | AliMUONRegHeader(const AliMUONRegHeader& event); | |
24 | AliMUONRegHeader& operator=(const AliMUONRegHeader& event); | |
25 | ||
26 | virtual ~AliMUONRegHeader(); | |
27 | ||
28 | ||
29 | UInt_t GetWord() const {return fWord;} | |
30 | UInt_t GetInput(Int_t n) const {return fInput[n];} | |
31 | ||
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;} | |
37 | ||
38 | void SetWord(UInt_t w) {fWord = w;} | |
39 | void SetInput(UInt_t in, Int_t n) {fInput[n] = in;} | |
40 | ||
41 | Int_t GetHeaderLength() const {return fgkHeaderLength;} | |
42 | UInt_t GetEndOfReg() const {return fgkEndOfReg;} | |
43 | ||
44 | ||
45 | UInt_t* GetHeader() {return &fWord;} | |
46 | ||
47 | // scalar methods | |
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;} | |
52 | ||
53 | UInt_t* GetScalers() {return &fL0;} | |
54 | ||
55 | // get scaler length | |
56 | Int_t GetScalerLength() const {return fgkScalerLength;} | |
57 | ||
58 | // set random numbers to fill variable | |
59 | void SetScalersNumbers(); | |
60 | ||
61 | // get TClonesArray | |
62 | TClonesArray* GetLocalArray() const {return fLocalArray;} | |
63 | ||
64 | // get entries | |
65 | Int_t GetLocalEntries() const {return fLocalArray->GetEntriesFast();} | |
66 | ||
67 | // get entry | |
68 | AliMUONLocalStruct* GetLocalEntry(Int_t i) const { | |
69 | return (AliMUONLocalStruct*)fLocalArray->At(i);} | |
70 | ||
71 | // clear | |
72 | void Clear(Option_t* opt); | |
73 | ||
74 | private: | |
75 | ||
76 | // regional header | |
829425a5 | 77 | UInt_t fWord; ///< first word |
78 | UInt_t fInput[2]; ///< regional input | |
32def6aa | 79 | |
80 | // regional card scalers | |
829425a5 | 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) | |
32def6aa | 85 | |
829425a5 | 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 | |
32def6aa | 89 | |
829425a5 | 90 | TClonesArray* fLocalArray; ///< array of local structure |
32def6aa | 91 | |
92 | ClassDef(AliMUONRegHeader,3) | |
93 | }; | |
94 | #endif |