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 hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () 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 60 of file L1GTDigiToRaw.cc.

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

60  :
61 
63  "DaqGtFedId", FEDNumbering::MAXTriggerGTPFEDID)),
64  m_daqGtInputToken(consumes<L1GlobalTriggerReadoutRecord>(pSet.getParameter<edm::InputTag> ("DaqGtInputTag"))),
65  m_muGmtInputToken(consumes<L1MuGMTReadoutCollection>(pSet.getParameter<edm::InputTag> ("MuGmtInputTag"))),
66  m_daqGtInputTag(pSet.getParameter<edm::InputTag> ("DaqGtInputTag")),
67  m_muGmtInputTag(pSet.getParameter<edm::InputTag> ("MuGmtInputTag")),
68  m_activeBoardsMaskGt(pSet.getParameter<unsigned int> ("ActiveBoardsMask")),
71  m_verbosity(pSet.getUntrackedParameter<int> ("Verbosity", 0)),
73 
74 {
75 
77  LogDebug("L1GTDigiToRaw")
78  << "\nFED Id for DAQ GT record: " << m_daqGtFedId << " \n"
79  << "\nInput tag for DAQ GT record: " << m_daqGtInputTag << " \n"
80  << "\nInput tag for GMT record: " << m_muGmtInputTag << " \n"
81  << "\nMask for active boards (hex format): " << std::hex
82  << std::setw(sizeof(m_activeBoardsMaskGt) * 2) << std::setfill('0')
84  << std::dec << std::setfill(' ') << " \n"
85  << std::endl;
86  }
87 
88  //
89  produces<FEDRawDataCollection> ();
90 
91 }
#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:98
cms_uint16_t m_activeBoardsMaskGt
mask for active boards
const edm::InputTag m_muGmtInputTag
const edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_daqGtInputToken
input tag for GT DAQ record
Definition: L1GTDigiToRaw.h:95
const edm::InputTag m_daqGtInputTag
Definition: L1GTDigiToRaw.h:99
int m_verbosity
verbosity level
int m_totalBxInEvent
total Bx&#39;s in the event, obtained from GTFE block

Member Function Documentation

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

Definition at line 837 of file L1GTDigiToRaw.cc.

838 {
839  return ( (w&0xffff00ff) | ((~w)&0x0000ff00) );
840 }
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 596 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().

