ATLAS Offline Software
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:
32 public:
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 
95 public:
96  // public default constructor needed for I/O, but should not be
97  // called from an alg
99 
101  // Private data:
103 private:
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;
111  float m_errorCondensedHit[20]{};
112 
113 };
114 
116 // Inline methods:
118 // decode size of group of strips information
120 {
121  return (m_word & 0x7FF);
122 }
123 
124 inline unsigned int SCT_TB04_RawData::getEvent() const
125 {
126  return m_event;
127 }
128 
129 inline unsigned int SCT_TB04_RawData::getFragmentType() const
130 {
131  return m_fragment_type;
132 }
133 
134 inline unsigned int SCT_TB04_RawData::getSize() const
135 {
136  return m_size;
137 }
138 
139 inline unsigned int SCT_TB04_RawData::getWordErrorCount() const
140 {
141  return m_word_error_count;
142 }
143 
144 inline 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
156 inline int SCT_TB04_RawData::getErrors() const
157 {
158  return ((m_word >> 25) & 0x7);
159 }
160 
161 inline int SCT_TB04_RawData::getStream() const
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 
170 inline int SCT_TB04_RawData::getROB() const
171 {
172  return (m_onlineId &0xFFFF);
173 }
174 
175 inline 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 
196 inline bool SCT_TB04_RawData::LVL1Error() const
197 {
198  bool isError = false;
199  if ((m_word >> 26) & 0x1) isError = true;
200  return isError;
201 }
202 
203 inline bool SCT_TB04_RawData::BCIDError() const
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 
233 {
234  return m_errorCondensedHit;
235 }
236 
237 
238 
239 
240 #endif // SITRACKEREVENT_SCT_TB04_RAWDATA_H
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
SCT_TB04_RawData::getEvent
unsigned int getEvent() const
Definition: SCT_TB04_RawData.h:124
SCT_TB04_RawData::getSize
unsigned int getSize() const
Definition: SCT_TB04_RawData.h:134
SCT_TB04_RawData::getStream
int getStream() const
Definition: SCT_TB04_RawData.h:161
SCT_TB04_RawData::OnTime
bool OnTime() const
Definition: SCT_TB04_RawData.h:175
SCT_TB04_RawData::getROB
int getROB() const
Definition: SCT_TB04_RawData.h:170
SCT_TB04_RawData::m_errorCondensedHit
float m_errorCondensedHit[20]
Definition: SCT_TB04_RawData.h:111
SCT_TB04_RawData::SCT_TB04_RawData
SCT_TB04_RawData()
Definition: SCT_TB04_RawData.cxx:19
TrigConf::JetWindowSize::Size
Size
Definition: TriggerThresholdValue.h:17
Event
Definition: trigbs_orderedMerge.cxx:42
SCT_TB04_RawData::m_fragment_type
unsigned int m_fragment_type
Definition: SCT_TB04_RawData.h:106
SCT_RDORawData
Definition: SCT_RDORawData.h:24
SCT_TB04_RawData::getGroupSize
virtual int getGroupSize() const
Definition: SCT_TB04_RawData.h:119
SCT_TB04_RawData::SyncronizationError
bool SyncronizationError() const
Definition: SCT_TB04_RawData.h:182
SCT_TB04_RawData::m_size
unsigned int m_size
Definition: SCT_TB04_RawData.h:107
SCT_TB04_RawData::PreambleError
bool PreambleError() const
Definition: SCT_TB04_RawData.h:189
SCT_TB04_RawData::m_event_count
unsigned int m_event_count
Definition: SCT_TB04_RawData.h:109
SCT_TB04_RawData::getFragmentType
unsigned int getFragmentType() const
Definition: SCT_TB04_RawData.h:129
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
SCT_TB04_RawData::getErrorCondensedHit
float * getErrorCondensedHit()
Definition: SCT_TB04_RawData.h:232
SCT_TB04_RawData::BCIDError
bool BCIDError() const
Definition: SCT_TB04_RawData.h:203
InDetRawData::m_word
unsigned int m_word
Definition: InDetRawData.h:72
SCT_TB04_RawData::~SCT_TB04_RawData
virtual ~SCT_TB04_RawData()=default
SCT_TB04_RawData::FirstHitError
bool FirstHitError() const
Definition: SCT_TB04_RawData.h:218
SCT_RDORawData.h
SCT_TB04_RawData::getEventCount
unsigned int getEventCount() const
Definition: SCT_TB04_RawData.h:144
SCT_TB04_RawData::getErrors
int getErrors() const
Definition: SCT_TB04_RawData.h:156
SCT_TB04_RawData
Definition: SCT_TB04_RawData.h:27
SCT_TB04_RawData::LVL1Error
bool LVL1Error() const
Definition: SCT_TB04_RawData.h:196
SCT_TB04_RawData::m_word_error_count
unsigned int m_word_error_count
Definition: SCT_TB04_RawData.h:108
SCT_TB04_RawData::m_onlineId
unsigned int m_onlineId
Definition: SCT_TB04_RawData.h:110
SCT_TB04_RawData::m_event
unsigned int m_event
Definition: SCT_TB04_RawData.h:105
SCT_TB04_RawData::FormatterError
bool FormatterError() const
Definition: SCT_TB04_RawData.h:210
SCT_TB04_RawData::getWordErrorCount
unsigned int getWordErrorCount() const
Definition: SCT_TB04_RawData.h:139
SCT_TB04_RawData::SecondHitError
bool SecondHitError() const
Definition: SCT_TB04_RawData.h:225
SCT_TB04_RawData::getTimeBin
int getTimeBin() const
Definition: SCT_TB04_RawData.h:150