ATLAS Offline Software
Loading...
Searching...
No Matches
Muon::TGC_RodDecoderRawdata Class Reference

A tool to decode a TGC ROB fragment written in the raw data format into TGC RDO. More...

#include <TGC_RodDecoderRawdata.h>

Inheritance diagram for Muon::TGC_RodDecoderRawdata:
Collaboration diagram for Muon::TGC_RodDecoderRawdata:

Public Member Functions

virtual ~TGC_RodDecoderRawdata ()
 Default destructor.
virtual StatusCode initialize () override
 Standard AlgTool method.
virtual StatusCode fillCollection (const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment &robFrag, TgcRdoContainer &rdoIdc, const EventContext &ctx) const override
 Convert ROBFragment to RDO.

Private Member Functions

TgcRdogetCollection (const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment &robFrag, TgcRdoContainer &rdoIdc) const
 Retrieve header of ROBFragment.
void byteStream2Rdo (OFFLINE_FRAGMENTS_NAMESPACE::PointerType bs, TgcRdo &rdo, uint32_t source_id) const
 Convert data contents of ROBFragment to RDO The same byteStream2Rdo method in TGC_RodDecoderReadout is used for checking conversion validation.
void showStatusWords (const uint32_t source_id, const uint16_t rdoId, const int idHash, const uint32_t nstatus, const uint32_t *status) const
 Show status words.

Private Attributes

Gaudi::Property< bool > m_readSlbHeaderId {this, "ReadSlbHeaderId", false}
 Switch for reading IDs in SLB Header or ROD Header.
Gaudi::Property< bool > m_checkRawData {this, "CheckRawData", false}
 Switch for checking rawdata format with readout format.
std::unique_ptr< TgcRODReadOutm_tgcRODReadOut {}
 RawData format converter.
Gaudi::Property< bool > m_showStatusWords {this, "ShowStatusWords", false}
 Flag for showStatusWords.
SG::ReadCondHandleKey< Muon::TgcCablingMapm_cablingKey

Detailed Description

A tool to decode a TGC ROB fragment written in the raw data format into TGC RDO.

Author
Susumu Oda Susum.nosp@m.u.Od.nosp@m.a@cer.nosp@m.n.ch
Hisaya Kurashige

This class was originally developed by Tadashi Maeno based on RpcROD_Decoder written by Ketevi A. Assamagan. Hisaya Kurashige removed TGC ROD Encoder from this and updated decodeRodToRdo in January 2008. Takashi Kubota migrated to MuonTGC_CnvTools package in July 2008. The previous class name was TgcROD_Decoder.

Definition at line 30 of file TGC_RodDecoderRawdata.h.

Constructor & Destructor Documentation

◆ ~TGC_RodDecoderRawdata()

Muon::TGC_RodDecoderRawdata::~TGC_RodDecoderRawdata ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ byteStream2Rdo()

void Muon::TGC_RodDecoderRawdata::byteStream2Rdo ( OFFLINE_FRAGMENTS_NAMESPACE::PointerType bs,
TgcRdo & rdo,
uint32_t source_id ) const
private

Convert data contents of ROBFragment to RDO The same byteStream2Rdo method in TGC_RodDecoderReadout is used for checking conversion validation.

Definition at line 139 of file TGC_RodDecoderRawdata.cxx.

