CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

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
 
const edm::ESGetToken< L1GtBoardMaps, L1GtBoardMapsRcdm_l1GtBMToken
 EventSetup Token for L1GtBoardMaps. More...
 
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<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::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 48 of file L1GTDigiToRaw.h.

Constructor & Destructor Documentation

◆ L1GTDigiToRaw()

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

constructor(s)

Definition at line 54 of file L1GTDigiToRaw.cc.

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

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

Member Function Documentation

◆ flipPtQ()

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

Definition at line 739 of file L1GTDigiToRaw.cc.

References w().

739 { return ((w & 0xffff00ff) | ((~w) & 0x0000ff00)); }
T w() const

◆ packFDL()

void L1GTDigiToRaw::packFDL ( const edm::EventSetup evSetup,
unsigned char *  ptrGt,
L1GtFdlWord fdlBlock 
)
private

pack FDL blocks for various bunch crosses

Definition at line 527 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().

527  {
528  if (m_verbosity && m_isDebugEnabled) {
529  LogDebug("L1GTDigiToRaw") << "\nPacking FDL \n" << std::endl;
530  }
531 
533 
534  // initialize the required number of word64
535  int nrWord64 = fdlBlock.getSize() / uLength;
536  std::vector<cms_uint64_t> tmpWord64;
537  tmpWord64.resize(nrWord64);
538 
539  for (int iWord = 0; iWord < nrWord64; ++iWord) {
540  tmpWord64[iWord] = 0x0000000000000000ULL;
541  }
542 
543  // fill the values in the words
544  for (int iWord = 0; iWord < nrWord64; ++iWord) {
545  fdlBlock.setBoardIdWord64(tmpWord64[iWord], iWord);
546  fdlBlock.setBxInEventWord64(tmpWord64[iWord], iWord);
547  fdlBlock.setBxNrWord64(tmpWord64[iWord], iWord);
548  fdlBlock.setEventNrWord64(tmpWord64[iWord], iWord);
549 
550  fdlBlock.setGtTechnicalTriggerWordWord64(tmpWord64[iWord], iWord);
551 
552  fdlBlock.setGtDecisionWordAWord64(tmpWord64[iWord], iWord);
553  fdlBlock.setGtDecisionWordBWord64(tmpWord64[iWord], iWord);
554 
555  fdlBlock.setGtDecisionWordExtendedWord64(tmpWord64[iWord], iWord);
556 
557  fdlBlock.setPhysicsDeclaredWord64(tmpWord64[iWord], iWord);
558  fdlBlock.setGtPrescaleFactorIndexTechWord64(tmpWord64[iWord], iWord);
559  fdlBlock.setGtPrescaleFactorIndexAlgoWord64(tmpWord64[iWord], iWord);
560  fdlBlock.setNoAlgoWord64(tmpWord64[iWord], iWord);
561  fdlBlock.setFinalORWord64(tmpWord64[iWord], iWord);
562 
563  fdlBlock.setOrbitNrWord64(tmpWord64[iWord], iWord);
564  fdlBlock.setLumiSegmentNrWord64(tmpWord64[iWord], iWord);
565  fdlBlock.setLocalBxNrWord64(tmpWord64[iWord], iWord);
566  }
567 
568  // put the words in the FED record
569 
570  cms_uint64_t* pw = reinterpret_cast<cms_uint64_t*>(const_cast<unsigned char*>(ptrGt));
571 
572  for (int iWord = 0; iWord < nrWord64; ++iWord) {
573  *pw++ = tmpWord64[iWord];
574 
575  if (m_verbosity && m_isDebugEnabled) {
576  LogTrace("L1GTDigiToRaw") << std::setw(4) << iWord << " " << std::hex << std::setfill('0') << std::setw(16)
577  << tmpWord64[iWord] << std::dec << std::setfill(' ') << std::endl;
578  }
579  }
580 }
void setNoAlgoWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:512
void setGtDecisionWordBWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:386
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:547
void setOrbitNrWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:534
void setGtTechnicalTriggerWordWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:259
#define LogTrace(id)
void setGtPrescaleFactorIndexTechWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:488
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:475
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
void setGtDecisionWordExtendedWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:444
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 setLocalBxNrWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:558
void setGtDecisionWordAWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:359
int m_verbosity
verbosity level
void setFinalORWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:523
unsigned long long cms_uint64_t
Definition: typedefs.h:17
void setGtPrescaleFactorIndexAlgoWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:501
#define LogDebug(id)

◆ packGMT()

unsigned L1GTDigiToRaw::packGMT ( L1MuGMTReadoutRecord const &  gmtrr,
unsigned char *  chp 
)
private

pack a GMT record

Definition at line 645 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().

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

◆ packGmtCollection()

unsigned int L1GTDigiToRaw::packGmtCollection ( unsigned char *  ptrGt,
L1MuGMTReadoutCollection const *  digis 
)
private

pack the GMT collection using packGMT (GMT record packing)

