CMS 3D CMS Logo

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