]>
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 | ||
24 | Int_t GetTotalLength() const {return fTotalLength;} | |
25 | Int_t GetLength() const {return fLength;} | |
26 | Int_t GetBufSize() const {return fBufSize;} | |
27 | Int_t GetBusPatchId() const {return fBusPatchId;} | |
28 | Int_t GetTriggerWord() const {return fTriggerWord;} | |
29 | UInt_t* GetData() const {return fData;} | |
30 | Int_t GetBlockId() const {return fBlkId;} | |
31 | Int_t GetDspId() const {return fDspId;} | |
32 | ||
33 | ||
34 | Char_t GetParity(Int_t n) const; | |
35 | UShort_t GetManuId(Int_t n) const; | |
36 | Char_t GetChannelId(Int_t n) const; | |
37 | UShort_t GetCharge(Int_t n) const; | |
38 | UInt_t GetData(Int_t n) const; | |
39 | ||
40 | void SetTotalLength(Int_t l) {fTotalLength = l;} | |
41 | void SetLength(Int_t l) {fLength = l;} | |
42 | void SetBusPatchId(Int_t b) {fBusPatchId = b;} | |
43 | void SetTriggerWord(Int_t w) {fTriggerWord = w;} | |
44 | void SetData(UInt_t d, Int_t n) {fData[n] = d;} | |
45 | void SetBlockId(Int_t b) {fBlkId = b;} | |
46 | void SetDspId(Int_t d) {fDspId = d;} | |
47 | ||
48 | void AddData(UInt_t d); | |
49 | void SetAlloc(Int_t size); | |
50 | ||
51 | Bool_t IsSortable() const {return kTRUE;} | |
52 | Int_t Compare(const TObject *obj) const; | |
53 | void Clear(Option_t* opt); | |
54 | ||
55 | Int_t GetHeaderLength() const {return fgkHeaderLength;} | |
56 | ||
57 | Int_t* GetBusPatchHeader() {return &fTotalLength;} | |
58 | ||
59 | private: | |
60 | Int_t fTotalLength; // total length of buspatch structure | |
61 | Int_t fLength; // length of raw data | |
62 | Int_t fBusPatchId; // bus patch id | |
63 | Int_t fTriggerWord ; // counter trigger word | |
64 | ||
65 | static const Int_t fgkHeaderLength; // header length in word | |
66 | ||
67 | UInt_t* fData; // data | |
68 | ||
69 | Int_t fBufSize; // initial size for data array | |
70 | ||
71 | Int_t fDspId; // Dsp number for monitoring | |
72 | Int_t fBlkId; // block numer for monitoring | |
73 | ||
74 | void ResizeData(Int_t size = 0); | |
75 | ||
76 | ClassDef(AliMUONBusStruct,1) // MUON DDL Tracker | |
77 | }; | |
78 | #endif |