141 {
142 ATH_MSG_DEBUG("Muon::TGC_RodDecoder::byteStream2Rdo");
143
144 // Check that we are filling the right collection
145 TGC_BYTESTREAM_SOURCEID sid;
146 fromBS32(source_id, sid);
147
148 if (rdo.identify() != TgcRdo::calculateOnlineId(sid.side, sid.rodid)) {
149 ATH_MSG_DEBUG("Error: input TgcRdo id does not match bytestream id");
150 return;
151 }
152
153 // rdo.setOnlineId(sid.side, sid.rodid); // Standard data
154
155 TGC_BYTESTREAM_FRAGMENTCOUNT counters[7] = {{0, 1}, {0, 2}, {0, 3}, {0, 4},
156 {0, 5}, {0, 8}, {0, 9}};
157 TGC_BYTESTREAM_FRAGMENTCOUNT counter{};
158
159 int iBs = 0;
160 for (int iCnt = 0; iCnt < 7; iCnt++) {
161 fromBS32(bs[iBs], counter);
162 if (counter.id == counters[iCnt].id) {
163 counters[iCnt].count = counter.count;
164 iBs++;
165 }
166 }
167
168 // iBs--;
169 for (int iCnt = 0; iCnt < 7; iCnt++) {
170 if (counters[iCnt].count == 0) {
171 continue;
172 }
173 switch (counters[iCnt].id) {
174 case 1: // Raw data format (SSW format)
175 {
176 ATH_MSG_VERBOSE("fragment" << counters[iCnt].id << " "
177 << counters[iCnt].count << "words");
178 for (unsigned iFrag = 0; iFrag < counters[iCnt].count;
179 iFrag++) {
180 ATH_MSG_VERBOSE("WORD" << iFrag << ":" << MSG::hex
181 << bs[iBs]);
182 iBs++;
183 }
184 break;
185 }
186 case 2: // TgcRawData::TYPE_HIT
187 {
188 ATH_MSG_VERBOSE("fragment" << counters[iCnt].id << " "
189 << counters[iCnt].count << "words");
190
191 TGC_BYTESTREAM_READOUTHIT roh;
192 for (unsigned iFrag = 0; iFrag < counters[iCnt].count;
193 iFrag++) {
194 ATH_MSG_VERBOSE("WORD" << iFrag << ":" << MSG::hex
195 << bs[iBs]);
196 fromBS32(bs[iBs++], roh);
197
198 ATH_MSG_VERBOSE(" rdo.subDetectorId():"
199 << rdo.subDetectorId() << " rdo.rodId():"
200 << rdo.rodId() << " roh.ldbId:" << roh.ldbId
201 << " roh.sbId:" << roh.sbId
202 << " rdo.l1Id():" << rdo.l1Id()
203 << " rdo.bcId():" << rdo.bcId());
204
205 uint16_t slbId = roh.sbId;
206 // SBLOCs for EIFI are different in online (ByteStream) and
207 // offline (RDO). bug #57051: Wrong numbering of SBLOC for
208 // Inner Stations (EI/FI) in 12-fold TGC cablings ByteStream
209 // : slbId = SBLOC + ip*2 (ip=0, 1, 2), SBLOC = 8 or 9 (EI),
210 // 0 or 1 (FI)
211 // slbId = 8, 10, 12, 9, 11, 13, 0, 2, 4,
212 // 1, 3, 5
213 // RDO : slbId = SBLOC + ip*4 (ip=0, 1, 2), SBLOC = 1
214 // or 3 (EI), 0 or 2 (FI)
215 // slbId = 1, 5, 9, 3, 7, 11, 0, 4, 8,
216 // 2, 6, 10
219 if (roh.sbId < 8) {
220 slbId = roh.sbId * 2;
221 } else {
222 slbId = (roh.sbId - 8) * 2 + 1;
223 }
224 }
225
226 TgcRawData* raw = new TgcRawData(
227 bcTag(roh.bcBitmap), rdo.subDetectorId(), rdo.rodId(),
228 roh.ldbId, slbId, rdo.l1Id(), rdo.bcId(),
229 // http://cern.ch/atlas-tgc/doc/ROBformat.pdf
230 // Table 7 : SB type, bits 15..13
231 // 0,1: doublet wire, strip
232 // 2,3: triplet wire, strip triplet;
233 // 4 : inner wire and strip
234 // TgcRawData::SlbType is defined in TgcRawData.h
235 // 0: SLB_TYPE_DOUBLET_WIRE,
236 // 1: SLB_TYPE_DOUBLET_STRIP,
237 // 2: SLB_TYPE_TRIPLET_WIRE,
238 // 3: SLB_TYPE_TRIPLET_STRIP,
239 // 4: SLB_TYPE_INNER_WIRE,
240 // 5: SLB_TYPE_INNER_STRIP,
241 // 6: SLB_TYPE_UNKNOWN
242 (TgcRawData::SlbType)roh.sbType, (bool)roh.adj,
243 roh.tracklet, roh.channel + 40);
244 rdo.push_back(raw);
245 }
246 break;
247 }
248 case 3: // TgcRawData::TYPE_TRACKLET
249 {
250 ATH_MSG_VERBOSE("fragment" << counters[iCnt].id << " "
251 << counters[iCnt].count << "words");
252 TGC_BYTESTREAM_READOUTTRIPLETSTRIP rostrip;
253 TGC_BYTESTREAM_READOUTTRACKLET rotrk;
254 for (unsigned iFrag = 0; iFrag < counters[iCnt].count;
255 iFrag++) {
256 ATH_MSG_VERBOSE("WORD" << iFrag << ":" << MSG::hex
257 << bs[iBs]);
258 fromBS32(bs[iBs], rostrip);
259
261 TgcRawData* raw = new TgcRawData(
262 bcTag(rostrip.bcBitmap), rdo.subDetectorId(),
263 rdo.rodId(), rostrip.ldbId, rostrip.sbId,
264 rdo.l1Id(), rdo.bcId(),
266 rostrip.subc, rostrip.phi);
267 rdo.push_back(raw);
268 } else {
269 fromBS32(bs[iBs], rotrk);
270 TgcRawData* raw = new TgcRawData(
271 bcTag(rotrk.bcBitmap), rdo.subDetectorId(),
272 rdo.rodId(), rotrk.ldbId, rotrk.sbId, rdo.l1Id(),
273 rdo.bcId(),
274 // http://cern.ch/atlas-tgc/doc/ROBformat.pdf
275 // Table 8 : Slave Board type, bits 30..28
276 // 0,1: doublet wire, strip
277 // 2,3: triplet wire, strip triplet;
278 // 4,5: inner wire, strip
279 // TgcRawData::SlbType is defined in TgcRawData.h
280 // 0: SLB_TYPE_DOUBLET_WIRE,
281 // 1: SLB_TYPE_DOUBLET_STRIP,
282 // 2: SLB_TYPE_TRIPLET_WIRE,
283 // 3: SLB_TYPE_TRIPLET_STRIP,
284 // 4: SLB_TYPE_INNER_WIRE,
285 // 5: SLB_TYPE_INNER_STRIP,
286 // 6: SLB_TYPE_UNKNOWN
287 (TgcRawData::SlbType)rotrk.slbType, rotrk.delta,
288 rotrk.seg, rotrk.subm, rotrk.rphi);
289 rdo.push_back(raw);
290 }
291 iBs++;
292 }
293 break;
294 }
295 case 8: // TgcRawData::TYPE_HIPT
296 {
297 ATH_MSG_VERBOSE("fragment" << counters[iCnt].id << " "
298 << counters[iCnt].count << "words");
299 TGC_BYTESTREAM_HIPT hpt;
300 TGC_BYTESTREAM_HIPT_INNER hptinner;
301 for (unsigned iFrag = 0; iFrag < counters[iCnt].count;
302 iFrag++) {
303 ATH_MSG_VERBOSE("WORD" << iFrag << ":" << MSG::hex
304 << bs[iBs]);
305 fromBS32(bs[iBs], hptinner);
306
307 if (hptinner.sector & 4) {
308 TgcRawData* raw = new TgcRawData(
309 bcTag(hptinner.bcBitmap), rdo.subDetectorId(),
310 rdo.rodId(), rdo.l1Id(), rdo.bcId(), hptinner.strip,
311 0, hptinner.sector, 0, 0, 0, 0, 0, 0,
312 hptinner.inner);
313 rdo.push_back(raw);
314 } else {
315 fromBS32(bs[iBs], hpt);
316 TgcRawData* raw = new TgcRawData(
317 bcTag(hpt.bcBitmap), rdo.subDetectorId(),
318 rdo.rodId(), rdo.l1Id(), rdo.bcId(), hpt.strip,
319 hpt.fwd, hpt.sector, hpt.chip, hpt.cand, hpt.hipt,
320 hpt.hitId, hpt.sub, hpt.delta, 0);
321 rdo.push_back(raw);
322 }
323 iBs++;
324 }
325 break;
326 }
327 case 9: // TgcRawData::TYPE_SL
328 {
329 ATH_MSG_VERBOSE("fragment" << counters[iCnt].id << " "
330 << counters[iCnt].count << "words");
331 TGC_BYTESTREAM_SL sl;
332 for (unsigned iFrag = 0; iFrag < counters[iCnt].count;
333 iFrag++) {
334 ATH_MSG_VERBOSE("WORD" << iFrag << ":" << MSG::hex
335 << bs[iBs]);
336 fromBS32(bs[iBs++], sl);
337
338 TgcRawData* raw = new TgcRawData(
339 bcTag(sl.bcBitmap), rdo.subDetectorId(), rdo.rodId(),
340 rdo.l1Id(), rdo.bcId(), sl.cand2plus,
341 static_cast<bool>(sl.fwd), sl.sector, sl.cand, sl.sign,
342 sl.threshold, sl.overlap, sl.veto, sl.roi);
343 rdo.push_back(raw);
344 }
345 break;
346 }
347 default:
349 "Error: Muon::TGC_RodDecoder::byteStream2Rdo Unsupported "
350 "fragment type "
351 << counters[iCnt].id);
352 break;
353 }
354 }
355
356 ATH_MSG_VERBOSE("Decoded " << MSG::dec << rdo.size() << " elements");
357 ATH_MSG_VERBOSE("Muon::TGC_RodDecoder::byteStream2Rdo done");
358}
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current TgcRawData
void fromBS32(uint32_t data, T &s)
unsigned bcTag(unsigned bcBitMap)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
@ SLB_TYPE_INNER_WIRE
Definition TgcRawData.h:36
@ SLB_TYPE_TRIPLET_STRIP
Definition TgcRawData.h:35
@ SLB_TYPE_INNER_STRIP
Definition TgcRawData.h:37
uint16_t rodId() const
Definition TgcRdo.h:138
uint16_t l1Id() const
Definition TgcRdo.h:150
uint16_t subDetectorId() const
Definition TgcRdo.h:134
static uint16_t calculateOnlineId(uint16_t subDetectorId, uint16_t rodId)
Definition TgcRdo.cxx:60
uint16_t identify() const
Definition TgcRdo.h:107
uint16_t bcId() const
Definition TgcRdo.h:146
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146
setWord1 uint16_t

