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