597  {
598 
599  if (m_verbosity && m_isDebugEnabled) {
600 
601  LogDebug("L1GTDigiToRaw") << "\nPacking FDL \n" << std::endl;
602  }
603 
605 
606  // initialize the required number of word64
607  int nrWord64 = fdlBlock.getSize() / uLength;
608  std::vector<cms_uint64_t> tmpWord64;
609  tmpWord64.resize(nrWord64);
610 
611  for (int iWord = 0; iWord < nrWord64; ++iWord) {
612  tmpWord64[iWord] = 0x0000000000000000ULL;
613  }
614 
615  // fill the values in the words
616  for (int iWord = 0; iWord < nrWord64; ++iWord) {
617 
618  fdlBlock.setBoardIdWord64(tmpWord64[iWord], iWord);
619  fdlBlock.setBxInEventWord64(tmpWord64[iWord], iWord);
620  fdlBlock.setBxNrWord64(tmpWord64[iWord], iWord);
621  fdlBlock.setEventNrWord64(tmpWord64[iWord], iWord);
622 
623  fdlBlock.setGtTechnicalTriggerWordWord64(tmpWord64[iWord], iWord);
624 
625  fdlBlock.setGtDecisionWordAWord64(tmpWord64[iWord], iWord);
626  fdlBlock.setGtDecisionWordBWord64(tmpWord64[iWord], iWord);
627 
628  fdlBlock.setGtDecisionWordExtendedWord64(tmpWord64[iWord], iWord);
629 
630  fdlBlock.setPhysicsDeclaredWord64(tmpWord64[iWord], iWord);
631  fdlBlock.setGtPrescaleFactorIndexTechWord64(tmpWord64[iWord], iWord);
632  fdlBlock.setGtPrescaleFactorIndexAlgoWord64(tmpWord64[iWord], iWord);
633  fdlBlock.setNoAlgoWord64(tmpWord64[iWord], iWord);
634  fdlBlock.setFinalORWord64(tmpWord64[iWord], iWord);
635 
636  fdlBlock.setOrbitNrWord64(tmpWord64[iWord], iWord);
637  fdlBlock.setLumiSegmentNrWord64(tmpWord64[iWord], iWord);
638  fdlBlock.setLocalBxNrWord64(tmpWord64[iWord], iWord);
639 
640  }
641 
642  // put the words in the FED record
643 
644  cms_uint64_t* pw = reinterpret_cast<cms_uint64_t*> (const_cast<unsigned char*> (ptrGt));
645 
646  for (int iWord = 0; iWord < nrWord64; ++iWord) {
647 
648  *pw++ = tmpWord64[iWord];
649 
650  if (m_verbosity && m_isDebugEnabled) {
651 
652  LogTrace("L1GTDigiToRaw")
653  << std::setw(4) << iWord << " "
654  << std::hex << std::setfill('0') << std::setw(16) << tmpWord64[iWord] << std::dec
655  << std::setfill(' ')
656  << std::endl;
657  }
658  }
659 
660 }
#define LogDebug(id)
void setNoAlgoWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:642
void setGtDecisionWordBWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:471
static const int UnitLength
one unit in the word is UnitLength bits
void setBoardIdWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:196
void setLumiSegmentNrWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:700
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
void setOrbitNrWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:682
void setGtTechnicalTriggerWordWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:311
void setGtPrescaleFactorIndexTechWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:603
void setBxInEventWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:217
void setPhysicsDeclaredWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:584
void setEventNrWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:258
void setBxNrWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:239
#define LogTrace(id)
void setGtDecisionWordExtendedWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:545
void setLocalBxNrWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:719
void setGtDecisionWordAWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:435
int m_verbosity
verbosity level
void setFinalORWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:664
unsigned long long cms_uint64_t
Definition: typedefs.h:17
void setGtPrescaleFactorIndexAlgoWord64(cms_uint64_t &word64, const int iWord)
Definition: L1GtFdlWord.cc:623
unsigned L1GTDigiToRaw::packGMT ( L1MuGMTReadoutRecord const &  gmtrr,
unsigned char *  chp 
)
private

pack a GMT record

Definition at line 741 of file L1GTDigiToRaw.cc.

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