◆ fillCollection()

StatusCode Muon::TGC_RodDecoderRawdata::fillCollection ( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment & robFrag,
TgcRdoContainer & rdoIdc,
const EventContext & ctx ) const
overridevirtual

Convert ROBFragment to RDO.

Definition at line 32 of file TGC_RodDecoderRawdata.cxx.

34 {
35 try {
36 robFrag.check();
37 } catch (eformat::Issue& ex) { // error in fragment
38 ATH_MSG_WARNING(ex.what());
39 return StatusCode::SUCCESS;
40 }
41 const TgcCablingMap* cabling{nullptr};
42 ATH_CHECK(SG::get(cabling, m_cablingKey, ctx));
43 uint32_t source_id = robFrag.rod_source_id();
44 SourceIdentifier sid(robFrag.rod_source_id());
45
46 // do not convert if the TGC collection is already in the converter
47 uint16_t rdoId =
48 TgcRdo::calculateOnlineId(sid.subdetector_id(), sid.module_id());
49 TgcRdoIdHash rdoIdHash;
50 int idHash = rdoIdHash(rdoId);
51
52 if (rdoIdc.indexFindPtr(idHash) == nullptr) {
54 robFrag.rod_data(bs);
55 TgcRdo* rdo = getCollection(robFrag, rdoIdc);
56
57 if (!rdo) {
59 "Pointer of RDO is NULL. Skip decoding of this ROD in this "
60 "event...");
61 return StatusCode::SUCCESS;
62 }
63
64 if (m_checkRawData) {
65 byteStream2Rdo(bs, *rdo, robFrag.rod_source_id());
66 if (!m_tgcRODReadOut->check(bs, *rdo, robFrag.rod_source_id(),
67 *cabling, msgStream())) {
69 " Can't Check the contents of TgcRdo: Skip decoding of "
70 "remaining hits of this event...");
71 return StatusCode::SUCCESS;
72 }
73 } else {
74 if (!m_tgcRODReadOut->byteStream2Rdo(
75 bs, *rdo, robFrag.rod_source_id(), *cabling, msgStream())) {
77 " Can't Convert the TGC BS to Rdo: Skip decoding of "
78 "remaining hits of this event...");
79 return StatusCode::SUCCESS;
80 }
81 }
82 } else {
83 ATH_MSG_DEBUG(" Collection ID = "
84 << source_id
85 << "already found into the container; do not convert");
86 }
87
88 return StatusCode::SUCCESS;
89}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Old TgcRdo
virtual const T * indexFindPtr(IdentifierHash hashId) const override final
return pointer on the found entry or null if out of range using hashed index - fast version,...
std::unique_ptr< TgcRODReadOut > m_tgcRODReadOut
RawData format converter.
Gaudi::Property< bool > m_checkRawData
Switch for checking rawdata format with readout format.
TgcRdo * getCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment &robFrag, TgcRdoContainer &rdoIdc) const
Retrieve header of ROBFragment.
SG::ReadCondHandleKey< Muon::TgcCablingMap > m_cablingKey
void byteStream2Rdo(OFFLINE_FRAGMENTS_NAMESPACE::PointerType bs, TgcRdo &rdo, uint32_t source_id) const
Convert data contents of ROBFragment to RDO The same byteStream2Rdo method in TGC_RodDecoderReadout i...
const DataType * PointerType
Definition RawEvent.h:25
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
setEventNumber uint32_t

