CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1GTDigiToRaw Class Reference

#include <L1GTDigiToRaw.h>

Inheritance diagram for L1GTDigiToRaw:
edm::stream::EDProducer<>

Public Member Functions

 L1GTDigiToRaw (const edm::ParameterSet &)
 constructor(s) More...
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Member Functions

unsigned int flipPtQ (unsigned int)
 
void packFDL (const edm::EventSetup &, unsigned char *, L1GtFdlWord &)
 pack FDL blocks for various bunch crosses More...
 
unsigned int packGMT (L1MuGMTReadoutRecord const &, unsigned char *)
 pack a GMT record More...
 
unsigned int packGmtCollection (unsigned char *ptrGt, L1MuGMTReadoutCollection const *digis)
 pack the GMT collection using packGMT (GMT record packing) More...
 
void packGTFE (const edm::EventSetup &, unsigned char *, L1GtfeWord &, cms_uint16_t activeBoardsGtValue)
 
void packHeader (unsigned char *, edm::Event &)
 block packers -------—— More...
 
void packPSB (const edm::EventSetup &, unsigned char *, L1GtPsbWord &)
 
void packTrailer (unsigned char *, unsigned char *, int)
 pack trailer word More...
 
void produce (edm::Event &, const edm::EventSetup &) override
 loop over events More...
 

Private Attributes

cms_uint16_t m_activeBoardsMaskGt
 mask for active boards More...
 
int m_daqGtFedId
 
const edm::InputTag m_daqGtInputTag
 
const edm::EDGetTokenT< L1GlobalTriggerReadoutRecordm_daqGtInputToken
 input tag for GT DAQ record More...
 
bool m_isDebugEnabled
 
int m_maxBxInEvent
 
int m_minBxInEvent
 
const edm::InputTag m_muGmtInputTag
 
const edm::EDGetTokenT< L1MuGMTReadoutCollectionm_muGmtInputToken
 input tag for GMT record More...
 
int m_totalBxInEvent
 total Bx's in the event, obtained from GTFE block More...
 
int m_verbosity
 verbosity level More...
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Description: generate raw data from digis.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna - GT
: Ivan Mikulec - HEPHY Vienna - GMT

Definition at line 45 of file L1GTDigiToRaw.h.

Constructor & Destructor Documentation

L1GTDigiToRaw::L1GTDigiToRaw ( const edm::ParameterSet pSet)
explicit

constructor(s)

Definition at line 57 of file L1GTDigiToRaw.cc.

References TauDecayModes::dec, LogDebug, m_activeBoardsMaskGt, m_daqGtFedId, m_daqGtInputTag, m_isDebugEnabled, m_muGmtInputTag, and m_verbosity.

58  :
59 
61  m_daqGtInputToken(consumes<L1GlobalTriggerReadoutRecord>(pSet.getParameter<edm::InputTag>("DaqGtInputTag"))),
62  m_muGmtInputToken(consumes<L1MuGMTReadoutCollection>(pSet.getParameter<edm::InputTag>("MuGmtInputTag"))),
63  m_daqGtInputTag(pSet.getParameter<edm::InputTag>("DaqGtInputTag")),
64  m_muGmtInputTag(pSet.getParameter<edm::InputTag>("MuGmtInputTag")),
65  m_activeBoardsMaskGt(pSet.getParameter<unsigned int>("ActiveBoardsMask")),
67  m_minBxInEvent(0),
69  m_verbosity(pSet.getUntrackedParameter<int>("Verbosity", 0)),
71 
72 {
74  LogDebug("L1GTDigiToRaw") << "\nFED Id for DAQ GT record: " << m_daqGtFedId << " \n"
75  << "\nInput tag for DAQ GT record: " << m_daqGtInputTag << " \n"
76  << "\nInput tag for GMT record: " << m_muGmtInputTag << " \n"
77  << "\nMask for active boards (hex format): " << std::hex
78  << std::setw(sizeof(m_activeBoardsMaskGt) * 2) << std::setfill('0')
79  << m_activeBoardsMaskGt << std::dec << std::setfill(' ') << " \n"
80  << std::endl;
81  }
82 
83  //
84  produces<FEDRawDataCollection>();
85 }
#define LogDebug(id)
T getParameter(std::string const &) const
bool isDebugEnabled()
T getUntrackedParameter(std::string const &, T const &) const
const edm::EDGetTokenT< L1MuGMTReadoutCollection > m_muGmtInputToken
input tag for GMT record
Definition: L1GTDigiToRaw.h:90
cms_uint16_t m_activeBoardsMaskGt
mask for active boards
Definition: L1GTDigiToRaw.h:95
const edm::InputTag m_muGmtInputTag
Definition: L1GTDigiToRaw.h:92
const edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_daqGtInputToken
input tag for GT DAQ record
Definition: L1GTDigiToRaw.h:87
const edm::InputTag m_daqGtInputTag
Definition: L1GTDigiToRaw.h:91
int m_verbosity
verbosity level
int m_totalBxInEvent
total Bx&#39;s in the event, obtained from GTFE block
Definition: L1GTDigiToRaw.h:98

Member Function Documentation

unsigned int L1GTDigiToRaw::flipPtQ ( unsigned int  w)
private

Definition at line 742 of file L1GTDigiToRaw.cc.

742 { return ((w & 0xffff00ff) | ((~w) & 0x0000ff00)); }
const double w
Definition: UKUtility.cc:23
void L1GTDigiToRaw::packFDL ( const edm::EventSetup evSetup,
unsigned char *  ptrGt,
L1GtFdlWord fdlBlock 
)
private

pack FDL blocks for various bunch crosses

Definition at line 530 of file L1GTDigiToRaw.cc.

References TauDecayModes::dec, L1GtFdlWord::getSize(), LogDebug, LogTrace, m_isDebugEnabled, m_verbosity, L1GtFdlWord::setBoardIdWord64(), L1GtFdlWord::setBxInEventWord64(), L1GtFdlWord::setBxNrWord64(), L1GtFdlWord::setEventNrWord64(), L1GtFdlWord::setFinalORWord64(), L1GtFdlWord::setGtDecisionWordAWord64(), L1GtFdlWord::setGtDecisionWordBWord64(), L1GtFdlWord::setGtDecisionWordExtendedWord64(), L1GtFdlWord::setGtPrescaleFactorIndexAlgoWord64(), L1GtFdlWord::setGtPrescaleFactorIndexTechWord64(), L1GtFdlWord::setGtTechnicalTriggerWordWord64(), L1GtFdlWord::setLocalBxNrWord64(), L1GtFdlWord::setLumiSegmentNrWord64(), L1GtFdlWord::setNoAlgoWord64(), L1GtFdlWord::setOrbitNrWord64(), L1GtFdlWord::setPhysicsDeclaredWord64(), and L1GlobalTriggerReadoutSetup::UnitLength.