742 {
743 
744  const unsigned SIZE=136;
745  const unsigned boardId=0xdd12;
746  memset(chp,0,SIZE);
747 
748  unsigned* p = (unsigned*) chp;
749 
750  // event number + bcerr
751  *p++ = (gmtrr.getEvNr()&0xffffff) | ((gmtrr.getBCERR()&0xff)<<24);
752  // bx number, bx in event, length(?), board-id(?)
753  *p++ = (gmtrr.getBxNr()&0xfff) | ((gmtrr.getBxInEvent()&0xf)<<12) | (boardId<<16);
754 
755  std::vector<L1MuRegionalCand> vrc;
756  std::vector<L1MuRegionalCand>::const_iterator irc;
757  unsigned* pp = p;
758 
759  vrc = gmtrr.getDTBXCands();
760  pp = p;
761  for(irc=vrc.begin(); irc!=vrc.end(); irc++) {
762  *pp++ = (*irc).getDataWord();
763  }
764  p+=4;
765 
766  vrc = gmtrr.getBrlRPCCands();
767  pp = p;
768  for(irc=vrc.begin(); irc!=vrc.end(); irc++) {
769  *pp++ = (*irc).getDataWord();
770  }
771  p+=4;
772 
773  vrc = gmtrr.getCSCCands();
774  pp = p;
775  for(irc=vrc.begin(); irc!=vrc.end(); irc++) {
776  *pp++ = (*irc).getDataWord();
777  }
778  p+=4;
779 
780  vrc = gmtrr.getFwdRPCCands();
781  pp = p;
782  for(irc=vrc.begin(); irc!=vrc.end(); irc++) {
783  *pp++ = (*irc).getDataWord();
784  }
785  p+=4;
786 
787  // the regional candidates are written to the record with inverted Pt and qual bits
788  pp = p-16;
789  for(int i=0; i<16; i++) {
790  unsigned w = *pp;
791  *pp++ = (w&0xffff00ff) | ((~w)&0x0000ff00);
792  }
793 
794  std::vector<L1MuGMTExtendedCand> vgc;
795  std::vector<L1MuGMTExtendedCand>::const_iterator igc;
796 
797  vgc = gmtrr.getGMTBrlCands();
798  pp = p;
799  for(igc=vgc.begin(); igc!=vgc.end(); igc++) {
800  *pp++ = (*igc).getDataWord();
801  }
802  p+=4;
803 
804  vgc = gmtrr.getGMTFwdCands();
805  pp = p;
806  for(igc=vgc.begin(); igc!=vgc.end(); igc++) {
807  *pp++ = (*igc).getDataWord();
808  }
809  p+=4;
810 
811  vgc = gmtrr.getGMTCands();
812  pp = p;
813  for(igc=vgc.begin(); igc!=vgc.end(); igc++) {
814  *pp++ = (*igc).getDataWord();
815  }
816  p+=4;
817 
818  unsigned char* chpp;
819 
820  vgc = gmtrr.getGMTBrlCands();
821  chpp = (unsigned char*) p;
822  for(igc=vgc.begin(); igc!=vgc.end(); igc++) {
823  *chpp++ = (*igc).rank();
824  }
825  p++;
826 
827  vgc = gmtrr.getGMTFwdCands();
828  chpp = (unsigned char*) p;
829  for(igc=vgc.begin(); igc!=vgc.end(); igc++) {
830  *chpp++ = (*igc).rank();
831  }
832  p++;
833 
834  return SIZE;
835 }
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 717 of file L1GTDigiToRaw.cc.

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

Referenced by produce().

720 {
721 
722  if (m_verbosity && m_isDebugEnabled) {
723  LogDebug("L1GTDigiToRaw") << "\nPacking GMT collection \n" << std::endl;
724  }
725 
726  unsigned gmtsize = 0;
727 
728  // loop range: int m_totalBxInEvent is normally even (L1A-1, L1A, L1A+1, with L1A = 0)
729  for (int iBxInEvent = m_minBxInEvent; iBxInEvent <= m_maxBxInEvent;
730  ++iBxInEvent) {
731  L1MuGMTReadoutRecord const& gmtrr = digis->getRecord(iBxInEvent);
732  gmtsize = packGMT(gmtrr, ptrGt);
733  ptrGt += gmtsize;
734  }
735 
736  return m_totalBxInEvent*gmtsize;
737 
738 }
#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
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 542 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().