◆ getCollection()

TgcRdo * Muon::TGC_RodDecoderRawdata::getCollection ( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment & robFrag,
TgcRdoContainer & rdoIdc ) const
private

Retrieve header of ROBFragment.

Definition at line 93 of file TGC_RodDecoderRawdata.cxx.

94 {
95 TgcRdo* theColl = nullptr;
96
97 uint32_t source_id = robFrag.rod_source_id();
98 SourceIdentifier sid(source_id);
99
100 uint16_t rdoId =
101 TgcRdo::calculateOnlineId(sid.subdetector_id(), sid.module_id());
102 TgcRdoIdHash rdoIdHash;
103 int idHash = rdoIdHash(rdoId);
104
105 ATH_MSG_DEBUG(" Created new Collection ID = " << sid.human()
106 << " Hash = " << idHash);
107
108 // create new collection
109 theColl = new TgcRdo(rdoId, idHash);
110 // add collection into IDC
111 if (rdoIdc.addCollection(theColl, idHash).isFailure()) {
112 ATH_MSG_WARNING("Failed to add TGC RDO collection to container");
113 delete theColl;
114 theColl = nullptr;
115 return nullptr;
116 }
117 theColl->setL1Id(robFrag.rod_lvl1_id());
118 theColl->setBcId(robFrag.rod_bc_id());
119 theColl->setTriggerType(robFrag.rod_lvl1_trigger_type());
120 theColl->setOnlineId(sid.subdetector_id(), sid.module_id());
121
122 uint32_t nstatus = robFrag.rod_nstatus();
123 const uint32_t* status;
124 robFrag.rod_status(status);
125 theColl->setErrors(nstatus > 0 ? status[0] : 0);
126 theColl->setRodStatus(nstatus > 1 ? status[1] : 0);
127 theColl->setLocalStatus(nstatus > 3 ? status[3] : 0);
128 theColl->setOrbit(nstatus > 4 ? status[4] : 0);
129
130 if (m_showStatusWords) {
131 showStatusWords(source_id, rdoId, idHash, nstatus, status);
132 }
133
134 return theColl;
135}
virtual StatusCode addCollection(const T *coll, IdentifierHash hashId) override final
insert collection into container with id hash if IDC should not take ownership of collection,...
void showStatusWords(const uint32_t source_id, const uint16_t rdoId, const int idHash, const uint32_t nstatus, const uint32_t *status) const
Show status words.
Gaudi::Property< bool > m_showStatusWords
Flag for showStatusWords.
void setLocalStatus(uint32_t data)
Definition TgcRdo.h:194
void setTriggerType(uint16_t v)
Definition TgcRdo.h:127
void setRodStatus(uint32_t data)
Definition TgcRdo.h:178
void setL1Id(uint32_t v)
Definition TgcRdo.h:119
void setOnlineId(uint16_t subDetectorId, uint16_t rodId)
Definition TgcRdo.cxx:37
void setOrbit(uint32_t orbit)
Definition TgcRdo.h:210
void setErrors(uint16_t data)
Definition TgcRdo.h:162
void setBcId(uint16_t v)
Definition TgcRdo.h:123
status
Definition merge.py:16

