]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFRawDataFormat.h
New file to be read during reconstruction
[u/mrichter/AliRoot.git] / TOF / AliTOFRawDataFormat.h
1 #ifndef ALITOFRAWDATAFORMAT_H
2 #define ALITOFRAWDATAFORMAT_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */
8
9 ///////////////////////////////////////////////////////////////
10 //                                                           //
11 //   This classes provide the TOF raw data bit fields.       //
12 //                                                           //
13 ///////////////////////////////////////////////////////////////
14
15 #include "TROOT.h"
16
17 //TRM global header
18 class AliTOFTRMGlobalHeader
19 {
20  public:
21   UInt_t GetSlotID() {return fSlotID;};
22   UInt_t GetEventWords() {return fEventWords;};
23   UInt_t GetACQBits() {return fACQBits;};
24   UInt_t GetLBit() {return fLBit;};
25   UInt_t GetMBZ() {return fMBZ;};
26   UInt_t GetWordType() {return fWordType;};
27  private:
28   UInt_t fSlotID:     4;
29   UInt_t fEventWords: 13;
30   UInt_t fACQBits:    2;
31   UInt_t fLBit:       1;
32   UInt_t fMBZ:        8;
33   UInt_t fWordType:   4;
34 };
35
36 //TRM global trailer
37 class AliTOFTRMGlobalTrailer
38 {
39  public:
40   UInt_t GetSlotID() {return fSlotID;};
41   UInt_t GetEventCRC() {return fEventCRC;};
42   UInt_t GetEventCounter() {return fEventCounter;};
43   UInt_t GetWordType() {return fWordType;};
44  private:
45   UInt_t fSlotID:       4;
46   UInt_t fEventCRC:     12;
47   UInt_t fEventCounter: 12;
48   UInt_t fWordType:     4;
49 };
50
51 //TRM chain header
52 class AliTOFTRMChainHeader
53 {
54  public:
55   UInt_t GetSlotID() {return fSlotID;};
56   UInt_t GetBunchID() {return fBunchID;};
57   UInt_t GetPB24Temp() {return fPB24Temp;};
58   UInt_t GetPB24ID() {return fPB24ID;};
59   UInt_t GetTSBit() {return fTSBit;};
60   UInt_t GetWordType() {return fWordType;};
61  private:
62   UInt_t fSlotID:   4;
63   UInt_t fBunchID:  12;
64   UInt_t fPB24Temp: 8;
65   UInt_t fPB24ID:   3;
66   UInt_t fTSBit:    1;
67   UInt_t fWordType: 4;
68 };
69
70 //TRM chain trailer
71 class AliTOFTRMChainTrailer
72 {
73  public:
74   UInt_t GetStatus() {return fStatus;};
75   UInt_t GetMBZ() {return fMBZ;};
76   UInt_t GetEventCounter() {return fEventCounter;};
77   UInt_t GetWordType() {return fWordType;};
78  private:
79   UInt_t fStatus:       4;
80   UInt_t fMBZ:          12;
81   UInt_t fEventCounter: 12;
82   UInt_t fWordType:     4;
83 };
84
85 //TDC packed hit
86 class AliTOFTDCPackedHit
87 {
88  public:
89   UInt_t GetHitTime() {return fHitTime;};
90   UInt_t GetTOTWidth() {return fTOTWidth;};
91   UInt_t GetChan() {return fChan;};
92   UInt_t GetTDCID() {return fTDCID;};
93   UInt_t GetEBit() {return fEBit;};
94   UInt_t GetPSBits() {return fPSBits;};
95   UInt_t GetMBO() {return fMBO;};
96  private:
97   UInt_t fHitTime:  13;
98   UInt_t fTOTWidth: 8;
99   UInt_t fChan:     3;
100   UInt_t fTDCID:    4;
101   UInt_t fEBit:     1;
102   UInt_t fPSBits:   2;
103   UInt_t fMBO:      1;
104 };
105
106 //TDC unpacked hit
107 class AliTOFTDCUnpackedHit
108 {
109  public:
110   UInt_t GetHitTime() {return fHitTime;};
111   UInt_t GetChan() {return fChan;};
112   UInt_t GetTDCID() {return fTDCID;};
113   UInt_t GetEBit() {return fEBit;};
114   UInt_t GetPSBits() {return fPSBits;};
115   UInt_t GetMBO() {return fMBO;};
116  private:
117   UInt_t fHitTime:  21;
118   UInt_t fChan:     3;
119   UInt_t fTDCID:    4;
120   UInt_t fEBit:     1;
121   UInt_t fPSBits:   2;
122   UInt_t fMBO:      1;
123 };
124
125 //TRM TDC error
126 class AliTOFTRMTDCError
127 {
128  public:
129   UInt_t GetErrorFlags() {return fErrorFlags;};
130   UInt_t GetMBZ() {return fMBZ;};
131   UInt_t GetTDCID () {return fTDCID;};
132   UInt_t GetWordType() {return fWordType;};
133  private:
134   UInt_t fErrorFlags: 15;
135   UInt_t fMBZ:        9;
136   UInt_t fTDCID:      4;
137   UInt_t fWordType:   4;
138 };
139
140 //TRM diagnostic error word 1
141 class AliTOFTRMDiagnosticErrorWord1
142 {
143  public:
144   UInt_t GetFaultChipFlagID() {return fFaultChipFlagID;};
145   UInt_t GetCBit() {return fCBit;};
146   UInt_t GetMBZ() {return fMBZ;};
147   UInt_t GetMBO() {return fMBO;};
148   UInt_t GetWordType() {return fWordType;};
149  private:
150   UInt_t fFaultChipFlagID: 15;
151   UInt_t fCBit:            1;
152   UInt_t fMBZ:             8;
153   UInt_t fMBO:             4;
154   UInt_t fWordType:        4;
155 };
156
157 //TRM diagnostic error word 2
158 class AliTOFTRMDiagnosticErrorWord2
159 {
160  public:
161   UInt_t GetJtagErrorCode() {return fJtagErrorCode;};
162   UInt_t GetTDCID() {return fTDCID;};
163   UInt_t GetCBit() {return fCBit;};
164   UInt_t GetMBZ() {return fMBZ;};
165   UInt_t GetMBO() {return fMBO;};
166   UInt_t GetWordType() {return fWordType;};
167  private:
168   UInt_t fJtagErrorCode: 11;
169   UInt_t fTDCID:         4;
170   UInt_t fCBit:          1;
171   UInt_t fMBZ:           8;
172   UInt_t fMBO:           4;
173   UInt_t fWordType:      4;
174 };
175
176 #endif /* ALITOFRAWDATAFORMAT_H */