544  {
545 
546  if (m_verbosity && m_isDebugEnabled) {
547  LogDebug("L1GTDigiToRaw") << "\nPacking GTFE \n" << std::endl;
548  }
549 
551 
552  // initialize the required number of word64
553  int nrWord64 = gtfeBlock.getSize() / uLength;
554  std::vector<cms_uint64_t> tmpWord64;
555  tmpWord64.resize(nrWord64);
556 
557  for (int iWord = 0; iWord < nrWord64; ++iWord) {
558  tmpWord64[iWord] = 0x0000000000000000ULL;
559  }
560 
561  // fill the values in the words
562  for (int iWord = 0; iWord < nrWord64; ++iWord) {
563 
564  gtfeBlock.setBoardIdWord64(tmpWord64[iWord], iWord);
565  gtfeBlock.setRecordLength1Word64(tmpWord64[iWord], iWord);
566  gtfeBlock.setRecordLengthWord64(tmpWord64[iWord], iWord);
567  gtfeBlock.setBxNrWord64(tmpWord64[iWord], iWord);
568  gtfeBlock.setSetupVersionWord64(tmpWord64[iWord], iWord);
569  gtfeBlock.setActiveBoardsWord64(tmpWord64[iWord], iWord, activeBoardsGtValue);
570  gtfeBlock.setAltNrBxBoardWord64(tmpWord64[iWord], iWord);
571  gtfeBlock.setTotalTriggerNrWord64(tmpWord64[iWord], iWord);
572 
573  }
574 
575  // put the words in the FED record
576 
577  cms_uint64_t* pw = reinterpret_cast<cms_uint64_t*> (const_cast<unsigned char*> (ptrGt));
578 
579  for (int iWord = 0; iWord < nrWord64; ++iWord) {
580 
581  *pw++ = tmpWord64[iWord];
582 
583  if (m_verbosity && m_isDebugEnabled) {
584  LogTrace("L1GTDigiToRaw")
585  << std::setw(4) << iWord << " "
586  << std::hex << std::setfill('0') << std::setw(16) << tmpWord64[iWord] << std::dec
587  << std::setfill(' ')
588  << std::endl;
589  }
590  }
591 
592 }
#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:229
void setRecordLength1Word64(cms_uint64_t &word64, int iWord)
Definition: L1GtfeWord.cc:138
static const int UnitLength
one unit in the word is UnitLength bits
void setActiveBoardsWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtfeWord.cc:231
void setSetupVersionWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtfeWord.cc:194
void setBoardIdWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtfeWord.cc:120
#define LogTrace(id)
void setAltNrBxBoardWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtfeWord.cc:263
void setBxNrWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtfeWord.cc:176
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:293
void setRecordLengthWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtfeWord.cc:157
void L1GTDigiToRaw::packHeader ( unsigned char *  ptrGt,
edm::Event iEvent 
)
private

block packers -------——

pack header

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

500  {
501  // TODO FIXME where from to get all numbers?
502 
503  // Event Trigger type identifier
504  int triggerTypeVal = 0;
505 
506  // Level-1 event number generated by the TTC system
507  int lvl1IdVal = iEvent.id().event();
508 
509  // The bunch crossing number
510  int bxCross = iEvent.bunchCrossing();
511  cms_uint16_t bxCrossHw = 0;
512  if ( ( bxCross & 0xFFF ) == bxCross) {
513  bxCrossHw = static_cast<cms_uint16_t> (bxCross);
514  } else {
515  bxCrossHw = 0; // Bx number too large, set to 0!
516  if (m_verbosity && m_isDebugEnabled) {
517  LogDebug("L1GTDigiToRaw") << "\nBunch cross number [hex] = " << std::hex << bxCross
518  << "\n larger than 12 bits. Set to 0! \n" << std::dec << std::endl;
519  }
520  }
521  int bxIdVal = bxCrossHw;
522 
523  // Identifier of the FED
524  int sourceIdVal = m_daqGtFedId;
525 
526  // Version identifier of the FED data format
527  int versionVal = 0;
528 
529  // 0 -> the current header word is the last one.
530  // 1-> other header words can follow
531  // (always 1 for ECAL)
532  bool moreHeadersVal = false;
533 
534  FEDHeader gtFEDHeader(ptrGt);
535 
536  gtFEDHeader.set(
537  ptrGt, triggerTypeVal, lvl1IdVal, bxIdVal, sourceIdVal, versionVal, moreHeadersVal);
538 
539 }
#define LogDebug(id)
EventNumber_t event() const
Definition: EventID.h:41
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 663 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().

