CMS 3D CMS Logo

L1TGlobalUtil.cc
Go to the documentation of this file.
1 // L1TGlobalUtil
2 //
3 // author: Brian Winer Ohio State
4 //
5 
7 
8 #include <iostream>
9 #include <fstream>
10 
16 
19 
20 // constructor
21 l1t::L1TGlobalUtil::L1TGlobalUtil() : m_l1GtMenu(nullptr) {
22  // initialize cached IDs
23  m_l1GtMenuCacheID = 0ULL;
24  m_l1GtPfAlgoCacheID = 0ULL;
25  m_filledPrescales = false;
26 
27  edm::FileInPath f1("L1Trigger/L1TGlobal/data/Luminosity/startup/prescale_L1TGlobal.csv");
28  m_preScaleFileName = f1.fullPath();
29  m_numberPhysTriggers = 512; //need to get this out of the EventSetup
30  m_PreScaleColumn = 0;
32 
33  m_prescaleFactorsAlgoTrig = nullptr;
34  m_triggerMaskAlgoTrig = nullptr;
35 }
36 
39  UseEventSetupIn useEventSetupIn)
40  : L1TGlobalUtil(pset, iC, useEventSetupIn) {}
41 
44  UseEventSetupIn useEventSetupIn)
45  : L1TGlobalUtil() {
47  m_readPrescalesFromFile = m_l1tGlobalUtilHelper->readPrescalesFromFile();
48  eventSetupConsumes(iC, useEventSetupIn);
49 }
50 
51 // destructor
53  // empty
54 }
55 
57 bool l1t::L1TGlobalUtil::valid() const { return m_l1GtMenuCacheID != 0ULL and m_l1GtMenu != nullptr; }
58 
60  edm::FileInPath f1("L1Trigger/L1TGlobal/data/Luminosity/startup/" + filename);
61  m_preScaleFileName = f1.fullPath();
62  m_PreScaleColumn = psColumn;
63 }
64 
66  // typically, the L1T menu and prescale table (may change only between Runs)
67  bool isRun = false;
68  retrieveL1Setup(evSetup, isRun);
69  // typically the prescale set index used and the event by event accept/reject info (changes between Events)
70  retrieveL1Event(iEvent, evSetup);
71 }
72 
74  const edm::EventSetup& evSetup,
75  edm::EDGetToken gtAlgToken) {
76  // typically, the L1T menu and prescale table (may change only between Runs)
77  bool isRun = false;
78  retrieveL1Setup(evSetup, isRun);
79  // typically the prescale set index used and the event by event accept/reject info (changes between Events)
80  retrieveL1Event(iEvent, evSetup, gtAlgToken);
81 }
82 
84  bool isRun = true;
85  retrieveL1Setup(evSetup, isRun);
86 }
87 
88 void l1t::L1TGlobalUtil::retrieveL1Setup(const edm::EventSetup& evSetup, bool isRun) {
89  // get / update the trigger menu from the EventSetup
90  // local cache & check on cacheIdentifier
91  auto menuRcd = evSetup.get<L1TUtmTriggerMenuRcd>();
92  unsigned long long l1GtMenuCacheID = menuRcd.cacheIdentifier();
93 
94  if (m_l1GtMenuCacheID != l1GtMenuCacheID) {
95  if (isRun) {
96  m_l1GtMenu = &menuRcd.get(m_L1TUtmTriggerMenuRunToken);
97  } else {
98  m_l1GtMenu = &menuRcd.get(m_L1TUtmTriggerMenuEventToken);
99  }
100 
101  //std::cout << "Attempting to fill the map " << std::endl;
102  m_algorithmMap = &(m_l1GtMenu->getAlgorithmMap());
103 
104  //reset vectors since we have new menu
105  resetDecisionVectors();
106 
107  m_l1GtMenuCacheID = l1GtMenuCacheID;
108  }
109 
110  if (!m_readPrescalesFromFile) {
111  auto vetosRcd = evSetup.get<L1TGlobalPrescalesVetosRcd>();
112  unsigned long long l1GtPfAlgoCacheID = vetosRcd.cacheIdentifier();
113 
114  if (m_l1GtPfAlgoCacheID != l1GtPfAlgoCacheID) {
115  //std::cout << "Reading Prescales and Masks from dB" << std::endl;
116 
117  // clear and dimension
118  resetPrescaleVectors();
119  resetMaskVectors();
120  m_PreScaleColumn = 0;
121  m_numberOfPreScaleColumns = 0;
122  m_numberPhysTriggers = 0;
123 
124  const L1TGlobalPrescalesVetos* es = nullptr;
125  if (isRun) {
126  es = &vetosRcd.get(m_L1TGlobalPrescalesVetosRunToken);
127  } else {
128  es = &vetosRcd.get(m_L1TGlobalPrescalesVetosEventToken);
129  }
130  m_l1GtPrescalesVetoes = PrescalesVetosHelper::readFromEventSetup(es);
131 
132  m_prescaleFactorsAlgoTrig = &(m_l1GtPrescalesVetoes->prescaleTable());
133  m_numberOfPreScaleColumns = m_prescaleFactorsAlgoTrig->size();
134  m_numberPhysTriggers =
135  (*m_prescaleFactorsAlgoTrig)[0].size(); // assumes all prescale columns are the same length
136 
137  m_triggerMaskAlgoTrig = &(m_l1GtPrescalesVetoes->triggerAlgoBxMask());
138 
139  m_l1GtPfAlgoCacheID = l1GtPfAlgoCacheID;
140  }
141  } else {
142  //Load the prescales from external file
143  // clear and dimension
144  if (!m_filledPrescales) {
145  resetPrescaleVectors();
146  resetMaskVectors();
147 
148  loadPrescalesAndMasks();
149 
150  // Set Prescale factors to initial
151  m_prescaleFactorsAlgoTrig = &m_initialPrescaleFactorsAlgoTrig;
152  m_triggerMaskAlgoTrig = &m_initialTriggerMaskAlgoTrig;
153  m_filledPrescales = true;
154  }
155  }
156 
157  //Protect against poor prescale column choice (I don't think there is a way this happen as currently structured)
158  if (m_PreScaleColumn > m_prescaleFactorsAlgoTrig->size()) {
159  LogTrace("l1t|Global") << "\nNo Prescale Set: " << m_PreScaleColumn
160  << "\nMax Prescale Set value : " << m_prescaleFactorsAlgoTrig->size()
161  << "\nSetting prescale column to 0" << std::endl;
162  m_PreScaleColumn = 0;
163  }
164  //std::cout << "Using prescale column: " << m_PreScaleColumn << std::endl;
165  const std::vector<int>& prescaleSet = (*m_prescaleFactorsAlgoTrig)[m_PreScaleColumn];
166 
167  for (std::map<std::string, L1TUtmAlgorithm>::const_iterator itAlgo = m_algorithmMap->begin();
168  itAlgo != m_algorithmMap->end();
169  itAlgo++) {
170  // Get the algorithm name
171  std::string algName = itAlgo->first;
172  int algBit = (itAlgo->second).getIndex(); //algoBitNumber();
173 
174  (m_prescales[algBit]).first = algName;
175  if (size_t(algBit) < prescaleSet.size()) {
176  (m_prescales[algBit]).second = prescaleSet[algBit];
177  }
178  LogDebug("l1t|Global") << "Number of bunch crossings stored: " << (*m_triggerMaskAlgoTrig).size() << endl;
179 
180  const std::map<int, std::vector<int> >* triggerAlgoMaskAlgoTrig = m_triggerMaskAlgoTrig;
181  std::map<int, std::vector<int> >::const_iterator it = triggerAlgoMaskAlgoTrig->begin();
182 
183  std::vector<int> maskedBxs;
184  (m_masks[algBit]).first = algName;
185  (m_masks[algBit]).second = maskedBxs;
186  while (it != triggerAlgoMaskAlgoTrig->end()) {
187  std::vector<int> masks = it->second;
188  //std::cout<< "BX: " << it->first<<" VecSize: "<< masks.size();
189  //std::cout << "\tMasked algos: ";
190  for (unsigned int imask = 0; imask < masks.size(); imask++) {
191  if (masks.at(imask) == algBit)
192  maskedBxs.push_back(it->first);
193  // std::cout << "\t" << masks.at(imask);
194  }
195  //std::cout << "\n";
196  it++;
197  }
198 
199  if (!maskedBxs.empty()) {
200  LogDebug("l1t|Global") << "i Algo: " << algBit << "\t" << algName << " masked\n";
201  for (unsigned int ibx = 0; ibx < maskedBxs.size(); ibx++) {
202  // std::cout << "\t" << maskedBxs.at(ibx);
203  (m_masks[algBit]).second = maskedBxs;
204  }
205  }
206  }
207 }
208 
210  retrieveL1Event(iEvent, evSetup, m_l1tGlobalUtilHelper->l1tAlgBlkToken());
211 }
212 
214  const edm::EventSetup& evSetup,
215  edm::EDGetToken gtAlgToken) {
216  // Get the Global Trigger Output Algorithm block
217  iEvent.getByToken(gtAlgToken, m_uGtAlgBlk);
218  m_finalOR = false;
219 
220  //Make sure we have a valid AlgBlk
221  if (m_uGtAlgBlk.isValid()) {
222  // get the GlabalAlgBlk (Stupid find better way) of BX=0
223  std::vector<GlobalAlgBlk>::const_iterator algBlk = m_uGtAlgBlk->begin(0);
224  if (algBlk != m_uGtAlgBlk->end(0)) {
225  if (!m_readPrescalesFromFile) {
226  m_PreScaleColumn = static_cast<unsigned int>(algBlk->getPreScColumn());
227 
228  // Fix for MC prescale column being set to index+1 in early versions of uGT emulator
229  if (iEvent.run() == 1) {
230  if (m_prescaleFactorsAlgoTrig->size() == 1 && m_PreScaleColumn == 1)
231  m_PreScaleColumn = 0;
232  }
233 
234  // add protection against out-of-bound index for prescale column
235  if (m_PreScaleColumn >= m_prescaleFactorsAlgoTrig->size()) {
236  LogDebug("l1t|Global") << "Prescale column extracted from GlobalAlgBlk too large: " << m_PreScaleColumn
237  << "\tMaximum value allowed: " << m_prescaleFactorsAlgoTrig->size() - 1
238  << "\tResetting prescale column to 0" << std::endl;
239  m_PreScaleColumn = 0;
240  }
241  }
242  const std::vector<int>& prescaleSet = (*m_prescaleFactorsAlgoTrig)[m_PreScaleColumn];
243 
244  // Grab the final OR from the AlgBlk,
245  m_finalOR = algBlk->getFinalOR();
246 
247  // Make a map of the trigger name and whether it passed various stages (initial,prescale,final)
248  // Note: might be able to improve performance by not full remaking map with names each time
249  for (std::map<std::string, L1TUtmAlgorithm>::const_iterator itAlgo = m_algorithmMap->begin();
250  itAlgo != m_algorithmMap->end();
251  itAlgo++) {
252  // Get the algorithm name
253  std::string algName = itAlgo->first;
254  int algBit = (itAlgo->second).getIndex(); //algoBitNumber();
255 
256  bool decisionInitial = algBlk->getAlgoDecisionInitial(algBit);
257  (m_decisionsInitial[algBit]).first = algName;
258  (m_decisionsInitial[algBit]).second = decisionInitial;
259 
260  bool decisionInterm = algBlk->getAlgoDecisionInterm(algBit);
261  (m_decisionsInterm[algBit]).first = algName;
262  (m_decisionsInterm[algBit]).second = decisionInterm;
263 
264  bool decisionFinal = algBlk->getAlgoDecisionFinal(algBit);
265  (m_decisionsFinal[algBit]).first = algName;
266  (m_decisionsFinal[algBit]).second = decisionFinal;
267 
268  (m_prescales[algBit]).first = algName;
269  if (size_t(algBit) < prescaleSet.size()) {
270  (m_prescales[algBit]).second = prescaleSet[algBit];
271  }
272  }
273  } else {
274  //cout << "Error empty AlgBlk recovered.\n";
275  }
276  } else {
277  //cout<< "Error no valid uGT Algorithm Data with Token provided " << endl;
278  }
279 }
280 
282  std::ifstream inputPrescaleFile;
283  //std::cout << "Reading prescales from file: " << m_preScaleFileName << std::endl;
284  inputPrescaleFile.open(m_preScaleFileName);
285 
286  std::vector<std::vector<int> > vec;
287  std::vector<std::vector<int> > prescale_vec;
288 
289  if (inputPrescaleFile) {
290  std::string prefix1("#");
291  std::string prefix2("-1");
292 
294 
295  bool first = true;
296 
297  while (getline(inputPrescaleFile, line)) {
298  if (!line.compare(0, prefix1.size(), prefix1))
299  continue;
300  //if( !line.compare(0, prefix2.size(), prefix2) ) continue;
301 
302  istringstream split(line);
303  int value;
304  int col = 0;
305  char sep;
306 
307  while (split >> value) {
308  if (first) {
309  // Each new value read on line 1 should create a new inner vector
310  vec.push_back(std::vector<int>());
311  }
312 
313  vec[col].push_back(value);
314  ++col;
315 
316  // read past the separator
317  split >> sep;
318  }
319 
320  // Finished reading line 1 and creating as many inner
321  // vectors as required
322  first = false;
323  }
324 
325  int NumPrescaleSets = 0;
326  for (int iCol = 0; iCol < int(vec.size()); iCol++) {
327  if (!vec[iCol].empty()) {
328  int firstRow = vec[iCol][0];
329 
330  if (firstRow >= 0)
331  NumPrescaleSets++;
332  //else if( firstRow==-2 ) maskColumn = iCol;
333  //else if( firstRow==-3 ) maskVetoColumn = iCol;
334  }
335  }
336 
337  //std::cout << "NumPrescaleSets= " << NumPrescaleSets << std::endl;
338  if (NumPrescaleSets > 0) {
339  // Fill default prescale set
340  for (int iSet = 0; iSet < NumPrescaleSets; iSet++) {
341  prescale_vec.push_back(std::vector<int>());
342  for (unsigned int iBit = 0; iBit < m_numberPhysTriggers; ++iBit) {
343  int inputDefaultPrescale = 1;
344  prescale_vec[iSet].push_back(inputDefaultPrescale);
345  }
346  }
347 
348  // Fill non-trivial prescale set
349  for (int iBit = 1; iBit < int(vec[0].size()); iBit++) {
350  unsigned int algoBit = vec[0][iBit];
351  // algoBit must be less than the number of triggers
352  if (algoBit < m_numberPhysTriggers) {
353  for (int iSet = 0; iSet < int(vec.size()); iSet++) {
354  int useSet = -1;
355  if (!vec[iSet].empty()) {
356  useSet = vec[iSet][0];
357  }
358  useSet -= 1;
359 
360  if (useSet < 0)
361  continue;
362 
363  int prescale = vec[iSet][iBit];
364  prescale_vec[useSet][algoBit] = prescale;
365  }
366  } else {
367  LogTrace("l1t|Global") << "\nPrescale file has algo bit: " << algoBit
368  << "\nThis is larger than the number of triggers: " << m_numberPhysTriggers
369  << "\nSomething is wrong. Ignoring." << std::endl;
370  }
371  }
372  }
373 
374  } else {
375  LogTrace("l1t|Global") << "\nCould not find file: " << m_preScaleFileName
376  << "\nFilling the prescale vectors with prescale 1"
377  << "\nSetting prescale set to 0" << std::endl;
378 
379  m_PreScaleColumn = 0;
380 
381  for (int col = 0; col < 1; col++) {
382  prescale_vec.push_back(std::vector<int>());
383  for (unsigned int iBit = 0; iBit < m_numberPhysTriggers; ++iBit) {
384  int inputDefaultPrescale = 0;
385  prescale_vec[col].push_back(inputDefaultPrescale);
386  }
387  }
388  }
389 
390  inputPrescaleFile.close();
391 
392  m_initialPrescaleFactorsAlgoTrig = prescale_vec;
393  // setting of bx masks from an input file not enabled; do not see a use case at the moment
394  std::map<int, std::vector<int> > m_initialTriggerMaskAlgoTrig;
395 }
396 
398  if (useEventSetupIn == UseEventSetupIn::Run || useEventSetupIn == UseEventSetupIn::RunAndEvent) {
399  m_L1TUtmTriggerMenuRunToken = iC.esConsumes<L1TUtmTriggerMenu, L1TUtmTriggerMenuRcd, edm::Transition::BeginRun>();
400  if (!m_readPrescalesFromFile) {
401  m_L1TGlobalPrescalesVetosRunToken =
403  }
404  }
405  if (useEventSetupIn == UseEventSetupIn::Event || useEventSetupIn == UseEventSetupIn::RunAndEvent) {
406  m_L1TUtmTriggerMenuEventToken = iC.esConsumes<L1TUtmTriggerMenu, L1TUtmTriggerMenuRcd>();
407  if (!m_readPrescalesFromFile) {
408  m_L1TGlobalPrescalesVetosEventToken = iC.esConsumes<L1TGlobalPrescalesVetos, L1TGlobalPrescalesVetosRcd>();
409  }
410  }
411 }
412 
414  // Reset all the vector contents with null information
415  m_decisionsInitial.clear();
416  m_decisionsInitial.resize(m_maxNumberPhysTriggers);
417  m_decisionsInterm.clear();
418  m_decisionsInterm.resize(m_maxNumberPhysTriggers);
419  m_decisionsFinal.clear();
420  m_decisionsFinal.resize(m_maxNumberPhysTriggers);
421 
422  for (unsigned int algBit = 0; algBit < m_maxNumberPhysTriggers; algBit++) {
423  (m_decisionsInitial[algBit]).first = "NULL";
424  (m_decisionsInitial[algBit]).second = false;
425 
426  (m_decisionsInterm[algBit]).first = "NULL";
427  (m_decisionsInterm[algBit]).second = false;
428 
429  (m_decisionsFinal[algBit]).first = "NULL";
430  (m_decisionsFinal[algBit]).second = false;
431  }
432 }
433 
435  // Reset all the vector contents with null information
436  m_prescales.clear();
437  m_prescales.resize(m_maxNumberPhysTriggers);
438 
439  for (unsigned int algBit = 0; algBit < m_maxNumberPhysTriggers; algBit++) {
440  (m_prescales[algBit]).first = "NULL";
441  (m_prescales[algBit]).second = 1;
442  }
443 }
444 
446  // Reset all the vector contents with null information
447  m_masks.clear();
448  m_masks.resize(m_maxNumberPhysTriggers);
449 
450  for (unsigned int algBit = 0; algBit < m_maxNumberPhysTriggers; algBit++) {
451  (m_masks[algBit]).first = "NULL";
452  // ccla (m_masks[algBit]).second = true;
453  }
454 }
455 
456 const bool l1t::L1TGlobalUtil::getAlgBitFromName(const std::string& algName, int& bit) const {
457  std::map<std::string, L1TUtmAlgorithm>::const_iterator itAlgo = m_algorithmMap->find(algName);
458  if (itAlgo != m_algorithmMap->end()) {
459  bit = (itAlgo->second).getIndex(); //algoBitNumber();
460  return true;
461  }
462 
463  return false; //did not find anything by that name
464 }
465 
466 const bool l1t::L1TGlobalUtil::getAlgNameFromBit(int& bit, std::string& algName) const {
467  // since we are just looking up the name, doesn't matter which vector we get it from
468  if ((m_decisionsInitial[bit]).first != "NULL") {
469  algName = (m_decisionsInitial[bit]).first;
470  return true;
471  }
472  return false; //No name associated with this bit
473 }
474 
475 const bool l1t::L1TGlobalUtil::getInitialDecisionByBit(int& bit, bool& decision) const {
476  /*
477  for(std::vector<GlobalAlgBlk>::const_iterator algBlk = m_uGtAlgBlk->begin(0); algBlk != m_uGtAlgBlk->end(0); ++algBlk) {
478  decision = algBlk->getAlgoDecisionFinal(bit);
479  }
480  */
481  // Need some check that this is a valid bit
482  if ((m_decisionsInitial[bit]).first != "NULL") {
483  decision = (m_decisionsInitial[bit]).second;
484  return true;
485  }
486 
487  return false; //couldn't get the information requested.
488 }
489 const bool l1t::L1TGlobalUtil::getIntermDecisionByBit(int& bit, bool& decision) const {
490  // Need some check that this is a valid bit
491  if ((m_decisionsInterm[bit]).first != "NULL") {
492  decision = (m_decisionsInterm[bit]).second;
493  return true;
494  }
495 
496  return false; //couldn't get the information requested.
497 }
498 const bool l1t::L1TGlobalUtil::getFinalDecisionByBit(int& bit, bool& decision) const {
499  // Need some check that this is a valid bit
500  if ((m_decisionsFinal[bit]).first != "NULL") {
501  decision = (m_decisionsFinal[bit]).second;
502  return true;
503  }
504 
505  return false; //couldn't get the information requested.
506 }
507 const bool l1t::L1TGlobalUtil::getPrescaleByBit(int& bit, int& prescale) const {
508  // Need some check that this is a valid bit
509  if ((m_prescales[bit]).first != "NULL") {
510  prescale = (m_prescales[bit]).second;
511  return true;
512  }
513 
514  return false; //couldn't get the information requested.
515 }
516 const bool l1t::L1TGlobalUtil::getMaskByBit(int& bit, std::vector<int>& mask) const {
517  // Need some check that this is a valid bit
518  if ((m_masks[bit]).first != "NULL") {
519  mask = (m_masks[bit]).second;
520  return true;
521  }
522 
523  return false; //couldn't get the information requested.
524 }
525 
526 const bool l1t::L1TGlobalUtil::getInitialDecisionByName(const std::string& algName, bool& decision) const {
527  int bit = -1;
528  if (getAlgBitFromName(algName, bit)) {
529  decision = (m_decisionsInitial[bit]).second;
530  return true;
531  }
532 
533  return false; //trigger name was not the menu.
534 }
535 
536 const bool l1t::L1TGlobalUtil::getIntermDecisionByName(const std::string& algName, bool& decision) const {
537  int bit = -1;
538  if (getAlgBitFromName(algName, bit)) {
539  decision = (m_decisionsInterm[bit]).second;
540  return true;
541  }
542 
543  return false; //trigger name was not the menu.
544 }
545 
546 const bool l1t::L1TGlobalUtil::getFinalDecisionByName(const std::string& algName, bool& decision) const {
547  int bit = -1;
548  if (getAlgBitFromName(algName, bit)) {
549  decision = (m_decisionsFinal[bit]).second;
550  return true;
551  }
552 
553  return false; //trigger name was not the menu.
554 }
555 const bool l1t::L1TGlobalUtil::getPrescaleByName(const std::string& algName, int& prescale) const {
556  int bit = -1;
557  if (getAlgBitFromName(algName, bit)) {
558  prescale = (m_prescales[bit]).second;
559  return true;
560  }
561 
562  return false; //trigger name was not the menu.
563 }
564 const bool l1t::L1TGlobalUtil::getMaskByName(const std::string& algName, std::vector<int>& mask) const {
565  int bit = -1;
566  if (getAlgBitFromName(algName, bit)) {
567  mask = (m_masks[bit]).second;
568  return true;
569  }
570 
571  return false; //trigger name was not the menu.
572 }
l1t::L1TGlobalUtil::OverridePrescalesAndMasks
void OverridePrescalesAndMasks(std::string filename, unsigned int psColumn=1)
Definition: L1TGlobalUtil.cc:59
PrescalesVetos_cff.L1TGlobalPrescalesVetos
L1TGlobalPrescalesVetos
Definition: PrescalesVetos_cff.py:14
L1TGlobalPrescalesVetosRcd
Definition: L1TGlobalPrescalesVetosRcd.h:11
MessageLogger.h
l1t::L1TGlobalUtil::getPrescaleByBit
const bool getPrescaleByBit(int &bit, int &prescale) const
Definition: L1TGlobalUtil.cc:507
l1t::L1TGlobalUtil::m_PreScaleColumn
unsigned int m_PreScaleColumn
Definition: L1TGlobalUtil.h:205
L1TUtmTriggerMenuRcd
Definition: L1TUtmTriggerMenuRcd.h:11
l1t::L1TGlobalUtil::valid
bool valid() const
check that the L1TGlobalUtil has been properly initialised
Definition: L1TGlobalUtil.cc:57
cuy.col
col
Definition: cuy.py:1010
l1t::L1TGlobalUtil::m_prescaleFactorsAlgoTrig
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
Definition: L1TGlobalUtil.h:209
l1t::L1TGlobalUtil::getFinalDecisionByName
const bool getFinalDecisionByName(const std::string &algName, bool &decision) const
Definition: L1TGlobalUtil.cc:546
l1t::UseEventSetupIn::Run
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
l1t::UseEventSetupIn
UseEventSetupIn
Definition: L1TGlobalUtil.h:40
l1t::UseEventSetupIn::Event
l1t::L1TGlobalUtil::retrieveL1Setup
void retrieveL1Setup(const edm::EventSetup &evSetup)
Definition: L1TGlobalUtil.cc:83
l1t::L1TGlobalUtil::eventSetupConsumes
void eventSetupConsumes(edm::ConsumesCollector &iC, UseEventSetupIn useEventSetupIn)
Definition: L1TGlobalUtil.cc:397
cms::dd::split
std::vector< std::string_view > split(std::string_view, const char *)
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:86
l1t::L1TGlobalUtil::m_l1GtMenuCacheID
unsigned long long m_l1GtMenuCacheID
Definition: L1TGlobalUtil.h:185
dqmdumpme.first
first
Definition: dqmdumpme.py:55
L1TUtmTriggerMenu
Definition: L1TUtmTriggerMenu.h:36
l1t::L1TGlobalUtil::loadPrescalesAndMasks
void loadPrescalesAndMasks()
Definition: L1TGlobalUtil.cc:281
l1t::L1TGlobalUtil::getFinalDecisionByBit
const bool getFinalDecisionByBit(int &bit, bool &decision) const
Definition: L1TGlobalUtil.cc:498
l1t::L1TGlobalUtil::getMaskByName
const bool getMaskByName(const std::string &algName, std::vector< int > &mask) const
Definition: L1TGlobalUtil.cc:564
l1t::PrescalesVetosHelper::readFromEventSetup
static const PrescalesVetosHelper * readFromEventSetup(const L1TGlobalPrescalesVetos *es)
Definition: PrescalesVetosHelper.cc:5
edm::FileInPath
Definition: FileInPath.h:64
l1t::L1TGlobalUtil::m_triggerMaskAlgoTrig
const std::map< int, std::vector< int > > * m_triggerMaskAlgoTrig
Definition: L1TGlobalUtil.h:211
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
l1t::L1TGlobalUtil
Definition: L1TGlobalUtil.h:42
L1TGlobalPrescalesVetos
Definition: L1TGlobalPrescalesVetos.h:13
l1t::L1TGlobalUtil::m_l1tGlobalUtilHelper
std::unique_ptr< L1TGlobalUtilHelper > m_l1tGlobalUtilHelper
Definition: L1TGlobalUtil.h:229
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
l1t::L1TGlobalUtil::m_readPrescalesFromFile
bool m_readPrescalesFromFile
Definition: L1TGlobalUtil.h:188
l1t::L1TGlobalUtil::L1TGlobalUtil
L1TGlobalUtil()
Definition: L1TGlobalUtil.cc:21
Transition.h
l1t::L1TGlobalUtil::getAlgNameFromBit
const bool getAlgNameFromBit(int &bit, std::string &AlgName) const
Definition: L1TGlobalUtil.cc:466
l1t::L1TGlobalUtil::m_l1GtPfAlgoCacheID
unsigned long long m_l1GtPfAlgoCacheID
Definition: L1TGlobalUtil.h:190
EDGetToken.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
MessageDrop.h
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
l1t::L1TGlobalUtil::m_preScaleFileName
std::string m_preScaleFileName
Definition: L1TGlobalUtil.h:204
l1t::L1TGlobalUtil::getAlgBitFromName
const bool getAlgBitFromName(const std::string &AlgName, int &bit) const
Definition: L1TGlobalUtil.cc:456
l1t::L1TGlobalUtil::retrieveL1
void retrieveL1(const edm::Event &iEvent, const edm::EventSetup &evSetup)
initialize the class (mainly reserve)
Definition: L1TGlobalUtil.cc:65
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
value
Definition: value.py:1
l1t::L1TGlobalUtil::getInitialDecisionByBit
const bool getInitialDecisionByBit(int &bit, bool &decision) const
Definition: L1TGlobalUtil.cc:475
l1t::L1TGlobalUtil::getIntermDecisionByBit
const bool getIntermDecisionByBit(int &bit, bool &decision) const
Definition: L1TGlobalUtil.cc:489
l1t::L1TGlobalUtil::resetPrescaleVectors
void resetPrescaleVectors()
Definition: L1TGlobalUtil.cc:434
edm::EventSetup
Definition: EventSetup.h:57
l1t::L1TGlobalUtil::retrieveL1Event
void retrieveL1Event(const edm::Event &iEvent, const edm::EventSetup &evSetup)
Definition: L1TGlobalUtil.cc:209
edm::EDGetToken
Definition: EDGetToken.h:35
prescale
Definition: PrescaleEventFilter.cc:32
l1t::UseEventSetupIn::RunAndEvent
InputTag.h
l1t::L1TGlobalUtil::resetDecisionVectors
void resetDecisionVectors()
clear decision vectors on a menu change
Definition: L1TGlobalUtil.cc:413
l1t::L1TGlobalUtil::getIntermDecisionByName
const bool getIntermDecisionByName(const std::string &algName, bool &decision) const
Definition: L1TGlobalUtil.cc:536
l1t::L1TGlobalUtil::getInitialDecisionByName
const bool getInitialDecisionByName(const std::string &algName, bool &decision) const
Definition: L1TGlobalUtil.cc:526
l1t::L1TGlobalUtil::m_filledPrescales
bool m_filledPrescales
Definition: L1TGlobalUtil.h:193
edm::Transition::BeginRun
relativeConstraints.value
value
Definition: relativeConstraints.py:53
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
HLT_2018_cff.psColumn
psColumn
Definition: HLT_2018_cff.py:88422
L1TGlobalUtil.h
edm::eventsetup::EventSetupRecord::cacheIdentifier
unsigned long long cacheIdentifier() const
Definition: EventSetupRecord.h:185
l1t::L1TGlobalUtil::resetMaskVectors
void resetMaskVectors()
Definition: L1TGlobalUtil.cc:445
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
ParameterSet.h
edm::Event
Definition: Event.h:73
DeadROC_duringRun.f1
f1
Definition: DeadROC_duringRun.py:219
mps_splice.line
line
Definition: mps_splice.py:76
l1t::L1TGlobalUtil::m_numberPhysTriggers
unsigned int m_numberPhysTriggers
Definition: L1TGlobalUtil.h:200
l1t::L1TGlobalUtil::getMaskByBit
const bool getMaskByBit(int &bit, std::vector< int > &mask) const
Definition: L1TGlobalUtil.cc:516
l1t::L1TGlobalUtil::~L1TGlobalUtil
virtual ~L1TGlobalUtil()
destructor
Definition: L1TGlobalUtil.cc:52
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
l1t::L1TGlobalUtil::getPrescaleByName
const bool getPrescaleByName(const std::string &algName, int &prescale) const
Definition: L1TGlobalUtil.cc:555
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
l1t::L1TGlobalUtilHelper
Definition: L1TGlobalUtilHelper.h:38
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443