]>
Commit | Line | Data |
---|---|---|
47c194a6 | 1 | #ifndef ALIMUONBLOCKHEADER_H |
2 | #define ALIMUONBLOCKHEADER_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 AliMUONBlockHeader | |
84ceeb06 | 10 | /// \brief MUON block (Crocus CRT) header for tracker event |
47c194a6 | 11 | /// |
78649106 | 12 | // Author Christian Finck |
47c194a6 | 13 | |
14 | #include <TObject.h> | |
15 | #include <TClonesArray.h> | |
16 | ||
17 | class AliMUONDspHeader; | |
18 | ||
19 | class AliMUONBlockHeader : public TObject { | |
20 | ||
21 | public: | |
22 | AliMUONBlockHeader(); | |
23 | AliMUONBlockHeader(const AliMUONBlockHeader &event); | |
24 | AliMUONBlockHeader& operator=(const AliMUONBlockHeader &event); | |
25 | ||
26 | virtual ~AliMUONBlockHeader(); | |
27 | ||
71a2d3aa | 28 | // |
47c194a6 | 29 | // Block header |
71a2d3aa | 30 | // |
31 | /// Return data key word for CRT header | |
84ceeb06 | 32 | Int_t GetDataKey() const {return fDataKey;} |
71a2d3aa | 33 | /// Return total length of block structure (w/o padding word) |
47c194a6 | 34 | Int_t GetTotalLength() const {return fTotalLength;} |
71a2d3aa | 35 | /// Return length of raw data |
47c194a6 | 36 | Int_t GetLength() const {return fLength;} |
71a2d3aa | 37 | /// Return Dsp id |
47c194a6 | 38 | Int_t GetDspId() const {return fDspId;} |
71a2d3aa | 39 | /// Return L0 trigger word |
84ceeb06 | 40 | Int_t GetL0Trigger() const {return fL0Trigger;} |
71a2d3aa | 41 | /// Return Bunch Crossing for mini-event id (see TDR chapter 8) |
84ceeb06 | 42 | Int_t GetMiniEventId() const {return fMiniEventId;} |
71a2d3aa | 43 | /// Return Event Id in bunch crossing |
84ceeb06 | 44 | Int_t GetEventId1() const {return fEventId1;} |
71a2d3aa | 45 | /// Return Event Id in orbit number |
84ceeb06 | 46 | Int_t GetEventId2() const {return fEventId2;} |
47 | ||
71a2d3aa | 48 | /// Return header length in word |
47c194a6 | 49 | Int_t GetHeaderLength() const {return fgkHeaderLength;} |
71a2d3aa | 50 | /// Return default data key word for CRT header |
84ceeb06 | 51 | UInt_t GetDefaultDataKey() const {return fgkDefaultDataKey;} |
47c194a6 | 52 | |
71a2d3aa | 53 | |
54 | /// Set data key word for CRT header | |
84ceeb06 | 55 | void SetDataKey(Int_t d) {fDataKey = d;} |
71a2d3aa | 56 | /// Set total length of block structure (w/o padding word) |
47c194a6 | 57 | void SetTotalLength(Int_t l) {fTotalLength = l;} |
71a2d3aa | 58 | /// Set length of raw data |
47c194a6 | 59 | void SetLength(Int_t l) {fLength = l;} |
71a2d3aa | 60 | /// Set Dsp id |
47c194a6 | 61 | void SetDspId(Int_t d) {fDspId = d;} |
71a2d3aa | 62 | /// Set L0 trigger word |
84ceeb06 | 63 | void SetL0Trigger(Int_t l) {fL0Trigger = l;} |
71a2d3aa | 64 | /// Set Bunch Crossing for mini-event id (see TDR chapter 8) |
84ceeb06 | 65 | void SetMiniEventId(Int_t e) {fMiniEventId = e;} |
71a2d3aa | 66 | /// Set Event Id in bunch crossing |
84ceeb06 | 67 | void SetEventId1(Int_t e) {fEventId1 = e;} |
71a2d3aa | 68 | /// Set Event Id in orbit number |
84ceeb06 | 69 | void SetEventId2(Int_t e) {fEventId2 = e;} |
71a2d3aa | 70 | |
71 | ||
72 | /// Return header | |
84ceeb06 | 73 | Int_t* GetHeader() {return &fDataKey;} |
47c194a6 | 74 | |
75 | void AddDspHeader(const AliMUONDspHeader& dspHeader); | |
76 | ||
71a2d3aa | 77 | /// get TClonesArray |
47c194a6 | 78 | TClonesArray* GetDspHeaderArray() const {return fDspHeaderArray;} |
79 | ||
71a2d3aa | 80 | /// get entries |
47c194a6 | 81 | Int_t GetDspHeaderEntries() const {return fDspHeaderArray->GetEntriesFast();} |
82 | ||
71a2d3aa | 83 | /// get entry |
47c194a6 | 84 | AliMUONDspHeader* GetDspHeaderEntry(Int_t i) const { |
85 | return (AliMUONDspHeader*)fDspHeaderArray->At(i);} | |
86 | ||
87 | // clear | |
88 | void Clear(Option_t* opt); | |
89 | ||
1ed3c5c2 | 90 | // print out |
91 | void Print(Option_t* /*opt*/) const; | |
92 | ||
47c194a6 | 93 | private: |
94 | ||
95 | // block header | |
84ceeb06 | 96 | Int_t fDataKey; ///< Data key word for CRT header |
829425a5 | 97 | Int_t fTotalLength; ///< total length of block structure (w/o padding word) |
98 | Int_t fLength; ///< length of raw data | |
99 | Int_t fDspId; ///< Dsp id | |
84ceeb06 | 100 | Int_t fL0Trigger; ///< L0 trigger word |
101 | Int_t fMiniEventId; ///< Bunch Crossing for mini-event id (see TDR chapter 8) | |
102 | Int_t fEventId1; ///< Event Id in bunch crossing | |
103 | Int_t fEventId2; ///< Event Id in orbit number | |
104 | ||
105 | ||
106 | static const Int_t fgkHeaderLength; ///< header length in word | |
107 | static const UInt_t fgkDefaultDataKey; ///< default data key word for CRT header | |
47c194a6 | 108 | |
829425a5 | 109 | TClonesArray* fDspHeaderArray; ///< array of block header |
47c194a6 | 110 | |
84ceeb06 | 111 | ClassDef(AliMUONBlockHeader,2) // MUON block header for Tracker event |
47c194a6 | 112 | }; |
113 | #endif |