664  {
665  if (m_verbosity && m_isDebugEnabled) {
666 
667  LogDebug("L1GTDigiToRaw") << "\nPacking PSB \n" << std::endl;
668  }
669 
671 
672  // initialize the required number of word64
673  int nrWord64 = psbBlock.getSize() / uLength;
674  std::vector<cms_uint64_t> tmpWord64;
675  tmpWord64.resize(nrWord64);
676 
677  for (int iWord = 0; iWord < nrWord64; ++iWord) {
678  tmpWord64[iWord] = 0x0000000000000000ULL;
679  }
680 
681  // fill the values in the words
682  for (int iWord = 0; iWord < nrWord64; ++iWord) {
683 
684  psbBlock.setBoardIdWord64(tmpWord64[iWord], iWord);
685  psbBlock.setBxInEventWord64(tmpWord64[iWord], iWord);
686  psbBlock.setBxNrWord64(tmpWord64[iWord], iWord);
687  psbBlock.setEventNrWord64(tmpWord64[iWord], iWord);
688 
689  psbBlock.setADataWord64(tmpWord64[iWord], iWord);
690  psbBlock.setBDataWord64(tmpWord64[iWord], iWord);
691 
692  psbBlock.setLocalBxNrWord64(tmpWord64[iWord], iWord);
693 
694  }
695 
696  // put the words in the FED record
697 
698  cms_uint64_t* pw = reinterpret_cast<cms_uint64_t*> (const_cast<unsigned char*> (ptrGt));
699 
700  for (int iWord = 0; iWord < nrWord64; ++iWord) {
701 
702  *pw++ = tmpWord64[iWord];
703 
704  if (m_verbosity && m_isDebugEnabled) {
705 
706  LogTrace("L1GTDigiToRaw")
707  << std::setw(4) << iWord << " "
708  << std::hex << std::setfill('0') << std::setw(16) << tmpWord64[iWord] << std::dec
709  << std::setfill(' ')
710  << std::endl;
711  }
712  }
713 
714 }
#define LogDebug(id)
void setEventNrWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtPsbWord.cc:216
static const int UnitLength
one unit in the word is UnitLength bits
void setBxNrWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtPsbWord.cc:195
void setBxInEventWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtPsbWord.cc:170
void setADataWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtPsbWord.cc:295
void setLocalBxNrWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtPsbWord.cc:418
void setBDataWord64(cms_uint64_t &word64, int iWord)
Definition: L1GtPsbWord.cc:379
#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:146
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 L1GTDigiToRaw::packTrailer ( unsigned char *  ptrGt,
unsigned char *  ptrGtBegin,
int  dataSize 
)
private

pack trailer word

Definition at line 843 of file L1GTDigiToRaw.cc.

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

Referenced by produce().

843  {
844 
845  // TODO FIXME where from to get all numbers?
846 
847  // The length of the event fragment counted in 64-bit words including header and trailer
848  int lengthVal = dataSize / 8;
849 
850  // Cyclic Redundancy Code of the event fragment including header and trailer
851  int crcVal = evf::compute_crc(ptrGtBegin, dataSize);
852 
853  // Event fragment status information
854  int evtStatusVal = 0;
855 
856  // Current value of the Trigger Throttling System bits.
857  int ttsBitsVal = 0;
858 
859  // 0 -> the current trailer word is the last one.
860  // 1-> other trailer words can follow
861  // (always 0 for ECAL)
862  bool moreTrailersVal = false;
863 
864  FEDTrailer gtFEDTrailer(ptrGt);
865  gtFEDTrailer.set(ptrGt, lengthVal, crcVal, evtStatusVal, ttsBitsVal, moreTrailersVal);
866 
867 }
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 97 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().

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

Member Data Documentation

cms_uint16_t L1GTDigiToRaw::m_activeBoardsMaskGt
private

mask for active boards

Definition at line 103 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 92 of file L1GTDigiToRaw.h.

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

const edm::InputTag L1GTDigiToRaw::m_daqGtInputTag
private

Definition at line 99 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 95 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 114 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 110 of file L1GTDigiToRaw.h.

Referenced by packGmtCollection(), and produce().

const edm::InputTag L1GTDigiToRaw::m_muGmtInputTag
private

Definition at line 100 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 98 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 106 of file L1GTDigiToRaw.h.

Referenced by packGmtCollection(), and produce().

int L1GTDigiToRaw::m_verbosity
private

verbosity level

Definition at line 119 of file L1GTDigiToRaw.h.

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