Definition at line 627 of file L1GTDigiToRaw.cc.

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

Referenced by produce().

627  {
628  if (m_verbosity && m_isDebugEnabled) {
629  LogDebug("L1GTDigiToRaw") << "\nPacking GMT collection \n" << std::endl;
630  }
631 
632  unsigned gmtsize = 0;
633 
634  // loop range: int m_totalBxInEvent is normally even (L1A-1, L1A, L1A+1, with L1A = 0)
635  for (int iBxInEvent = m_minBxInEvent; iBxInEvent <= m_maxBxInEvent; ++iBxInEvent) {
636  L1MuGMTReadoutRecord const& gmtrr = digis->getRecord(iBxInEvent);
637  gmtsize = packGMT(gmtrr, ptrGt);
638  ptrGt += gmtsize;
639  }
640 
641  return m_totalBxInEvent * gmtsize;
642 }
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
#define LogDebug(id)

◆ packGTFE()

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 481 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().

484  {
485  if (m_verbosity && m_isDebugEnabled) {
486  LogDebug("L1GTDigiToRaw") << "\nPacking GTFE \n" << std::endl;
487  }
488 
490 
491  // initialize the required number of word64
492  int nrWord64 = gtfeBlock.getSize() / uLength;
493  std::vector<cms_uint64_t> tmpWord64;
494  tmpWord64.resize(nrWord64);
495 
496  for (int iWord = 0; iWord < nrWord64; ++iWord) {
497  tmpWord64[iWord] = 0x0000000000000000ULL;
498  }
499 
500  // fill the values in the words
501  for (int iWord = 0; iWord < nrWord64; ++iWord) {
502  gtfeBlock.setBoardIdWord64(tmpWord64[iWord], iWord);
503  gtfeBlock.setRecordLength1Word64(tmpWord64[iWord], iWord);
504  gtfeBlock.setRecordLengthWord64(tmpWord64[iWord], iWord);
505  gtfeBlock.setBxNrWord64(tmpWord64[iWord], iWord);
506  gtfeBlock.setSetupVersionWord64(tmpWord64[iWord], iWord);
507  gtfeBlock.setActiveBoardsWord64(tmpWord64[iWord], iWord, activeBoardsGtValue);
508  gtfeBlock.setAltNrBxBoardWord64(tmpWord64[iWord], iWord);
509  gtfeBlock.setTotalTriggerNrWord64(tmpWord64[iWord], iWord);
510  }
511 
512  // put the words in the FED record
513 
514  cms_uint64_t* pw = reinterpret_cast<cms_uint64_t*>(const_cast<unsigned char*>(ptrGt));
515 
516  for (int iWord = 0; iWord < nrWord64; ++iWord) {
517  *pw++ = tmpWord64[iWord];
518 
519  if (m_verbosity && m_isDebugEnabled) {
520  LogTrace("L1GTDigiToRaw") << std::setw(4) << iWord << " " << std::hex << std::setfill('0') << std::setw(16)
521  << tmpWord64[iWord] << std::dec << std::setfill(' ') << std::endl;
522  }
523  }
524 }
void setRecordLength1Word64(cms_uint64_t &word64, int iWord)
Definition: L1GtfeWord.cc:129
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
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
#define LogTrace(id)
void setBoardIdWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtfeWord.cc:116
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
#define LogDebug(id)

◆ packHeader()

void L1GTDigiToRaw::packHeader ( unsigned char *  ptrGt,
edm::Event iEvent 
)
private

block packers -------——

pack header

Definition at line 440 of file L1GTDigiToRaw.cc.

References TauDecayModes::dec, iEvent, LogDebug, m_daqGtFedId, m_isDebugEnabled, m_verbosity, and FEDHeader::set().

Referenced by produce().

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

◆ packPSB()

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 583 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().

583  {
584  if (m_verbosity && m_isDebugEnabled) {
585  LogDebug("L1GTDigiToRaw") << "\nPacking PSB \n" << std::endl;
586  }
587 
589 
590  // initialize the required number of word64
591  int nrWord64 = psbBlock.getSize() / uLength;
592  std::vector<cms_uint64_t> tmpWord64;
593  tmpWord64.resize(nrWord64);
594 
595  for (int iWord = 0; iWord < nrWord64; ++iWord) {
596  tmpWord64[iWord] = 0x0000000000000000ULL;
597  }
598 
599  // fill the values in the words
600  for (int iWord = 0; iWord < nrWord64; ++iWord) {
601  psbBlock.setBoardIdWord64(tmpWord64[iWord], iWord);
602  psbBlock.setBxInEventWord64(tmpWord64[iWord], iWord);
603  psbBlock.setBxNrWord64(tmpWord64[iWord], iWord);
604  psbBlock.setEventNrWord64(tmpWord64[iWord], iWord);
605 
606  psbBlock.setADataWord64(tmpWord64[iWord], iWord);
607  psbBlock.setBDataWord64(tmpWord64[iWord], iWord);
608 
609  psbBlock.setLocalBxNrWord64(tmpWord64[iWord], iWord);
610  }
611 
612  // put the words in the FED record
613 
614  cms_uint64_t* pw = reinterpret_cast<cms_uint64_t*>(const_cast<unsigned char*>(ptrGt));
615 
616  for (int iWord = 0; iWord < nrWord64; ++iWord) {
617  *pw++ = tmpWord64[iWord];
618 
619  if (m_verbosity && m_isDebugEnabled) {
620  LogTrace("L1GTDigiToRaw") << std::setw(4) << iWord << " " << std::hex << std::setfill('0') << std::setw(16)
621  << tmpWord64[iWord] << std::dec << std::setfill(' ') << std::endl;
622  }
623  }
624 }
void setEventNrWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtPsbWord.cc:173
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
static const int UnitLength
one unit in the word is UnitLength bits
void setBxNrWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtPsbWord.cc:158
#define LogTrace(id)
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
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
#define LogDebug(id)

