CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1GTDigiToRaw Class Reference

#include <L1GTDigiToRaw.h>

Inheritance diagram for L1GTDigiToRaw:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1GTDigiToRaw (const edm::ParameterSet &)
 constructor(s) More...
 
virtual ~L1GTDigiToRaw ()
 destructor More...
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void beginJob ()
 beginning of job stuff More...
 
virtual void endJob ()
 end of job stuff More...
 
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...
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 loop over events More...
 

Private Attributes

cms_uint16_t m_activeBoardsMaskGt
 mask for active boards More...
 
int m_daqGtFedId
 
edm::InputTag m_daqGtInputTag
 input tag for GT DAQ record More...
 
bool m_isDebugEnabled
 
int m_maxBxInEvent
 
int m_minBxInEvent
 
edm::InputTag m_muGmtInputTag
 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::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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 43 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 LogDebug, m_activeBoardsMaskGt, m_daqGtFedId, m_daqGtInputTag, m_isDebugEnabled, m_muGmtInputTag, and m_verbosity.

60  :
61 
63  "DaqGtFedId", FEDNumbering::MAXTriggerGTPFEDID)),
64  m_daqGtInputTag(pSet.getParameter<edm::InputTag> ("DaqGtInputTag")),
65  m_muGmtInputTag(pSet.getParameter<edm::InputTag> ("MuGmtInputTag")),
66  m_activeBoardsMaskGt(pSet.getParameter<unsigned int> ("ActiveBoardsMask")),
69  m_verbosity(pSet.getUntrackedParameter<int> ("Verbosity", 0)),
71 
72 {
73 
75  LogDebug("L1GTDigiToRaw")
76  << "\nFED Id for DAQ GT record: " << m_daqGtFedId << " \n"
77  << "\nInput tag for DAQ GT record: " << m_daqGtInputTag << " \n"
78  << "\nInput tag for GMT record: " << m_muGmtInputTag << " \n"
79  << "\nMask for active boards (hex format): " << std::hex
80  << std::setw(sizeof(m_activeBoardsMaskGt) * 2) << std::setfill('0')
82  << std::dec << std::setfill(' ') << " \n"
83  << std::endl;
84  }
85 
86  //
87  produces<FEDRawDataCollection> ();
88 
89 }
#define LogDebug(id)
T getParameter(std::string const &) const
bool isDebugEnabled()
T getUntrackedParameter(std::string const &, T const &) const
cms_uint16_t m_activeBoardsMaskGt
mask for active boards
edm::InputTag m_daqGtInputTag
input tag for GT DAQ record
edm::InputTag m_muGmtInputTag
input tag for GMT record
int m_verbosity
verbosity level
int m_totalBxInEvent
total Bx&#39;s in the event, obtained from GTFE block
L1GTDigiToRaw::~L1GTDigiToRaw ( )
virtual

destructor

Definition at line 92 of file L1GTDigiToRaw.cc.

93 {
94 
95  // empty now
96 
97 }

Member Function Documentation

void L1GTDigiToRaw::beginJob ( void  )
privatevirtual

beginning of job stuff

Reimplemented from edm::EDProducer.

Definition at line 102 of file L1GTDigiToRaw.cc.

103 {
104 
105  // empty now
106 
107 }
void L1GTDigiToRaw::endJob ( void  )
privatevirtual

end of job stuff

Reimplemented from edm::EDProducer.

Definition at line 885 of file L1GTDigiToRaw.cc.

886 {
887 
888  // empty now
889 }
unsigned int L1GTDigiToRaw::flipPtQ ( unsigned int  w)
private

Definition at line 851 of file L1GTDigiToRaw.cc.

852 {
853  return ( (w&0xffff00ff) | ((~w)&0x0000ff00) );
854 }
T w() const
void L1GTDigiToRaw::packFDL ( const edm::EventSetup evSetup,
unsigned char *  ptrGt,
L1GtFdlWord fdlBlock 
)
private

pack FDL blocks for various bunch crosses

Definition at line 610 of file L1GTDigiToRaw.cc.

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

