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 */
9 /// \class AliMUONBusStruct
10 /// \brief MUON buspatch structure for tracker
12 /// \author Christian Finck
16 class AliMUONBusStruct : public TObject {
20 virtual ~AliMUONBusStruct ();
21 AliMUONBusStruct(const AliMUONBusStruct& rhs);
22 AliMUONBusStruct& operator=(const AliMUONBusStruct& rhs);
25 Int_t GetDataKey() const {return fDataKey;}
26 Int_t GetTotalLength() const {return fTotalLength;}
27 Int_t GetLength() const {return fLength;}
28 Int_t GetBusPatchId() const {return fBusPatchId;}
30 Int_t GetHeaderLength() const {return fgkHeaderLength;}
31 UInt_t GetDefaultDataKey() const {return fgkDefaultDataKey;}
33 Int_t* GetHeader() {return &fDataKey;}
36 Int_t GetBufSize() const {return fBufSize;}
37 UInt_t* GetData() const {return fData;}
38 Int_t GetBlockId() const {return fBlkId;}
39 Int_t GetDspId() const {return fDspId;}
41 Char_t GetParity(Int_t n) const;
42 UShort_t GetManuId(Int_t n) const;
43 Char_t GetChannelId(Int_t n) const;
44 UShort_t GetCharge(Int_t n) const;
45 UInt_t GetData(Int_t n) const;
48 void SetDataKey(Int_t d) {fDataKey = d;}
49 void SetTotalLength(Int_t l) {fTotalLength = l;}
50 void SetLength(Int_t l) {fLength = l;}
51 void SetBusPatchId(Int_t b) {fBusPatchId = b;}
54 void SetData(UInt_t d, Int_t n) {fData[n] = d;}
55 void SetBlockId(Int_t b) {fBlkId = b;}
56 void SetDspId(Int_t d) {fDspId = d;}
58 void AddData(UInt_t d);
59 void SetAlloc(Int_t size);
62 Bool_t IsSortable() const {return kTRUE;}
63 Int_t Compare(const TObject *obj) const;
64 void Clear(Option_t* opt);
67 Int_t fDataKey; ///< Data key word for bus patch header
68 Int_t fTotalLength; ///< total length of buspatch structure
69 Int_t fLength; ///< length of raw data
70 Int_t fBusPatchId; ///< bus patch id
72 static const Int_t fgkHeaderLength; ///< header length in word
73 static const UInt_t fgkDefaultDataKey; ///< default data key word for Bus Patch Header
75 Int_t fBufSize; ///< initial size for data array
77 UInt_t* fData; ///< data
79 Int_t fDspId; ///< Dsp number for monitoring
80 Int_t fBlkId; ///< block numer for monitoring
82 void ResizeData(Int_t size = 0);
84 ClassDef(AliMUONBusStruct,3) // MUON DDL Tracker