CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1GlobaTriggerRawToDigi.cc
Go to the documentation of this file.
1 
16 // this class header
18 
19 // system include files
20 #include <iostream>
21 #include <iomanip>
22 #include <algorithm>
23 
24 // user include files
27 
32 
36 
40 
45 
48 
51 
56 
59 
62 
63 // constructor(s)
65 
66  // input tag for DAQ GT record
67  m_daqGtInputTag(pSet.getParameter<edm::InputTag> ("DaqGtInputTag")),
68 
69  // FED Id for GT DAQ record
70  // default value defined in DataFormats/FEDRawData/src/FEDNumbering.cc
71  // default value: assume the DAQ record is the last GT record
72  m_daqGtFedId(pSet.getUntrackedParameter<int> (
73  "DaqGtFedId", FEDNumbering::MAXTriggerGTPFEDID)),
74 
75  // mask for active boards
76  m_activeBoardsMaskGt(pSet.getParameter<unsigned int> ("ActiveBoardsMask")),
77 
78  // number of bunch crossing to be unpacked
79  m_unpackBxInEvent(pSet.getParameter<int> ("UnpackBxInEvent")),
80 
81  // create GTFE, FDL, PSB cards once per producer
82  // content will be reset whenever needed
83 
84  m_lowSkipBxInEvent(0), m_uppSkipBxInEvent(0),
85 
86  m_recordLength0(0), m_recordLength1(0),
87 
88  m_totalBxInEvent(0), m_verbosity(pSet.getUntrackedParameter<int> ("Verbosity", 0)),
89 
90  m_isDebugEnabled(edm::isDebugEnabled())
91 
92 {
93 
94  produces<L1GlobalTriggerReadoutRecord> ();
95  produces<L1MuGMTReadoutCollection> ();
96 
97  produces<std::vector<L1MuRegionalCand> > ("DT");
98  produces<std::vector<L1MuRegionalCand> > ("CSC");
99  produces<std::vector<L1MuRegionalCand> > ("RPCb");
100  produces<std::vector<L1MuRegionalCand> > ("RPCf");
101  produces<std::vector<L1MuGMTCand> > ();
102  consumes<FEDRawDataCollection>(m_daqGtInputTag);
103 
104  // create GTFE, FDL, PSB cards once per producer
105  // content will be reset whenever needed
106  m_gtfeWord = new L1GtfeWord();
107  m_gtFdlWord = new L1GtFdlWord();
108  m_gtPsbWord = new L1GtPsbWord();
109 
110  if (m_verbosity && m_isDebugEnabled) {
111 
112  LogDebug("L1GlobalTriggerRawToDigi")
113  << "\nInput tag for DAQ GT record: " << m_daqGtInputTag
114  << "\nFED Id for DAQ GT record: " << m_daqGtFedId
115  << "\nMask for active boards (hex format): " << std::hex
116  << std::setw(sizeof(m_activeBoardsMaskGt) * 2) << std::setfill('0')
118  << std::dec << std::setfill(' ')
119  << "\nNumber of bunch crossing to be unpacked: "
120  << m_unpackBxInEvent << "\n"
121  << std::endl;
122  }
123 
124  if ( ( m_unpackBxInEvent > 0 ) && ( ( m_unpackBxInEvent % 2 ) == 0 )) {
126 
127  if (m_verbosity) {
128  edm::LogInfo("L1GlobalTriggerRawToDigi")
129  << "\nWARNING: Number of bunch crossing to be unpacked rounded to: "
130  << m_unpackBxInEvent << "\n The number must be an odd number!\n"
131  << std::endl;
132  }
133  }
134 
135 }
136 
137 // destructor
139 
140  delete m_gtfeWord;
141  delete m_gtFdlWord;
142  delete m_gtPsbWord;
143 
144 }
145 
148  static const char* const kComm1=
149  "# input tag for GT readout collection: \n"
150  "# source = hardware record, \n"
151  "# l1GtPack = GT packer (DigiToRaw)";
152  desc.add<edm::InputTag>("DaqGtInputTag",edm::InputTag("l1GtPack"))->setComment(kComm1);
153  static const char* const kComm2=
154  "# FED Id for GT DAQ record \n"
155  "# default value defined in DataFormats/FEDRawData/src/FEDNumbering.cc";
156  desc.addUntracked<int>("DaqGtFedId",FEDNumbering::MAXTriggerGTPFEDID)->setComment(kComm2);
157  static const char* const kComm3=
158  "# mask for active boards (actually 16 bits) \n"
159  "# if bit is zero, the corresponding board will not be unpacked \n"
160  "# default: no board masked";
161  desc.add<unsigned int>("ActiveBoardsMask",0xFFFF)->setComment(kComm3);
162  static const char* const kComm4=
163  "# number of 'bunch crossing in the event' (bxInEvent) to be unpacked \n"
164  "# symmetric around L1Accept (bxInEvent = 0): \n"
165  "# 1 (bxInEvent = 0); 3 (F 0 1) (standard record); 5 (E F 0 1 2) (debug record) \n"
166  "# even numbers (except 0) 'rounded' to the nearest lower odd number \n"
167  "# negative value: unpack all available bxInEvent \n"
168  "# if more bxInEvent than available are required, unpack what exists and write a warning";
169  desc.add<int>("UnpackBxInEvent",-1)->setComment(kComm4);
170  desc.addUntracked<int>("Verbosity",0);
171  descriptions.add("l1GlobalTriggerRawToDigi",desc);
172 }
173 
174 
175 // member functions
176 
177 // method called to produce the data
179 
180  // get records from EventSetup
181 
182  // muon trigger scales
184  evSetup.get<L1MuTriggerScalesRcd> ().get(trigscales_h);
185  m_TriggerScales = trigscales_h.product();
186 
187  edm::ESHandle<L1MuTriggerPtScale> trigptscale_h;
188  evSetup.get<L1MuTriggerPtScaleRcd> ().get(trigptscale_h);
189  m_TriggerPtScale = trigptscale_h.product();
190 
191  // board maps
193  evSetup.get<L1GtBoardMapsRcd> ().get(l1GtBM);
194 
195  const std::vector<L1GtBoard> boardMaps = l1GtBM->gtBoardMaps();
196  int boardMapsSize = boardMaps.size();
197 
198  typedef std::vector<L1GtBoard>::const_iterator CItBoardMaps;
199 
200  // create an ordered vector for the GT DAQ record
201  // header (pos 0 in record) and trailer (last position in record)
202  // not included, as they are not in board list
203  std::vector<L1GtBoard> gtRecordMap;
204  gtRecordMap.reserve(boardMapsSize);
205 
206  for (int iPos = 0; iPos < boardMapsSize; ++iPos) {
207  for (CItBoardMaps itBoard = boardMaps.begin(); itBoard != boardMaps.end(); ++itBoard) {
208 
209  if (itBoard->gtPositionDaqRecord() == iPos) {
210  gtRecordMap.push_back(*itBoard);
211  break;
212  }
213 
214  }
215  }
216 
217  // raw collection
218 
220  iEvent.getByLabel(m_daqGtInputTag, fedHandle);
221 
222  if (!fedHandle.isValid()) {
223  if (m_verbosity) {
224  edm::LogWarning("L1GlobalTriggerRawToDigi")
225  << "\nWarning: FEDRawDataCollection with input tag " << m_daqGtInputTag
226  << "\nrequested in configuration, but not found in the event."
227  << "\nQuit unpacking this event" << std::endl;
228  }
229 
230  produceEmptyProducts(iEvent);
231 
232  return;
233  }
234 
235  // retrieve data for Global Trigger FED (GT + GMT)
236  const FEDRawData& raw = ( fedHandle.product() )->FEDData(m_daqGtFedId);
237 
238  int gtSize = raw.size();
239 
240  // get a const pointer to the beginning of the data buffer
241  const unsigned char* ptrGt = raw.data();
242 
243  // get a const pointer to the end of the data buffer
244  const unsigned char* endPtrGt = ptrGt + gtSize;
245 
246  //
247  if (m_verbosity && m_isDebugEnabled) {
248 
249  LogTrace("L1GlobalTriggerRawToDigi") << "\n Size of raw data: "
250  << gtSize << "\n" << std::endl;
251 
252  std::ostringstream myCoutStream;
253  dumpFedRawData(ptrGt, gtSize, myCoutStream);
254 
255  LogTrace("L1GlobalTriggerRawToDigi") << "\n Dump FEDRawData\n"
256  << myCoutStream.str() << "\n" << std::endl;
257 
258  }
259 
260  // unpack header (we have one header only)
261  int headerSize = 8;
262 
263  if ((ptrGt + headerSize) > endPtrGt) {
264  edm::LogError("L1GlobalTriggerRawToDigi")
265  << "\nError: Pointer after header greater than end pointer."
266  << "\n Put empty products in the event!"
267  << "\n Quit unpacking this event." << std::endl;
268 
269  produceEmptyProducts(iEvent);
270 
271  return;
272  }
273 
274 
275  FEDHeader cmsHeader(ptrGt);
276  FEDTrailer cmsTrailer(ptrGt + gtSize - headerSize);
277 
278  unpackHeader(ptrGt, cmsHeader);
279  ptrGt += headerSize; // advance with header size
280 
281  // unpack first GTFE to find the length of the record and the active boards
282  // here GTFE assumed immediately after the header
283 
284  // if pointer after GTFE payload is greater than pointer at
285  // the end of GT payload, produce empty products and quit unpacking
286  if ((ptrGt + m_gtfeWord->getSize()) > endPtrGt) {
287  edm::LogError("L1GlobalTriggerRawToDigi")
288  << "\nError: Pointer after GTFE greater than end pointer."
289  << "\n Put empty products in the event!"
290  << "\n Quit unpacking this event." << std::endl;
291 
292  produceEmptyProducts(iEvent);
293 
294  return;
295  }
296 
297  bool gtfeUnpacked = false;
298 
299  for (CItBoardMaps itBoard = boardMaps.begin(); itBoard != boardMaps.end(); ++itBoard) {
300 
301  if (itBoard->gtBoardType() == GTFE) {
302 
303  // unpack GTFE
304  if (itBoard->gtPositionDaqRecord() == 1) {
305 
306  m_gtfeWord->unpack(ptrGt);
307  ptrGt += m_gtfeWord->getSize(); // advance with GTFE block size
308  gtfeUnpacked = true;
309 
310  if (m_verbosity && m_isDebugEnabled) {
311 
312  std::ostringstream myCoutStream;
313  m_gtfeWord->print(myCoutStream);
314  LogTrace("L1GlobalTriggerRawToDigi") << myCoutStream.str() << "\n" << std::endl;
315  }
316 
317  // break the loop - GTFE was found
318  break;
319 
320  } else {
321 
322  if (m_verbosity) {
323  edm::LogWarning("L1GlobalTriggerRawToDigi")
324  << "\nWarning: GTFE block found in raw data does not follow header."
325  << "\nAssumed start position of the block is wrong!"
326  << "\nQuit unpacking this event" << std::endl;
327  }
328 
329  produceEmptyProducts(iEvent);
330 
331  return;
332  }
333 
334  }
335  }
336 
337  // quit if no GTFE found
338  if (!gtfeUnpacked) {
339 
340  if (m_verbosity) {
341  edm::LogWarning("L1GlobalTriggerRawToDigi")
342  << "\nWarning: no GTFE block found in raw data."
343  << "\nCan not find the record length (BxInEvent) and the active boards!"
344  << "\nQuit unpacking this event" << std::endl;
345  }
346 
347  produceEmptyProducts(iEvent);
348 
349  return;
350  }
351 
352  // life normal here, GTFE found
353 
354  // get list of active blocks
355  // blocks not active are not written to the record
356  cms_uint16_t activeBoardsGtInitial = m_gtfeWord->activeBoards();
357  cms_uint16_t altNrBxBoardInitial = m_gtfeWord->altNrBxBoard();
358 
359  // mask some boards, if needed
360  cms_uint16_t activeBoardsGt = activeBoardsGtInitial & m_activeBoardsMaskGt;
361  m_gtfeWord->setActiveBoards(activeBoardsGt);
362 
363  if (m_verbosity) {
364  LogDebug("L1GlobalTriggerRawToDigi") << "\nActive boards before masking: 0x" << std::hex
365  << std::setw(sizeof ( activeBoardsGtInitial ) * 2) << std::setfill('0')
366  << activeBoardsGtInitial << std::dec << std::setfill(' ')
367  << "\nActive boards after masking: 0x" << std::hex << std::setw(
368  sizeof ( activeBoardsGt ) * 2) << std::setfill('0') << activeBoardsGt << std::dec
369  << std::setfill(' ') << " \n" << std::endl;
370  }
371 
372  // loop over other blocks in the raw record, count them if they are active
373 
374  int numberGtfeBoards = 0;
375  int numberFdlBoards = 0;
376  int numberPsbBoards = 0;
377  int numberGmtBoards = 0;
378  int numberTcsBoards = 0;
379  int numberTimBoards = 0;
380 
381  for (CItBoardMaps itBoard = boardMaps.begin(); itBoard != boardMaps.end(); ++itBoard) {
382 
383  int iActiveBit = itBoard->gtBitDaqActiveBoards();
384  bool activeBoardToUnpack = false;
385 
386  if (iActiveBit >= 0) {
387  activeBoardToUnpack = activeBoardsGt & ( 1 << iActiveBit );
388  } else {
389  // board not in the ActiveBoards for the record
390  continue;
391  }
392 
393  if (activeBoardToUnpack) {
394 
395  switch (itBoard->gtBoardType()) {
396  case GTFE: {
397  numberGtfeBoards++;
398  }
399 
400  break;
401  case FDL: {
402  numberFdlBoards++;
403  }
404 
405  break;
406  case PSB: {
407  numberPsbBoards++;
408  }
409 
410  break;
411  case GMT: {
412  numberGmtBoards++;
413  }
414 
415  break;
416  case TCS: {
417  numberTcsBoards++;
418  }
419 
420  break;
421  case TIM: {
422  numberTimBoards++;
423  }
424 
425  break;
426  default: {
427  // do nothing, all blocks are given in GtBoardType enum
428  if (m_verbosity) {
429  LogDebug("L1GlobalTriggerRawToDigi") << "\nBoard of type "
430  << itBoard->gtBoardType() << " not expected in record.\n"
431  << std::endl;
432  }
433  }
434 
435  break;
436  }
437  }
438 
439  }
440 
441  // produce the L1GlobalTriggerReadoutRecord now, after we found the maximum number of
442  // BxInEvent the record has and how many boards are active (it is just reserving space
443  // for vectors)
444  //LogDebug("L1GlobalTriggerRawToDigi")
445  //<< "\nL1GlobalTriggerRawToDigi: producing L1GlobalTriggerReadoutRecord\n"
446  //<< "\nL1GlobalTriggerRawToDigi: producing L1MuGMTReadoutCollection;\n"
447  //<< std::endl;
448 
449  // get number of Bx in the event from GTFE block corresponding to alternative 0 and 1 in
452 
453  int maxBxInEvent = std::max(m_recordLength0, m_recordLength1);
454 
455 
456  std::auto_ptr<L1GlobalTriggerReadoutRecord> gtReadoutRecord(new L1GlobalTriggerReadoutRecord(
457  maxBxInEvent, numberFdlBoards, numberPsbBoards));
458 
459  // produce also the GMT readout collection and set the reference in GT record
460  std::auto_ptr<L1MuGMTReadoutCollection> gmtrc(new L1MuGMTReadoutCollection(maxBxInEvent));
461 
462  //edm::RefProd<L1MuGMTReadoutCollection> refProdMuGMT = iEvent.getRefBeforePut<
463  // L1MuGMTReadoutCollection> ();
464 
465  //if (m_verbosity) {
466  // LogDebug("L1GlobalTriggerRawToDigi")
467  // << "\nL1GlobalTriggerRawToDigi: set L1MuGMTReadoutCollection RefProd"
468  // << " in L1GlobalTriggerReadoutRecord.\n" << std::endl;
469  //}
470  //gtReadoutRecord->setMuCollectionRefProd(refProdMuGMT);
471 
472 
473  // ... then unpack modules other than GTFE, if requested
474 
475  for (CItBoardMaps itBoard = gtRecordMap.begin(); itBoard != gtRecordMap.end(); ++itBoard) {
476 
477  int iActiveBit = itBoard->gtBitDaqActiveBoards();
478 
479  bool activeBoardToUnpack = false;
480  bool activeBoardInitial = false;
481 
482  int altNrBxBoardVal = -1;
483 
484  if (iActiveBit >= 0) {
485  activeBoardInitial = activeBoardsGtInitial & ( 1 << iActiveBit );
486  activeBoardToUnpack = activeBoardsGt & ( 1 << iActiveBit );
487 
488  altNrBxBoardVal = (altNrBxBoardInitial & ( 1 << iActiveBit )) >> iActiveBit;
489 
490  if (altNrBxBoardVal == 1) {
492  } else if (altNrBxBoardVal == 0) {
494  } else {
495  if (m_verbosity) {
496  edm::LogWarning("L1GlobalTriggerRawToDigi")
497  << "\n\nWARNING: Wrong value altNrBxBoardVal = " << altNrBxBoardVal
498  << " for board " << std::hex << ( itBoard->gtBoardId() ) << std::dec
499  << "\n iActiveBit = " << iActiveBit
500  << "\n altNrBxBoardInitial = 0x" << std::hex << altNrBxBoardInitial << std::dec
501  << "\n activeBoardsGt = 0x" << std::hex << activeBoardsGt << std::dec
502  << "\n activeBoardInitial = " << activeBoardInitial
503  << "\n activeBoardToUnpack = " << activeBoardToUnpack
504  << "\n Set altNrBxBoardVal tentatively to "
505  << m_recordLength0 << "\n Job may crash or produce wrong results!\n\n"
506  << std::endl;
507  }
508 
510  }
511 
512  // number of BX required to be unpacked
513 
515  if (m_verbosity) {
516  LogDebug("L1GlobalTriggerRawToDigi")
517  << "\nWARNING: Number of available bunch crosses for board"
518  << ( itBoard->gtBoardId() ) << " in the record ( " << m_totalBxInEvent
519  << " ) \n is smaller than the number of bunch crosses requested to be unpacked ("
520  << m_unpackBxInEvent << " )!!! \n Unpacking only "
521  << m_totalBxInEvent << " bunch crosses.\n" << std::endl;
522  }
523 
524  m_lowSkipBxInEvent = 0;
526 
527  } else if (m_unpackBxInEvent < 0) {
528 
529  m_lowSkipBxInEvent = 0;
531 
532  if (m_verbosity) {
533  LogDebug("L1GlobalTriggerRawToDigi") << "\nUnpacking all " << m_totalBxInEvent
534  << " bunch crosses available." << "\n" << std::endl;
535  }
536 
537 
538  } else if (m_unpackBxInEvent == 0) {
539 
542 
543  if (m_verbosity) {
544  LogDebug("L1GlobalTriggerRawToDigi")
545  << "\nNo bxInEvent required to be unpacked from " << m_totalBxInEvent
546  << " bunch crosses available." << "\n" << std::endl;
547  }
548 
549  // change RecordLength
550  // cast int to cms_uint16_t (there are normally 3 or 5 BxInEvent)
551  m_gtfeWord->setRecordLength(static_cast<cms_uint16_t> (m_unpackBxInEvent));
552  m_gtfeWord->setRecordLength1(static_cast<cms_uint16_t> (m_unpackBxInEvent));
553 
554  } else {
555 
558 
559  if (m_verbosity) {
560  LogDebug("L1GlobalTriggerRawToDigi") << "\nUnpacking " << m_unpackBxInEvent
561  << " bunch crosses from " << m_totalBxInEvent
562  << " bunch crosses available." << "\n" << std::endl;
563  }
564 
565  // change RecordLength
566  // cast int to cms_uint16_t (there are normally 3 or 5 BxInEvent)
567  m_gtfeWord->setRecordLength(static_cast<cms_uint16_t> (m_unpackBxInEvent));
568  m_gtfeWord->setRecordLength1(static_cast<cms_uint16_t> (m_unpackBxInEvent));
569 
570  }
571 
572  } else {
573  // board not in the ActiveBoards for the record
574  continue;
575  }
576 
577  if (!activeBoardInitial) {
578  if (m_verbosity) {
579  LogDebug("L1GlobalTriggerRawToDigi") << "\nBoard of type "
580  << itBoard->gtBoardName() << " with index " << itBoard->gtBoardIndex()
581  << " not active initially in raw data.\n" << std::endl;
582  }
583  continue;
584  }
585 
586  // active board initially, could unpack it
587  switch (itBoard->gtBoardType()) {
588 
589  case FDL: {
590  for (int iFdl = 0; iFdl < m_totalBxInEvent; ++iFdl) {
591 
592  // if pointer after FDL payload is greater than pointer at
593  // the end of GT payload, produce empty products and quit unpacking
594  if ((ptrGt + m_gtFdlWord->getSize()) > endPtrGt) {
595  edm::LogError("L1GlobalTriggerRawToDigi")
596  << "\nError: Pointer after FDL " << iFdl
597  << " greater than end pointer."
598  << "\n Put empty products in the event!"
599  << "\n Quit unpacking this event." << std::endl;
600 
601  produceEmptyProducts(iEvent);
602 
603  return;
604  }
605 
606  // unpack only if requested, otherwise skip it
607  if (activeBoardToUnpack) {
608 
609  // unpack only bxInEvent requested, otherwise skip it
610  if ( ( iFdl >= m_lowSkipBxInEvent ) && ( iFdl < m_uppSkipBxInEvent )) {
611 
612  m_gtFdlWord->unpack(ptrGt);
613 
614  // add 1 to the GT luminosity number to use the same convention as
615  // offline, where LS number starts with 1;
616  // in GT hardware, LS starts with 0
617  cms_uint16_t lsNr = m_gtFdlWord->lumiSegmentNr() + 1;
619 
620  // add FDL block to GT readout record
621  gtReadoutRecord->setGtFdlWord(*m_gtFdlWord);
622 
623  if (m_verbosity && m_isDebugEnabled) {
624 
625  std::ostringstream myCoutStream;
626  m_gtFdlWord->print(myCoutStream);
627  LogTrace("L1GlobalTriggerRawToDigi") << myCoutStream.str() << "\n"
628  << std::endl;
629  }
630 
631  // ... and reset it
632  m_gtFdlWord->reset();
633  }
634 
635  }
636 
637  ptrGt += m_gtFdlWord->getSize(); // advance with FDL block size
638 
639  }
640  }
641 
642  break;
643  case PSB: {
644  for (int iPsb = 0; iPsb < m_totalBxInEvent; ++iPsb) {
645 
646  // if pointer after PSB payload is greater than pointer at
647  // the end of GT payload, produce empty products and quit unpacking
648  if ((ptrGt + m_gtPsbWord->getSize()) > endPtrGt) {
649  edm::LogError("L1GlobalTriggerRawToDigi")
650  << "\nError: Pointer after PSB " << iPsb
651  << " greater than end pointer."
652  << "\n Put empty products in the event!"
653  << "\n Quit unpacking this event." << std::endl;
654 
655  produceEmptyProducts(iEvent);
656 
657  return;
658  }
659 
660  // unpack only if requested, otherwise skip it
661  if (activeBoardToUnpack) {
662 
663  // unpack only bxInEvent requested, otherwise skip it
664  if ( ( iPsb >= m_lowSkipBxInEvent ) && ( iPsb < m_uppSkipBxInEvent )) {
665 
666  unpackPSB(evSetup, ptrGt, *m_gtPsbWord);
667 
668  // add PSB block to GT readout record
669  gtReadoutRecord->setGtPsbWord(*m_gtPsbWord);
670 
671  if (m_verbosity && m_isDebugEnabled) {
672 
673  std::ostringstream myCoutStream;
674  m_gtPsbWord->print(myCoutStream);
675  LogTrace("L1GlobalTriggerRawToDigi") << myCoutStream.str() << "\n"
676  << std::endl;
677  }
678 
679  // ... and reset it
680  m_gtPsbWord->reset();
681  }
682 
683  }
684 
685  ptrGt += m_gtPsbWord->getSize(); // advance with PSB block size
686 
687  }
688  }
689  break;
690  case GMT: {
691 
692  // 17*64/8 TODO FIXME ask Ivan for a getSize() function for GMT record
693  unsigned int gmtRecordSize = 136;
694  unsigned int gmtCollSize = m_totalBxInEvent * gmtRecordSize;
695 
696  // if pointer after GMT payload is greater than pointer at
697  // the end of GT payload, produce empty products and quit unpacking
698  if ((ptrGt + gmtCollSize) > endPtrGt) {
699  edm::LogError("L1GlobalTriggerRawToDigi")
700  << "\nError: Pointer after GMT "
701  << " greater than end pointer."
702  << "\n Put empty products in the event!"
703  << "\n Quit unpacking this event." << std::endl;
704 
705  produceEmptyProducts(iEvent);
706 
707  return;
708  }
709 
710  // unpack only if requested, otherwise skip it
711  if (activeBoardToUnpack) {
712  unpackGMT(ptrGt, gmtrc, iEvent);
713  }
714 
715 
716  ptrGt += gmtCollSize; // advance with GMT block size
717  }
718  break;
719  default: {
720  // do nothing, all blocks are given in GtBoardType enum
721  if (m_verbosity) {
722 
723  LogDebug("L1GlobalTriggerRawToDigi") << "\nBoard of type "
724  << itBoard->gtBoardType() << " not expected in record.\n" << std::endl;
725  }
726  }
727  break;
728 
729  }
730 
731  }
732 
733  // add GTFE block to GT readout record, after updating active boards and record length
734 
735  gtReadoutRecord->setGtfeWord(*m_gtfeWord);
736 
737  // ... and reset it
738  m_gtfeWord->reset();
739 
740 
741 
742  // unpack trailer
743 
744  int trailerSize = 8;
745 
746  // if pointer after trailer is greater than pointer at
747  // the end of GT payload, produce empty products and quit unpacking
748  if ((ptrGt + trailerSize) > endPtrGt) {
749  edm::LogError("L1GlobalTriggerRawToDigi")
750  << "\nError: Pointer after trailer "
751  << " greater than end pointer."
752  << "\n Put empty products in the event!"
753  << "\n Quit unpacking this event." << std::endl;
754 
755  produceEmptyProducts(iEvent);
756 
757  return;
758  }
759 
760  unpackTrailer(ptrGt, cmsTrailer);
761 
762  //
763  if (m_verbosity && m_isDebugEnabled) {
764  std::ostringstream myCoutStream;
765  gtReadoutRecord->print(myCoutStream);
766  LogTrace("L1GlobalTriggerRawToDigi")
767  << "\n The following L1 GT DAQ readout record was unpacked.\n"
768  << myCoutStream.str() << "\n" << std::endl;
769  }
770 
771  // put records into event
772 
773  iEvent.put(gmtrc);
774  iEvent.put(gtReadoutRecord);
775 
776 }
777 
778 // unpack header
779 void L1GlobalTriggerRawToDigi::unpackHeader(const unsigned char* gtPtr, FEDHeader& cmsHeader) {
780 
781  // TODO if needed in another format
782 
783  // print the header info
784  if (m_verbosity && m_isDebugEnabled) {
785 
786  const cms_uint64_t* payload =
787  reinterpret_cast<cms_uint64_t*> (const_cast<unsigned char*> (gtPtr));
788 
789  std::ostringstream myCoutStream;
790 
791  // one word only
792  int iWord = 0;
793 
794  myCoutStream << std::setw(4) << iWord << " " << std::hex << std::setfill('0')
795  << std::setw(16) << payload[iWord] << std::dec << std::setfill(' ') << "\n"
796  << std::endl;
797 
798  myCoutStream << " Event_type: " << std::hex << " hex: " << " " << std::setw(1)
799  << std::setfill('0') << cmsHeader.triggerType() << std::setfill(' ') << std::dec
800  << " dec: " << cmsHeader.triggerType() << std::endl;
801 
802  myCoutStream << " LVL1_Id: " << std::hex << " hex: " << "" << std::setw(6)
803  << std::setfill('0') << cmsHeader.lvl1ID() << std::setfill(' ') << std::dec
804  << " dec: " << cmsHeader.lvl1ID() << std::endl;
805 
806  myCoutStream << " BX_Id: " << std::hex << " hex: " << " " << std::setw(3)
807  << std::setfill('0') << cmsHeader.bxID() << std::setfill(' ') << std::dec
808  << " dec: " << cmsHeader.bxID() << std::endl;
809 
810  myCoutStream << " Source_Id: " << std::hex << " hex: " << " " << std::setw(3)
811  << std::setfill('0') << cmsHeader.sourceID() << std::setfill(' ') << std::dec
812  << " dec: " << cmsHeader.sourceID() << std::endl;
813 
814  myCoutStream << " FOV: " << std::hex << " hex: " << " " << std::setw(1)
815  << std::setfill('0') << cmsHeader.version() << std::setfill(' ') << std::dec
816  << " dec: " << cmsHeader.version() << std::endl;
817 
818  myCoutStream << " H: " << std::hex << " hex: " << " " << std::setw(1)
819  << std::setfill('0') << cmsHeader.moreHeaders() << std::setfill(' ') << std::dec
820  << " dec: " << cmsHeader.moreHeaders() << std::endl;
821 
822  LogDebug("L1GlobalTriggerRawToDigi") << "\n CMS Header \n" << myCoutStream.str() << "\n"
823  << std::endl;
824 
825  }
826 
827 }
828 
829 // unpack PSB records
830 // psbPtr pointer to the beginning of the each PSB block obtained from gtPtr
832  const edm::EventSetup& evSetup, const unsigned char* psbPtr, L1GtPsbWord& psbWord) {
833 
834  //LogDebug("L1GlobalTriggerRawToDigi")
835  //<< "\nUnpacking PSB block.\n"
836  //<< std::endl;
837 
839 
840  int psbSize = psbWord.getSize();
841  int psbWords = psbSize / uLength;
842 
843  const cms_uint64_t* payload =
844  reinterpret_cast<cms_uint64_t*> (const_cast<unsigned char*> (psbPtr));
845 
846  for (int iWord = 0; iWord < psbWords; ++iWord) {
847 
848  // fill PSB
849  // the second argument must match the word index defined in L1GtPsbWord class
850 
851  psbWord.setBoardId(payload[iWord], iWord);
852  psbWord.setBxInEvent(payload[iWord], iWord);
853  psbWord.setBxNr(payload[iWord], iWord);
854  psbWord.setEventNr(payload[iWord], iWord);
855 
856  psbWord.setAData(payload[iWord], iWord);
857  psbWord.setBData(payload[iWord], iWord);
858 
859  psbWord.setLocalBxNr(payload[iWord], iWord);
860 
861  LogTrace("L1GlobalTriggerRawToDigi") << std::setw(4) << iWord << " " << std::hex
862  << std::setfill('0') << std::setw(16) << payload[iWord] << std::dec
863  << std::setfill(' ') << std::endl;
864 
865  }
866 
867 }
868 
869 // unpack the GMT record
870 void L1GlobalTriggerRawToDigi::unpackGMT(const unsigned char* chp, std::auto_ptr<
872 
873  //LogDebug("L1GlobalTriggerRawToDigi")
874  //<< "\nUnpacking GMT collection.\n"
875  //<< std::endl;
876 
877  // 17*64/2 TODO FIXME ask Ivan for a getSize() function for GMT record
878  const unsigned int gmtRecordSize32 = 34;
879 
880  std::auto_ptr<std::vector<L1MuRegionalCand> > DTCands(new std::vector<L1MuRegionalCand>);
881  std::auto_ptr<std::vector<L1MuRegionalCand> > CSCCands(new std::vector<L1MuRegionalCand>);
882  std::auto_ptr<std::vector<L1MuRegionalCand> > RPCbCands(new std::vector<L1MuRegionalCand>);
883  std::auto_ptr<std::vector<L1MuRegionalCand> > RPCfCands(new std::vector<L1MuRegionalCand>);
884  std::auto_ptr<std::vector<L1MuGMTCand> > GMTCands(new std::vector<L1MuGMTCand>);
885 
886  const unsigned* p = (const unsigned*) chp;
887 
888  // min Bx's in the event, computed after m_totalBxInEvent is obtained from GTFE block
889  // assume symmetrical number of BX around L1Accept
890  int iBxInEvent = ( m_totalBxInEvent + 1 ) / 2 - m_totalBxInEvent;
891 
892  for (int iGmtRec = 0; iGmtRec < m_totalBxInEvent; ++iGmtRec) {
893 
894  // unpack only bxInEvent requested, otherwise skip it
895  if ( ( iGmtRec >= m_lowSkipBxInEvent ) && ( iGmtRec < m_uppSkipBxInEvent )) {
896 
897  // Dump the block
898  const cms_uint64_t* bp =
899  reinterpret_cast<cms_uint64_t*> (const_cast<unsigned*> (p));
900  for (int iWord = 0; iWord < 17; iWord++) {
901  LogTrace("L1GlobalTriggerRawToDigi") << std::setw(4) << iWord << " " << std::hex
902  << std::setfill('0') << std::setw(16) << *bp++ << std::dec << std::setfill(
903  ' ') << std::endl;
904  }
905 
906  L1MuGMTReadoutRecord gmtrr(iBxInEvent);
907 
908  gmtrr.setEvNr( ( *p ) & 0xffffff);
909  gmtrr.setBCERR( ( ( *p ) >> 24 ) & 0xff);
910  p++;
911 
912  gmtrr.setBxNr( ( *p ) & 0xfff);
913  if ( ( ( *p ) >> 15 ) & 1) {
914  gmtrr.setBxInEvent( ( ( ( *p ) >> 12 ) & 7 ) - 8);
915  } else {
916  gmtrr.setBxInEvent( ( ( ( *p ) >> 12 ) & 7 ));
917  }
918  // to do: check here the block length and the board id
919  p++;
920 
921  for (int im = 0; im < 16; im++) {
922  // flip the pt and quality bits -- this should better be done by GMT input chips
923  unsigned waux = *p++;
924  waux = ( waux & 0xffff00ff ) | ( ( ~waux ) & 0x0000ff00 );
925  L1MuRegionalCand cand(waux, iBxInEvent);
926  // fix the type assignment (csc=2, rpcb=1) -- should be done by GMT input chips
927  if (im >= 4 && im < 8) cand.setType(1);
928  if (im >= 8 && im < 12) cand.setType(2);
930  cand.setEtaValue(m_TriggerScales->getRegionalEtaScale(cand.type_idx())->getCenter(
931  cand.eta_packed()));
933  gmtrr.setInputCand(im, cand);
934  if (!cand.empty()) {
935  if (im < 4) DTCands->push_back(cand);
936  if (im >= 4 && im < 8) RPCbCands->push_back(cand);
937  if (im >= 8 && im < 12) CSCCands->push_back(cand);
938  if (im >= 12) RPCfCands->push_back(cand);
939  }
940  }
941 
942  unsigned char* prank = (unsigned char*) ( p + 12 );
943 
944  for (int im = 0; im < 12; im++) {
945  unsigned waux = *p++;
946  unsigned raux = im < 8 ? *prank++ : 0; // only fwd and brl cands have valid rank
947  L1MuGMTExtendedCand cand(waux, raux, iBxInEvent);
951  if (im < 4)
952  gmtrr.setGMTBrlCand(im, cand);
953  else if (im < 8)
954  gmtrr.setGMTFwdCand(im - 4, cand);
955  else {
956  gmtrr.setGMTCand(im - 8, cand);
957  if (!cand.empty()) GMTCands->push_back(cand);
958  }
959  }
960 
961  // skip the two sort rank words and two chip BX words
962  p += 4;
963 
964  gmtrc->addRecord(gmtrr);
965 
966  } else {
967  // increase the pointer with the GMT record size
968  p += gmtRecordSize32;
969  }
970 
971  // increase the BxInEvent number
972  iBxInEvent++;
973 
974  }
975 
976  iEvent.put(DTCands, "DT");
977  iEvent.put(CSCCands, "CSC");
978  iEvent.put(RPCbCands, "RPCb");
979  iEvent.put(RPCfCands, "RPCf");
980  iEvent.put(GMTCands);
981 
982 }
983 
984 // unpack trailer word
985 // trPtr pointer to the beginning of trailer obtained from gtPtr
986 void L1GlobalTriggerRawToDigi::unpackTrailer(const unsigned char* trlPtr, FEDTrailer& cmsTrailer) {
987 
988  // TODO if needed in another format
989 
990  // print the trailer info
991  if (m_verbosity && m_isDebugEnabled) {
992 
993  const cms_uint64_t* payload =
994  reinterpret_cast<cms_uint64_t*> (const_cast<unsigned char*> (trlPtr));
995 
996  std::ostringstream myCoutStream;
997 
998  // one word only
999  int iWord = 0;
1000 
1001  myCoutStream << std::setw(4) << iWord << " " << std::hex << std::setfill('0')
1002  << std::setw(16) << payload[iWord] << std::dec << std::setfill(' ') << "\n"
1003  << std::endl;
1004 
1005  myCoutStream << " Event_length: " << std::hex << " hex: " << "" << std::setw(6)
1006  << std::setfill('0') << cmsTrailer.lenght() << std::setfill(' ') << std::dec
1007  << " dec: " << cmsTrailer.lenght() << std::endl;
1008 
1009  myCoutStream << " CRC: " << std::hex << " hex: " << " " << std::setw(4)
1010  << std::setfill('0') << cmsTrailer.crc() << std::setfill(' ') << std::dec
1011  << " dec: " << cmsTrailer.crc() << std::endl;
1012 
1013  myCoutStream << " Event_status: " << std::hex << " hex: " << " " << std::setw(2)
1014  << std::setfill('0') << cmsTrailer.evtStatus() << std::setfill(' ') << std::dec
1015  << " dec: " << cmsTrailer.evtStatus() << std::endl;
1016 
1017  myCoutStream << " TTS_bits: " << std::hex << " hex: " << " " << std::setw(1)
1018  << std::setfill('0') << cmsTrailer.ttsBits() << std::setfill(' ') << std::dec
1019  << " dec: " << cmsTrailer.ttsBits() << std::endl;
1020 
1021  myCoutStream << " More trailers: " << std::hex << " hex: " << " " << std::setw(1)
1022  << std::setfill('0') << cmsTrailer.moreTrailers() << std::setfill(' ') << std::dec
1023  << " dec: " << cmsTrailer.moreTrailers() << std::endl;
1024 
1025  LogDebug("L1GlobalTriggerRawToDigi") << "\n CMS Trailer \n" << myCoutStream.str() << "\n"
1026  << std::endl;
1027 
1028  }
1029 
1030 }
1031 
1032 // produce empty products in case of problems
1034 
1035  std::auto_ptr<L1GlobalTriggerReadoutRecord> gtReadoutRecord(
1037 
1038  std::auto_ptr<L1MuGMTReadoutCollection> gmtrc(new L1MuGMTReadoutCollection());
1039 
1040  std::auto_ptr<std::vector<L1MuRegionalCand> > DTCands(new std::vector<L1MuRegionalCand>);
1041  std::auto_ptr<std::vector<L1MuRegionalCand> > CSCCands(new std::vector<L1MuRegionalCand>);
1042  std::auto_ptr<std::vector<L1MuRegionalCand> > RPCbCands(new std::vector<L1MuRegionalCand>);
1043  std::auto_ptr<std::vector<L1MuRegionalCand> > RPCfCands(new std::vector<L1MuRegionalCand>);
1044  std::auto_ptr<std::vector<L1MuGMTCand> > GMTCands(new std::vector<L1MuGMTCand>);
1045 
1046  // put empty records into event
1047 
1048  iEvent.put(gmtrc);
1049  iEvent.put(gtReadoutRecord);
1050 
1051  iEvent.put(DTCands, "DT");
1052  iEvent.put(CSCCands, "CSC");
1053  iEvent.put(RPCbCands, "RPCb");
1054  iEvent.put(RPCfCands, "RPCf");
1055  iEvent.put(GMTCands);
1056 
1057 }
1058 
1059 
1060 
1061 // dump FED raw data
1063  const unsigned char* gtPtr, int gtSize, std::ostream& myCout) {
1064 
1065  LogDebug("L1GlobalTriggerRawToDigi") << "\nDump FED raw data.\n" << std::endl;
1066 
1069 
1070  int gtWords = gtSize / uLength;
1071  LogTrace("L1GlobalTriggerRawToDigi") << "\nFED GT words (" << wLength << " bits):" << gtWords
1072  << "\n" << std::endl;
1073 
1074  const cms_uint64_t* payload =
1075  reinterpret_cast<cms_uint64_t*> (const_cast<unsigned char*> (gtPtr));
1076 
1077  for (unsigned int i = 0; i < gtSize / sizeof(cms_uint64_t); i++) {
1078  myCout << std::setw(4) << i << " " << std::hex << std::setfill('0') << std::setw(16)
1079  << payload[i] << std::dec << std::setfill(' ') << std::endl;
1080  }
1081 
1082 }
1083 
1084 // static class members
1085 
#define LogDebug(id)
const L1MuTriggerScales * m_TriggerScales
muon trigger scales to convert unpacked data into physical quantities
bool isDebugEnabled()
int i
Definition: DBlmapReader.cc:9
void reset()
reset the content of a L1GtPsbWord
Definition: L1GtPsbWord.cc:432
const unsigned int getSize() const
get the size of the GTFE block in GT DAQ record (in multiple of 8 bits)
Definition: L1GtfeWord.h:229
int version()
Version identifier of the FED data format.
Definition: FEDHeader.cc:32
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
virtual void print(std::ostream &myCout) const
pretty print the content of a L1GtfeWord
Definition: L1GtfeWord.cc:321
const L1MuScale * getPtScale() const
get the Pt scale
unsigned int phiIndex() const
get phi-code
Definition: L1MuGMTCand.h:73
void unpackHeader(const unsigned char *, FEDHeader &)
block unpackers
cms_uint16_t m_activeBoardsMaskGt
mask for active boards
virtual void produce(edm::Event &, const edm::EventSetup &) override
static const int UnitLength
one unit in the word is UnitLength bits
virtual bool empty() const
return empty flag
void setGMTBrlCand(int nr, L1MuGMTExtendedCand const &cand)
set GMT barrel candidate
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
int evtStatus()
Event fragment status information.
Definition: FEDTrailer.cc:27
bool moreTrailers()
Definition: FEDTrailer.cc:37
int m_recordLength0
total Bx&#39;s in the event, obtained from GTFE block
void setBData(cms_uint16_t bDataVal, int iB)
Definition: L1GtPsbWord.cc:337
unsigned int etaIndex() const
get eta-code
Definition: L1MuGMTCand.h:108
void setGMTFwdCand(int nr, L1MuGMTExtendedCand const &cand)
set GMT forward candidate
void unpack(const unsigned char *fdlPtr)
Definition: L1GtFdlWord.cc:891
void setInputCand(int nr, unsigned data)
set Input muon
void unpackPSB(const edm::EventSetup &, const unsigned char *, L1GtPsbWord &)
void setRecordLength(cms_uint16_t recordLengthValue)
Definition: L1GtfeWord.h:109
virtual float getCenter(unsigned packed) const =0
get the center of bin represented by packed
void setPtValue(float ptVal)
Set Pt Value.
const unsigned int getSize() const
get the size of the FDL block in GT DAQ record (in multiple of 8 bits)
Definition: L1GtFdlWord.h:392
const cms_uint16_t altNrBxBoard() const
get/set alternative for number of BX per board
Definition: L1GtfeWord.h:187
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
static const int WordLength
GT DAQ record organized in words of WordLength bits.
const cms_uint16_t recordLength() const
get/set record length for alternative 0
Definition: L1GtfeWord.h:104
void setEventNr(cms_uint32_t eventNrValue)
Definition: L1GtPsbWord.h:134
int sourceID()
Identifier of the FED.
Definition: FEDHeader.cc:28
void setBxNr(cms_uint16_t bxNrValue)
Definition: L1GtPsbWord.h:113
bool empty() const
is it an empty muon candidate?
Definition: L1MuGMTCand.h:64
virtual void reset()
reset the content of a L1GtfeWord
Definition: L1GtfeWord.cc:306
int iEvent
Definition: GenABIO.cc:230
const L1MuTriggerPtScale * m_TriggerPtScale
void setPhiValue(float phiVal)
Set Phi Value.
bool moreHeaders()
Definition: FEDHeader.cc:36
void setBoardId(cms_uint16_t boardIdValue)
Definition: L1GtPsbWord.h:71
int m_recordLength1
corresponding to alternative 1 in altNrBxBoard()
void setPhiValue(float phiVal)
Setters for physical values.
Definition: L1MuGMTCand.h:177
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:113
void setLumiSegmentNr(const cms_uint16_t &lumiSegmentNrValue)
Definition: L1GtFdlWord.h:357
edm::InputTag m_daqGtInputTag
input tags for GT DAQ record
void setBxInEvent(int bxInEventValue)
Definition: L1GtPsbWord.h:92
const L1MuScale * getPhiScale() const
get the phi scale
void reset()
reset the content of a L1GtFdlWord
Definition: L1GtFdlWord.cc:732
void setEtaValue(float etaVal)
Set Eta Value (need to set type, first)
unsigned eta_packed() const
return eta packed as in hardware
unsigned short cms_uint16_t
Definition: typedefs.h:13
void setType(unsigned type)
Set Type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC.
void setRecordLength1(cms_uint16_t recordLengthValue)
Definition: L1GtfeWord.h:90
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool isValid() const
Definition: HandleBase.h:75
L1GlobalTriggerRawToDigi(const edm::ParameterSet &)
constructor(s)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:405
const cms_uint16_t activeBoards() const
get/set boards contributing to EVM respectively DAQ record
Definition: L1GtfeWord.h:163
#define LogTrace(id)
void unpackGMT(const unsigned char *, std::auto_ptr< L1MuGMTReadoutCollection > &, edm::Event &)
unpack the GMT record
void print(std::ostream &myCout) const
pretty print the content of a L1GtFdlWord
Definition: L1GtFdlWord.cc:766
void print(std::ostream &myCout) const
pretty print
Definition: L1GtPsbWord.cc:453
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
int ttsBits()
Current value of the Trigger Throttling System bitsAQ).
Definition: FEDTrailer.cc:32
const cms_uint16_t lumiSegmentNr() const
get/set luminosity segment number of the actual bx
Definition: L1GtFdlWord.h:352
int m_totalBxInEvent
number of Bx for a board, obtained from GTFE block (record length &amp; alternative)
T const * product() const
Definition: Handle.h:81
int lenght()
The length of the event fragment counted in 64-bit words including header and trailer.
Definition: FEDTrailer.cc:17
void setActiveBoards(cms_uint16_t activeBoardsValue)
Definition: L1GtfeWord.h:168
const T & get() const
Definition: EventSetup.h:55
void setEtaValue(float etaVal)
Set Eta Value (need to set type, first)
Definition: L1MuGMTCand.h:183
int bxID()
The bunch crossing number.
Definition: FEDHeader.cc:24
T const * product() const
Definition: ESHandle.h:86
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void setBxNr(int bxnr)
set counters
void unpackTrailer(const unsigned char *, FEDTrailer &)
unpack trailer word
const L1MuScale * getRegionalEtaScale(int isys) const
get the regioanl muon trigger eta scale, isys = 0(DT), 1(bRPC), 2(CSC), 3(fwdRPC) ...
virtual ~L1GlobalTriggerRawToDigi()
destructor
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:28
void setLocalBxNr(cms_uint16_t localBxNrValue)
Definition: L1GtPsbWord.h:183
int crc()
Cyclic Redundancy Code of the event fragment including header and trailer.
Definition: FEDTrailer.cc:22
const L1MuScale * getGMTEtaScale() const
get the GMT eta scale
void setGMTCand(int nr, L1MuGMTExtendedCand const &cand)
set GMT candidate (does not store rank)
int lvl1ID()
Level-1 event number generated by the TTC system.
Definition: FEDHeader.cc:20
unsigned long long cms_uint64_t
Definition: typedefs.h:17
void produceEmptyProducts(edm::Event &)
produce empty products in case of problems
void setPtValue(float ptVal)
Set Pt Value.
Definition: L1MuGMTCand.h:180
unsigned pt_packed() const
return pt packed as in hardware
const cms_uint16_t recordLength1() const
get/set record length for alternative 1
Definition: L1GtfeWord.h:85
unsigned int ptIndex() const
get pt-code
Definition: L1MuGMTCand.h:76
int triggerType()
Event Trigger type identifier.
Definition: FEDHeader.cc:16
void setAData(cms_uint16_t aDataVal, int iA)
Definition: L1GtPsbWord.cc:242
virtual void unpack(const unsigned char *gtfePtr)
Definition: L1GtfeWord.cc:380
unsigned type_idx() const
return type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC
unsigned phi_packed() const
return phi packed as in hardware
const unsigned int getSize() const
get the size of the PSB block in GT DAQ record (in multiple of 8 bits)
Definition: L1GtPsbWord.h:198
void dumpFedRawData(const unsigned char *, int, std::ostream &)
dump FED raw data