611  {
612 
613  if (m_verbosity && m_isDebugEnabled) {
614 
615  LogDebug("L1GTDigiToRaw") << "\nPacking FDL \n" << std::endl;
616  }
617 
619 
620  // initialize the required number of word64
621  int nrWord64 = fdlBlock.getSize() / uLength;
622  std::vector<cms_uint64_t> tmpWord64;
623  tmpWord64.resize(nrWord64);
624 
625  for (int iWord = 0; iWord < nrWord64; ++iWord) {
626  tmpWord64[iWord] = 0x0000000000000000ULL;
627  }
628 
629  // fill the values in the words
630  for (int iWord = 0; iWord < nrWord64; ++iWord) {
631 
632  fdlBlock.setBoardIdWord64(tmpWord64[iWord], iWord);
633  fdlBlock.setBxInEventWord64(tmpWord64[iWord], iWord);
634  fdlBlock.setBxNrWord64(tmpWord64[iWord], iWord);
635  fdlBlock.setEventNrWord64(tmpWord64[iWord], iWord);
636 
637  fdlBlock.setGtTechnicalTriggerWordWord64(tmpWord64[iWord], iWord);
638 
639  fdlBlock.setGtDecisionWordAWord64(tmpWord64[iWord], iWord);
640  fdlBlock.setGtDecisionWordBWord64(tmpWord64[iWord], iWord);
641 
642  fdlBlock.setGtDecisionWordExtendedWord64(tmpWord64[iWord], iWord);
643 
644  fdlBlock.setPhysicsDeclaredWord64(tmpWord64[iWord], iWord);
645  fdlBlock.setGtPrescaleFactorIndexTechWord64(tmpWord64[iWord], iWord);
646  fdlBlock.setGtPrescaleFactorIndexAlgoWord64(tmpWord64[iWord], iWord);
647  fdlBlock.setNoAlgoWord64(tmpWord64[iWord], iWord);
648  fdlBlock.setFinalORWord64(tmpWord64[iWord], iWord);
649 
650  fdlBlock.setOrbitNrWord64(tmpWord64[iWord], iWord);
651  fdlBlock.setLumiSegmentNrWord64(tmpWord64[iWord], iWord);
652  fdlBlock.setLocalBxNrWord64(tmpWord64[iWord], iWord);
653 
654  }
655 
656  // put the words in the FED record
657 
658  cms_uint64_t* pw = reinterpret_cast<cms_uint64_t*> (const_cast<unsigned char*> (ptrGt));
659 
660  for (int iWord = 0; iWord < nrWord64; ++iWord) {
661 
662  *pw++ = tmpWord64[iWord];
663 
664  if (m_verbosity && m_isDebugEnabled) {
665 
666  LogTrace("L1GTDigiToRaw")
667  << std::setw(4) << iWord << " "
668  << std::hex << std::setfill('0') << std::setw(16) << tmpWord64[iWord] << std::dec
669  << std::setfill(' ')
670  << std::endl;
671  }
672  }
673 
674 }
#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 755 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(), i, AlCaHLTBitMon_ParallelJobs::p, createTree::pp, and w().

Referenced by packGmtCollection().

