ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_TB04_RawData.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
6// SCT_TB04_RawData.h
7// Header file for class SCT_TB03_RawData
9// (c) ATLAS Detector software
11// Class to implement RawData for SCT, using TB03 for decoding word
13// Version 1.0 11/12/2003 MJ Costa
15
16#ifndef SITRACKEREVENT_SCT_TB04_RAWDATA_H
17#define SITRACKEREVENT_SCT_TB04_RAWDATA_H
18
19// Base class
21
22
23// Data members classes
24
25
26
28
30 // Public methods:
32public:
33
34 // Constructor with parameters:
35 // Mustard Constructor
36 SCT_TB04_RawData(const Identifier rdoId, const unsigned int word,
37 const unsigned int Event, const unsigned int FragmentIdentifier,
38 const unsigned int Size, const unsigned int WordErrorCount,
39 const unsigned int EventCount, const unsigned int onlineId);
40 // ROD Constructor
41 SCT_TB04_RawData(const Identifier rdoId, const unsigned int word,
42 const unsigned int onlineId, float errorhit[20]);
43
44 // Destructor:
45 virtual ~SCT_TB04_RawData() = default;
46
48 // Virtual methods
50
51 // decode group of strips
52 virtual int getGroupSize() const;
53
54 unsigned int getEvent() const;
55
56 unsigned int getFragmentType() const;
57
58 unsigned int getSize() const;
59
60 unsigned int getWordErrorCount() const;
61
62 unsigned int getEventCount() const;
63
64 int getTimeBin() const;
65
66 int getErrors() const;
67
68 int getStream() const;
69
70 int getROB() const;
71
72 bool OnTime() const;
73
74 bool SyncronizationError() const;
75
76 bool PreambleError() const;
77 bool LVL1Error() const;
78 bool BCIDError() const;
79 bool FormatterError() const;
80 bool FirstHitError() const;
81 bool SecondHitError() const;
82
83 float *getErrorCondensedHit();
84
85
86
88 // Static methods:
90
91
92 // Create a new SCT_TB04_RawData and return a pointer to it:
93 // static SCT_TB04_RawData *newObject(const Identifier rdoId, const unsigned int word);
94
95public:
96 // public default constructor needed for I/O, but should not be
97 // called from an alg
99
101 // Private data:
103private:
104
105 unsigned int m_event;
106 unsigned int m_fragment_type;
107 unsigned int m_size;
108 unsigned int m_word_error_count;
109 unsigned int m_event_count;
110 unsigned int m_onlineId;
112
113};
114
116// Inline methods:
118// decode size of group of strips information
120{
121 return (m_word & 0x7FF);
122}
123
124inline unsigned int SCT_TB04_RawData::getEvent() const
125{
126 return m_event;
127}
128
129inline unsigned int SCT_TB04_RawData::getFragmentType() const
130{
131 return m_fragment_type;
132}
133
134inline unsigned int SCT_TB04_RawData::getSize() const
135{
136 return m_size;
137}
138
139inline unsigned int SCT_TB04_RawData::getWordErrorCount() const
140{
141 return m_word_error_count;
142}
143
144inline unsigned int SCT_TB04_RawData::getEventCount() const
145{
146 return m_event_count;
147}
148
149//decode time bin information
151{
152 return ((m_word >> 22) & 0x7);
153}
154
155//decode errors information
157{
158 return ((m_word >> 25) & 0x7);
159}
160
162{
163 // return ((m_onlineId >>16)&0xFFFF);
164 //Kondo 14/02/07: New calculation of the online Id in the cabling packages
165 // return ((m_onlineId >>8)&0xFFFF);
166 //Kondo 28/05/07: New calculation of the online Id in the cabling packages
167 return ((m_onlineId >>24)&0xFFFF);
168}
169
170inline int SCT_TB04_RawData::getROB() const
171{
172 return (m_onlineId &0xFFFF);
173}
174
175inline bool SCT_TB04_RawData::OnTime() const
176{
177 bool isOnTime = false;
178 if ((m_word >> 23) & 0x1) isOnTime = true;
179 return isOnTime;
180}
181
183{
184 bool isError = false;
185 if (((m_word >> 26) & 0x1) || (((m_word >> 27) & 0x1))) isError = true;
186 return isError;
187}
188
190{
191 bool isError = false;
192 if ((m_word >> 25) & 0x1) isError = true;
193 return isError;
194}
195
197{
198 bool isError = false;
199 if ((m_word >> 26) & 0x1) isError = true;
200 return isError;
201}
202
204{
205 bool isError = false;
206 if ((m_word >> 27) & 0x1) isError = true;
207 return isError;
208}
209
211{
212 bool isError = false;
213 if ((m_word >> 28) & 0x1) isError = true;
214 return isError;
215}
216
217
219{
220 bool isError = false;
221 if ((m_word >> 29) & 0x1) isError = true;
222 return isError;
223}
224
226{
227 bool isError = false;
228 if ((m_word >> 30) & 0x1) isError = true;
229 return isError;
230}
231
236
237
238
239
240#endif // SITRACKEREVENT_SCT_TB04_RAWDATA_H
unsigned int m_word
SCT_RDORawData(const Identifier rdoId, const unsigned int word)
unsigned int getWordErrorCount() const
virtual ~SCT_TB04_RawData()=default
bool PreambleError() const
bool FirstHitError() const
unsigned int getFragmentType() const
unsigned int getEventCount() const
bool BCIDError() const
float m_errorCondensedHit[20]
unsigned int m_onlineId
unsigned int getEvent() const
unsigned int m_event_count
float * getErrorCondensedHit()
SCT_TB04_RawData(const Identifier rdoId, const unsigned int word, const unsigned int Event, const unsigned int FragmentIdentifier, const unsigned int Size, const unsigned int WordErrorCount, const unsigned int EventCount, const unsigned int onlineId)
unsigned int m_fragment_type
virtual int getGroupSize() const
unsigned int m_word_error_count
bool SyncronizationError() const
bool FormatterError() const
bool LVL1Error() const
unsigned int getSize() const
bool SecondHitError() const