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