Referenced by produce().

530  {
531  if (m_verbosity && m_isDebugEnabled) {
532  LogDebug("L1GTDigiToRaw") << "\nPacking FDL \n" << std::endl;
533  }
534 
536 
537  // initialize the required number of word64
538  int nrWord64 = fdlBlock.getSize() / uLength;
539  std::vector<cms_uint64_t> tmpWord64;
540  tmpWord64.resize(nrWord64);
541 
542  for (int iWord = 0; iWord < nrWord64; ++iWord) {
543  tmpWord64[iWord] = 0x0000000000000000ULL;
544  }
545 
546  // fill the values in the words
547  for (int iWord = 0; iWord < nrWord64; ++iWord) {
548  fdlBlock.setBoardIdWord64(tmpWord64[iWord], iWord);
549  fdlBlock.setBxInEventWord64(tmpWord64[iWord], iWord);
550  fdlBlock.setBxNrWord64(tmpWord64[iWord], iWord);
551  fdlBlock.setEventNrWord64(tmpWord64[iWord], iWord);
552 
553  fdlBlock.setGtTechnicalTriggerWordWord64(tmpWord64[iWord], iWord);
554 
555  fdlBlock.setGtDecisionWordAWord64(tmpWord64[iWord], iWord);
556  fdlBlock.setGtDecisionWordBWord64(tmpWord64[iWord], iWord);
557 
558  fdlBlock.setGtDecisionWordExtendedWord64(tmpWord64[iWord], iWord);
559 
560  fdlBlock.setPhysicsDeclaredWord64(tmpWord64[iWord], iWord);
561  fdlBlock.setGtPrescaleFactorIndexTechWord64(tmpWord64[iWord], iWord);
562  fdlBlock.setGtPrescaleFactorIndexAlgoWord64(tmpWord64[iWord], iWord);
563  fdlBlock.setNoAlgoWord64(tmpWord64[iWord], iWord);
564  fdlBlock.setFinalORWord64(tmpWord64[iWord], iWord);
565 
566  fdlBlock.setOrbitNrWord64(tmpWord64[iWord], iWord);
567  fdlBlock.setLumiSegmentNrWord64(tmpWord64[iWord], iWord);
568  fdlBlock.setLocalBxNrWord64(tmpWord64[iWord], iWord);
569  }
570 
571  // put the words in the FED record
572 
573  cms_uint64_t* pw = reinterpret_cast<cms_uint64_t*>(const_cast<unsigned char*>(ptrGt));
574 
575  for (int iWord = 0; iWord < nrWord64; ++iWord) {
576  *pw++ = tmpWord64[iWord];
577 
578  if (m_verbosity && m_isDebugEnabled) {
579  LogTrace("L1GTDigiToRaw") << std::setw(4) << iWord << " " << std::hex << std::setfill('0') << std::setw(16)
580  << tmpWord64[iWord] << std::dec << std::setfill(' ') << std::endl;
581  }
582  }
583 }
#define LogDebug(id)
void setNoAlgoWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:514
void setGtDecisionWordBWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:388
static const int UnitLength
one unit in the word is UnitLength bits
void setBoardIdWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:179
void setLumiSegmentNrWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:549
const unsigned int getSize() const
get the size of the FDL block in GT DAQ record (in multiple of 8 bits)
Definition: L1GtFdlWord.h:271
void setOrbitNrWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:536
void setGtTechnicalTriggerWordWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:259
void setGtPrescaleFactorIndexTechWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:490
void setBxInEventWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:194
void setPhysicsDeclaredWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:477
void setEventNrWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:218
void setBxNrWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:207
#define LogTrace(id)
void setGtDecisionWordExtendedWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:446
void setLocalBxNrWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:560
void setGtDecisionWordAWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:361
int m_verbosity
verbosity level
void setFinalORWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:525
unsigned long long cms_uint64_t
Definition: typedefs.h:17
void setGtPrescaleFactorIndexAlgoWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:503
unsigned L1GTDigiToRaw::packGMT ( L1MuGMTReadoutRecord const &  gmtrr,
unsigned char *  chp 
)
private

pack a GMT record

Definition at line 648 of file L1GTDigiToRaw.cc.

References amcDumpToRaw_cfi::boardId, L1MuGMTReadoutRecord::getBCERR(), L1MuGMTReadoutRecord::getBrlRPCCands(), L1MuGMTReadoutRecord::getBxInEvent(), L1MuGMTReadoutRecord::getBxNr(), L1MuGMTReadoutRecord::getCSCCands(), L1MuGMTReadoutRecord::getDTBXCands(), L1MuGMTReadoutRecord::getEvNr(), L1MuGMTReadoutRecord::getFwdRPCCands(), L1MuGMTReadoutRecord::getGMTBrlCands(), L1MuGMTReadoutRecord::getGMTCands(), L1MuGMTReadoutRecord::getGMTFwdCands(), mps_fire::i, AlCaHLTBitMon_ParallelJobs::p, createTree::pp, SIZE, and w.

Referenced by packGmtCollection().

648  {
649  const unsigned SIZE = 136;
650  const unsigned boardId = 0xdd12;
651  memset(chp, 0, SIZE);
652 
653  unsigned* p = (unsigned*)chp;
654 
655  // event number + bcerr
656  *p++ = (gmtrr.getEvNr() & 0xffffff) | ((gmtrr.getBCERR() & 0xff) << 24);
657  // bx number, bx in event, length(?), board-id(?)
658  *p++ = (gmtrr.getBxNr() & 0xfff) | ((gmtrr.getBxInEvent() & 0xf) << 12) | (boardId << 16);
659 
660  std::vector<L1MuRegionalCand> vrc;
661  std::vector<L1MuRegionalCand>::const_iterator irc;
662  unsigned* pp = p;
663 
664  vrc = gmtrr.getDTBXCands();
665  pp = p;
666  for (irc = vrc.begin(); irc != vrc.end(); irc++) {
667  *pp++ = (*irc).getDataWord();
668  }
669  p += 4;
670 
671  vrc = gmtrr.getBrlRPCCands();
672  pp = p;
673  for (irc = vrc.begin(); irc != vrc.end(); irc++) {
674  *pp++ = (*irc).getDataWord();
675  }
676  p += 4;
677 
678  vrc = gmtrr.getCSCCands();
679  pp = p;
680  for (irc = vrc.begin(); irc != vrc.end(); irc++) {
681  *pp++ = (*irc).getDataWord();
682  }
683  p += 4;
684 
685  vrc = gmtrr.getFwdRPCCands();
686  pp = p;
687  for (irc = vrc.begin(); irc != vrc.end(); irc++) {
688  *pp++ = (*irc).getDataWord();
689  }
690  p += 4;
691 
692  // the regional candidates are written to the record with inverted Pt and qual bits
693  pp = p - 16;
694  for (int i = 0; i < 16; i++) {
695  unsigned w = *pp;
696  *pp++ = (w & 0xffff00ff) | ((~w) & 0x0000ff00);
697  }
698 
699  std::vector<L1MuGMTExtendedCand> vgc;
700  std::vector<L1MuGMTExtendedCand>::const_iterator igc;
701 
702  vgc = gmtrr.getGMTBrlCands();
703  pp = p;
704  for (igc = vgc.begin(); igc != vgc.end(); igc++) {
705  *pp++ = (*igc).getDataWord();
706  }
707  p += 4;
708 
709  vgc = gmtrr.getGMTFwdCands();
710  pp = p;
711  for (igc = vgc.begin(); igc != vgc.end(); igc++) {
712  *pp++ = (*igc).getDataWord();
713  }
714  p += 4;
715 
716  vgc = gmtrr.getGMTCands();
717  pp = p;
718  for (igc = vgc.begin(); igc != vgc.end(); igc++) {
719  *pp++ = (*igc).getDataWord();
720  }
721  p += 4;
722 
723  unsigned char* chpp;
724 
725  vgc = gmtrr.getGMTBrlCands();
726  chpp = (unsigned char*)p;
727  for (igc = vgc.begin(); igc != vgc.end(); igc++) {
728  *chpp++ = (*igc).rank();
729  }
730  p++;
731 
732  vgc = gmtrr.getGMTFwdCands();
733  chpp = (unsigned char*)p;
734  for (igc = vgc.begin(); igc != vgc.end(); igc++) {
735  *chpp++ = (*igc).rank();
736  }
737  p++;
738 
739  return SIZE;
740 }
const double w
Definition: UKUtility.cc:23
unsigned int L1GTDigiToRaw::packGmtCollection ( unsigned char *  ptrGt,
L1MuGMTReadoutCollection const *  digis 
)
private

pack the GMT collection using packGMT (GMT record packing)

Definition at line 630 of file L1GTDigiToRaw.cc.

References L1MuGMTReadoutCollection::getRecord(), LogDebug, m_isDebugEnabled, m_maxBxInEvent, m_minBxInEvent, m_totalBxInEvent, m_verbosity, and packGMT().

Referenced by produce().

630  {
631  if (m_verbosity && m_isDebugEnabled) {
632  LogDebug("L1GTDigiToRaw") << "\nPacking GMT collection \n" << std::endl;
633  }
634 
635  unsigned gmtsize = 0;
636 
637  // loop range: int m_totalBxInEvent is normally even (L1A-1, L1A, L1A+1, with L1A = 0)
638  for (int iBxInEvent = m_minBxInEvent; iBxInEvent <= m_maxBxInEvent; ++iBxInEvent) {
639  L1MuGMTReadoutRecord const& gmtrr = digis->getRecord(iBxInEvent);
640  gmtsize = packGMT(gmtrr, ptrGt);
641  ptrGt += gmtsize;
642  }
643 
644  return m_totalBxInEvent * gmtsize;
645 }
#define LogDebug(id)
unsigned int packGMT(L1MuGMTReadoutRecord const &, unsigned char *)
pack a GMT record
int m_verbosity
verbosity level
int m_totalBxInEvent
total Bx&#39;s in the event, obtained from GTFE block
Definition: L1GTDigiToRaw.h:98
void L1GTDigiToRaw::packGTFE ( const edm::EventSetup evSetup,
unsigned char *  ptrGt,
L1GtfeWord gtfeBlock,
cms_uint16_t  activeBoardsGtValue 
)
private

pack the GTFE block gives the number of bunch crosses in the event, as well as the active boards records for inactive boards are not written in the GT DAQ record

Definition at line 484 of file L1GTDigiToRaw.cc.

References TauDecayModes::dec, L1GtfeWord::getSize(), LogDebug, LogTrace, m_isDebugEnabled, m_verbosity, L1GtfeWord::setActiveBoardsWord64(), L1GtfeWord::setAltNrBxBoardWord64(), L1GtfeWord::setBoardIdWord64(), L1GtfeWord::setBxNrWord64(), L1GtfeWord::setRecordLength1Word64(), L1GtfeWord::setRecordLengthWord64(), L1GtfeWord::setSetupVersionWord64(), L1GtfeWord::setTotalTriggerNrWord64(), and L1GlobalTriggerReadoutSetup::UnitLength.

Referenced by produce().

487  {
488  if (m_verbosity && m_isDebugEnabled) {
489  LogDebug("L1GTDigiToRaw") << "\nPacking GTFE \n" << std::endl;
490  }
491 
493 
494  // initialize the required number of word64
495  int nrWord64 = gtfeBlock.getSize() / uLength;
496  std::vector<cms_uint64_t> tmpWord64;
497  tmpWord64.resize(nrWord64);
498 
499  for (int iWord = 0; iWord < nrWord64; ++iWord) {
500  tmpWord64[iWord] = 0x0000000000000000ULL;
501  }
502 
503  // fill the values in the words
504  for (int iWord = 0; iWord < nrWord64; ++iWord) {
505  gtfeBlock.setBoardIdWord64(tmpWord64[iWord], iWord);
506  gtfeBlock.setRecordLength1Word64(tmpWord64[iWord], iWord);
507  gtfeBlock.setRecordLengthWord64(tmpWord64[iWord], iWord);
508  gtfeBlock.setBxNrWord64(tmpWord64[iWord], iWord);
509  gtfeBlock.setSetupVersionWord64(tmpWord64[iWord], iWord);
510  gtfeBlock.setActiveBoardsWord64(tmpWord64[iWord], iWord, activeBoardsGtValue);
511  gtfeBlock.setAltNrBxBoardWord64(tmpWord64[iWord], iWord);
512  gtfeBlock.setTotalTriggerNrWord64(tmpWord64[iWord], iWord);
513  }
514 
515  // put the words in the FED record
516 
517  cms_uint64_t* pw = reinterpret_cast<cms_uint64_t*>(const_cast<unsigned char*>(ptrGt));
518 
519  for (int iWord = 0; iWord < nrWord64; ++iWord) {
520  *pw++ = tmpWord64[iWord];
521 
522  if (m_verbosity && m_isDebugEnabled) {
523  LogTrace("L1GTDigiToRaw") << std::setw(4) << iWord << " " << std::hex << std::setfill('0') << std::setw(16)
524  << tmpWord64[iWord] << std::dec << std::setfill(' ') << std::endl;
525  }
526  }
527 }
#define LogDebug(id)
const unsigned int getSize() const
get the size of the GTFE block in GT DAQ record (in multiple of 8 bits)
Definition: L1GtfeWord.h:160
void setRecordLength1Word64(cms_uint64_t &word64, int iWord)
Definition: L1GtfeWord.cc:129
static const int UnitLength
one unit in the word is UnitLength bits
void setActiveBoardsWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtfeWord.cc:191
void setSetupVersionWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtfeWord.cc:166
void setBoardIdWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtfeWord.cc:116
#define LogTrace(id)
void setAltNrBxBoardWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtfeWord.cc:212
void setBxNrWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtfeWord.cc:153
int m_verbosity
verbosity level
unsigned long long cms_uint64_t
Definition: typedefs.h:17
void setTotalTriggerNrWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtfeWord.cc:233
void setRecordLengthWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtfeWord.cc:142
void L1GTDigiToRaw::packHeader ( unsigned char *  ptrGt,
edm::Event iEvent 
)
private

block packers -------——

pack header

Definition at line 443 of file L1GTDigiToRaw.cc.

References edm::EventBase::bunchCrossing(), TauDecayModes::dec, edm::EventID::event(), edm::EventBase::id(), LogDebug, m_daqGtFedId, m_isDebugEnabled, m_verbosity, and FEDHeader::set().

Referenced by produce().

443  {
444  // TODO FIXME where from to get all numbers?
445 
446  // Event Trigger type identifier
447  int triggerTypeVal = 0;
448 
449  // Level-1 event number generated by the TTC system
450  int lvl1IdVal = iEvent.id().event();
451 
452  // The bunch crossing number
453  int bxCross = iEvent.bunchCrossing();
454  cms_uint16_t bxCrossHw = 0;
455  if ((bxCross & 0xFFF) == bxCross) {
456  bxCrossHw = static_cast<cms_uint16_t>(bxCross);
457  } else {
458  bxCrossHw = 0; // Bx number too large, set to 0!
459  if (m_verbosity && m_isDebugEnabled) {
460  LogDebug("L1GTDigiToRaw") << "\nBunch cross number [hex] = " << std::hex << bxCross
461  << "\n larger than 12 bits. Set to 0! \n"
462  << std::dec << std::endl;
463  }
464  }
465  int bxIdVal = bxCrossHw;
466 
467  // Identifier of the FED
468  int sourceIdVal = m_daqGtFedId;
469 
470  // Version identifier of the FED data format
471  int versionVal = 0;
472 
473  // 0 -> the current header word is the last one.
474  // 1-> other header words can follow
475  // (always 1 for ECAL)
476  bool moreHeadersVal = false;
477 
478  FEDHeader gtFEDHeader(ptrGt);
479 
480  gtFEDHeader.set(ptrGt, triggerTypeVal, lvl1IdVal, bxIdVal, sourceIdVal, versionVal, moreHeadersVal);
481 }
#define LogDebug(id)
EventNumber_t event() const
Definition: EventID.h:40
int bunchCrossing() const
Definition: EventBase.h:64
unsigned short cms_uint16_t
Definition: typedefs.h:13
edm::EventID id() const
Definition: EventBase.h:59
int m_verbosity
verbosity level
void L1GTDigiToRaw::packPSB ( const edm::EventSetup evSetup,
unsigned char *  ptrGt,
L1GtPsbWord psbBlock 
)
private

pack PSB blocks packing is done in PSB class format

Definition at line 586 of file L1GTDigiToRaw.cc.

References TauDecayModes::dec, L1GtPsbWord::getSize(), LogDebug, LogTrace, m_isDebugEnabled, m_verbosity, L1GtPsbWord::setADataWord64(), L1GtPsbWord::setBDataWord64(), L1GtPsbWord::setBoardIdWord64(), L1GtPsbWord::setBxInEventWord64(), L1GtPsbWord::setBxNrWord64(), L1GtPsbWord::setEventNrWord64(), L1GtPsbWord::setLocalBxNrWord64(), and L1GlobalTriggerReadoutSetup::UnitLength.

Referenced by produce().

586  {
587  if (m_verbosity && m_isDebugEnabled) {
588  LogDebug("L1GTDigiToRaw") << "\nPacking PSB \n" << std::endl;
589  }
590 
592 
593  // initialize the required number of word64
594  int nrWord64 = psbBlock.getSize() / uLength;
595  std::vector<cms_uint64_t> tmpWord64;
596  tmpWord64.resize(nrWord64);
597 
598  for (int iWord = 0; iWord < nrWord64; ++iWord) {
599  tmpWord64[iWord] = 0x0000000000000000ULL;
600  }
601 
602  // fill the values in the words
603  for (int iWord = 0; iWord < nrWord64; ++iWord) {
604  psbBlock.setBoardIdWord64(tmpWord64[iWord], iWord);
605  psbBlock.setBxInEventWord64(tmpWord64[iWord], iWord);
606  psbBlock.setBxNrWord64(tmpWord64[iWord], iWord);
607  psbBlock.setEventNrWord64(tmpWord64[iWord], iWord);
608 
609  psbBlock.setADataWord64(tmpWord64[iWord], iWord);
610  psbBlock.setBDataWord64(tmpWord64[iWord], iWord);
611 
612  psbBlock.setLocalBxNrWord64(tmpWord64[iWord], iWord);
613  }
614 
615  // put the words in the FED record
616 
617  cms_uint64_t* pw = reinterpret_cast<cms_uint64_t*>(const_cast<unsigned char*>(ptrGt));
618 
619  for (int iWord = 0; iWord < nrWord64; ++iWord) {
620  *pw++ = tmpWord64[iWord];
621 
622  if (m_verbosity && m_isDebugEnabled) {
623  LogTrace("L1GTDigiToRaw") << std::setw(4) << iWord << " " << std::hex << std::setfill('0') << std::setw(16)
624  << tmpWord64[iWord] << std::dec << std::setfill(' ') << std::endl;
625  }
626  }
627 }
#define LogDebug(id)
void setEventNrWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtPsbWord.cc:173
static const int UnitLength
one unit in the word is UnitLength bits
void setBxNrWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtPsbWord.cc:158
void setBxInEventWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtPsbWord.cc:141
void setADataWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtPsbWord.cc:233
void setLocalBxNrWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtPsbWord.cc:323
void setBDataWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtPsbWord.cc:295
#define LogTrace(id)
int m_verbosity
verbosity level
unsigned long long cms_uint64_t
Definition: typedefs.h:17
void setBoardIdWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtPsbWord.cc:123
const unsigned int getSize() const
get the size of the PSB block in GT DAQ record (in multiple of 8 bits)
Definition: L1GtPsbWord.h:147
void L1GTDigiToRaw::packTrailer ( unsigned char *  ptrGt,
unsigned char *  ptrGtBegin,
int  dataSize 
)
private

pack trailer word

Definition at line 745 of file L1GTDigiToRaw.cc.

References evf::compute_crc(), and FEDTrailer::set().

Referenced by produce().

745  {
746  // TODO FIXME where from to get all numbers?
747 
748  // The length of the event fragment counted in 64-bit words including header and trailer
749  int lengthVal = dataSize / 8;
750 
751  // Cyclic Redundancy Code of the event fragment including header and trailer
752  int crcVal = evf::compute_crc(ptrGtBegin, dataSize);
753 
754  // Event fragment status information
755  int evtStatusVal = 0;
756 
757  // Current value of the Trigger Throttling System bits.
758  int ttsBitsVal = 0;
759 
760  // 0 -> the current trailer word is the last one.
761  // 1-> other trailer words can follow
762  // (always 0 for ECAL)
763  bool moreTrailersVal = false;
764 
765  FEDTrailer gtFEDTrailer(ptrGt);
766  gtFEDTrailer.set(ptrGt, lengthVal, crcVal, evtStatusVal, ttsBitsVal, moreTrailersVal);
767 }
unsigned short compute_crc(unsigned char *buffer, unsigned int bufSize)
Definition: CRC16.h:46
void L1GTDigiToRaw::produce ( edm::Event iEvent,
const edm::EventSetup evSetup 
)
overrideprivate

loop over events

Definition at line 90 of file L1GTDigiToRaw.cc.

References L1GtfeWord::activeBoards(), L1GtfeWord::altNrBxBoard(), FEDRawData::data(), TauDecayModes::dec, FDL, edm::EventSetup::get(), edm::Event::getByToken(), L1GtPsbWord::getSize(), L1GtfeWord::getSize(), L1TcsWord::getSize(), L1GtFdlWord::getSize(), GMT, L1GtBoardMaps::gtBoardMaps(), L1GlobalTriggerReadoutRecord::gtFdlWord(), GTFE, L1GlobalTriggerReadoutRecord::gtfeWord(), L1GlobalTriggerReadoutRecord::gtPsbWord(), edm::HandleBase::isValid(), LogDebug, LogTrace, m_activeBoardsMaskGt, m_daqGtFedId, m_daqGtInputTag, m_daqGtInputToken, m_isDebugEnabled, m_maxBxInEvent, m_minBxInEvent, m_muGmtInputTag, m_muGmtInputToken, m_totalBxInEvent, m_verbosity, eostools::move(), packFDL(), packGmtCollection(), packGTFE(), packHeader(), packPSB(), packTrailer(), L1GlobalTriggerReadoutRecord::print(), L1GtPsbWord::print(), L1GtfeWord::print(), L1GtFdlWord::print(), edm::Handle< T >::product(), PSB, edm::Event::put(), L1GtfeWord::recordLength(), L1GtfeWord::recordLength1(), FEDRawData::resize(), FEDRawData::size(), TCS, and TIM.

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

90  {
91  // define new FEDRawDataCollection
92  // it contains ALL FEDs in an event
93  std::unique_ptr<FEDRawDataCollection> allFedRawData(new FEDRawDataCollection);
94 
95  FEDRawData& gtRawData = allFedRawData->FEDData(m_daqGtFedId);
96 
97  // get records from EventSetup
98 
99  // board maps
101  evSetup.get<L1GtBoardMapsRcd>().get(l1GtBM);
102 
103  const std::vector<L1GtBoard> boardMaps = l1GtBM->gtBoardMaps();
104  int boardMapsSize = boardMaps.size();
105 
106  typedef std::vector<L1GtBoard>::const_iterator CItBoardMaps;
107 
108  // create an ordered vector for the GT DAQ record
109  // header (pos 0 in record) and trailer (last position in record)
110  // not included, as they are not in board list
111  std::vector<L1GtBoard> gtRecordMap;
112  gtRecordMap.reserve(boardMapsSize);
113 
114  for (int iPos = 0; iPos < boardMapsSize; ++iPos) {
115  for (CItBoardMaps itBoard = boardMaps.begin(); itBoard != boardMaps.end(); ++itBoard) {
116  if (itBoard->gtPositionDaqRecord() == iPos) {
117  gtRecordMap.push_back(*itBoard);
118  break;
119  }
120  }
121  }
122 
123  // get L1GlobalTriggerReadoutRecord
125  iEvent.getByToken(m_daqGtInputToken, gtReadoutRecord);
126 
127  if (!gtReadoutRecord.isValid()) {
128  if (m_verbosity) {
129  edm::LogWarning("L1GTDigiToRaw") << "\nWarning: L1GlobalTriggerReadoutRecord with input tag " << m_daqGtInputTag
130  << "\nrequested in configuration, but not found in the event."
131  << "\nQuit packing this event" << std::endl;
132  }
133 
134  // put the raw data in the event
135  iEvent.put(std::move(allFedRawData));
136 
137  return;
138  }
139 
140  if (m_verbosity && m_isDebugEnabled) {
141  std::ostringstream myCoutStream;
142  gtReadoutRecord->print(myCoutStream);
143  LogTrace("L1GTDigiToRaw") << "\n The following L1 GT DAQ readout record will be packed.\n"
144  << " Some boards could be disabled before packing,"
145  << " see detailed board packing.\n"
146  << myCoutStream.str() << "\n"
147  << std::endl;
148  }
149 
150  // get GTFE block
151  L1GtfeWord gtfeBlock = gtReadoutRecord->gtfeWord();
152 
153  // get the number of Bx in the event for alternative 0 and alternative 1
154  cms_uint16_t recordLength0 = gtfeBlock.recordLength();
155  cms_uint16_t recordLength1 = gtfeBlock.recordLength1();
156 
157  // get list of active boards from the GTFE payload
158  // and mask some boards, if required
159  // boards not active are not written to the record
160 
161  cms_uint16_t activeBoardsGtInitial = gtfeBlock.activeBoards();
162  cms_uint16_t altNrBxBoardInitial = gtfeBlock.altNrBxBoard();
163 
164  // mask some boards, if needed
165 
166  cms_uint16_t activeBoardsGt = activeBoardsGtInitial & m_activeBoardsMaskGt;
167 
168  if (m_verbosity && m_isDebugEnabled) {
169  LogDebug("L1GTDigiToRaw") << "\nActive boards before masking(hex format): " << std::hex
170  << std::setw(sizeof(activeBoardsGtInitial) * 2) << std::setfill('0')
171  << activeBoardsGtInitial << std::dec << std::setfill(' ')
172  << "Active boards after masking(hex format): " << std::hex
173  << std::setw(sizeof(activeBoardsGt) * 2) << std::setfill('0') << activeBoardsGt
174  << std::dec << std::setfill(' ') << " \n"
175  << std::endl;
176  }
177 
178  // get the size of the record
179 
180  unsigned int gtDataSize = 0;
181 
182  unsigned int headerSize = 8;
183  gtDataSize += headerSize;
184 
185  for (CItBoardMaps itBoard = boardMaps.begin(); itBoard != boardMaps.end(); ++itBoard) {
186  if (itBoard->gtBoardType() == GTFE) {
187  gtDataSize += gtfeBlock.getSize();
188  continue;
189  }
190 
191  int iActiveBit = itBoard->gtBitDaqActiveBoards();
192  bool activeBoardToPack = false;
193 
194  int altNrBxBoardVal = -1;
195 
196  if (iActiveBit >= 0) {
197  activeBoardToPack = activeBoardsGt & (1 << iActiveBit);
198 
199  altNrBxBoardVal = (altNrBxBoardInitial & (1 << iActiveBit)) >> iActiveBit;
200 
201  if (altNrBxBoardVal == 1) {
202  m_totalBxInEvent = recordLength1;
203  } else if (altNrBxBoardVal == 0) {
204  m_totalBxInEvent = recordLength0;
205  } else {
206  if (m_verbosity) {
207  edm::LogWarning("L1GTDigiToRaw")
208  << "\n\nWARNING: Wrong value altNrBxBoardVal = " << altNrBxBoardVal << " for board " << std::hex
209  << (itBoard->gtBoardId()) << std::dec << "\n iActiveBit = " << iActiveBit
210  << "\n altNrBxBoardInitial = 0x" << std::hex << altNrBxBoardInitial << std::dec
211  << "\n activeBoardsGt = 0x" << std::hex << activeBoardsGt << std::dec
212  << "\n activeBoardToPack = " << activeBoardToPack << "\n Set altNrBxBoardVal tentatively to "
213  << recordLength0 << "\n Job may crash or produce wrong results!\n\n"
214  << std::endl;
215  }
216 
217  m_totalBxInEvent = recordLength0;
218  }
219 
220  } else {
221  // board not in the ActiveBoards for the record
222  continue;
223  }
224 
225  if (activeBoardToPack) {
226  switch (itBoard->gtBoardType()) {
227  case GTFE: {
228  // size already added;
229  }
230 
231  break;
232  case FDL: {
233  L1GtFdlWord fdlBlock;
234  gtDataSize += m_totalBxInEvent * fdlBlock.getSize();
235  }
236 
237  break;
238  case PSB: {
239  L1GtPsbWord psbBlock;
240  gtDataSize += m_totalBxInEvent * psbBlock.getSize();
241  }
242 
243  break;
244  case GMT: {
245  // 17*64/8 TODO FIXME ask Ivan for a getSize() function for GMT record
246  unsigned int gmtRecordSize = 136;
247  unsigned int gmtCollSize = m_totalBxInEvent * gmtRecordSize;
248  gtDataSize += gmtCollSize;
249  }
250 
251  break;
252  case TCS: {
253  L1TcsWord tcsBlock;
254  gtDataSize += tcsBlock.getSize();
255  }
256 
257  break;
258  case TIM: {
259  // not considered
260  }
261 
262  break;
263  default: {
264  // do nothing, all blocks are given in GtBoardType enum
265  }
266 
267  break;
268  }
269  }
270  }
271 
272  unsigned int trailerSize = 8;
273  gtDataSize += trailerSize;
274 
275  // resize, GT raw data record has variable length,
276  // depending on active boards (read in GTFE)
277  gtRawData.resize(gtDataSize);
278 
279  // ptrGt: pointer to the beginning of GT record in the raw data
280 
281  unsigned char* ptrGt = gtRawData.data();
282  unsigned char* ptrGtBegin = gtRawData.data();
283 
284  if (m_verbosity && m_isDebugEnabled) {
285  LogDebug("L1GTDigiToRaw") << "\n Size of raw data: " << gtRawData.size() << "\n" << std::endl;
286  }
287 
288  // ------- pack boards -------
289 
290  // pack header
291  packHeader(ptrGt, iEvent);
292  ptrGt += headerSize; // advance with header size
293 
294  // loop over other blocks in the raw record, if they are active
295 
296  for (CItBoardMaps itBoard = gtRecordMap.begin(); itBoard != gtRecordMap.end(); ++itBoard) {
297  if (itBoard->gtBoardType() == GTFE) {
298  packGTFE(evSetup, ptrGt, gtfeBlock, activeBoardsGt);
299 
300  if (m_verbosity && m_isDebugEnabled) {
301  std::ostringstream myCoutStream;
302  gtfeBlock.print(myCoutStream);
303  LogTrace("L1GTDigiToRaw") << myCoutStream.str() << "\n" << std::endl;
304  }
305 
306  ptrGt += gtfeBlock.getSize(); // advance with GTFE block size
307 
308  continue;
309  }
310 
311  // pack modules other than GTFE if they are active
312 
313  int iActiveBit = itBoard->gtBitDaqActiveBoards();
314  bool activeBoardToPack = false;
315 
316  int altNrBxBoardVal = -1;
317 
318  if (iActiveBit >= 0) {
319  activeBoardToPack = activeBoardsGt & (1 << iActiveBit);
320 
321  altNrBxBoardVal = (altNrBxBoardInitial & (1 << iActiveBit)) >> iActiveBit;
322 
323  if (altNrBxBoardVal == 1) {
324  m_totalBxInEvent = recordLength1;
325  } else if (altNrBxBoardVal == 0) {
326  m_totalBxInEvent = recordLength0;
327  } else {
328  if (m_verbosity) {
329  edm::LogWarning("L1GTDigiToRaw")
330  << "\n\nWARNING: Wrong value altNrBxBoardVal = " << altNrBxBoardVal << " for board " << std::hex
331  << (itBoard->gtBoardId()) << std::dec << "\n iActiveBit = " << iActiveBit
332  << "\n altNrBxBoardInitial = 0x" << std::hex << altNrBxBoardInitial << std::dec
333  << "\n activeBoardsGt = 0x" << std::hex << activeBoardsGt << std::dec
334  << "\n activeBoardToPack = " << activeBoardToPack << "\n Set altNrBxBoardVal tentatively to "
335  << recordLength0 << "\n Job may crash or produce wrong results!\n\n"
336  << std::endl;
337  }
338 
339  m_totalBxInEvent = recordLength0;
340  }
341 
343  m_maxBxInEvent = (m_totalBxInEvent + 1) / 2 - 1;
344 
345  } else {
346  // board not in the ActiveBoards for the record
347  continue;
348  }
349 
350  if (activeBoardToPack) {
351  if (m_verbosity && m_isDebugEnabled) {
352  LogDebug("L1GTDigiToRaw") << "\nBoard " << std::hex << "0x" << (itBoard->gtBoardId()) << std::dec
353  << "\n Number of bunch crosses in the record: " << m_totalBxInEvent << " = "
354  << "[" << m_minBxInEvent << ", " << m_maxBxInEvent << "] BX\n"
355  << std::endl;
356  }
357 
358  // active board, pack it
359  switch (itBoard->gtBoardType()) {
360  case FDL: {
361  for (int iBxInEvent = m_minBxInEvent; iBxInEvent <= m_maxBxInEvent; ++iBxInEvent) {
362  L1GtFdlWord fdlBlock = gtReadoutRecord->gtFdlWord(iBxInEvent);
363  packFDL(evSetup, ptrGt, fdlBlock);
364 
365  if (m_verbosity && m_isDebugEnabled) {
366  std::ostringstream myCoutStream;
367  fdlBlock.print(myCoutStream);
368  LogTrace("L1GTDigiToRaw") << myCoutStream.str() << "\n" << std::endl;
369  }
370 
371  ptrGt += fdlBlock.getSize(); // advance with FDL block size
372  }
373 
374  } break;
375  case PSB: {
376  if (m_verbosity && m_isDebugEnabled) {
377  LogDebug("L1GTDigiToRaw") << "\nBoard of type " << itBoard->gtBoardName() << " with index "
378  << itBoard->gtBoardIndex() << " and boardId " << std::hex << itBoard->gtBoardId()
379  << std::dec << "\n"
380  << std::endl;
381  }
382 
383  for (int iBxInEvent = m_minBxInEvent; iBxInEvent <= m_maxBxInEvent; ++iBxInEvent) {
384  L1GtPsbWord psbBlock = gtReadoutRecord->gtPsbWord(itBoard->gtBoardId(), iBxInEvent);
385 
386  packPSB(evSetup, ptrGt, psbBlock);
387 
388  if (m_verbosity && m_isDebugEnabled) {
389  std::ostringstream myCoutStream;
390  psbBlock.print(myCoutStream);
391  LogTrace("L1GTDigiToRaw") << myCoutStream.str() << "\n" << std::endl;
392  }
393 
394  ptrGt += psbBlock.getSize(); // advance with PSB block size
395  }
396 
397  } break;
398  case GMT: {
399  // get GMT record TODO separate GMT record or via RefProd from GT record
401  iEvent.getByToken(m_muGmtInputToken, gmtrc_handle);
402  if (!gmtrc_handle.isValid()) {
403  if (m_verbosity) {
404  edm::LogWarning("L1GTDigiToRaw")
405  << "\nWarning: L1MuGMTReadoutCollection with input tag " << m_muGmtInputTag
406  << "\nrequested in configuration, but not found in the event."
407  << "\nQuit packing this event" << std::endl;
408  }
409 
410  std::unique_ptr<FEDRawDataCollection> allFedRawData(new FEDRawDataCollection);
411 
412  // put the raw data in the event
413  iEvent.put(std::move(allFedRawData));
414 
415  return;
416  }
417 
418  L1MuGMTReadoutCollection const* gmtrc = gmtrc_handle.product();
419 
420  // pack the GMT record
421 
422  unsigned int gmtCollSize = 0;
423  gmtCollSize = packGmtCollection(ptrGt, gmtrc);
424  ptrGt += gmtCollSize; // advance with GMT collection size
425 
426  } break;
427  default: {
428  // do nothing, all blocks are given in GtBoardType enum
429  break;
430  }
431  }
432  }
433  }
434 
435  // pack trailer
436  packTrailer(ptrGt, ptrGtBegin, gtDataSize);
437 
438  // put the raw data in the event
439  iEvent.put(std::move(allFedRawData));
440 }
#define LogDebug(id)
void packFDL(const edm::EventSetup &, unsigned char *, L1GtFdlWord &)
pack FDL blocks for various bunch crosses
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
const unsigned int getSize() const
get the size of the GTFE block in GT DAQ record (in multiple of 8 bits)
Definition: L1GtfeWord.h:160
void print(std::ostream &myCout) const
pretty print the content of a L1GlobalTriggerReadoutRecord
virtual void print(std::ostream &myCout) const
pretty print the content of a L1GtfeWord
Definition: L1GtfeWord.cc:253
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
const edm::EDGetTokenT< L1MuGMTReadoutCollection > m_muGmtInputToken
input tag for GMT record
Definition: L1GTDigiToRaw.h:90
void packHeader(unsigned char *, edm::Event &)
block packers -------——
const L1GtfeWord gtfeWord() const
get / set GTFE word (record) in the GT readout record
const unsigned int getSize() const
get the size of the FDL block in GT DAQ record (in multiple of 8 bits)
Definition: L1GtFdlWord.h:271
const cms_uint16_t altNrBxBoard() const
get/set alternative for number of BX per board
Definition: L1GtfeWord.h:134
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:45
cms_uint16_t m_activeBoardsMaskGt
mask for active boards
Definition: L1GTDigiToRaw.h:95
const cms_uint16_t recordLength() const
get/set record length for alternative 0
Definition: L1GtfeWord.h:82
void packPSB(const edm::EventSetup &, unsigned char *, L1GtPsbWord &)
void resize(size_t newsize)
Definition: FEDRawData.cc:28
const edm::InputTag m_muGmtInputTag
Definition: L1GTDigiToRaw.h:92
void packTrailer(unsigned char *, unsigned char *, int)
pack trailer word
unsigned short cms_uint16_t
Definition: typedefs.h:13
const edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_daqGtInputToken
input tag for GT DAQ record
Definition: L1GTDigiToRaw.h:87
const L1GtPsbWord gtPsbWord(cms_uint16_t boardIdValue, int bxInEventValue) const
get / set PSB word (record) in the GT readout record
bool isValid() const
Definition: HandleBase.h:70
const cms_uint16_t activeBoards() const
get/set boards contributing to EVM respectively DAQ record
Definition: L1GtfeWord.h:119
#define LogTrace(id)
void print(std::ostream &myCout) const
pretty print the content of a L1GtFdlWord
Definition: L1GtFdlWord.cc:595
void print(std::ostream &myCout) const
pretty print
Definition: L1GtPsbWord.cc:348
const edm::InputTag m_daqGtInputTag
Definition: L1GTDigiToRaw.h:91
T const * product() const
Definition: Handle.h:69
const L1GtFdlWord gtFdlWord(int bxInEventValue) const
get / set FDL word (record) in the GT readout record
unsigned int packGmtCollection(unsigned char *ptrGt, L1MuGMTReadoutCollection const *digis)
pack the GMT collection using packGMT (GMT record packing)
void packGTFE(const edm::EventSetup &, unsigned char *, L1GtfeWord &, cms_uint16_t activeBoardsGtValue)
const unsigned int getSize() const
get the size of the TCS block in GT EVM record (in multiple of 8 bits)
Definition: L1TcsWord.h:197
const std::vector< L1GtBoard > & gtBoardMaps() const
get / set / print the L1 GT board map
Definition: L1GtBoardMaps.h:43
T get() const
Definition: EventSetup.h:73
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:24
int m_verbosity
verbosity level
const cms_uint16_t recordLength1() const
get/set record length for alternative 1
Definition: L1GtfeWord.h:71
int m_totalBxInEvent
total Bx&#39;s in the event, obtained from GTFE block
Definition: L1GTDigiToRaw.h:98
def move(src, dest)
Definition: eostools.py:511
const unsigned int getSize() const
get the size of the PSB block in GT DAQ record (in multiple of 8 bits)
Definition: L1GtPsbWord.h:147

Member Data Documentation

cms_uint16_t L1GTDigiToRaw::m_activeBoardsMaskGt
private

mask for active boards

Definition at line 95 of file L1GTDigiToRaw.h.

Referenced by L1GTDigiToRaw(), and produce().

int L1GTDigiToRaw::m_daqGtFedId
private

FED Id for GT DAQ record default value defined in DataFormats/FEDRawData/src/FEDNumbering.cc

Definition at line 84 of file L1GTDigiToRaw.h.

Referenced by L1GTDigiToRaw(), packHeader(), and produce().

const edm::InputTag L1GTDigiToRaw::m_daqGtInputTag
private

Definition at line 91 of file L1GTDigiToRaw.h.

Referenced by L1GTDigiToRaw(), and produce().

const edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> L1GTDigiToRaw::m_daqGtInputToken
private

input tag for GT DAQ record

Definition at line 87 of file L1GTDigiToRaw.h.

Referenced by produce().

bool L1GTDigiToRaw::m_isDebugEnabled
private
int L1GTDigiToRaw::m_maxBxInEvent
private

max Bx's in the event, computed after m_totalBxInEvent is obtained from GTFE block assume symmetrical number of BX around L1Accept

Definition at line 106 of file L1GTDigiToRaw.h.

Referenced by packGmtCollection(), and produce().

int L1GTDigiToRaw::m_minBxInEvent
private

min Bx's in the event, computed after m_totalBxInEvent is obtained from GTFE block assume symmetrical number of BX around L1Accept

Definition at line 102 of file L1GTDigiToRaw.h.

Referenced by packGmtCollection(), and produce().

const edm::InputTag L1GTDigiToRaw::m_muGmtInputTag
private

Definition at line 92 of file L1GTDigiToRaw.h.

Referenced by L1GTDigiToRaw(), and produce().

const edm::EDGetTokenT<L1MuGMTReadoutCollection> L1GTDigiToRaw::m_muGmtInputToken
private

input tag for GMT record

Definition at line 90 of file L1GTDigiToRaw.h.

Referenced by produce().

int L1GTDigiToRaw::m_totalBxInEvent
private

total Bx's in the event, obtained from GTFE block

Definition at line 98 of file L1GTDigiToRaw.h.

Referenced by packGmtCollection(), and produce().

int L1GTDigiToRaw::m_verbosity
private

verbosity level

Definition at line 110 of file L1GTDigiToRaw.h.

Referenced by L1GTDigiToRaw(), packFDL(), packGmtCollection(), packGTFE(), packHeader(), packPSB(), and produce().