756 {
757 
758  const unsigned SIZE=136;
759  const unsigned boardId=0xdd12;
760  memset(chp,0,SIZE);
761 
762  unsigned* p = (unsigned*) chp;
763 
764  // event number + bcerr
765  *p++ = (gmtrr.getEvNr()&0xffffff) | ((gmtrr.getBCERR()&0xff)<<24);
766  // bx number, bx in event, length(?), board-id(?)
767  *p++ = (gmtrr.getBxNr()&0xfff) | ((gmtrr.getBxInEvent()&0xf)<<12) | (boardId<<16);
768 
769  std::vector<L1MuRegionalCand> vrc;
770  std::vector<L1MuRegionalCand>::const_iterator irc;
771  unsigned* pp = p;
772 
773  vrc = gmtrr.getDTBXCands();
774  pp = p;
775  for(irc=vrc.begin(); irc!=vrc.end(); irc++) {
776  *pp++ = (*irc).getDataWord();
777  }
778  p+=4;
779 
780  vrc = gmtrr.getBrlRPCCands();
781  pp = p;
782  for(irc=vrc.begin(); irc!=vrc.end(); irc++) {
783  *pp++ = (*irc).getDataWord();
784  }
785  p+=4;
786 
787  vrc = gmtrr.getCSCCands();
788  pp = p;
789  for(irc=vrc.begin(); irc!=vrc.end(); irc++) {
790  *pp++ = (*irc).getDataWord();
791  }
792  p+=4;
793 
794  vrc = gmtrr.getFwdRPCCands();
795  pp = p;
796  for(irc=vrc.begin(); irc!=vrc.end(); irc++) {
797  *pp++ = (*irc).getDataWord();
798  }
799  p+=4;
800 
801  // the regional candidates are written to the record with inverted Pt and qual bits
802  pp = p-16;
803  for(int i=0; i<16; i++) {
804  unsigned w = *pp;
805  *pp++ = (w&0xffff00ff) | ((~w)&0x0000ff00);
806  }
807 
808  std::vector<L1MuGMTExtendedCand> vgc;
809  std::vector<L1MuGMTExtendedCand>::const_iterator igc;
810 
811  vgc = gmtrr.getGMTBrlCands();
812  pp = p;
813  for(igc=vgc.begin(); igc!=vgc.end(); igc++) {
814  *pp++ = (*igc).getDataWord();
815  }
816  p+=4;
817 
818  vgc = gmtrr.getGMTFwdCands();
819  pp = p;
820  for(igc=vgc.begin(); igc!=vgc.end(); igc++) {
821  *pp++ = (*igc).getDataWord();
822  }
823  p+=4;
824 
825  vgc = gmtrr.getGMTCands();
826  pp = p;
827  for(igc=vgc.begin(); igc!=vgc.end(); igc++) {
828  *pp++ = (*igc).getDataWord();
829  }
830  p+=4;
831 
832  unsigned char* chpp;
833 
834  vgc = gmtrr.getGMTBrlCands();
835  chpp = (unsigned char*) p;
836  for(igc=vgc.begin(); igc!=vgc.end(); igc++) {
837  *chpp++ = (*igc).rank();
838  }
839  p++;
840 
841  vgc = gmtrr.getGMTFwdCands();
842  chpp = (unsigned char*) p;
843  for(igc=vgc.begin(); igc!=vgc.end(); igc++) {
844  *chpp++ = (*igc).rank();
845  }
846  p++;
847 
848  return SIZE;
849 }
int i
Definition: DBlmapReader.cc:9
tuple pp
Definition: createTree.py:15
T w() const
unsigned int L1GTDigiToRaw::packGmtCollection ( unsigned char *  ptrGt,
L1MuGMTReadoutCollection const *  digis 
)
private

pack the GMT collection using packGMT (GMT record packing)

Definition at line 731 of file L1GTDigiToRaw.cc.

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

Referenced by produce().

734 {
735 
736  if (m_verbosity && m_isDebugEnabled) {
737  LogDebug("L1GTDigiToRaw") << "\nPacking GMT collection \n" << std::endl;
738  }
739 
740  unsigned gmtsize = 0;
741 
742  // loop range: int m_totalBxInEvent is normally even (L1A-1, L1A, L1A+1, with L1A = 0)
743  for (int iBxInEvent = m_minBxInEvent; iBxInEvent <= m_maxBxInEvent;
744  ++iBxInEvent) {
745  L1MuGMTReadoutRecord const& gmtrr = digis->getRecord(iBxInEvent);
746  gmtsize = packGMT(gmtrr, ptrGt);
747  ptrGt += gmtsize;
748  }
749 
750  return m_totalBxInEvent*gmtsize;
751 
752 }
#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 556 of file L1GTDigiToRaw.cc.

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

