CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1GtAnalyzer.cc
Go to the documentation of this file.
1 
17 // this class header
19 
20 // system include files
21 #include <memory>
22 #include <iomanip>
23 
24 // user include files
27 
31 
33 
35 
37 
39 
44 
47 
50 
52 
54 
55 // constructor(s)
57 
58  // input tag for GT DAQ product
59  m_l1GtDaqReadoutRecordInputTag(parSet.getParameter<edm::InputTag>(
60  "L1GtDaqReadoutRecordInputTag")),
61 
62  // input tag for GT lite product
63  m_l1GtRecordInputTag(parSet.getParameter<edm::InputTag>(
64  "L1GtRecordInputTag")),
65 
66  // input tag for GT object map collection
67  m_l1GtObjectMapTag(parSet.getParameter<edm::InputTag>(
68  "L1GtObjectMapTag")),
69 
70  // input tag for muon collection from GMT
71  m_l1GmtInputTag(parSet.getParameter<edm::InputTag>(
72  "L1GmtInputTag")),
73 
74  // input tag for L1GtTriggerMenuLite
75  m_l1GtTmLInputTag(parSet.getParameter<edm::InputTag> (
76  "L1GtTmLInputTag")),
77 
78  // input tag for ConditionInEdm products
79  m_condInEdmInputTag(parSet.getParameter<edm::InputTag> (
80  "CondInEdmInputTag")),
81 
82  // an algorithm and a condition in that algorithm to test the object maps
83  m_nameAlgTechTrig(parSet.getParameter<std::string> ("AlgorithmName")),
84  m_condName(parSet.getParameter<std::string> ("ConditionName")),
85  m_bitNumber(parSet.getParameter<unsigned int> ("BitNumber")),
86 
87  m_l1GtUtilsConfiguration(parSet.getParameter<unsigned int> ("L1GtUtilsConfiguration")),
88  m_l1GtTmLInputTagProv(parSet.getParameter<bool> ("L1GtTmLInputTagProv"))
89 
90 {
91  LogDebug("L1GtAnalyzer")
92  << "\n Input parameters for L1 GT test analyzer"
93  << "\n L1 GT DAQ product: "
95  << "\n L1 GT lite product: "
97  << "\n L1 GT object map collection: "
99  << "\n Muon collection from GMT: "
100  << m_l1GmtInputTag
101  << "\n L1 trigger menu lite product: "
103  << "\n Algorithm name or alias, technical trigger name: " << m_nameAlgTechTrig
104  << "\n Condition, if a physics algorithm is requested: " << m_condName
105  << "\n Bit number for an algorithm or technical trigger: " << m_bitNumber
106  << "\n Requested L1 trigger configuration: " << m_l1GtUtilsConfiguration
107  << "\n Retrieve input tag from provenance for L1 trigger menu lite in the L1GtUtils: "
109  << " \n" << std::endl;
110 
111 }
112 
113 // destructor
115 
116  // empty
117 
118 }
119 
120 // method called once each job just before starting event loop
122 {
123 
124  // empty
125 
126 }
127 
129  const edm::EventSetup& evSetup) {
130 
131  analyzeConditionsInRunBlock(iRun, evSetup);
132 
133 }
134 
136  const edm::EventSetup& evSetup) {
137 
138  analyzeConditionsInLumiBlock(iLumi, evSetup);
139 
140 }
141 
142 
143 // member functions
144 
145 // analyze: decision and decision word
146 // bunch cross in event BxInEvent = 0 - L1Accept event
148 {
149 
150  LogDebug("L1GtAnalyzer")
151  << "\n**** L1GtAnalyzer::analyzeDecisionReadoutRecord ****\n"
152  << std::endl;
153 
154  // define an output stream to print into
155  // it can then be directed to whatever log level is desired
156  std::ostringstream myCoutStream;
157 
158  // get L1GlobalTriggerReadoutRecord
160  iEvent.getByLabel(m_l1GtDaqReadoutRecordInputTag, gtReadoutRecord);
161 
162  if (!gtReadoutRecord.isValid()) {
163 
164  LogDebug("L1GtAnalyzer") << "\nL1GlobalTriggerReadoutRecord with \n "
166  << "\nrequested in configuration, but not found in the event."
167  << "\nExit the method.\n" << std::endl;
168 
169  return;
170  }
171 
172  // get Global Trigger decision and the decision word
173  bool gtDecision = gtReadoutRecord->decision();
174  DecisionWord gtDecisionWord = gtReadoutRecord->decisionWord();
175 
176  // print Global Trigger decision and the decision word
177  edm::LogVerbatim("L1GtAnalyzer")
178  << "\n GlobalTrigger decision: " << gtDecision << std::endl;
179 
180  // print via supplied "print" function (
181  gtReadoutRecord->printGtDecision(myCoutStream);
182 
183  // print technical trigger word via supplied "print" function
184  gtReadoutRecord->printTechnicalTrigger(myCoutStream);
185 
186  LogDebug("L1GtAnalyzer") << myCoutStream.str() << std::endl;
187 
188  myCoutStream.str("");
189  myCoutStream.clear();
190 
191 }
192 
193 // analyze: decision for a given algorithm via trigger menu
195  const edm::EventSetup& evSetup) {
196 
197  LogDebug("L1GtAnalyzer")
198  << "\n**** L1GtAnalyzer::analyzeDecisionLiteRecord ****\n"
199  << std::endl;
200 
202  iEvent.getByLabel(m_l1GtRecordInputTag, gtRecord);
203 
204  if (!gtRecord.isValid()) {
205 
206  LogDebug("L1GtAnalyzer") << "\nL1GlobalTriggerRecord with \n "
208  << "\nrequested in configuration, but not found in the event."
209  << "\nExit the method.\n" << std::endl;
210 
211  return;
212 
213  }
214 
215  const DecisionWord gtDecisionWord = gtRecord->decisionWord();
216 
218  evSetup.get<L1GtTriggerMenuRcd>().get(l1GtMenu) ;
219  const L1GtTriggerMenu* m_l1GtMenu = l1GtMenu.product();
220 
221  const bool algResult = m_l1GtMenu->gtAlgorithmResult(m_nameAlgTechTrig,
222  gtDecisionWord);
223 
224  edm::LogVerbatim("L1GtAnalyzer") << "\nResult for algorithm " << m_nameAlgTechTrig
225  << ": " << algResult << "\n" << std::endl;
226 
227 }
228 
230  const edm::EventSetup& evSetup) {
231 
232 
233  // define an output stream to print into
234  // it can then be directed to whatever log level is desired
235  std::ostringstream myCoutStream;
236 
237 
238  // example to access L1 trigger results using public methods from L1GtUtils
239  // all must be called after one or both of the commands retrieving the L1 configuration
240  // m_l1GtUtils.retrieveL1EventSetup(evSetup);
241  // m_l1GtUtils.retrieveL1GtTriggerMenuLite(iEvent, m_l1GtTmLInputTag);
242  //
243  //
244 
245  // testing which environment is used
246 
247  int iErrorCode = -1;
248  int l1ConfCode = -1;
249 
250  const bool l1Conf = m_l1GtUtils.availableL1Configuration(iErrorCode, l1ConfCode);
251 
252  myCoutStream << "\nL1 configuration code: \n"
253  << "\n Legend: "
254  << "\n 0 - Retrieve L1 trigger configuration from L1GtTriggerMenuLite only"
255  << "\n 10000 L1GtTriggerMenuLite product is valid"
256  << "\n 99999 L1GtTriggerMenuLite product not valid. Error."
257  << "\n"
258  << "\n 100000 - Fall through: try first L1GtTriggerMenuLite; if not valid,try event setup."
259  << "\n 110000 L1GtTriggerMenuLite product is valid"
260  << "\n 120000 L1GtTriggerMenuLite product not valid, event setup valid."
261  << "\n 199999 L1GtTriggerMenuLite product not valid, event setup not valid. Error."
262  << "\n"
263  << "\n 200000 - Retrieve L1 trigger configuration from event setup only."
264  << "\n 210000 Event setup valid."
265  << "\n 299999 Event setup not valid. Error."
266  << "\n"
267  << "\n 300000 - No L1 trigger configuration requested to be retrieved. Error"
268  << "\n Must call before using L1GtUtils methods at least one of the following:"
269  << "\n retrieveL1GtTriggerMenuLite or retrieveL1EventSetup.\n"
270 
271  << std::endl;
272 
273 
274  if (l1Conf) {
275  myCoutStream << "\nL1 configuration code:" << l1ConfCode
276  << "\nValid L1 trigger configuration." << std::endl;
277 
278  myCoutStream << "\nL1 trigger menu name and implementation:" << "\n"
279  << m_l1GtUtils.l1TriggerMenu() << "\n"
280  << m_l1GtUtils.l1TriggerMenuImplementation() << std::endl;
281 
282  } else {
283  myCoutStream << "\nL1 configuration code:" << l1ConfCode
284  << "\nNo valid L1 trigger configuration available."
285  << "\nSee text above for error code interpretation"
286  << "\nNo return here, in order to test each method, protected against configuration error."
287  << std::endl;
288  }
289 
290 
291 
292  myCoutStream
293  << "\n******** Results found with input tags retrieved from provenance ******** \n"
294  << std::endl;
295 
296  //
297  // no input tags; for the appropriate EDM product, it will be found
298  // from provenance
299 
300  // the following methods share the same error code, therefore one can check only once
301  // the validity of the result
302 
303  iErrorCode = -1;
304 
305  bool decisionBeforeMaskAlgTechTrig = m_l1GtUtils.decisionBeforeMask(iEvent,
306  m_nameAlgTechTrig, iErrorCode);
307 
308  bool decisionAfterMaskAlgTechTrig = m_l1GtUtils.decisionAfterMask(iEvent,
309  m_nameAlgTechTrig, iErrorCode);
310 
311  bool decisionAlgTechTrig = m_l1GtUtils.decision(iEvent, m_nameAlgTechTrig,
312  iErrorCode);
313 
314  int prescaleFactorAlgTechTrig = m_l1GtUtils.prescaleFactor(iEvent,
315  m_nameAlgTechTrig, iErrorCode);
316 
317  int triggerMaskAlgTechTrig = m_l1GtUtils.triggerMask(iEvent,
318  m_nameAlgTechTrig, iErrorCode);
319 
320  myCoutStream << "\n\nMethods:"
321  << "\n decisionBeforeMask(iEvent, m_nameAlgTechTrig, iErrorCode)"
322  << "\n decisionAfterMask(iEvent, m_nameAlgTechTrig, iErrorCode)"
323  << "\n decision(iEvent, m_nameAlgTechTrig, iErrorCode)"
324  << "\n prescaleFactor(iEvent, m_nameAlgTechTrig, iErrorCode)"
325  << "\n triggerMask(iEvent, m_nameAlgTechTrig, iErrorCode)"
326  << "\n triggerMask(m_nameAlgTechTrig,iErrorCode)"
327  << "\n\n" << std::endl;
328 
329 
330  if (iErrorCode == 0) {
331  myCoutStream << "\nDecision before trigger mask for "
332  << m_nameAlgTechTrig << ": " << decisionBeforeMaskAlgTechTrig
333  << std::endl;
334  myCoutStream << "Decision after trigger mask for " << m_nameAlgTechTrig
335  << ": " << decisionAfterMaskAlgTechTrig << std::endl;
336  myCoutStream << "Decision (after trigger mask) for "
337  << m_nameAlgTechTrig << ": " << decisionAlgTechTrig
338  << std::endl;
339 
340  myCoutStream << "Prescale factor for " << m_nameAlgTechTrig
341  << ": " << prescaleFactorAlgTechTrig
342  << std::endl;
343 
344  myCoutStream << "Trigger mask for " << m_nameAlgTechTrig
345  << ": " << triggerMaskAlgTechTrig
346  << std::endl;
347 
348  } else if (iErrorCode == 1) {
349  myCoutStream << "\n" << m_nameAlgTechTrig
350  << " does not exist in the L1 menu "
351  << m_l1GtUtils.l1TriggerMenu() << "\n" << std::endl;
352 
353  } else {
354  myCoutStream << "\nError: "
355  << "\n An error was encountered when retrieving decision, mask and prescale factor for "
356  << m_nameAlgTechTrig << "\n L1 Menu: "
357  << m_l1GtUtils.l1TriggerMenu() << "\n Error code: "
358  << iErrorCode << std::endl;
359 
360  }
361 
362  // another method to get the trigger mask (no common errorCode)
363 
364  iErrorCode = -1;
365  triggerMaskAlgTechTrig = m_l1GtUtils.triggerMask(m_nameAlgTechTrig,
366  iErrorCode);
367 
368  if (iErrorCode == 0) {
369  myCoutStream << "\nTrigger mask for " << m_nameAlgTechTrig
370  << "(faster method): " << triggerMaskAlgTechTrig
371  << std::endl;
372 
373  } else if (iErrorCode == 1) {
374  myCoutStream << "\n" << m_nameAlgTechTrig
375  << " does not exist in the L1 menu "
376  << m_l1GtUtils.l1TriggerMenu() << "\n" << std::endl;
377 
378  } else {
379  myCoutStream << "\nError: "
380  << "\n An error was encountered when fast retrieving trigger mask for "
381  << m_nameAlgTechTrig << "\n L1 Menu: "
382  << m_l1GtUtils.l1TriggerMenu() << "\n Error code: "
383  << iErrorCode << std::endl;
384 
385  }
386 
387  // index of the actual prescale factor set, and the actual prescale
388  // factor set for algorithm triggers
389 
390 
391 
393 
394  myCoutStream << "\nMethods:"
395  << "\n prescaleFactorSetIndex(iEvent, trigCategory, iErrorCode)"
396  << "\n prescaleFactorSet(iEvent, trigCategory,iErrorCode)\n"
397  << std::endl;
398 
399  iErrorCode = -1;
400  const int pfSetIndexAlgorithmTrigger = m_l1GtUtils.prescaleFactorSetIndex(
401  iEvent, trigCategory, iErrorCode);
402 
403  if (iErrorCode == 0) {
404  myCoutStream
405  << "\nAlgorithm triggers: index for prescale factor set = "
406  << pfSetIndexAlgorithmTrigger << "\nfor run " << iEvent.run()
407  << ", luminosity block " << iEvent.luminosityBlock()
408  << ", with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
409  << std::endl;
410 
411 
412  } else {
413  myCoutStream
414  << "\nError encountered when retrieving the prescale factor set index"
415  << "\n for algorithm triggers, for run " << iEvent.run()
416  << ", luminosity block " << iEvent.luminosityBlock()
417  << " with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
418  << "\n Error code: " << iErrorCode << "\n" << std::endl;
419  }
420 
421  iErrorCode = -1;
422  const std::vector<int>& pfSetAlgorithmTrigger =
423  m_l1GtUtils.prescaleFactorSet(iEvent, trigCategory, iErrorCode);
424 
425  if (iErrorCode == 0) {
426  myCoutStream << "\nAlgorithm triggers: prescale factor set index = "
427  << pfSetIndexAlgorithmTrigger << "\nfor run " << iEvent.run()
428  << ", luminosity block " << iEvent.luminosityBlock()
429  << ", with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
430  << std::endl;
431 
432  int iBit = -1;
433  for (std::vector<int>::const_iterator cItBit =
434  pfSetAlgorithmTrigger.begin(); cItBit
435  != pfSetAlgorithmTrigger.end(); ++cItBit) {
436 
437  iBit++;
438  myCoutStream << "Bit number " << std::right << std::setw(4) << iBit
439  << ": prescale factor = " << (*cItBit) << std::endl;
440 
441  }
442 
443  } else {
444  myCoutStream
445  << "\nError encountered when retrieving the prescale factor set "
446  << "\n for algorithm triggers, for run " << iEvent.run()
447  << ", luminosity block " << iEvent.luminosityBlock()
448  << " with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
449  << "\n Error code: " << iErrorCode << "\n" << std::endl;
450  }
451 
452  // the actual trigger mask set for algorithm triggers
453 
454  myCoutStream << "\nMethod:"
455  << "\n triggerMaskSet(trigCategory, iErrorCode)"
456  << std::endl;
457 
458  iErrorCode = -1;
459  const std::vector<unsigned int>& tmSetAlgorithmTrigger =
460  m_l1GtUtils.triggerMaskSet(trigCategory, iErrorCode);
461 
462  if (iErrorCode == 0) {
463  myCoutStream << "\nAlgorithm triggers: trigger mask set for run "
464  << iEvent.run() << ", luminosity block "
465  << iEvent.luminosityBlock() << ", with L1 menu \n "
466  << m_l1GtUtils.l1TriggerMenu() << "\n" << std::endl;
467 
468  int iBit = -1;
469  for (std::vector<unsigned int>::const_iterator cItBit =
470  tmSetAlgorithmTrigger.begin(); cItBit
471  != tmSetAlgorithmTrigger.end(); ++cItBit) {
472 
473  iBit++;
474  myCoutStream << "Bit number " << std::right << std::setw(4) << iBit
475  << ": trigger mask = " << (*cItBit) << std::endl;
476 
477  }
478 
479  } else {
480  myCoutStream
481  << "\nError encountered when retrieving the trigger mask set "
482  << "\n for algorithm triggers, for run " << iEvent.run()
483  << ", luminosity block " << iEvent.luminosityBlock()
484  << " with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
485  << "\n Error code: " << iErrorCode << "\n" << std::endl;
486  }
487 
488  // deprecated methods using std::string
489 
490  std::string triggerAlgTechTrig = "PhysicsAlgorithms";
491 
492  myCoutStream << "\nDeprecated methods:"
493  << "\n prescaleFactorSetIndex(iEvent, triggerAlgTechTrig, iErrorCode)"
494  << "\n prescaleFactorSet(iEvent, triggerAlgTechTrig, iErrorCode)"
495  << std::endl;
496 
497  iErrorCode = -1;
498  const int pfSetIndexPhysicsAlgorithms = m_l1GtUtils.prescaleFactorSetIndex(
499  iEvent, triggerAlgTechTrig, iErrorCode);
500 
501  if (iErrorCode == 0) {
502  myCoutStream << "\nAlgorithm triggers: index for prescale factor set = "
503  << pfSetIndexPhysicsAlgorithms << "\nfor run " << iEvent.run()
504  << ", luminosity block " << iEvent.luminosityBlock()
505  << ", with L1 menu \n " << m_l1GtUtils.l1TriggerMenu() << "\n"
506  << "Warning: deprecated method.\n" << std::endl;
507 
508  } else {
509  myCoutStream
510  << "\nError encountered when retrieving the prescale factor set index"
511  << "\n for algorithm triggers, for run " << iEvent.run()
512  << ", luminosity block " << iEvent.luminosityBlock()
513  << " with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
514  << "\n Error code: " << iErrorCode << "\n" << std::endl;
515  }
516 
517 
518  iErrorCode = -1;
519  const std::vector<int>& pfSetPhysicsAlgorithms =
520  m_l1GtUtils.prescaleFactorSet(iEvent, triggerAlgTechTrig,
521  iErrorCode);
522 
523  if (iErrorCode == 0) {
524  myCoutStream << "\nAlgorithm triggers: prescale factor set index = "
525  << pfSetIndexPhysicsAlgorithms << "\nfor run " << iEvent.run()
526  << ", luminosity block " << iEvent.luminosityBlock()
527  << ", with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
528  << "\nWarning: deprecated method.\n" << std::endl;
529 
530  int iBit = -1;
531  for (std::vector<int>::const_iterator cItBit =
532  pfSetPhysicsAlgorithms.begin(); cItBit
533  != pfSetPhysicsAlgorithms.end(); ++cItBit) {
534 
535  iBit++;
536  myCoutStream << "Bit number " << std::right << std::setw(4) << iBit
537  << ": prescale factor = " << (*cItBit) << std::endl;
538 
539  }
540 
541  } else {
542  myCoutStream
543  << "\nError encountered when retrieving the prescale factor set "
544  << "\n for algorithm triggers, for run " << iEvent.run()
545  << ", luminosity block " << iEvent.luminosityBlock()
546  << " with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
547  << "\n Error code: " << iErrorCode << "\n" << std::endl;
548  }
549 
550  // the actual trigger mask set for algorithm triggers
551 
552  myCoutStream << "\nDeprecated methods:"
553  << "\n triggerMaskSet(triggerAlgTechTrig, iErrorCode)"
554  << std::endl;
555 
556  iErrorCode = -1;
557  const std::vector<unsigned int>& tmSetPhysicsAlgorithms =
558  m_l1GtUtils.triggerMaskSet(triggerAlgTechTrig, iErrorCode);
559 
560  if (iErrorCode == 0) {
561  myCoutStream << "\nAlgorithm triggers: trigger mask set for run "
562  << iEvent.run() << ", luminosity block "
563  << iEvent.luminosityBlock() << ", with L1 menu \n "
565  << "\nWarning: deprecated method.\n" << std::endl;
566 
567  int iBit = -1;
568  for (std::vector<unsigned int>::const_iterator cItBit =
569  tmSetPhysicsAlgorithms.begin(); cItBit
570  != tmSetPhysicsAlgorithms.end(); ++cItBit) {
571 
572  iBit++;
573  myCoutStream << "Bit number " << std::right << std::setw(4) << iBit
574  << ": trigger mask = " << (*cItBit) << std::endl;
575 
576  }
577 
578  } else {
579  myCoutStream
580  << "\nError encountered when retrieving the trigger mask set "
581  << "\n for algorithm triggers, for run " << iEvent.run()
582  << ", luminosity block " << iEvent.luminosityBlock()
583  << " with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
584  << "\n Error code: " << iErrorCode << "\n" << std::endl;
585  }
586 
587 
588 
589  // index of the actual prescale factor set, and the actual prescale
590  // factor set for technical triggers
591 
592  trigCategory = L1GtUtils::TechnicalTrigger;
593 
594  myCoutStream << "\nMethods:"
595  << "\n prescaleFactorSetIndex(iEvent, trigCategory, iErrorCode)"
596  << "\n prescaleFactorSet(iEvent, trigCategory,iErrorCode)\n"
597  << std::endl;
598 
599  iErrorCode = -1;
600  const int pfSetIndexTechnicalTrigger = m_l1GtUtils.prescaleFactorSetIndex(
601  iEvent, trigCategory, iErrorCode);
602 
603  if (iErrorCode == 0) {
604  myCoutStream
605  << "\nTechnical triggers: index for prescale factor set = "
606  << pfSetIndexTechnicalTrigger << "\nfor run " << iEvent.run()
607  << ", luminosity block " << iEvent.luminosityBlock()
608  << ", with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
609  << "\nMethod: prescaleFactorSetIndex(iEvent, trigCategory, iErrorCode)\n"
610  << std::endl;
611 
612  } else {
613  myCoutStream
614  << "\nError encountered when retrieving the prescale factor set index"
615  << "\n for technical triggers, for run " << iEvent.run()
616  << ", luminosity block " << iEvent.luminosityBlock()
617  << " with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
618  << "\n Error code: " << iErrorCode << "\n" << std::endl;
619  }
620 
621  iErrorCode = -1;
622  const std::vector<int>& pfSetTechnicalTrigger =
623  m_l1GtUtils.prescaleFactorSet(iEvent, trigCategory, iErrorCode);
624 
625  if (iErrorCode == 0) {
626  myCoutStream << "\nTechnical triggers: prescale factor set index = "
627  << pfSetIndexTechnicalTrigger << "\nfor run " << iEvent.run()
628  << ", luminosity block " << iEvent.luminosityBlock()
629  << ", with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
630  << "\nMethod: prescaleFactorSet(iEvent, trigCategory,iErrorCode)\n"
631  << std::endl;
632 
633  int iBit = -1;
634  for (std::vector<int>::const_iterator cItBit =
635  pfSetTechnicalTrigger.begin(); cItBit
636  != pfSetTechnicalTrigger.end(); ++cItBit) {
637 
638  iBit++;
639  myCoutStream << "Bit number " << std::right << std::setw(4) << iBit
640  << ": prescale factor = " << (*cItBit) << std::endl;
641 
642  }
643 
644  } else {
645  myCoutStream
646  << "\nError encountered when retrieving the prescale factor set "
647  << "\n for technical triggers, for run " << iEvent.run()
648  << ", luminosity block " << iEvent.luminosityBlock()
649  << " with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
650  << "\n Error code: " << iErrorCode << "\n" << std::endl;
651  }
652 
653  // the actual trigger mask set for technical triggers
654 
655  myCoutStream << "\nMethod:"
656  << "\n triggerMaskSet(trigCategory, iErrorCode)"
657  << std::endl;
658 
659  iErrorCode = -1;
660  const std::vector<unsigned int>& tmSetTechnicalTrigger =
661  m_l1GtUtils.triggerMaskSet(trigCategory, iErrorCode);
662 
663  if (iErrorCode == 0) {
664  myCoutStream << "\nTechnical triggers: trigger mask set for run "
665  << iEvent.run() << ", luminosity block "
666  << iEvent.luminosityBlock() << ", with L1 menu \n "
667  << m_l1GtUtils.l1TriggerMenu() << "\n" << std::endl;
668 
669  int iBit = -1;
670  for (std::vector<unsigned int>::const_iterator cItBit =
671  tmSetTechnicalTrigger.begin(); cItBit
672  != tmSetTechnicalTrigger.end(); ++cItBit) {
673 
674  iBit++;
675  myCoutStream << "Bit number " << std::right << std::setw(4) << iBit
676  << ": trigger mask = " << (*cItBit) << std::endl;
677 
678  }
679 
680  } else {
681  myCoutStream
682  << "\nError encountered when retrieving the trigger mask set "
683  << "\n for technical triggers, for run " << iEvent.run()
684  << ", luminosity block " << iEvent.luminosityBlock()
685  << " with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
686  << "\n Error code: " << iErrorCode << "\n" << std::endl;
687  }
688 
689  // deprecated methods using std::string
690 
691  triggerAlgTechTrig = "TechnicalTriggers";
692 
693  myCoutStream << "\nDeprecated methods:"
694  << "\n prescaleFactorSetIndex(iEvent, triggerAlgTechTrig, iErrorCode)"
695  << "\n prescaleFactorSet(iEvent, triggerAlgTechTrig, iErrorCode)"
696  << std::endl;
697 
698  iErrorCode = -1;
699  const int pfSetIndexTechnicalTriggers = m_l1GtUtils.prescaleFactorSetIndex(
700  iEvent, triggerAlgTechTrig, iErrorCode);
701 
702  if (iErrorCode == 0) {
703  myCoutStream << "\nTechnical triggers: index for prescale factor set = "
704  << pfSetIndexTechnicalTriggers << "\nfor run " << iEvent.run()
705  << ", luminosity block " << iEvent.luminosityBlock()
706  << ", with L1 menu \n " << m_l1GtUtils.l1TriggerMenu() << "\n"
707  << "Warning: deprecated method.\n" << std::endl;
708 
709  } else {
710  myCoutStream
711  << "\nError encountered when retrieving the prescale factor set index"
712  << "\n for technical triggers, for run " << iEvent.run()
713  << ", luminosity block " << iEvent.luminosityBlock()
714  << " with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
715  << "\n Error code: " << iErrorCode << "\n" << std::endl;
716  }
717 
718 
719  iErrorCode = -1;
720  const std::vector<int>& pfSetTechnicalTriggers =
721  m_l1GtUtils.prescaleFactorSet(iEvent, triggerAlgTechTrig,
722  iErrorCode);
723 
724  if (iErrorCode == 0) {
725  myCoutStream << "\nTechnical triggers: prescale factor set index = "
726  << pfSetIndexTechnicalTriggers << "\nfor run " << iEvent.run()
727  << ", luminosity block " << iEvent.luminosityBlock()
728  << ", with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
729  << "\nWarning: deprecated method.\n" << std::endl;
730 
731  int iBit = -1;
732  for (std::vector<int>::const_iterator cItBit =
733  pfSetTechnicalTriggers.begin(); cItBit
734  != pfSetTechnicalTriggers.end(); ++cItBit) {
735 
736  iBit++;
737  myCoutStream << "Bit number " << std::right << std::setw(4) << iBit
738  << ": prescale factor = " << (*cItBit) << std::endl;
739 
740  }
741 
742  } else {
743  myCoutStream
744  << "\nError encountered when retrieving the prescale factor set "
745  << "\n for technical triggers, for run " << iEvent.run()
746  << ", luminosity block " << iEvent.luminosityBlock()
747  << " with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
748  << "\n Error code: " << iErrorCode << "\n" << std::endl;
749  }
750 
751  // the actual trigger mask set for algorithm triggers
752 
753  myCoutStream << "\nDeprecated methods:"
754  << "\n triggerMaskSet(triggerAlgTechTrig, iErrorCode)"
755  << std::endl;
756 
757  iErrorCode = -1;
758  const std::vector<unsigned int>& tmSetTechnicalTriggers =
759  m_l1GtUtils.triggerMaskSet(triggerAlgTechTrig, iErrorCode);
760 
761  if (iErrorCode == 0) {
762  myCoutStream << "\nTechnical triggers: trigger mask set for run "
763  << iEvent.run() << ", luminosity block "
764  << iEvent.luminosityBlock() << ", with L1 menu \n "
766  << "\nWarning: deprecated method.\n" << std::endl;
767 
768  int iBit = -1;
769  for (std::vector<unsigned int>::const_iterator cItBit =
770  tmSetTechnicalTriggers.begin(); cItBit
771  != tmSetTechnicalTriggers.end(); ++cItBit) {
772 
773  iBit++;
774  myCoutStream << "Bit number " << std::right << std::setw(4) << iBit
775  << ": trigger mask = " << (*cItBit) << std::endl;
776 
777  }
778 
779  } else {
780  myCoutStream
781  << "\nError encountered when retrieving the trigger mask set "
782  << "\n for technical triggers, for run " << iEvent.run()
783  << ", luminosity block " << iEvent.luminosityBlock()
784  << " with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
785  << "\n Error code: " << iErrorCode << "\n" << std::endl;
786  }
787 
788 
789 
790  //
791  // same methods as above, but with input tag given explicitly, allowing to select
792  // the EDM products used to get the results
793 
794  myCoutStream
795  << "\n******** Results found with input tags provided in the configuration file ******** \n"
796  << "\n L1GlobalTriggerRecord: " << m_l1GtRecordInputTag
797  << "\n L1GlobalTriggerReadoutRecord: "
798  << m_l1GtDaqReadoutRecordInputTag << std::endl;
799 
800 
801  // the following methods share the same error code, therefore one can check only once
802  // the validity of the result
803 
804  iErrorCode = -1;
805 
806  bool decisionBeforeMaskAlgTechTrigITag = m_l1GtUtils.decisionBeforeMask(iEvent,
808  m_nameAlgTechTrig, iErrorCode);
809 
810  bool decisionAfterMaskAlgTechTrigITag = m_l1GtUtils.decisionAfterMask(iEvent,
812  m_nameAlgTechTrig, iErrorCode);
813 
814  bool decisionAlgTechTrigITag = m_l1GtUtils.decision(iEvent,
816  m_nameAlgTechTrig, iErrorCode);
817 
818  int prescaleFactorAlgTechTrigITag = m_l1GtUtils.prescaleFactor(iEvent,
820  m_nameAlgTechTrig, iErrorCode);
821 
822  int triggerMaskAlgTechTrigITag = m_l1GtUtils.triggerMask(iEvent,
824  m_nameAlgTechTrig, iErrorCode);
825 
826  myCoutStream << "\n\nMethods:"
827  << "\n decisionBeforeMask(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, m_nameAlgTechTrig, iErrorCode)"
828  << "\n decisionAfterMask(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, m_nameAlgTechTrig, iErrorCode)"
829  << "\n decision(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, m_nameAlgTechTrig, iErrorCode)"
830  << "\n prescaleFactor(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, m_nameAlgTechTrig, iErrorCode)"
831  << "\n triggerMask(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, m_nameAlgTechTrig, iErrorCode)"
832  << "\n\n"
833  << std::endl;
834 
835 
836  if (iErrorCode == 0) {
837  myCoutStream << "\nDecision before trigger mask for "
838  << m_nameAlgTechTrig << ": " << decisionBeforeMaskAlgTechTrigITag
839  << std::endl;
840  myCoutStream << "Decision after trigger mask for " << m_nameAlgTechTrig
841  << ": " << decisionAfterMaskAlgTechTrigITag << std::endl;
842  myCoutStream << "Decision (after trigger mask) for "
843  << m_nameAlgTechTrig << ": " << decisionAlgTechTrigITag
844  << std::endl;
845 
846  myCoutStream << "Prescale factor for " << m_nameAlgTechTrig
847  << ": " << prescaleFactorAlgTechTrigITag
848  << std::endl;
849 
850  myCoutStream << "Trigger mask for " << m_nameAlgTechTrig
851  << ": " << triggerMaskAlgTechTrigITag
852  << std::endl;
853 
854  } else if (iErrorCode == 1) {
855  myCoutStream << "\n" << m_nameAlgTechTrig
856  << " does not exist in the L1 menu "
857  << m_l1GtUtils.l1TriggerMenu() << "\n" << std::endl;
858 
859  } else {
860  myCoutStream << "\nError: "
861  << "\n An error was encountered when retrieving decision, mask and prescale factor for "
862  << m_nameAlgTechTrig << "\n L1 Menu: "
863  << m_l1GtUtils.l1TriggerMenu() << "\n Error code: "
864  << iErrorCode << std::endl;
865 
866  }
867 
868 
869  // index of the actual prescale factor set, and the actual prescale
870  // factor set for algorithm triggers
871 
872 
873 
874  trigCategory = L1GtUtils::AlgorithmTrigger;
875 
876  myCoutStream << "\nMethods:"
877  << "\n prescaleFactorSetIndex(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, trigCategory, iErrorCode)"
878  << "\n prescaleFactorSet(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, trigCategory,iErrorCode)\n"
879  << std::endl;
880 
881  iErrorCode = -1;
882  const int pfSetIndexAlgorithmTriggerITag = m_l1GtUtils.prescaleFactorSetIndex(
884  trigCategory, iErrorCode);
885 
886  if (iErrorCode == 0) {
887  myCoutStream
888  << "\nAlgorithm triggers: index for prescale factor set = "
889  << pfSetIndexAlgorithmTriggerITag << "\nfor run " << iEvent.run()
890  << ", luminosity block " << iEvent.luminosityBlock()
891  << ", with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
892  << std::endl;
893 
894 
895  } else {
896  myCoutStream
897  << "\nError encountered when retrieving the prescale factor set index"
898  << "\n for algorithm triggers, for run " << iEvent.run()
899  << ", luminosity block " << iEvent.luminosityBlock()
900  << " with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
901  << "\n Error code: " << iErrorCode << "\n" << std::endl;
902  }
903 
904  iErrorCode = -1;
905  const std::vector<int>& pfSetAlgorithmTriggerITag =
907  m_l1GtDaqReadoutRecordInputTag, trigCategory, iErrorCode);
908 
909  if (iErrorCode == 0) {
910  myCoutStream << "\nAlgorithm triggers: prescale factor set index = "
911  << pfSetIndexAlgorithmTriggerITag << "\nfor run " << iEvent.run()
912  << ", luminosity block " << iEvent.luminosityBlock()
913  << ", with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
914  << std::endl;
915 
916  int iBit = -1;
917  for (std::vector<int>::const_iterator cItBit =
918  pfSetAlgorithmTriggerITag.begin(); cItBit
919  != pfSetAlgorithmTriggerITag.end(); ++cItBit) {
920 
921  iBit++;
922  myCoutStream << "Bit number " << std::right << std::setw(4) << iBit
923  << ": prescale factor = " << (*cItBit) << std::endl;
924 
925  }
926 
927  } else {
928  myCoutStream
929  << "\nError encountered when retrieving the prescale factor set "
930  << "\n for algorithm triggers, for run " << iEvent.run()
931  << ", luminosity block " << iEvent.luminosityBlock()
932  << " with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
933  << "\n Error code: " << iErrorCode << "\n" << std::endl;
934  }
935 
936 
937  // deprecated methods using std::string
938 
939  triggerAlgTechTrig = "PhysicsAlgorithms";
940 
941  myCoutStream << "\nDeprecated methods:"
942  << "\n prescaleFactorSetIndex(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, triggerAlgTechTrig, iErrorCode)"
943  << "\n prescaleFactorSet(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, triggerAlgTechTrig, iErrorCode)"
944  << std::endl;
945 
946  iErrorCode = -1;
947  const int pfSetIndexPhysicsAlgorithmsITag = m_l1GtUtils.prescaleFactorSetIndex(
949  triggerAlgTechTrig, iErrorCode);
950 
951  if (iErrorCode == 0) {
952  myCoutStream << "\nAlgorithm triggers: index for prescale factor set = "
953  << pfSetIndexPhysicsAlgorithmsITag << "\nfor run " << iEvent.run()
954  << ", luminosity block " << iEvent.luminosityBlock()
955  << ", with L1 menu \n " << m_l1GtUtils.l1TriggerMenu() << "\n"
956  << "Warning: deprecated method.\n" << std::endl;
957 
958  } else {
959  myCoutStream
960  << "\nError encountered when retrieving the prescale factor set index"
961  << "\n for algorithm triggers, for run " << iEvent.run()
962  << ", luminosity block " << iEvent.luminosityBlock()
963  << " with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
964  << "\n Error code: " << iErrorCode << "\n" << std::endl;
965  }
966 
967 
968  iErrorCode = -1;
969  const std::vector<int>& pfSetPhysicsAlgorithmsITag =
971  m_l1GtDaqReadoutRecordInputTag, triggerAlgTechTrig,
972  iErrorCode);
973 
974  if (iErrorCode == 0) {
975  myCoutStream << "\nAlgorithm triggers: prescale factor set index = "
976  << pfSetIndexPhysicsAlgorithmsITag << "\nfor run " << iEvent.run()
977  << ", luminosity block " << iEvent.luminosityBlock()
978  << ", with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
979  << "\nWarning: deprecated method.\n" << std::endl;
980 
981  int iBit = -1;
982  for (std::vector<int>::const_iterator cItBit =
983  pfSetPhysicsAlgorithmsITag.begin(); cItBit
984  != pfSetPhysicsAlgorithmsITag.end(); ++cItBit) {
985 
986  iBit++;
987  myCoutStream << "Bit number " << std::right << std::setw(4) << iBit
988  << ": prescale factor = " << (*cItBit) << std::endl;
989 
990  }
991 
992  } else {
993  myCoutStream
994  << "\nError encountered when retrieving the prescale factor set "
995  << "\n for algorithm triggers, for run " << iEvent.run()
996  << ", luminosity block " << iEvent.luminosityBlock()
997  << " with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
998  << "\n Error code: " << iErrorCode << "\n" << std::endl;
999  }
1000 
1001 
1002 
1003 
1004  // index of the actual prescale factor set, and the actual prescale
1005  // factor set for technical triggers
1006 
1007  trigCategory = L1GtUtils::TechnicalTrigger;
1008 
1009  myCoutStream << "\nMethods:"
1010  << "\n prescaleFactorSetIndex(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, trigCategory, iErrorCode)"
1011  << "\n prescaleFactorSet(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, trigCategory,iErrorCode)\n"
1012  << std::endl;
1013 
1014  iErrorCode = -1;
1015  const int pfSetIndexTechnicalTriggerITag = m_l1GtUtils.prescaleFactorSetIndex(
1017  trigCategory, iErrorCode);
1018 
1019  if (iErrorCode == 0) {
1020  myCoutStream
1021  << "\nTechnical triggers: index for prescale factor set = "
1022  << pfSetIndexTechnicalTriggerITag << "\nfor run " << iEvent.run()
1023  << ", luminosity block " << iEvent.luminosityBlock()
1024  << ", with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
1025  << std::endl;
1026 
1027  } else {
1028  myCoutStream
1029  << "\nError encountered when retrieving the prescale factor set index"
1030  << "\n for technical triggers, for run " << iEvent.run()
1031  << ", luminosity block " << iEvent.luminosityBlock()
1032  << " with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
1033  << "\n Error code: " << iErrorCode << "\n" << std::endl;
1034  }
1035 
1036  iErrorCode = -1;
1037  const std::vector<int>& pfSetTechnicalTriggerITag =
1039  m_l1GtDaqReadoutRecordInputTag, trigCategory, iErrorCode);
1040 
1041  if (iErrorCode == 0) {
1042  myCoutStream << "\nTechnical triggers: prescale factor set index = "
1043  << pfSetIndexTechnicalTriggerITag << "\nfor run " << iEvent.run()
1044  << ", luminosity block " << iEvent.luminosityBlock()
1045  << ", with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
1046  << std::endl;
1047 
1048  int iBit = -1;
1049  for (std::vector<int>::const_iterator cItBit =
1050  pfSetTechnicalTriggerITag.begin(); cItBit
1051  != pfSetTechnicalTriggerITag.end(); ++cItBit) {
1052 
1053  iBit++;
1054  myCoutStream << "Bit number " << std::right << std::setw(4) << iBit
1055  << ": prescale factor = " << (*cItBit) << std::endl;
1056 
1057  }
1058 
1059  } else {
1060  myCoutStream
1061  << "\nError encountered when retrieving the prescale factor set "
1062  << "\n for technical triggers, for run " << iEvent.run()
1063  << ", luminosity block " << iEvent.luminosityBlock()
1064  << " with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
1065  << "\n Error code: " << iErrorCode << "\n" << std::endl;
1066  }
1067 
1068 
1069  // deprecated methods using std::string
1070 
1071  triggerAlgTechTrig = "TechnicalTriggers";
1072 
1073  myCoutStream << "\nDeprecated methods:"
1074  << "\n prescaleFactorSetIndex(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, triggerAlgTechTrig, iErrorCode)"
1075  << "\n prescaleFactorSet(iEvent, m_l1GtRecordInputTag, m_l1GtDaqReadoutRecordInputTag, triggerAlgTechTrig, iErrorCode)"
1076  << std::endl;
1077 
1078  iErrorCode = -1;
1079  const int pfSetIndexTechnicalTriggersITag = m_l1GtUtils.prescaleFactorSetIndex(
1081  triggerAlgTechTrig, iErrorCode);
1082 
1083  if (iErrorCode == 0) {
1084  myCoutStream << "\nTechnical triggers: index for prescale factor set = "
1085  << pfSetIndexTechnicalTriggersITag << "\nfor run " << iEvent.run()
1086  << ", luminosity block " << iEvent.luminosityBlock()
1087  << ", with L1 menu \n " << m_l1GtUtils.l1TriggerMenu() << "\n"
1088  << "Warning: deprecated method.\n" << std::endl;
1089 
1090  } else {
1091  myCoutStream
1092  << "\nError encountered when retrieving the prescale factor set index"
1093  << "\n for technical triggers, for run " << iEvent.run()
1094  << ", luminosity block " << iEvent.luminosityBlock()
1095  << " with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
1096  << "\n Error code: " << iErrorCode << "\n" << std::endl;
1097  }
1098 
1099 
1100  iErrorCode = -1;
1101  const std::vector<int>& pfSetTechnicalTriggersITag =
1103  m_l1GtDaqReadoutRecordInputTag, triggerAlgTechTrig,
1104  iErrorCode);
1105 
1106  if (iErrorCode == 0) {
1107  myCoutStream << "\nTechnical triggers: prescale factor set index = "
1108  << pfSetIndexTechnicalTriggersITag << "\nfor run " << iEvent.run()
1109  << ", luminosity block " << iEvent.luminosityBlock()
1110  << ", with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
1111  << "\nWarning: deprecated method.\n" << std::endl;
1112 
1113  int iBit = -1;
1114  for (std::vector<int>::const_iterator cItBit =
1115  pfSetTechnicalTriggersITag.begin(); cItBit
1116  != pfSetTechnicalTriggersITag.end(); ++cItBit) {
1117 
1118  iBit++;
1119  myCoutStream << "Bit number " << std::right << std::setw(4) << iBit
1120  << ": prescale factor = " << (*cItBit) << std::endl;
1121 
1122  }
1123 
1124  } else {
1125  myCoutStream
1126  << "\nError encountered when retrieving the prescale factor set "
1127  << "\n for technical triggers, for run " << iEvent.run()
1128  << ", luminosity block " << iEvent.luminosityBlock()
1129  << " with L1 menu \n " << m_l1GtUtils.l1TriggerMenu()
1130  << "\n Error code: " << iErrorCode << "\n" << std::endl;
1131  }
1132 
1133  //
1134  // dump the stream in some Log tag (LogDebug here)
1135 
1136 
1137  LogDebug("L1GtAnalyzer") << myCoutStream.str() << std::endl;
1138 
1139  myCoutStream.str("");
1140  myCoutStream.clear();
1141 
1142 }
1143 
1145  const edm::EventSetup& evSetup) {
1146 
1147  LogDebug("L1GtAnalyzer")
1148  << "\n**** L1GtAnalyzer::analyzeL1GtUtilsMenuLite ****\n"
1149  << std::endl;
1150 
1151  // before accessing any result from L1GtUtils, one must retrieve and cache
1152  // the L1GtTriggerMenuLite product
1153  // add this call in the analyze / produce / filter method of your
1154  // analyzer / producer / filter
1155 
1156  if (m_l1GtTmLInputTagProv) {
1157 
1158  // input tag for L1GtTriggerMenuLite retrieved from provenance
1160 
1161  } else {
1162 
1163  // input tag for L1GtTriggerMenuLite explicitly given
1165 
1166  }
1167 
1168  analyzeL1GtUtilsCore(iEvent, evSetup);
1169 
1170 }
1171 
1173  const edm::EventSetup& evSetup) {
1174 
1175  LogDebug("L1GtAnalyzer") << "\n**** L1GtAnalyzer::analyzeL1GtUtilsEventSetup ****\n"
1176  << std::endl;
1177 
1178  // before accessing any result from L1GtUtils, one must retrieve and cache
1179  // the L1 trigger event setup
1180  // add this call in the analyze / produce / filter method of your
1181  // analyzer / producer / filter
1182 
1184 
1185  analyzeL1GtUtilsCore(iEvent, evSetup);
1186 
1187 }
1188 
1190  const edm::EventSetup& evSetup) {
1191 
1192  LogDebug("L1GtAnalyzer") << "\n**** L1GtAnalyzer::analyzeL1GtUtils ****\n"
1193  << std::endl;
1194 
1195  // before accessing any result from L1GtUtils, one must retrieve and cache
1196  // the L1 trigger event setup and the L1GtTriggerMenuLite product
1197  // add this call in the analyze / produce / filter method of your
1198  // analyzer / producer / filter
1199 
1201 
1202  if (m_l1GtTmLInputTagProv) {
1203 
1204  // input tag for L1GtTriggerMenuLite retrieved from provenance
1206 
1207  } else {
1208 
1209  // input tag for L1GtTriggerMenuLite explicitly given
1211 
1212  }
1213 
1214  analyzeL1GtUtilsCore(iEvent, evSetup);
1215 
1216 }
1217 
1218 // analyze: object map product
1220  const edm::EventSetup& evSetup) {
1221 
1222  LogDebug("L1GtAnalyzer")
1223  << "\n**** L1GtAnalyzer::analyzeObjectMap object map product ****\n"
1224  << std::endl;
1225 
1226  // define an output stream to print into
1227  // it can then be directed to whatever log level is desired
1228  std::ostringstream myCoutStream;
1229 
1230  // get a handle to the object map product
1231  // the product can come only from emulator - no hardware ObjectMapRecord
1233  iEvent.getByLabel(m_l1GtObjectMapTag, gtObjectMapRecord);
1234 
1235  if (!gtObjectMapRecord.isValid()) {
1236  LogDebug("L1GtAnalyzer")
1237  << "\nWarning: L1GlobalTriggerObjectMapRecord with input tag "
1239  << "\nrequested in configuration, but not found in the event."
1240  << "\nExit the method.\n" << std::endl;
1241 
1242  return;
1243  }
1244 
1245  // get all object maps
1246  const std::vector<L1GlobalTriggerObjectMap>& objMapVec =
1247  gtObjectMapRecord->gtObjectMap();
1248 
1249  // print every object map via the implemented print
1250  for (std::vector<L1GlobalTriggerObjectMap>::const_iterator it =
1251  objMapVec.begin(); it != objMapVec.end(); ++it) {
1252 
1253  (*it).print(myCoutStream);
1254  }
1255 
1256  //
1257  const CombinationsInCond* comb = gtObjectMapRecord->getCombinationsInCond(
1259 
1260  // number of combinations
1261  if (comb != 0) {
1262  myCoutStream << "\n Number of combinations passing ("
1263  << m_nameAlgTechTrig << ", " << m_condName << "): "
1264  << comb->size() << std::endl;
1265  } else {
1266  myCoutStream << "\n No combination passes (" << m_nameAlgTechTrig
1267  << ", " << m_condName << ") " << std::endl;
1268 
1269  }
1270 
1271  // condition result
1272  const bool result = gtObjectMapRecord->getConditionResult(
1274 
1275  myCoutStream << "\n Result for condition " << m_condName
1276  << " in algorithm " << m_nameAlgTechTrig << ": " << result
1277  << std::endl;
1278 
1279  // print all the stuff if at LogDebug level
1280  LogDebug("L1GtAnalyzer")
1281  << "Test gtObjectMapRecord in L1GlobalTrigger \n\n"
1282  << myCoutStream.str() << "\n\n" << std::endl;
1283  myCoutStream.str("");
1284  myCoutStream.clear();
1285 
1286 }
1287 
1288 // analyze: usage of L1GtTriggerMenuLite
1290  const edm::EventSetup& evSetup) {
1291 
1292  LogDebug("L1GtAnalyzer")
1293  << "\n**** L1GtAnalyzer::analyzeL1GtTriggerMenuLite ****\n"
1294  << std::endl;
1295 
1296  // define an output stream to print into
1297  // it can then be directed to whatever log level is desired
1298  std::ostringstream myCoutStream;
1299 
1300  // get Run Data - the same code can be run in beginRun, with getByLabel from edm::Run
1301  const edm::Run& iRun = iEvent.getRun();
1302 
1303 
1304  // get L1GtTriggerMenuLite
1305  edm::Handle<L1GtTriggerMenuLite> triggerMenuLite;
1306  iRun.getByLabel(m_l1GtTmLInputTag, triggerMenuLite);
1307 
1308  if (!triggerMenuLite.isValid()) {
1309 
1310  LogDebug("L1GtAnalyzer") << "\nL1GtTriggerMenuLite with \n "
1312  << "\nrequested in configuration, but not found in the event."
1313  << "\nExit the method.\n" << std::endl;
1314 
1315  return;
1316  }
1317 
1318  // print via supplied "print" function
1319  myCoutStream << (*triggerMenuLite);
1320 
1321  // test the individual methods
1322 
1323  const std::string& triggerMenuInterface =
1324  triggerMenuLite->gtTriggerMenuInterface();
1325  const std::string& triggerMenuName = triggerMenuLite->gtTriggerMenuName();
1326  const std::string& triggerMenuImplementation =
1327  triggerMenuLite->gtTriggerMenuImplementation();
1328  const std::string& scaleDbKey = triggerMenuLite->gtScaleDbKey();
1329 
1330  const L1GtTriggerMenuLite::L1TriggerMap& algorithmMap = triggerMenuLite->gtAlgorithmMap();
1331  const L1GtTriggerMenuLite::L1TriggerMap& algorithmAliasMap =
1332  triggerMenuLite->gtAlgorithmAliasMap();
1333  const L1GtTriggerMenuLite::L1TriggerMap& technicalTriggerMap =
1334  triggerMenuLite->gtTechnicalTriggerMap();
1335 
1336  const std::vector<unsigned int>& triggerMaskAlgoTrig =
1337  triggerMenuLite->gtTriggerMaskAlgoTrig();
1338  const std::vector<unsigned int>& triggerMaskTechTrig =
1339  triggerMenuLite->gtTriggerMaskTechTrig();
1340 
1341  const std::vector<std::vector<int> >& prescaleFactorsAlgoTrig =
1342  triggerMenuLite->gtPrescaleFactorsAlgoTrig();
1343  const std::vector<std::vector<int> >& prescaleFactorsTechTrig =
1344  triggerMenuLite->gtPrescaleFactorsTechTrig();
1345 
1346  // print in the same format as in L1GtTriggerMenuLite definition
1347 
1348  size_t nrDefinedAlgo = algorithmMap.size();
1349  size_t nrDefinedTech = technicalTriggerMap.size();
1350 
1351  // header for printing algorithms
1352 
1353  myCoutStream << "\n ********** L1 Trigger Menu - printing ********** \n"
1354  << "\nL1 Trigger Menu Interface: " << triggerMenuInterface
1355  << "\nL1 Trigger Menu Name: " << triggerMenuName
1356  << "\nL1 Trigger Menu Implementation: " << triggerMenuImplementation
1357  << "\nAssociated Scale DB Key: " << scaleDbKey << "\n\n"
1358  << "\nL1 Physics Algorithms: " << nrDefinedAlgo << " algorithms defined." << "\n\n"
1359  << "Bit Number "
1360  << std::right << std::setw(35) << "Algorithm Name" << " "
1361  << std::right << std::setw(35) << "Algorithm Alias" << " "
1362  << std::right << std::setw(12) << "Trigger Mask";
1363  for (unsigned iSet = 0; iSet < prescaleFactorsAlgoTrig.size(); iSet++) {
1364  myCoutStream << std::right << std::setw(10) << "PF Set "
1365  << std::right << std::setw(2) << iSet;
1366  }
1367 
1368  myCoutStream << std::endl;
1369 
1370 
1371  for (L1GtTriggerMenuLite::CItL1Trig itTrig = algorithmMap.begin(); itTrig
1372  != algorithmMap.end(); itTrig++) {
1373 
1374  const unsigned int bitNumber = itTrig->first;
1375  const std::string& aName = itTrig->second;
1376 
1377  std::string aAlias;
1378  L1GtTriggerMenuLite::CItL1Trig itAlias = algorithmAliasMap.find(bitNumber);
1379  if (itAlias != algorithmAliasMap.end()) {
1380  aAlias = itAlias->second;
1381  }
1382 
1383  myCoutStream << std::setw(6) << bitNumber << " "
1384  << std::right << std::setw(35) << aName << " "
1385  << std::right << std::setw(35) << aAlias << " "
1386  << std::right << std::setw(12) << triggerMaskAlgoTrig[bitNumber];
1387  for (unsigned iSet = 0; iSet < prescaleFactorsAlgoTrig.size(); iSet++) {
1388  myCoutStream << std::right << std::setw(12) << prescaleFactorsAlgoTrig[iSet][bitNumber];
1389  }
1390 
1391  myCoutStream << std::endl;
1392  }
1393 
1394  myCoutStream << "\nL1 Technical Triggers: " << nrDefinedTech
1395  << " technical triggers defined." << "\n\n" << std::endl;
1396  if (nrDefinedTech) {
1397  myCoutStream
1398  << std::right << std::setw(6) << "Bit Number "
1399  << std::right << std::setw(45) << " Technical trigger name " << " "
1400  << std::right << std::setw(12) << "Trigger Mask";
1401  for (unsigned iSet = 0; iSet < prescaleFactorsTechTrig.size(); iSet++) {
1402  myCoutStream << std::right << std::setw(10) << "PF Set "
1403  << std::right << std::setw(2) << iSet;
1404  }
1405 
1406  myCoutStream << std::endl;
1407  }
1408 
1409  for (L1GtTriggerMenuLite::CItL1Trig itTrig = technicalTriggerMap.begin(); itTrig
1410  != technicalTriggerMap.end(); itTrig++) {
1411 
1412  unsigned int bitNumber = itTrig->first;
1413  std::string aName = itTrig->second;
1414 
1415  myCoutStream << std::setw(6) << bitNumber << " "
1416  << std::right << std::setw(45) << aName
1417  << std::right << std::setw(12) << triggerMaskTechTrig[bitNumber];
1418  for (unsigned iSet = 0; iSet < prescaleFactorsTechTrig.size(); iSet++) {
1419  myCoutStream << std::right << std::setw(12) << prescaleFactorsTechTrig[iSet][bitNumber];
1420  }
1421 
1422  myCoutStream << std::endl;
1423 
1424  }
1425 
1426  // individual methods
1427 
1428  int errorCode = -1;
1429  const std::string* algorithmAlias = triggerMenuLite->gtAlgorithmAlias(
1430  m_bitNumber, errorCode);
1431  if (errorCode) {
1432  myCoutStream
1433  << "\nError code retrieving alias for algorithm with bit number "
1434  << m_bitNumber << ": " << errorCode << std::endl;
1435  } else {
1436  myCoutStream << "\nAlias for algorithm with bit number " << m_bitNumber
1437  << ": " << (*algorithmAlias) << std::endl;
1438  }
1439 
1440  errorCode = -1;
1441  const std::string* algorithmName = triggerMenuLite->gtAlgorithmName(
1442  m_bitNumber, errorCode);
1443  if (errorCode) {
1444  myCoutStream
1445  << "\nError code retrieving name for algorithm with bit number "
1446  << m_bitNumber << ": " << errorCode << std::endl;
1447  } else {
1448  myCoutStream << "\nName for algorithm with bit number " << m_bitNumber
1449  << ": " << (*algorithmName) << std::endl;
1450  }
1451 
1452  errorCode = -1;
1453  const std::string* techTrigName = triggerMenuLite->gtTechTrigName(
1454  m_bitNumber, errorCode);
1455  if (errorCode) {
1456  myCoutStream
1457  << "\nError code retrieving name for technical trigger with bit number "
1458  << m_bitNumber << ": " << errorCode << std::endl;
1459  } else {
1460  myCoutStream << "\nName for technical trigger with bit number "
1461  << m_bitNumber << ": " << (*techTrigName) << std::endl;
1462  }
1463 
1464  errorCode = -1;
1465  const unsigned int bitNumber = triggerMenuLite->gtBitNumber(
1466  m_nameAlgTechTrig, errorCode);
1467  if (errorCode) {
1468  myCoutStream
1469  << "\nError code retrieving bit number for algorithm/technical trigger "
1470  << m_nameAlgTechTrig << ": " << errorCode << std::endl;
1471  } else {
1472  myCoutStream << "\nBit number for algorithm/technical trigger "
1473  << m_nameAlgTechTrig << ": " << bitNumber << std::endl;
1474  }
1475 
1476  // not tested
1477  //errorCode = -1;
1478  //const bool triggerMenuLite->gtTriggerResult( m_nameAlgTechTrig,
1479  // const std::vector<bool>& decWord, errorCode);
1480 
1481 
1482  LogDebug("L1GtAnalyzer") << myCoutStream.str() << std::endl;
1483 
1484  myCoutStream.str("");
1485  myCoutStream.clear();
1486 
1487 }
1488 
1489 // analyze: usage of ConditionsInEdm
1491  const edm::EventSetup& evSetup) {
1492 
1493  LogDebug("L1GtAnalyzer")
1494  << "\n**** L1GtAnalyzer::analyzeConditionsInRunBlock ****\n"
1495  << std::endl;
1496 
1497  // define an output stream to print into
1498  // it can then be directed to whatever log level is desired
1499  std::ostringstream myCoutStream;
1500 
1501  // get ConditionsInRunBlock
1503  iRun.getByLabel(m_condInEdmInputTag, condInRunBlock);
1504 
1505  if (!condInRunBlock.isValid()) {
1506 
1507  LogDebug("L1GtAnalyzer") << "\nConditionsInRunBlock with \n "
1509  << "\nrequested in configuration, but not found in the event."
1510  << "\nExit the method.\n" << std::endl;
1511 
1512  return;
1513  }
1514 
1515  const boost::uint16_t beamModeVal = condInRunBlock->beamMode;
1516  const boost::uint16_t beamMomentumVal = condInRunBlock->beamMomentum;
1517  const boost::uint32_t lhcFillNumberVal = condInRunBlock->lhcFillNumber;
1518 
1519  // print via supplied "print" function
1520  myCoutStream << "\nLHC quantities in run " << iRun.run()
1521  << "\n Beam Mode = " << beamModeVal
1522  << "\n Beam Momentum = " << beamMomentumVal << " GeV"
1523  << "\n LHC Fill Number = " << lhcFillNumberVal
1524  << std::endl;
1525 
1526  LogDebug("L1GtAnalyzer") << myCoutStream.str() << std::endl;
1527 
1528  myCoutStream.str("");
1529  myCoutStream.clear();
1530 
1531 }
1532 
1533 
1535  const edm::LuminosityBlock& iLumi, const edm::EventSetup& evSetup) {
1536  LogDebug("L1GtAnalyzer")
1537  << "\n**** L1GtAnalyzer::analyzeConditionsInLumiBlock ****\n"
1538  << std::endl;
1539 
1540  // define an output stream to print into
1541  // it can then be directed to whatever log level is desired
1542  std::ostringstream myCoutStream;
1543 
1544  // get ConditionsInLumiBlock
1546  iLumi.getByLabel(m_condInEdmInputTag, condInLumiBlock);
1547 
1548  if (!condInLumiBlock.isValid()) {
1549 
1550  LogDebug("L1GtAnalyzer") << "\nConditionsInLumiBlock with \n "
1552  << "\nrequested in configuration, but not found in the event."
1553  << "\nExit the method.\n" << std::endl;
1554 
1555  return;
1556  }
1557 
1558  const boost::uint32_t totalIntensityBeam1Val =
1559  condInLumiBlock->totalIntensityBeam1;
1560  const boost::uint32_t totalIntensityBeam2Val =
1561  condInLumiBlock->totalIntensityBeam2;
1562 
1563  myCoutStream << "\nLHC quantities in luminosity section "
1564 
1565  << iLumi.luminosityBlock() << " from run " << iLumi.run()
1566  << "\n Total Intensity Beam 1 (Integer × 10E10 charges) = "
1567  << totalIntensityBeam1Val
1568  << "\n Total Intensity Beam 2 (Integer × 10E10 charges) = "
1569  << totalIntensityBeam2Val << std::endl;
1570 
1571  LogDebug("L1GtAnalyzer") << myCoutStream.str() << std::endl;
1572 
1573  myCoutStream.str("");
1574  myCoutStream.clear();
1575 
1576 }
1577 
1579  const edm::EventSetup& evSetup) {
1580  // define an output stream to print into
1581  // it can then be directed to whatever log level is desired
1582  std::ostringstream myCoutStream;
1583 
1584  // get ConditionsInEventBlock
1586  iEvent.getByLabel(m_condInEdmInputTag, condInEventBlock);
1587 
1588  if (!condInEventBlock.isValid()) {
1589 
1590  LogDebug("L1GtAnalyzer") << "\nConditionsInEventBlock with \n "
1592  << "\nrequested in configuration, but not found in the event."
1593  << "\nExit the method.\n" << std::endl;
1594 
1595  return;
1596  }
1597 
1598  const boost::uint16_t bstMasterStatusVal =
1599  condInEventBlock->bstMasterStatus;
1600  const boost::uint32_t turnCountNumberVal =
1601  condInEventBlock->turnCountNumber;
1602 
1603  myCoutStream << "\nLHC quantities in event " << iEvent.id().event()
1604  << " from luminosity section " << iEvent.luminosityBlock()
1605  << " from run " << iEvent.run() << "\n BST Master Status = "
1606  << bstMasterStatusVal << "\n Turn count number = "
1607  << turnCountNumberVal << std::endl;
1608 
1609  LogDebug("L1GtAnalyzer") << myCoutStream.str() << std::endl;
1610 
1611  myCoutStream.str("");
1612  myCoutStream.clear();
1613 
1614 }
1615 
1616 // analyze each event: event loop
1618  const edm::EventSetup& evSetup) {
1619 
1620  // analyze: usage of ConditionsInEdm
1621  analyzeConditionsInEventBlock(iEvent, evSetup);
1622 
1623  // analyze: decision and decision word
1624  // bunch cross in event BxInEvent = 0 - L1Accept event
1625  analyzeDecisionReadoutRecord(iEvent, evSetup);
1626 
1627  // analyze: decision for a given algorithm via trigger menu
1628  analyzeDecisionLiteRecord(iEvent, evSetup);
1629 
1630  // analyze: decision for a given algorithm using L1GtUtils functions
1631  // for tests, use only one of the following methods
1632 
1633  switch (m_l1GtUtilsConfiguration) {
1634  case 0: {
1635  analyzeL1GtUtilsMenuLite(iEvent, evSetup);
1636 
1637  }
1638  break;
1639  case 100000: {
1640  analyzeL1GtUtils(iEvent, evSetup);
1641 
1642  }
1643  break;
1644  case 200000: {
1645  analyzeL1GtUtilsEventSetup(iEvent, evSetup);
1646 
1647  }
1648  break;
1649  default: {
1650  // do nothing
1651  }
1652  break;
1653  }
1654 
1655 
1656  // analyze: object map product
1657  analyzeObjectMap(iEvent, evSetup);
1658 
1659  // analyze: L1GtTriggerMenuLite
1660  analyzeL1GtTriggerMenuLite(iEvent, evSetup);
1661 
1662 }
1663 
1664 // end section
1666  const edm::EventSetup& evSetup) {
1667 
1668  // empty
1669 
1670 }
1671 void L1GtAnalyzer::endRun(const edm::Run& iRun, const edm::EventSetup& evSetup) {
1672 
1673  // empty
1674 
1675 }
1676 
1677 // method called once each job just after ending the event loop
1679 
1680  // empty
1681 
1682 }
1683 
#define LogDebug(id)
virtual void analyzeObjectMap(const edm::Event &, const edm::EventSetup &)
analyze: object map product
EventNumber_t event() const
Definition: EventID.h:44
bool getByLabel(std::string const &label, Handle< PROD > &result) const
Definition: Run.h:174
const bool decisionAfterMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision after trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1147
void analyzeDecisionLiteRecord(const edm::Event &, const edm::EventSetup &)
analyze: decision for a given algorithm via trigger menu
edm::InputTag m_l1GmtInputTag
input tag for muon collection from GMT
Definition: L1GtAnalyzer.h:104
RunNumber_t run() const
Definition: RunBase.h:44
virtual void analyzeDecisionReadoutRecord(const edm::Event &, const edm::EventSetup &)
edm::InputTag m_condInEdmInputTag
input tag for ConditionInEdm products
Definition: L1GtAnalyzer.h:110
edm::InputTag m_l1GtRecordInputTag
input tags for GT lite product
Definition: L1GtAnalyzer.h:98
TriggerCategory
Definition: L1GtUtils.h:59
virtual void endJob()
end of job
const bool availableL1Configuration(int &errorCode, int &l1ConfCode) const
Definition: L1GtUtils.cc:2235
virtual void analyze(const edm::Event &, const edm::EventSetup &)
analyze each event: event loop over various code snippets
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
Run const & getRun() const
Definition: Event.cc:44
const std::vector< unsigned int > & triggerMaskSet(const TriggerCategory &trigCategory, int &errorCode)
Definition: L1GtUtils.cc:1972
const std::string & l1TriggerMenu() const
return the L1 trigger menu name
Definition: L1GtUtils.cc:2120
virtual void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
end section
bool getByLabel(std::string const &label, Handle< PROD > &result) const
const bool decisionBeforeMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return decision before trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1110
void analyzeConditionsInEventBlock(const edm::Event &, const edm::EventSetup &)
to be used in analyze/produce/filter
std::map< unsigned int, std::string > L1TriggerMap
map containing the physics algorithms or the technical triggers
LuminosityBlockNumber_t luminosityBlock() const
void analyzeConditionsInRunBlock(const edm::Run &, const edm::EventSetup &)
void analyzeL1GtUtils(const edm::Event &, const edm::EventSetup &)
std::string m_nameAlgTechTrig
a physics algorithm (name or alias) or a technical trigger name
Definition: L1GtAnalyzer.h:113
virtual void endRun(const edm::Run &, const edm::EventSetup &)
int iEvent
Definition: GenABIO.cc:243
std::string m_condName
a condition in the physics algorithm to test the object maps
Definition: L1GtAnalyzer.h:116
const bool decision(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
Definition: L1GtUtils.cc:1184
void analyzeL1GtTriggerMenuLite(const edm::Event &, const edm::EventSetup &)
analyze: usage of L1GtTriggerMenuLite
const std::string & l1TriggerMenuImplementation() const
return the L1 trigger menu implementation
Definition: L1GtUtils.cc:2145
edm::InputTag m_l1GtObjectMapTag
input tags for GT object map collection
Definition: L1GtAnalyzer.h:101
std::vector< bool > DecisionWord
typedefs
dictionary comb
const bool gtAlgorithmResult(const std::string &algName, const std::vector< bool > &decWord) const
tuple result
Definition: query.py:137
const std::vector< int > & prescaleFactorSet(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const TriggerCategory &trigCategory, int &errorCode)
Definition: L1GtUtils.cc:1800
RunNumber_t run() const
Definition: Event.h:66
RunNumber_t run() const
void retrieveL1EventSetup(const edm::EventSetup &)
retrieve all the relevant L1 trigger event setup records and cache them to improve the speed ...
Definition: L1GtUtils.cc:107
unsigned int m_bitNumber
a bit number to retrieve the name and the alias
Definition: L1GtAnalyzer.h:119
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
L1GtUtils m_l1GtUtils
Definition: L1GtAnalyzer.h:130
L1TriggerMap::const_iterator CItL1Trig
iterators through map containing the physics algorithms or the technical triggers ...
void analyzeConditionsInLumiBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
to be used in beginLuminosityBlock
void retrieveL1GtTriggerMenuLite(const edm::Event &, edm::InputTag &)
Definition: L1GtUtils.cc:283
virtual void beginJob()
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
unsigned int m_l1GtUtilsConfiguration
L1 configuration code for L1GtUtils.
Definition: L1GtAnalyzer.h:122
edm::InputTag m_l1GtDaqReadoutRecordInputTag
input tags for GT DAQ product
Definition: L1GtAnalyzer.h:95
L1GtAnalyzer(const edm::ParameterSet &)
Definition: L1GtAnalyzer.cc:56
edm::EventID id() const
Definition: EventBase.h:56
const int prescaleFactorSetIndex(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const TriggerCategory &trigCategory, int &errorCode) const
Definition: L1GtUtils.cc:1496
const int triggerMask(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return trigger mask for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1256
bool m_l1GtTmLInputTagProv
Definition: L1GtAnalyzer.h:126
void analyzeL1GtUtilsEventSetup(const edm::Event &, const edm::EventSetup &)
const int prescaleFactor(const edm::Event &iEvent, const edm::InputTag &l1GtRecordInputTag, const edm::InputTag &l1GtReadoutRecordInputTag, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger
Definition: L1GtUtils.cc:1221
std::vector< SingleCombInCond > CombinationsInCond
all the object combinations evaluated to true in the condition
virtual void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
Definition: Run.h:31
void analyzeL1GtUtilsMenuLite(const edm::Event &, const edm::EventSetup &)
for tests, use only one of the following methods
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
edm::InputTag m_l1GtTmLInputTag
input tag for L1GtTriggerMenuLite
Definition: L1GtAnalyzer.h:107
void analyzeL1GtUtilsCore(const edm::Event &, const edm::EventSetup &)
analyze: usage of L1GtUtils