Line data Source code
1 : #ifndef ALIMUONDSPHEADER_H
2 : #define ALIMUONDSPHEADER_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 AliMUONDspHeader
10 : /// \brief MUON DSP header for tracker event
11 : ///
12 : // Author Christian Finck
13 :
14 : #include <TObject.h>
15 : #include <TClonesArray.h>
16 :
17 : class AliMUONBusStruct;
18 :
19 : class AliMUONDspHeader : public TObject {
20 :
21 : public:
22 : AliMUONDspHeader();
23 : AliMUONDspHeader(TRootIOCtor* dummy);
24 : AliMUONDspHeader(const AliMUONDspHeader& event);
25 : AliMUONDspHeader& operator=(const AliMUONDspHeader& event);
26 :
27 : virtual ~AliMUONDspHeader();
28 :
29 : // DSP header
30 : /// Return Data key word for FRT header
31 0 : Int_t GetDataKey() const {return fDataKey;}
32 : /// Return total length of block structure
33 0 : Int_t GetTotalLength() const {return fTotalLength;}
34 : /// Return length of raw data
35 0 : Int_t GetLength() const {return fLength;}
36 : /// Return Dsp id
37 0 : Int_t GetDspId() const {return fDspId;}
38 : /// Return L1 accept in Block Structure (CRT)
39 0 : Int_t GetBlkL1ATrigger() const {return fBlkL1ATrigger;}
40 : /// Return Mini Event Id in bunch crossing
41 0 : Int_t GetMiniEventId() const {return fMiniEventId;}
42 : /// Return Number of L1 accept in DSP Structure (FRT)
43 0 : Int_t GetL1ATrigger() const {return fL1ATrigger;}
44 : /// Return Number of L1 reject in DSP Structure (FRT)
45 0 : Int_t GetL1RTrigger() const {return fL1RTrigger;}
46 : /// Return padding dummy word for 64 bits transfer
47 0 : UInt_t GetPaddingWord() const {return fPaddingWord;}
48 : /// Return Error word
49 0 : Int_t GetErrorWord() const {return fErrorWord;}
50 :
51 : /// Return header length
52 3044 : Int_t GetHeaderLength() const {return fgkHeaderLength;}
53 : /// Return default data key word for FRT header
54 2 : UInt_t GetDefaultDataKey() const {return fgkDefaultDataKey;}
55 : /// Return default padding word value
56 100 : UInt_t GetDefaultPaddingWord() const {return fgkDefaultPaddingWord;}
57 :
58 : /// Set Data key word for FRT header
59 2 : void SetDataKey(Int_t d) {fDataKey = d;}
60 : /// Set total length of block structure
61 0 : void SetTotalLength(Int_t l) {fTotalLength = l;}
62 : /// Set length of raw data
63 0 : void SetLength(Int_t l) {fLength = l;}
64 : /// Set Dsp id
65 0 : void SetDspId(Int_t d) {fDspId = d;}
66 : /// Set L1 accept in Block Structure (CRT)
67 0 : void SetBlkL1ATrigger(Int_t l1) {fBlkL1ATrigger = l1;}
68 : /// Set Mini Event Id in bunch crossing
69 0 : void SetMiniEventId(Int_t id) {fMiniEventId = id;}
70 : /// Set Number of L1 accept in DSP Structure (FRT)
71 0 : void SetL1ATrigger(Int_t l1a) {fL1ATrigger = l1a;}
72 : /// Set Number of L1 reject in DSP Structure (FRT)
73 0 : void SetL1RTrigger(Int_t l1r) {fL1RTrigger = l1r;}
74 : /// Set padding dummy word for 64 bits transfer
75 0 : void SetPaddingWord(UInt_t w) {fPaddingWord = w;}
76 : /// Set Error word
77 0 : void SetErrorWord(Int_t w) {fErrorWord = w;}
78 :
79 : /// Return header
80 1472 : Int_t* GetHeader() {return &fDataKey;}
81 :
82 : void AddBusPatch(const AliMUONBusStruct& busPatch);
83 :
84 : /// get TClonesArray
85 0 : TClonesArray* GetBusPatchArray() const {return fBusPatchArray;}
86 :
87 : /// get entries
88 0 : Int_t GetBusPatchEntries() const {return fBusPatchArray->GetEntriesFast();}
89 :
90 : /// get entry
91 : AliMUONBusStruct* GetBusPatchEntry(Int_t i) const {
92 0 : return (AliMUONBusStruct*)fBusPatchArray->At(i);}
93 :
94 : // clear
95 : void Clear(Option_t* opt);
96 :
97 : // print out
98 : void Print(Option_t* /*opt*/) const;
99 :
100 : private:
101 :
102 : // Dsp header
103 : Int_t fDataKey; ///< Data key word for FRT header
104 : Int_t fTotalLength; ///< total length of block structure
105 : Int_t fLength; ///< length of raw data
106 : Int_t fDspId; ///< Dsp id
107 : Int_t fBlkL1ATrigger; ///< L1 accept in Block Structure (CRT)
108 : Int_t fMiniEventId; ///< Mini Event Id in bunch crossing
109 : Int_t fL1ATrigger; ///< Number of L1 accept in DSP Structure (FRT)
110 : Int_t fL1RTrigger; ///< Number of L1 reject in DSP Structure (FRT)
111 : Int_t fPaddingWord; ///< padding dummy word for 64 bits transfer
112 : Int_t fErrorWord; ///< Error word
113 :
114 : static const Int_t fgkHeaderLength; ///< header length
115 : static const UInt_t fgkDefaultDataKey; ///< default data key word for FRT header
116 : static const UInt_t fgkDefaultPaddingWord; ///< default padding word value
117 :
118 : TClonesArray* fBusPatchArray; ///< array of buspatch structure
119 :
120 18 : ClassDef(AliMUONDspHeader,2) // MUON Dsp header for Tracker event
121 : };
122 : #endif
|