AliRoot Core  edcc906 (edcc906)
AliMUONBusStruct.h
Go to the documentation of this file.
1 #ifndef ALIMUONBUSSTRUCT_H
2 #define ALIMUONBUSSTRUCT_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 
12 // Author Christian Finck
13 
14 #include <TObject.h>
15 
16 class AliMUONBusStruct : public TObject {
17 
18 public:
20  virtual ~AliMUONBusStruct ();
23 
25  static Int_t GetHeaderLength() {return fgkHeaderLength;}
27  static UInt_t GetDefaultDataKey() {return fgkDefaultDataKey;}
28 
29  // header
31  Int_t GetDataKey() const {return fDataKey;}
33  Int_t GetTotalLength() const {return fTotalLength;}
35  Int_t GetLength() const {return fLength;}
37  Int_t GetBusPatchId() const {return fBusPatchId;}
38 
40  Int_t* GetHeader() {return &fDataKey;}
41 
42  // data
44  Int_t GetBufSize() const {return fBufSize;}
46  UInt_t* GetData() const {return fData;}
48  Int_t GetBlockId() const {return fBlkId;}
50  Int_t GetDspId() const {return fDspId;}
51 
52  Char_t GetParity(Int_t n) const;
53  UShort_t GetManuId(Int_t n) const;
54  UChar_t GetChannelId(Int_t n) const;
55  UShort_t GetCharge(Int_t n) const;
56  UInt_t GetData(Int_t n) const;
57 
58  // header setter
60  void SetDataKey(Int_t d) {fDataKey = d;}
62  void SetTotalLength(Int_t l) {fTotalLength = l;}
64  void SetLength(Int_t l) {fLength = l;}
66  void SetBusPatchId(Int_t b) {fBusPatchId = b;}
67 
68  // data
70  void SetData(UInt_t d, Int_t n) {fData[n] = d;}
72  void SetBlockId(Int_t b) {fBlkId = b;}
74  void SetDspId(Int_t d) {fDspId = d;}
75 
76  void AddData(UInt_t d);
77  void SetAlloc(Int_t size);
78 
79  // TClonesArray
81  Bool_t IsSortable() const {return kTRUE;}
82  Int_t Compare(const TObject *obj) const;
83  void Clear(Option_t* opt);
84 
85  private:
86  Int_t fDataKey;
87  Int_t fTotalLength;
88  Int_t fLength;
89  Int_t fBusPatchId;
90 
91  static const Int_t fgkHeaderLength;
92  static const UInt_t fgkDefaultDataKey;
93  static const Int_t fgkManuNofChannels;
94 
95  Int_t fBufSize;
96 
97  UInt_t* fData;
98 
99  Int_t fDspId;
100  Int_t fBlkId;
101 
102  void ResizeData(Int_t size = 0);
103 
104  void Print(Option_t* opt) const;
105 
106 
107  ClassDef(AliMUONBusStruct,3) // MUON DDL Tracker
108 };
109 
110 #endif
Int_t GetLength() const
Return length of raw data.
TBrowser b
Definition: RunAnaESD.C:12
Int_t fLength
length of raw data
Int_t * GetHeader()
Return header.
UShort_t GetCharge(Int_t n) const
Int_t GetBufSize() const
Return initial size for data array.
Int_t GetBusPatchId() const
Return bus patch id.
Int_t fBlkId
block numer for monitoring
Int_t fBufSize
initial size for data array
void SetDspId(Int_t d)
Set Dsp number for monitoring.
static const Int_t fgkManuNofChannels
max number of channels per manu;
Bool_t IsSortable() const
Return true as Compare() is implemented.
UInt_t * GetData() const
Return data.
void SetData(UInt_t d, Int_t n)
Set data.
Int_t fTotalLength
total length of buspatch structure
static const Int_t fgkHeaderLength
header length in word
Int_t fDataKey
Data key word for bus patch header.
static Int_t GetHeaderLength()
Return header length in word.
void Clear(Option_t *opt)
void Print(Option_t *opt) const
void AddData(UInt_t d)
Int_t Compare(const TObject *obj) const
Int_t GetDspId() const
Return Dsp number for monitoring.
UInt_t * fData
data
static UInt_t GetDefaultDataKey()
Return default data key word for Bus Patch Header.
void SetTotalLength(Int_t l)
Set total length of buspatch structure.
AliMUONBusStruct & operator=(const AliMUONBusStruct &rhs)
UShort_t GetManuId(Int_t n) const
Int_t fDspId
Dsp number for monitoring.
Int_t fBusPatchId
bus patch id
Char_t GetParity(Int_t n) const
static const UInt_t fgkDefaultDataKey
default data key word for Bus Patch Header
void SetBusPatchId(Int_t b)
Set bus patch id.
Int_t GetTotalLength() const
Return total length of buspatch structure.
Int_t GetBlockId() const
Return block numer for monitoring.
void SetDataKey(Int_t d)
Set Data key word for bus patch header.
void SetAlloc(Int_t size)
void ResizeData(Int_t size=0)
void SetLength(Int_t l)
Set length of raw data.
virtual ~AliMUONBusStruct()
UChar_t GetChannelId(Int_t n) const
MUON buspatch structure for tracker.
Int_t GetDataKey() const
Return Data key word for bus patch header.
void SetBlockId(Int_t b)
Set block numer for monitoring.