558  {
559 
560  if (m_verbosity && m_isDebugEnabled) {
561  LogDebug("L1GTDigiToRaw") << "\nPacking GTFE \n" << std::endl;
562  }
563 
565 
566  // initialize the required number of word64
567  int nrWord64 = gtfeBlock.getSize() / uLength;
568  std::vector<cms_uint64_t> tmpWord64;
569  tmpWord64.resize(nrWord64);
570 
571  for (int iWord = 0; iWord < nrWord64; ++iWord) {
572  tmpWord64[iWord] = 0x0000000000000000ULL;
573  }
574 
575  // fill the values in the words
576  for (int iWord = 0; iWord < nrWord64; ++iWord) {
577 
578  gtfeBlock.setBoardIdWord64(tmpWord64[iWord], iWord);
579  gtfeBlock.setRecordLength1Word64(tmpWord64[iWord], iWord);
580  gtfeBlock.setRecordLengthWord64(tmpWord64[iWord], iWord);
581  gtfeBlock.setBxNrWord64(tmpWord64[iWord], iWord);
582  gtfeBlock.setSetupVersionWord64(tmpWord64[iWord], iWord);
583  gtfeBlock.setActiveBoardsWord64(tmpWord64[iWord], iWord, activeBoardsGtValue);
584  gtfeBlock.setAltNrBxBoardWord64(tmpWord64[iWord], iWord);
585  gtfeBlock.setTotalTriggerNrWord64(tmpWord64[iWord], iWord);
586 
587  }
588 
589  // put the words in the FED record
590 
591  cms_uint64_t* pw = reinterpret_cast<cms_uint64_t*> (const_cast<unsigned char*> (ptrGt));
592 
593  for (int iWord = 0; iWord < nrWord64; ++iWord) {
594 
595  *pw++ = tmpWord64[iWord];
596 
597  if (m_verbosity && m_isDebugEnabled) {
598  LogTrace("L1GTDigiToRaw")
599  << std::setw(4) << iWord << " "
600  << std::hex << std::setfill('0') << std::setw(16) << tmpWord64[iWord] << std::dec
601  << std::setfill(' ')
602  << std::endl;
603  }
604  }
605 
606 }
#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 514 of file L1GTDigiToRaw.cc.

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

Referenced by produce().

514  {
515  // TODO FIXME where from to get all numbers?
516 
517  // Event Trigger type identifier
518  int triggerTypeVal = 0;
519 
520  // Level-1 event number generated by the TTC system
521  int lvl1IdVal = iEvent.id().event();
522 
523  // The bunch crossing number
524  int bxCross = iEvent.bunchCrossing();
525  cms_uint16_t bxCrossHw = 0;
526  if ( ( bxCross & 0xFFF ) == bxCross) {
527  bxCrossHw = static_cast<cms_uint16_t> (bxCross);
528  } else {
529  bxCrossHw = 0; // Bx number too large, set to 0!
530  if (m_verbosity && m_isDebugEnabled) {
531  LogDebug("L1GTDigiToRaw") << "\nBunch cross number [hex] = " << std::hex << bxCross
532  << "\n larger than 12 bits. Set to 0! \n" << std::dec << std::endl;
533  }
534  }
535  int bxIdVal = bxCrossHw;
536 
537  // Identifier of the FED
538  int sourceIdVal = m_daqGtFedId;
539 
540  // Version identifier of the FED data format
541  int versionVal = 0;
542 
543  // 0 -> the current header word is the last one.
544  // 1-> other header words can follow
545  // (always 1 for ECAL)
546  bool moreHeadersVal = false;
547 
548  FEDHeader gtFEDHeader(ptrGt);
549 
550  gtFEDHeader.set(
551  ptrGt, triggerTypeVal, lvl1IdVal, bxIdVal, sourceIdVal, versionVal, moreHeadersVal);
552 
553 }
#define LogDebug(id)
EventNumber_t event() const
Definition: EventID.h:44
int bunchCrossing() const
Definition: EventBase.h:62
unsigned short cms_uint16_t
Definition: typedefs.h:13
edm::EventID id() const
Definition: EventBase.h:56
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 677 of file L1GTDigiToRaw.cc.

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

