]>
Commit | Line | Data |
---|---|---|
47c194a6 | 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 | ||
8 | /// \ingroup raw | |
9 | /// \class AliMUONBusStruct | |
10 | /// \brief MUON buspatch structure for tracker | |
11 | /// | |
12 | /// \author Christian Finck | |
13 | ||
14 | #include <TObject.h> | |
15 | ||
16 | class AliMUONBusStruct : public TObject { | |
17 | ||
18 | public: | |
19 | AliMUONBusStruct (); | |
20 | virtual ~AliMUONBusStruct (); | |
21 | AliMUONBusStruct(const AliMUONBusStruct& rhs); | |
22 | AliMUONBusStruct& operator=(const AliMUONBusStruct& rhs); | |
23 | ||
84ceeb06 | 24 | // header |
25 | Int_t GetDataKey() const {return fDataKey;} | |
47c194a6 | 26 | Int_t GetTotalLength() const {return fTotalLength;} |
27 | Int_t GetLength() const {return fLength;} | |
47c194a6 | 28 | Int_t GetBusPatchId() const {return fBusPatchId;} |
84ceeb06 | 29 | |
30 | Int_t GetHeaderLength() const {return fgkHeaderLength;} | |
31 | UInt_t GetDefaultDataKey() const {return fgkDefaultDataKey;} | |
32 | ||
33 | Int_t* GetHeader() {return &fDataKey;} | |
34 | ||
35 | // data | |
36 | Int_t GetBufSize() const {return fBufSize;} | |
47c194a6 | 37 | UInt_t* GetData() const {return fData;} |
38 | Int_t GetBlockId() const {return fBlkId;} | |
39 | Int_t GetDspId() const {return fDspId;} | |
40 | ||
47c194a6 | 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; | |
46 | ||
84ceeb06 | 47 | // header setter |
48 | void SetDataKey(Int_t d) {fDataKey = d;} | |
47c194a6 | 49 | void SetTotalLength(Int_t l) {fTotalLength = l;} |
50 | void SetLength(Int_t l) {fLength = l;} | |
84ceeb06 | 51 | void SetBusPatchId(Int_t b) {fBusPatchId = b;} |
52 | ||
53 | // data | |
47c194a6 | 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;} | |
57 | ||
58 | void AddData(UInt_t d); | |
59 | void SetAlloc(Int_t size); | |
60 | ||
84ceeb06 | 61 | // TClonesArray |
47c194a6 | 62 | Bool_t IsSortable() const {return kTRUE;} |
63 | Int_t Compare(const TObject *obj) const; | |
64 | void Clear(Option_t* opt); | |
65 | ||
47c194a6 | 66 | private: |
84ceeb06 | 67 | Int_t fDataKey; ///< Data key word for bus patch header |
829425a5 | 68 | Int_t fTotalLength; ///< total length of buspatch structure |
69 | Int_t fLength; ///< length of raw data | |
70 | Int_t fBusPatchId; ///< bus patch id | |
47c194a6 | 71 | |
84ceeb06 | 72 | static const Int_t fgkHeaderLength; ///< header length in word |
73 | static const UInt_t fgkDefaultDataKey; ///< default data key word for Bus Patch Header | |
47c194a6 | 74 | |
829425a5 | 75 | Int_t fBufSize; ///< initial size for data array |
47c194a6 | 76 | |
878b883f | 77 | UInt_t* fData; ///< data |
78 | ||
84ceeb06 | 79 | Int_t fDspId; ///< Dsp number for monitoring |
80 | Int_t fBlkId; ///< block numer for monitoring | |
47c194a6 | 81 | |
82 | void ResizeData(Int_t size = 0); | |
83 | ||
878b883f | 84 | ClassDef(AliMUONBusStruct,3) // MUON DDL Tracker |
47c194a6 | 85 | }; |
86 | #endif |