◆ initialize()

StatusCode Muon::TGC_RodDecoderRawdata::initialize ( )
overridevirtual

Standard AlgTool method.

Definition at line 22 of file TGC_RodDecoderRawdata.cxx.

22 {
23 m_tgcRODReadOut = std::make_unique<TgcRODReadOut>();
24 ATH_CHECK(m_cablingKey.initialize());
25 ATH_MSG_INFO("initialize() successful in " << name());
26 return StatusCode::SUCCESS;
27}
#define ATH_MSG_INFO(x)

◆ showStatusWords()

void Muon::TGC_RodDecoderRawdata::showStatusWords ( const uint32_t source_id,
const uint16_t rdoId,
const int idHash,
const uint32_t nstatus,
const uint32_t * status ) const
private

Show status words.

Definition at line 360 of file TGC_RodDecoderRawdata.cxx.

362 {
363 static const unsigned int maxNStatus = 5;
364 static const std::string statusDataWord[maxNStatus] = {
365 "First status word specific|generic:", // 0
366 "TGC ROD event status :", // 1
367 "ROD VME fileter bits | SSW timeout:", // 2
368 "Local status word | presence :", // 3
369 "orbit count :" // 4
370 };
371
372 static const unsigned int maxFirstStatus = 5;
373 static const std::string firstStatus[maxFirstStatus] = {
374 "incorrect BCID", // 0
375 "incorrect L1AID", // 1
376 "Timeout occurred in at least one of the FE links. Fragment is "
377 "incomplete.", // 2
378 "Data may be incorrect, see TGC ROD event status word", // 3
379 "An overflow in one of the ROD internal buffers has occurred. The "
380 "fragment is incomplete." // 4
381 };
382
383 static const unsigned int maxTgcRodEventStatus = 31;
384 static const std::string tgcRodEventStatus[maxTgcRodEventStatus] = {
385 "EC_RXsend : Error in request to send an event via RXlink", // 0
386 "EC_FELdown : A Front End link has gone down - abandoned", // 1
387 "EC_frame : Invalid FE link framing words", // 2
388 "EC_Glnk : Front End link G-link error", // 3
389 "EC_xor : Invalid XOR event checksum", // 4
390 "EC_ovfl : Input FE event is too long or FE FIFO overflow", // 5
391 "EC_timeout : Timeout expired for at least one FE link", // 6
392 "EC_xormezz : Bad XOR checksum from mezz board", // 7
393 "EC_wc0 : Event has WC=0 or WX>max WC", // 8
394 "EC_L1ID : L1ID mismatch (TTC EVID FIFO vs local).", // 9
395 "EC_nohdr : First word is not header", // 10
396 "EC_rectype : Unrecognized record type", // 11
397 "EC_null : Unexpected nulls in FE input", // 12
398 "EC_order : Word is out of order", // 13
399 "EC_LDB : Invalid or unexpected Star Switch ID", // 14
400 "EC_RXovfl : RXfifo has overflowed", // 15
401 "EC_SSWerr : SSW reports T1C, NRC, T2C, or GlinkNoLock error", // 16
402 "EC_sbid : SBid does not match SBinfo table", // 17
403 "EC_SBtype : SBtype does not match SBinfo table", // 18
404 "EC_duprx : RX ID is duplicated in the event", // 19
405 "EC_ec4 : Unexpected SB L1 Event ID(lo 4)", // 20
406 "EC_bc : Unexpected SB BCID", // 21
407 "EC_celladr : Invalid cell address", // 22
408 "EC_hitovfl : Too many hits in event", // 23
409 "EC_trgbit : Unexpected trigger bits", // 24
410 "EC_badEoE : Bad End-of-event marker received, not 0xFCA", // 25
411 "EC_endWCnot0 : WC not 0 after End-of-event marker", // 26
412 "EC_noEoE : No End-of-event marker received", // 27
413 "EC_SLGlink : Sector Logic reports G-Link error", // 28
414 "EC_SLbc : Sector Logic BCID[2:0] does not match its SB BCID", // 29
415 "EC_unxrxid : Data from disabled SSW RX ID" // 30
416 };
417
418 static const unsigned int maxSSWs = 12;
419
420 static const unsigned int maxPresence = 10;
421 static const std::string presence[maxPresence] = {
422 "", // 0
423 "raw data", // 1
424 "hits in readout fmt", // 2
425 "tracklets in readout fmt", // 3
426 "hits in chamber fmt", // 4
427 "tracklets in chamber fmt", // 5
428 "", // 6
429 "", // 7
430 "HipT output", // 8
431 "Sector Logic" // 9
432 };
433
434 static const unsigned int maxLocalStatus = 16;
435 static const std::string localStatus[maxLocalStatus] = {
436 "hit BCs are merged", // 0
437 "tracklet BCs are merged", // 1
438 "hits are sorted", // 2
439 "tracklets are sorted", // 3
440 "", // 4
441 "", // 5
442 "", // 6
443 "", // 7
444 "", // 8
445 "", // 9
446 "", // 10
447 "", // 11
448 "", // 12
449 "", // 13
450 "ROI in this fragment", // 14
451 "no L1AID, BCID check wrt ROD" // 15
452 };
453
454 ATH_MSG_INFO("***** TGC ROD STATUS WORDS for "
455 << "source_id=0x" << source_id << ", "
456 << "rdoId=0x" << rdoId << (rdoId < 16 ? " , " : ", ")
457 << "idHash=0x" << idHash << (idHash < 16 ? " , " : ", ")
458 << (idHash < 12 ? "A" : "C")
459 << (idHash % 12 + 1 < 10 ? "0" : "") << std::dec
460 << idHash % 12 + 1 << " ******");
462 "***** Based on http://cern.ch/atlas-tgc/doc/ROBformat.pdf "
463 "****************************");
464
465 for (uint32_t i = 0; i < nstatus && i < maxNStatus; i++) {
466 ATH_MSG_INFO(statusDataWord[i] << " status[" << i << "]=0x" << std::hex
467 << status[i]);
468
469 if (i == 0) {
470 // Table 2 ATLAS standard, first status word, all zero means no
471 // known errors
472 for (unsigned int j = 0; j < maxFirstStatus; j++) {
473 if ((status[i] >> j) & 0x1) {
474 ATH_MSG_INFO(std::dec << std::setw(3) << j << " : "
475 << firstStatus[j]);
476 }
477 }
478 } else if (i == 1) {
479 // Table 3 TGC ROD event status word
480 for (unsigned int j = 0; j < maxTgcRodEventStatus; j++) {
481 if ((status[i] >> j) & 0x1) {
482 ATH_MSG_INFO(std::dec << std::setw(3) << j << " : "
483 << tgcRodEventStatus[j]);
484 }
485 }
486 } else if (i == 2) {
487 // Table 4 Star switch time-out status and ROD VME filter bits
488 for (unsigned int j = 0; j < maxSSWs; j++) {
489 if ((status[i] >> j) & 0x1) {
490 ATH_MSG_INFO(std::dec << std::setw(3) << j << " : "
491 << "time-out for SSW" << j);
492 }
493 }
494 for (unsigned int j = 0 + 16; j <= maxSSWs + 16; j++) {
495 if ((status[i] >> j) & 0x1) {
496 ATH_MSG_INFO(std::dec << std::setw(3) << j << " : "
497 << "data from SSW" << j - 16
498 << " gave filter \"accept\"");
499 }
500 }
501 } else if (i == 3) {
502 // Table 6 Presence bits
503 for (unsigned int j = 0; j < maxPresence; j++) {
504 if (j == 0 || j == 6 || j == 7) {
505 continue;
506 }
507 if ((status[i] >> j) & 0x1) {
508 ATH_MSG_INFO(std::dec << std::setw(3) << j << " : "
509 << presence[j]);
510 }
511 }
512
513 // Table 5 Local status word
514 for (unsigned int j = 0 + 16; j < maxLocalStatus + 16; j++) {
515 if ((j >= 4 + 16 && j <= 13 + 16)) {
516 continue;
517 }
518 if ((status[i] >> j) & 0x1) {
519 ATH_MSG_INFO(std::dec << std::setw(3) << j << " : "
520 << localStatus[j - 16]);
521 }
522 }
523 }
524 }
525
527 "**********************************************************************"
528 "****************");
529}
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)