678  {
679  if (m_verbosity && m_isDebugEnabled) {
680 
681  LogDebug("L1GTDigiToRaw") << "\nPacking PSB \n" << std::endl;
682  }
683 
685 
686  // initialize the required number of word64
687  int nrWord64 = psbBlock.getSize() / uLength;
688  std::vector<cms_uint64_t> tmpWord64;
689  tmpWord64.resize(nrWord64);
690 
691  for (int iWord = 0; iWord < nrWord64; ++iWord) {
692  tmpWord64[iWord] = 0x0000000000000000ULL;
693  }
694 
695  // fill the values in the words
696  for (int iWord = 0; iWord < nrWord64; ++iWord) {
697 
698  psbBlock.setBoardIdWord64(tmpWord64[iWord], iWord);
699  psbBlock.setBxInEventWord64(tmpWord64[iWord], iWord);
700  psbBlock.setBxNrWord64(tmpWord64[iWord], iWord);
701  psbBlock.setEventNrWord64(tmpWord64[iWord], iWord);
702 
703  psbBlock.setADataWord64(tmpWord64[iWord], iWord);
704  psbBlock.setBDataWord64(tmpWord64[iWord], iWord);
705 
706  psbBlock.setLocalBxNrWord64(tmpWord64[iWord], iWord);
707 
708  }
709 
710  // put the words in the FED record
711 
712  cms_uint64_t* pw = reinterpret_cast<cms_uint64_t*> (const_cast<unsigned char*> (ptrGt));
713 
714  for (int iWord = 0; iWord < nrWord64; ++iWord) {
715 
716  *pw++ = tmpWord64[iWord];
717 
718  if (m_verbosity && m_isDebugEnabled) {
719 
720  LogTrace("L1GTDigiToRaw")
721  << std::setw(4) << iWord << " "
722  << std::hex << std::setfill('0') << std::setw(16) << tmpWord64[iWord] << std::dec
723  << std::setfill(' ')
724  << std::endl;
725  }
726  }
727 
728 }
#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 857 of file L1GTDigiToRaw.cc.

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

Referenced by produce().

857  {
858 
859  // TODO FIXME where from to get all numbers?
860 
861  // The length of the event fragment counted in 64-bit words including header and trailer
862  int lengthVal = dataSize / 8;
863 
864  // Cyclic Redundancy Code of the event fragment including header and trailer
865  int crcVal = evf::compute_crc(ptrGtBegin, dataSize);
866 
867  // Event fragment status information
868  int evtStatusVal = 0;
869 
870  // Current value of the Trigger Throttling System bits.
871  int ttsBitsVal = 0;
872 
873  // 0 -> the current trailer word is the last one.
874  // 1-> other trailer words can follow
875  // (always 0 for ECAL)
876  bool moreTrailersVal = false;
877 
878  FEDTrailer gtFEDTrailer(ptrGt);
879  gtFEDTrailer.set(ptrGt, lengthVal, crcVal, evtStatusVal, ttsBitsVal, moreTrailersVal);
880 
881 }
unsigned short compute_crc(unsigned char *buffer, unsigned int bufSize)
Definition: CRC16.h:67
void L1GTDigiToRaw::produce ( edm::Event iEvent,
const edm::EventSetup evSetup 
)
privatevirtual

loop over events

Implements edm::EDProducer.

Definition at line 111 of file L1GTDigiToRaw.cc.

References L1GtfeWord::activeBoards(), L1GtfeWord::altNrBxBoard(), FEDRawData::data(), FDL, edm::EventSetup::get(), edm::Event::getByLabel(), L1GtPsbWord::getSize(), L1GtfeWord::getSize(), L1TcsWord::getSize(), L1GtFdlWord::getSize(), GMT, GTFE, edm::HandleBase::isValid(), LogDebug, LogTrace, m_activeBoardsMaskGt, m_daqGtFedId, m_daqGtInputTag, m_isDebugEnabled, m_maxBxInEvent, m_minBxInEvent, m_muGmtInputTag, m_totalBxInEvent, m_verbosity, packFDL(), packGmtCollection(), packGTFE(), packHeader(), packPSB(), packTrailer(), 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().

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

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

edm::InputTag L1GTDigiToRaw::m_daqGtInputTag
private

input tag for GT DAQ record

Definition at line 102 of file L1GTDigiToRaw.h.

Referenced by L1GTDigiToRaw(), and 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 119 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 115 of file L1GTDigiToRaw.h.

Referenced by packGmtCollection(), and produce().

edm::InputTag L1GTDigiToRaw::m_muGmtInputTag
private

input tag for GMT record

Definition at line 105 of file L1GTDigiToRaw.h.

Referenced by L1GTDigiToRaw(), and produce().

int L1GTDigiToRaw::m_totalBxInEvent
private

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

Definition at line 111 of file L1GTDigiToRaw.h.

Referenced by packGmtCollection(), and produce().

int L1GTDigiToRaw::m_verbosity
private

verbosity level

Definition at line 124 of file L1GTDigiToRaw.h.

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