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