Member Data Documentation

◆ m_cablingKey

SG::ReadCondHandleKey<Muon::TgcCablingMap> Muon::TGC_RodDecoderRawdata::m_cablingKey
private
Initial value:
{
this, "CablingKey", "MuonTgc_CablingMap"}

Definition at line 67 of file TGC_RodDecoderRawdata.h.

67 {
68 this, "CablingKey", "MuonTgc_CablingMap"};

◆ m_checkRawData

Gaudi::Property<bool> Muon::TGC_RodDecoderRawdata::m_checkRawData {this, "CheckRawData", false}
private

Switch for checking rawdata format with readout format.

Definition at line 61 of file TGC_RodDecoderRawdata.h.

61{this, "CheckRawData", false};

◆ m_readSlbHeaderId

Gaudi::Property<bool> Muon::TGC_RodDecoderRawdata::m_readSlbHeaderId {this, "ReadSlbHeaderId", false}
private

Switch for reading IDs in SLB Header or ROD Header.

Definition at line 59 of file TGC_RodDecoderRawdata.h.

59{this, "ReadSlbHeaderId", false};

◆ m_showStatusWords

Gaudi::Property<bool> Muon::TGC_RodDecoderRawdata::m_showStatusWords {this, "ShowStatusWords", false}
private

Flag for showStatusWords.

Definition at line 65 of file TGC_RodDecoderRawdata.h.

65{this, "ShowStatusWords", false};

◆ m_tgcRODReadOut

std::unique_ptr<TgcRODReadOut> Muon::TGC_RodDecoderRawdata::m_tgcRODReadOut {}
private

RawData format converter.

Definition at line 63 of file TGC_RodDecoderRawdata.h.

63{};

The documentation for this class was generated from the following files: