CMS 3D CMS Logo

L1TGlobalProducer.cc
Go to the documentation of this file.
1 // L1TGlobalProducer.cc
2 //author: Brian Winer - Ohio State
3 // Vladimir Rekovic - extend for overlap removal
4 
6 
7 // system include files
8 #include <memory>
9 #include <iostream>
10 #include <iomanip>
11 #include <algorithm>
12 
13 #include <boost/cstdint.hpp>
14 
25 
29 
34 
38 
40 
41 #include "TriggerMenuParser.h"
42 
43 using namespace l1t;
44 
47  // These parameters are part of the L1T/HLT interface, avoid changing if possible::
48  desc.add<edm::InputTag> ("MuonInputTag", edm::InputTag(""))->setComment("InputTag for Global Muon Trigger (required parameter: default value is invalid)");
49  desc.add<edm::InputTag> ("EGammaInputTag", edm::InputTag(""))->setComment("InputTag for Calo Trigger EGamma (required parameter: default value is invalid)");
50  desc.add<edm::InputTag> ("TauInputTag", edm::InputTag(""))->setComment("InputTag for Calo Trigger Tau (required parameter: default value is invalid)");
51  desc.add<edm::InputTag> ("JetInputTag", edm::InputTag(""))->setComment("InputTag for Calo Trigger Jet (required parameter: default value is invalid)");
52  desc.add<edm::InputTag> ("EtSumInputTag", edm::InputTag(""))->setComment("InputTag for Calo Trigger EtSum (required parameter: default value is invalid)");
53  desc.add<edm::InputTag> ("ExtInputTag", edm::InputTag(""))->setComment("InputTag for external conditions (not required, but recommend to specify explicitly in config)");
54  desc.add<bool> ("AlgorithmTriggersUnprescaled", false)->setComment("not required, but recommend to specify explicitly in config");
55  desc.add<bool> ("AlgorithmTriggersUnmasked", false)->setComment("not required, but recommend to specify explicitly in config");
56  // These parameters have well defined default values and are not currently
57  // part of the L1T/HLT interface. They can be cleaned up or updated at will:
58  desc.add<bool> ("ProduceL1GtDaqRecord",true);
59  desc.add<bool> ("ProduceL1GtObjectMapRecord",true);
60  desc.add<int> ("EmulateBxInEvent",1);
61  desc.add<int> ("L1DataBxInEvent",5);
62  desc.add<unsigned int> ("AlternativeNrBxBoardDaq",0);
63  desc.add<int> ("BstLengthBytes",-1);
64  desc.add<unsigned int> ("PrescaleSet",1);
65  desc.addUntracked<int>("Verbosity",0);
66  desc.addUntracked<bool> ("PrintL1Menu",false);
67  desc.add<std::string>("TriggerMenuLuminosity","startup");
68  desc.add<std::string>("PrescaleCSVFile","prescale_L1TGlobal.csv");
69  descriptions.add("L1TGlobalProducer", desc);
70 }
71 
72 
73 
74 // constructors
75 
77  m_muInputTag(parSet.getParameter<edm::InputTag> ("MuonInputTag")),
78  m_egInputTag(parSet.getParameter<edm::InputTag> ("EGammaInputTag")),
79  m_tauInputTag(parSet.getParameter<edm::InputTag> ("TauInputTag")),
80  m_jetInputTag(parSet.getParameter<edm::InputTag> ("JetInputTag")),
81  m_sumInputTag(parSet.getParameter<edm::InputTag> ("EtSumInputTag")),
82  m_extInputTag(parSet.getParameter<edm::InputTag> ("ExtInputTag")),
83 
84  m_produceL1GtDaqRecord(parSet.getParameter<bool> ("ProduceL1GtDaqRecord")),
85  m_produceL1GtObjectMapRecord(parSet.getParameter<bool> ("ProduceL1GtObjectMapRecord")),
86 
87  m_emulateBxInEvent(parSet.getParameter<int> ("EmulateBxInEvent")),
88  m_L1DataBxInEvent(parSet.getParameter<int> ("L1DataBxInEvent")),
89 
90  m_alternativeNrBxBoardDaq(parSet.getParameter<unsigned int> ("AlternativeNrBxBoardDaq")),
91  m_psBstLengthBytes(parSet.getParameter<int> ("BstLengthBytes")),
92 
93  m_prescaleSet(parSet.getParameter<unsigned int> ("PrescaleSet")),
94 
95  m_algorithmTriggersUnprescaled(parSet.getParameter<bool> ("AlgorithmTriggersUnprescaled")),
96  m_algorithmTriggersUnmasked(parSet.getParameter<bool> ("AlgorithmTriggersUnmasked")),
97 
98  m_verbosity(parSet.getUntrackedParameter<int>("Verbosity")),
99  m_printL1Menu(parSet.getUntrackedParameter<bool>("PrintL1Menu")),
100  m_isDebugEnabled(edm::isDebugEnabled())
101 {
102 
103  m_egInputToken = consumes <BXVector<EGamma> > (m_egInputTag);
104  m_tauInputToken = consumes <BXVector<Tau> > (m_tauInputTag);
105  m_jetInputToken = consumes <BXVector<Jet> > (m_jetInputTag);
106  m_sumInputToken = consumes <BXVector<EtSum> > (m_sumInputTag);
107  m_muInputToken = consumes <BXVector<Muon> > (m_muInputTag);
108  m_extInputToken = consumes <BXVector<GlobalExtBlk> > (m_extInputTag);
109 
110  if (m_verbosity) {
111 
112 
113  LogTrace("L1TGlobalProducer")
114  << "\nInput tag for muon collection from uGMT: " << m_muInputTag
115  << "\nInput tag for calorimeter jet collections from Cal: " << m_jetInputTag
116  << "\nInput tag for external conditions : " << m_extInputTag
117  << std::endl;
118 
119 
120  LogTrace("L1TGlobalProducer")
121  << "\nProduce the L1 uGT DAQ readout record: " << m_produceL1GtDaqRecord
122  << "\nProduce the L1 uGT Object Map record: " << m_produceL1GtObjectMapRecord
123  << " \n"
124  << "\nNumber of BxInEvent to be emulated: " << m_emulateBxInEvent
125  << " \n"
126  << "\nAlternative for number of BX in GT DAQ record: 0x" << std::hex
128  << " \n"
129  << "\nRun algorithm triggers unprescaled: " << m_algorithmTriggersUnprescaled
130  << "\nRun algorithm triggers unmasked (all enabled): " << m_algorithmTriggersUnmasked
131  << "\n"
132  << std::endl;
133  }
134 
135 
136  if ( ( m_emulateBxInEvent > 0 ) && ( ( m_emulateBxInEvent % 2 ) == 0 )) {
138 
139  if (m_verbosity) {
140  edm::LogWarning("L1TGlobalProducer")
141  << "\nWARNING: Number of bunch crossing to be emulated rounded to: "
142  << m_emulateBxInEvent << "\n The number must be an odd number!\n"
143  << std::endl;
144  }
145  }
146 
147 
148  if ( ( m_L1DataBxInEvent > 0 ) && ( ( m_L1DataBxInEvent % 2 ) == 0 )) {
150 
151  if (m_verbosity) {
152  edm::LogWarning("L1TGlobalProducer")
153  << "\nWARNING: Number of bunch crossing for incoming L1 Data rounded to: "
154  << m_L1DataBxInEvent << "\n The number must be an odd number!\n"
155  << std::endl;
156  }
157  } else if( m_L1DataBxInEvent<0) {
158  m_L1DataBxInEvent = 1;
159 
160  if (m_verbosity) {
161  edm::LogWarning("L1TGlobalProducer")
162  << "\nWARNING: Number of bunch crossing for incoming L1 Data was changed to: "
163  << m_L1DataBxInEvent << "\n The number must be an odd positive number!\n"
164  << std::endl;
165  }
166  }
167 
168 
169 
170 
171  // register products
173  produces<GlobalAlgBlkBxCollection>();
174  //blwEXT produces<GlobalExtBlkBxCollection>();
175  }
176 
177 
179  produces<GlobalObjectMapRecord>();
180  }
181 
182 
183  // create new uGt Board
184  m_uGtBrd = std::make_unique<GlobalBoard>();
185  m_uGtBrd->setVerbosity(m_verbosity);
186 
187  // initialize cached IDs
188 
189  //
190  m_l1GtParCacheID = 0ULL;
191  m_l1GtMenuCacheID = 0ULL;
192 
195 
196  m_nrL1Mu = 0;
197  m_nrL1EG = 0;
198  m_nrL1Tau = 0;
199 
200  m_nrL1Jet = 0;
201 
202 
203 
206 
207  //
208  m_l1GtParCacheID = 0ULL;
209 
210  m_totalBxInEvent = 0;
211 
213  m_bstLengthBytes = 0;
214 
215  //
216  m_l1GtBMCacheID = 0ULL;
217 
218  //
219  m_l1GtPfAlgoCacheID = 0ULL;
220 
221  m_l1GtTmAlgoCacheID = 0ULL;
222 
224 
225 
226  // Set default, initial, dummy prescale factor table
227  std::vector<std::vector<int> > temp_prescaleTable;
228 
229  temp_prescaleTable.push_back(std::vector<int>());
230  m_initialPrescaleFactorsAlgoTrig = temp_prescaleTable;
231 }
232 
233 // destructor
235 {
236 }
237 
238 // member functions
239 
240 // method called to produce the data
242 {
243 
244 
245 
246 
247 
248  // process event iEvent
249  // get / update the stable parameters from the EventSetup
250  // local cache & check on cacheIdentifier
251 
252  unsigned long long l1GtParCacheID =
253  evSetup.get<L1TGlobalParametersRcd>().cacheIdentifier();
254 
255  if (m_l1GtParCacheID != l1GtParCacheID) {
256 
258  evSetup.get< L1TGlobalParametersRcd >().get( l1GtStablePar );
259  m_l1GtStablePar = l1GtStablePar.product();
260  const GlobalParamsHelper * data = GlobalParamsHelper::readFromEventSetup(m_l1GtStablePar);
261 
262  // number of bx
264 
265  // number of physics triggers
267 
268  // number of objects of each type
269  m_nrL1Mu = data->numberL1Mu();
270 
271  // EG
272  m_nrL1EG = data->numberL1EG();
273 
274  // jets
275  m_nrL1Jet = data->numberL1Jet();
276 
277  // taus
278  m_nrL1Tau= data->numberL1Tau();
279 
281  int minL1DataBxInEvent = (m_L1DataBxInEvent + 1)/2 - m_L1DataBxInEvent;
282  int maxL1DataBxInEvent = (m_L1DataBxInEvent + 1)/2 - 1;
283 
284  // Initialize Board
285  m_uGtBrd->init(m_numberPhysTriggers, m_nrL1Mu, m_nrL1EG, m_nrL1Tau, m_nrL1Jet, minL1DataBxInEvent, maxL1DataBxInEvent );
286 
287  //
288  m_l1GtParCacheID = l1GtParCacheID;
289 
290  }
291 
292  if (m_emulateBxInEvent < 0) {
294  }
295 
297  int minEmulBxInEvent = (m_emulateBxInEvent + 1)/2 - m_emulateBxInEvent;
298  int maxEmulBxInEvent = (m_emulateBxInEvent + 1)/2 - 1;
299 
300  // get / update the trigger menu from the EventSetup
301  // local cache & check on cacheIdentifier
302  unsigned long long l1GtMenuCacheID = evSetup.get<L1TUtmTriggerMenuRcd>().cacheIdentifier();
303 
304  if (m_l1GtMenuCacheID != l1GtMenuCacheID) {
305  const GlobalParamsHelper * data = GlobalParamsHelper::readFromEventSetup(m_l1GtStablePar);
306 
308  evSetup.get< L1TUtmTriggerMenuRcd>().get(l1GtMenu) ;
309  const L1TUtmTriggerMenu* utml1GtMenu = l1GtMenu.product();
310 
311  // Instantiate Parser
312  TriggerMenuParser gtParser = TriggerMenuParser();
313 
314  gtParser.setGtNumberConditionChips(data->numberChips());
315  gtParser.setGtPinsOnConditionChip(data->pinsOnChip());
316  gtParser.setGtOrderConditionChip(data->orderOfChip());
318 
319  //Parse menu into emulator classes
320  gtParser.parseCondFormats(utml1GtMenu);
321 
322  // transfer the condition map and algorithm map from parser to L1uGtTriggerMenu
323  m_l1GtMenu = std::make_unique<TriggerMenu>(gtParser.gtTriggerMenuName(), data->numberChips(),
324  gtParser.vecMuonTemplate(),
325  gtParser.vecCaloTemplate(),
326  gtParser.vecEnergySumTemplate(),
327  gtParser.vecExternalTemplate(),
328  gtParser.vecCorrelationTemplate(),
330  gtParser.corMuonTemplate(),
331  gtParser.corCaloTemplate(),
332  gtParser.corEnergySumTemplate()) ;
333 
334 
335  m_l1GtMenu->setGtTriggerMenuInterface(gtParser.gtTriggerMenuInterface());
336  m_l1GtMenu->setGtTriggerMenuImplementation(gtParser.gtTriggerMenuImplementation());
337  m_l1GtMenu->setGtScaleDbKey(gtParser.gtScaleDbKey());
338  m_l1GtMenu->setGtScales(gtParser.gtScales());
339  m_l1GtMenu->setGtTriggerMenuUUID(gtParser.gtTriggerMenuUUID());
340 
341  m_l1GtMenu->setGtAlgorithmMap(gtParser.gtAlgorithmMap());
342  m_l1GtMenu->setGtAlgorithmAliasMap(gtParser.gtAlgorithmAliasMap());
343 
344  m_l1GtMenu->buildGtConditionMap();
345 
346  int printV = 2;
347  if(m_printL1Menu) m_l1GtMenu->print(std::cout, printV);
348 
349  m_l1GtMenuCacheID = l1GtMenuCacheID;
350  }
351 
352 
353 
354 
355 
356  // get / update the board maps from the EventSetup
357  // local cache & check on cacheIdentifier
358 
359 /* *** Drop L1GtBoard Maps for now
360  typedef std::vector<L1GtBoard>::const_iterator CItBoardMaps;
361 
362  unsigned long long l1GtBMCacheID = evSetup.get<L1GtBoardMapsRcd>().cacheIdentifier();
363 */
364 
365 /* ** Drop board mapping for now
366  if (m_l1GtBMCacheID != l1GtBMCacheID) {
367 
368  edm::ESHandle< L1GtBoardMaps > l1GtBM;
369  evSetup.get< L1GtBoardMapsRcd >().get( l1GtBM );
370  m_l1GtBM = l1GtBM.product();
371 
372  m_l1GtBMCacheID = l1GtBMCacheID;
373 
374  }
375 
376 
377  // TODO need changes in CondFormats to cache the maps
378  const std::vector<L1GtBoard>& boardMaps = m_l1GtBM->gtBoardMaps();
379 */
380  // get / update the prescale factors from the EventSetup
381  // local cache & check on cacheIdentifier
382 
383  // Only get event record if not unprescaled and not unmasked
385  unsigned long long l1GtPfAlgoCacheID = evSetup.get<L1TGlobalPrescalesVetosRcd>().cacheIdentifier();
386 
387  if (m_l1GtPfAlgoCacheID != l1GtPfAlgoCacheID) {
388 
389  edm::ESHandle< L1TGlobalPrescalesVetos > l1GtPrescalesVetoes;
390  evSetup.get< L1TGlobalPrescalesVetosRcd >().get( l1GtPrescalesVetoes );
391  const L1TGlobalPrescalesVetos * es = l1GtPrescalesVetoes.product();
392  m_l1GtPrescalesVetoes = PrescalesVetosHelper::readFromEventSetup(es);
393 
396 
397  m_l1GtPfAlgoCacheID = l1GtPfAlgoCacheID;
398  }
399  }
400  else{
401  // Set Prescale factors to initial dummy values
402  m_prescaleSet = 0;
406  }
407 
408 
409  // get / update the trigger mask from the EventSetup
410  // local cache & check on cacheIdentifier
411 
412 
413 /* **** For now Leave out Masks *****
414  unsigned long long l1GtTmAlgoCacheID =
415  evSetup.get<L1GtTriggerMaskAlgoTrigRcd>().cacheIdentifier();
416 
417  if (m_l1GtTmAlgoCacheID != l1GtTmAlgoCacheID) {
418 
419  edm::ESHandle< L1GtTriggerMask > l1GtTmAlgo;
420  evSetup.get< L1GtTriggerMaskAlgoTrigRcd >().get( l1GtTmAlgo );
421  m_l1GtTmAlgo = l1GtTmAlgo.product();
422 
423  m_triggerMaskAlgoTrig = m_l1GtTmAlgo->gtTriggerMask();
424 
425  m_l1GtTmAlgoCacheID = l1GtTmAlgoCacheID;
426 
427  }
428 */
429 
430 
431 
432 /* **** For now Leave out Veto Masks *****
433  unsigned long long l1GtTmVetoAlgoCacheID =
434  evSetup.get<L1GtTriggerMaskVetoAlgoTrigRcd>().cacheIdentifier();
435 
436  if (m_l1GtTmVetoAlgoCacheID != l1GtTmVetoAlgoCacheID) {
437 
438  edm::ESHandle< L1GtTriggerMask > l1GtTmVetoAlgo;
439  evSetup.get< L1GtTriggerMaskVetoAlgoTrigRcd >().get( l1GtTmVetoAlgo );
440  m_l1GtTmVetoAlgo = l1GtTmVetoAlgo.product();
441 
442  m_triggerMaskVetoAlgoTrig = m_l1GtTmVetoAlgo->gtTriggerMask();
443 
444  m_l1GtTmVetoAlgoCacheID = l1GtTmVetoAlgoCacheID;
445 
446  }
447 */
448 
449 
450 
451 // ****** Board Maps Need to be redone....hard code for now ******
452  // loop over blocks in the GT DAQ record receiving data, count them if they are active
453  // all board type are defined in CondFormats/L1TObjects/L1GtFwd
454  // &
455  // set the active flag for each object type received from GMT and GCT
456  // all objects in the GT system
457 
458  //
459  bool receiveMu = true;
460  bool receiveEG = true;
461  bool receiveTau = true;
462  bool receiveJet = true;
463  bool receiveEtSums = true;
464  bool receiveExt = true;
465 
466 /* *** Boards need redefining *****
467  for (CItBoardMaps
468  itBoard = boardMaps.begin();
469  itBoard != boardMaps.end(); ++itBoard) {
470 
471  int iPosition = itBoard->gtPositionDaqRecord();
472  if (iPosition > 0) {
473 
474  int iActiveBit = itBoard->gtBitDaqActiveBoards();
475  bool activeBoard = false;
476 
477  if (iActiveBit >= 0) {
478  activeBoard = m_activeBoardsGtDaq & (1 << iActiveBit);
479  }
480 
481  // use board if: in the record, but not in ActiveBoardsMap (iActiveBit < 0)
482  // in the record and ActiveBoardsMap, and active
483  if ((iActiveBit < 0) || activeBoard) {
484 
485 // ****** Decide what board manipulation (if any we want here)
486 
487  }
488  }
489 
490  }
491 */
492 
493 
494 
495  // Produce the Output Records for the GT
496  std::unique_ptr<GlobalAlgBlkBxCollection> uGtAlgRecord( new GlobalAlgBlkBxCollection(0,minEmulBxInEvent,maxEmulBxInEvent));
497 
498  // * produce the GlobalObjectMapRecord
499  std::unique_ptr<GlobalObjectMapRecord> gtObjectMapRecord(
500  new GlobalObjectMapRecord() );
501 
502 
503  // fill the boards not depending on the BxInEvent in the L1 GT DAQ record
504  // GMT, PSB and FDL depend on BxInEvent
505 
506  // fill in emulator the same bunch crossing (12 bits - hardwired number of bits...)
507  // and the same local bunch crossing for all boards
508  int bxCross = iEvent.bunchCrossing();
509  boost::uint16_t bxCrossHw = 0;
510  if ((bxCross & 0xFFF) == bxCross) {
511  bxCrossHw = static_cast<boost::uint16_t> (bxCross);
512  }
513  else {
514  bxCrossHw = 0; // Bx number too large, set to 0!
515  if (m_verbosity) {
516 
517  LogDebug("L1TGlobalProducer")
518  << "\nBunch cross number [hex] = " << std::hex << bxCross
519  << "\n larger than 12 bits. Set to 0! \n" << std::dec
520  << std::endl;
521  }
522  }
523  LogDebug("L1TGlobalProducer") << "HW BxCross " << bxCrossHw << std::endl;
524 
525  // get the prescale factor from the configuration for now
526  // prescale set index counts from zero
527  unsigned int pfAlgoSetIndex = m_prescaleSet;
528 
529  auto max = (*m_prescaleFactorsAlgoTrig).size()-1;
530  if (pfAlgoSetIndex > max) {
531  edm::LogWarning("L1TGlobalProducer")
532  << "\nAttempting to access prescale algo set: " << m_prescaleSet
533  << "\nNumber of prescale algo sets available: 0.." << max
534  << "Setting former to latter."
535  << std::endl;
536  pfAlgoSetIndex = max;
537  }
538 
539  const std::vector<int>& prescaleFactorsAlgoTrig = (*m_prescaleFactorsAlgoTrig).at(pfAlgoSetIndex);
540 
541  // For now, set masks according to prescale value of 0
543  for( unsigned int iAlgo=0; iAlgo < prescaleFactorsAlgoTrig.size(); iAlgo++ ){
544  unsigned int value = prescaleFactorsAlgoTrig[iAlgo];
545  value = ( value==0 ) ? 0 : 1;
546  m_initialTriggerMaskAlgoTrig.push_back(value);
547  }
549 
550  const std::vector<unsigned int>& triggerMaskAlgoTrig = *m_triggerMaskAlgoTrig;
551  const std::vector<int>& triggerMaskVetoAlgoTrig = *m_triggerMaskVetoAlgoTrig;
552 
553  LogDebug("L1TGlobalProducer") << "Size of prescale vector" << prescaleFactorsAlgoTrig.size() << std::endl;
554 
555 
556 // Load the calorimeter input onto the uGt Board
557  m_uGtBrd->receiveCaloObjectData(iEvent,
562  receiveEG, m_nrL1EG,
563  receiveTau, m_nrL1Tau,
564  receiveJet, m_nrL1Jet,
565  receiveEtSums );
566 
567  m_uGtBrd->receiveMuonObjectData(iEvent, m_muInputToken,
568  receiveMu, m_nrL1Mu );
569 
570  m_uGtBrd->receiveExternalData(iEvent, m_extInputToken,
571  receiveExt );
572 
573 
574  // loop over BxInEvent
575  for (int iBxInEvent = minEmulBxInEvent; iBxInEvent <= maxEmulBxInEvent;
576  ++iBxInEvent) {
577 
578  // run GTL
579  LogDebug("L1TGlobalProducer")
580  << "\nL1TGlobalProducer : running GTL for bx = " << iBxInEvent << "\n"
581  << std::endl;
582 
583 
584 // Run the GTL for this BX
585  m_uGtBrd->runGTL(iEvent, evSetup, m_l1GtMenu.get(),
586  m_produceL1GtObjectMapRecord, iBxInEvent, gtObjectMapRecord,
588  m_nrL1Mu,
589  m_nrL1EG,
590  m_nrL1Tau,
591  m_nrL1Jet
592  );
593 
594 
595  // run FDL
596  LogDebug("L1TGlobalProducer")
597  << "\nL1TGlobalProducer : running FDL for bx = " << iBxInEvent << "\n"
598  << std::endl;
599 
600 
601 // Run the Final Decision Logic for this BX
602  m_uGtBrd->runFDL(iEvent,
603  iBxInEvent,
605  m_numberPhysTriggers,
606  prescaleFactorsAlgoTrig,
607  triggerMaskAlgoTrig,
608  triggerMaskVetoAlgoTrig,
611  );
612 
613 
614 
615 // Fill in the DAQ Records
617  m_uGtBrd->fillAlgRecord(iBxInEvent, uGtAlgRecord, m_prescaleSet, m_l1GtMenu->gtTriggerMenuUUID(), m_l1GtMenu->gtTriggerMenuImplementation());
618  }
619 
620 
621 
622  } //End Loop over Bx
623 
624 
625  // Add explicit reset of Board
626  m_uGtBrd->reset();
627 
628 
629 
630  if ( m_verbosity && m_isDebugEnabled ) {
631 
632  std::ostringstream myCoutStream;
633 
634  for(int bx=minEmulBxInEvent; bx<maxEmulBxInEvent; bx++) {
635 
637  (uGtAlgRecord->at(bx,0)).print(myCoutStream);
638 
639  }
640 
641  LogTrace("L1TGlobalProducer")
642  << "\n The following L1 GT DAQ readout record was produced:\n"
643  << myCoutStream.str() << "\n"
644  << std::endl;
645 
646  myCoutStream.str("");
647  myCoutStream.clear();
648 
649  const std::vector<GlobalObjectMap> objMapVec =
650  gtObjectMapRecord->gtObjectMap();
651 
652  for (std::vector<GlobalObjectMap>::const_iterator
653  it = objMapVec.begin(); it != objMapVec.end(); ++it) {
654 
655  (*it).print(myCoutStream);
656 
657  }
658 
659 
660  LogDebug("L1TGlobalProducer")
661  << "Test gtObjectMapRecord in L1TGlobalProducer \n\n" << myCoutStream.str() << "\n\n"
662  << std::endl;
663 
664  myCoutStream.str("");
665  myCoutStream.clear();
666  }
667 
668 
669 
670 
671  // register products
673  iEvent.put(std::move(uGtAlgRecord));
674  }
675 
676 
678  iEvent.put(std::move(gtObjectMapRecord));
679  }
680 
681 
682 }
683 
684 //define this as a plug-in
#define LogDebug(id)
bool isDebugEnabled()
edm::InputTag m_jetInputTag
unsigned int m_numberDaqPartitions
unsigned long long m_l1GtParCacheID
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
unsigned int numberL1Jet() const
get / set the number of L1 jets received by GT
unsigned long long m_l1GtTmVetoAlgoCacheID
const std::vector< std::vector< int > > & prescaleTable() const
const std::vector< std::vector< EnergySumTemplate > > & vecEnergySumTemplate() const
void setGtOrderConditionChip(const std::vector< int > &)
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
int m_verbosity
verbosity level
const AlgorithmMap & gtAlgorithmAliasMap() const
get / set the algorithm map (by alias)
unsigned int numberL1EG() const
get / set the number of L1 e/gamma objects received by GT
uint16_t m_activeBoardsGtDaq
active boards in L1 GT DAQ record
edm::InputTag m_egInputTag
input tag for calorimeter collections from GCT
edm::EDGetTokenT< BXVector< l1t::Tau > > m_tauInputToken
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
bool m_produceL1GtObjectMapRecord
logical flag to produce the L1 GT object map record
int m_totalBxInEvent
total number of Bx&#39;s in the event coming from EventSetup
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
Definition: print.cc:10
unsigned int numberPhysTriggers() const
get / set the number of physics trigger algorithms
const std::vector< std::vector< CorrelationWithOverlapRemovalTemplate > > & vecCorrelationWithOverlapRemovalTemplate() const
int bunchCrossing() const
Definition: EventBase.h:66
const std::vector< std::vector< ExternalTemplate > > & vecExternalTemplate() const
unsigned int m_numberPhysTriggers
const L1TGlobalParameters * m_l1GtStablePar
cached stuff
edm::EDGetTokenT< BXVector< GlobalExtBlk > > m_extInputToken
delete x;
Definition: CaloConfig.h:22
BXVector< GlobalAlgBlk > GlobalAlgBlkBxCollection
Definition: GlobalAlgBlk.h:31
unsigned long long m_l1GtTmAlgoCacheID
std::vector< unsigned int > m_initialTriggerMaskAlgoTrig
const std::vector< int > * m_triggerMaskVetoAlgoTrig
unsigned int m_alternativeNrBxBoardDaq
edm::InputTag m_sumInputTag
edm::InputTag m_muInputTag
input tag for muon collection from GMT
edm::InputTag m_extInputTag
input tag for external conditions
int iEvent
Definition: GenABIO.cc:230
void setGtPinsOnConditionChip(const unsigned int &)
unsigned long long m_l1GtMenuCacheID
edm::InputTag m_tauInputTag
const std::vector< int > & orderOfChip() const
const std::vector< int > & triggerMaskVeto() const
void parseCondFormats(const L1TUtmTriggerMenu *utmMenu)
std::unique_ptr< TriggerMenu > m_l1GtMenu
std::vector< std::vector< int > > m_initialPrescaleFactorsAlgoTrig
std::vector< int > m_initialTriggerMaskVetoAlgoTrig
const std::string & gtTriggerMenuName() const
const std::vector< std::vector< CaloTemplate > > & corCaloTemplate() const
bool m_produceL1GtDaqRecord
logical flag to produce the L1 GT DAQ readout record
edm::EDGetTokenT< BXVector< l1t::Muon > > m_muInputToken
Definition: value.py:1
const std::vector< std::vector< MuonTemplate > > & corMuonTemplate() const
unsigned int numberL1Tau() const
get / set the number of L1 tau received by GT
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const std::vector< std::vector< MuonTemplate > > & vecMuonTemplate() const
get / set the vectors containing the conditions
const std::vector< std::vector< EnergySumTemplate > > & corEnergySumTemplate() const
#define LogTrace(id)
unsigned int m_prescaleSet
prescale set used
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const std::vector< std::vector< CorrelationTemplate > > & vecCorrelationTemplate() const
edm::EDGetTokenT< BXVector< l1t::EtSum > > m_sumInputToken
int m_L1DataBxInEvent
Bx expected in Data coming to GT.
L1TGlobalProducer(const edm::ParameterSet &)
unsigned long long m_l1GtBMCacheID
const GlobalScales & gtScales() const
menu associated scales
const int gtTriggerMenuUUID() const
const AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
void setGtNumberConditionChips(const unsigned int &)
const T & get() const
Definition: EventSetup.h:55
void add(std::string const &label, ParameterSetDescription const &psetDescription)
unsigned int m_bstLengthBytes
length of BST record (in bytes) from event setup
HLT enums.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
int totalBxInEvent() const
get / set the number of bx in hardware
const l1t::PrescalesVetosHelper * m_l1GtPrescalesVetoes
prescale factors
const std::vector< std::vector< CaloTemplate > > & vecCaloTemplate() const
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
unsigned long long m_l1GtPfAlgoCacheID
const std::string & gtTriggerMenuInterface() const
get / set the trigger menu names
std::unique_ptr< l1t::GlobalBoard > m_uGtBrd
unsigned int numberL1Mu() const
get / set the number of L1 muons received by GT
T const * product() const
Definition: ESHandle.h:86
const std::string & gtScaleDbKey() const
menu associated scale key
unsigned int pinsOnChip() const
get / set the number of pins on the GTL condition chips
def move(src, dest)
Definition: eostools.py:510
const unsigned long gtTriggerMenuImplementation() const
edm::EDGetTokenT< BXVector< l1t::Jet > > m_jetInputToken
unsigned int numberChips() const
get / set the number of condition chips in GTL
edm::EDGetTokenT< BXVector< l1t::EGamma > > m_egInputToken
void setGtNumberPhysTriggers(const unsigned int &)
virtual void produce(edm::Event &, const edm::EventSetup &) override