◆ packTrailer()

void L1GTDigiToRaw::packTrailer ( unsigned char *  ptrGt,
unsigned char *  ptrGtBegin,
int  dataSize 
)
private

pack trailer word

Definition at line 742 of file L1GTDigiToRaw.cc.

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

Referenced by produce().

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

◆ produce()

void L1GTDigiToRaw::produce ( edm::Event iEvent,
const edm::EventSetup evSetup 
)
overrideprivate

loop over events

Definition at line 88 of file L1GTDigiToRaw.cc.

References L1GtfeWord::activeBoards(), L1GtfeWord::altNrBxBoard(), FEDRawData::data(), TauDecayModes::dec, FDL, edm::EventSetup::getHandle(), L1GtPsbWord::getSize(), L1GtfeWord::getSize(), L1TcsWord::getSize(), L1GtFdlWord::getSize(), GMT, L1GtBoardMaps::gtBoardMaps(), L1GlobalTriggerReadoutRecord::gtFdlWord(), GTFE, L1GlobalTriggerReadoutRecord::gtfeWord(), L1GlobalTriggerReadoutRecord::gtPsbWord(), iEvent, edm::HandleBase::isValid(), LogDebug, LogTrace, m_activeBoardsMaskGt, m_daqGtFedId, m_daqGtInputTag, m_daqGtInputToken, m_isDebugEnabled, m_l1GtBMToken, 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, L1GtfeWord::recordLength(), L1GtfeWord::recordLength1(), FEDRawData::resize(), FEDRawData::size(), TCS, and TIM.

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

Member Data Documentation

◆ m_activeBoardsMaskGt

cms_uint16_t L1GTDigiToRaw::m_activeBoardsMaskGt
private

mask for active boards

Definition at line 101 of file L1GTDigiToRaw.h.

Referenced by L1GTDigiToRaw(), and produce().

◆ m_daqGtFedId

int L1GTDigiToRaw::m_daqGtFedId
private

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

Definition at line 87 of file L1GTDigiToRaw.h.

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

◆ m_daqGtInputTag

const edm::InputTag L1GTDigiToRaw::m_daqGtInputTag
private

Definition at line 94 of file L1GTDigiToRaw.h.

Referenced by L1GTDigiToRaw(), and produce().

◆ m_daqGtInputToken

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

input tag for GT DAQ record

Definition at line 90 of file L1GTDigiToRaw.h.

Referenced by produce().

◆ m_isDebugEnabled

bool L1GTDigiToRaw::m_isDebugEnabled
private

◆ m_l1GtBMToken

const edm::ESGetToken<L1GtBoardMaps, L1GtBoardMapsRcd> L1GTDigiToRaw::m_l1GtBMToken
private

EventSetup Token for L1GtBoardMaps.

Definition at line 98 of file L1GTDigiToRaw.h.

Referenced by produce().

◆ m_maxBxInEvent

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 112 of file L1GTDigiToRaw.h.

Referenced by packGmtCollection(), and produce().

◆ m_minBxInEvent

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 108 of file L1GTDigiToRaw.h.

Referenced by packGmtCollection(), and produce().

◆ m_muGmtInputTag

const edm::InputTag L1GTDigiToRaw::m_muGmtInputTag
private

Definition at line 95 of file L1GTDigiToRaw.h.

Referenced by L1GTDigiToRaw(), and produce().

◆ m_muGmtInputToken

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

input tag for GMT record

Definition at line 93 of file L1GTDigiToRaw.h.

Referenced by produce().

◆ m_totalBxInEvent

int L1GTDigiToRaw::m_totalBxInEvent
private

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

Definition at line 104 of file L1GTDigiToRaw.h.

Referenced by packGmtCollection(), and produce().

◆ m_verbosity

int L1GTDigiToRaw::m_verbosity
private

verbosity level

Definition at line 116 of file L1GTDigiToRaw.h.

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