CMS 3D CMS Logo

L1TBPTX.cc
Go to the documentation of this file.
2 
4 
7 
8 #include "DataFormats/Common/interface/ConditionsInEdm.h" // Parameters associated to Run, LS and Event
9 
17 
18 // Luminosity Information
19 //#include "DataFormats/Luminosity/interface/LumiDetails.h"
20 //#include "DataFormats/Luminosity/interface/LumiSummary.h"
21 
22 // L1TMonitor includes
24 
25 #include "TList.h"
26 #include <string>
27 
28 using namespace edm;
29 using namespace std;
30 
31 //-------------------------------------------------------------------------------------
32 //-------------------------------------------------------------------------------------
34  m_parameters = pset;
35 
36  // Mapping parameter input variables
37  m_scalersSource = consumes<Level1TriggerScalersCollection>(pset.getParameter<InputTag>("inputTagScalersResults"));
38  m_l1GtDataDaqInputTag = consumes<L1GlobalTriggerReadoutRecord>(pset.getParameter<InputTag>("inputTagL1GtDataDaq"));
39  m_l1GtEvmSource = consumes<L1GlobalTriggerEvmReadoutRecord>(pset.getParameter<InputTag>("inputTagtEvmSource"));
40  m_verbose = pset.getUntrackedParameter<bool>("verbose", false);
41  // m_refPrescaleSet = pset.getParameter <int> ("refPrescaleSet");
42 
43  m_monitorBits = pset.getParameter<vector<ParameterSet> >("MonitorBits");
44 
45  for (unsigned i = 0; i < m_monitorBits.size(); i++) {
46  // Algorithms
47  if (m_monitorBits[i].getParameter<bool>("bitType")) {
48  int bit = m_monitorBits[i].getParameter<int>("bitNumber");
49  int offset = m_monitorBits[i].getParameter<int>("bitOffset");
50  m_selAlgoBit.push_back(pair<int, int>(bit, offset));
51  }
52  // Tech
53  else {
54  int bit = m_monitorBits[i].getParameter<int>("bitNumber");
55  int offset = m_monitorBits[i].getParameter<int>("bitOffset");
56  m_selTechBit.push_back(pair<int, int>(bit, offset));
57  }
58  }
59 
60  m_monitorRates = pset.getParameter<vector<ParameterSet> >("MonitorRates");
61 }
62 
63 //-------------------------------------------------------------------------------------
64 //-------------------------------------------------------------------------------------
66 
67 //-------------------------------------------------------------------------------------
69 //-------------------------------------------------------------------------------------
70 void L1TBPTX::bookHistograms(DQMStore::IBooker& ibooker, const edm::Run& iRun, const edm::EventSetup& iSetup) {
71  if (m_verbose) {
72  cout << "[L1TBPTX] Called beginRun." << endl;
73  }
74 
75  ibooker.setCurrentFolder("L1T/L1TBPTX");
76 
77  // Initializing variables
78  int maxNbins = 2501;
79 
80  // Reseting run dependent variables
81  m_lhcFill = 0;
82  m_currentLS = 0;
83 
84  // Getting Trigger menu from GT
86  iSetup.get<L1GtTriggerMenuRcd>().get(menuRcd);
87  const L1GtTriggerMenu* menu = menuRcd.product();
88 
89  // Filling Alias-Bit Map
90  for (CItAlgo algo = menu->gtAlgorithmAliasMap().begin(); algo != menu->gtAlgorithmAliasMap().end(); ++algo) {
91  m_algoBit_Alias[(algo->second).algoBitNumber()] = (algo->second).algoAlias();
92  }
93 
94  for (CItAlgo algo = menu->gtTechnicalTriggerMap().begin(); algo != menu->gtTechnicalTriggerMap().end(); ++algo) {
95  m_techBit_Alias[(algo->second).algoBitNumber()] = (algo->second).algoName();
96  }
97 
98  // Initializing DQM Monitor Elements
99  ibooker.setCurrentFolder("L1T/L1TBPTX");
100  m_ErrorMonitor = ibooker.book1D("ErrorMonitor", "ErrorMonitor", 7, 0, 7);
101  m_ErrorMonitor->setBinLabel(UNKNOWN, "UNKNOWN");
102  m_ErrorMonitor->setBinLabel(WARNING_DB_CONN_FAILED, "WARNING_DB_CONN_FAILED"); // Errors from L1TOMDSHelper
103  m_ErrorMonitor->setBinLabel(WARNING_DB_QUERY_FAILED, "WARNING_DB_QUERY_FAILED"); // Errors from L1TOMDSHelper
104  m_ErrorMonitor->setBinLabel(WARNING_DB_INCORRECT_NBUNCHES,
105  "WARNING_DB_INCORRECT_NBUNCHES"); // Errors from L1TOMDSHelper
106  m_ErrorMonitor->setBinLabel(ERROR_UNABLE_RETRIVE_PRODUCT, "ERROR_UNABLE_RETRIVE_PRODUCT");
107  m_ErrorMonitor->setBinLabel(ERROR_TRIGGERALIAS_NOTVALID, "ERROR_TRIGGERALIAS_NOTVALID");
108  m_ErrorMonitor->setBinLabel(ERROR_LSBLOCK_NOTVALID, "ERROR_LSBLOCK_NOTVALID");
109 
110  for (unsigned i = 0; i < m_monitorBits.size(); i++) {
111  bool isAlgo = m_monitorBits[i].getParameter<bool>("bitType");
112  TString testName = m_monitorBits[i].getParameter<string>("testName");
113  int bit = m_monitorBits[i].getParameter<int>("bitNumber");
114 
115  TString meTitle = "";
116  ibooker.setCurrentFolder("L1T/L1TBPTX/Efficiency/");
117  if (isAlgo) {
118  meTitle = "Algo ";
119  meTitle += bit;
120  meTitle += " - ";
121  meTitle += m_algoBit_Alias[bit];
122  meTitle += " Efficiency";
123  m_meAlgoEfficiency[bit] = ibooker.book1D(testName, meTitle, maxNbins, -0.5, double(maxNbins) - 0.5);
124  m_meAlgoEfficiency[bit]->setAxisTitle("Lumi Section", 1);
125  } else {
126  meTitle = "Tech ";
127  meTitle += bit;
128  meTitle += " - ";
129  meTitle += m_techBit_Alias[bit];
130  meTitle += " Efficiency";
131  m_meTechEfficiency[bit] = ibooker.book1D(testName, meTitle, maxNbins, -0.5, double(maxNbins) - 0.5);
132  m_meTechEfficiency[bit]->setAxisTitle("Lumi Section", 1);
133  }
134 
135  meTitle = "";
136  ibooker.setCurrentFolder("L1T/L1TBPTX/MissFire/");
137  if (isAlgo) {
138  meTitle = "Algo ";
139  meTitle += bit;
140  meTitle += " - ";
141  meTitle += m_algoBit_Alias[bit];
142  meTitle += "(1 - Miss Fire Rate)";
143  m_meAlgoMissFire[bit] = ibooker.book1D(testName, meTitle, maxNbins, -0.5, double(maxNbins) - 0.5);
144  m_meAlgoMissFire[bit]->setAxisTitle("Lumi Section", 1);
145  m_meAlgoMissFire[bit]->setAxisTitle("1 - Miss Fire Rate", 2);
146  } else {
147  meTitle = "Tech ";
148  meTitle += bit;
149  meTitle += " - ";
150  meTitle += m_techBit_Alias[bit];
151  meTitle += "(1 - Miss Fire Rate)";
152  m_meTechMissFire[bit] = ibooker.book1D(testName, meTitle, maxNbins, -0.5, double(maxNbins) - 0.5);
153  m_meTechMissFire[bit]->setAxisTitle("Lumi Section", 1);
154  m_meTechMissFire[bit]->setAxisTitle("1 - Miss Fire Rate", 2);
155  }
156  }
157 
158  for (unsigned i = 0; i < m_monitorRates.size(); i++) {
159  TString testName = m_monitorRates[i].getParameter<string>("testName");
160  bool isAlgo = m_monitorRates[i].getParameter<bool>("bitType");
161  int bit = m_monitorRates[i].getParameter<int>("bitNumber");
162 
163  pair<bool, int> refME = pair<bool, int>(isAlgo, bit);
164 
165  TString meTitle = "";
166  ibooker.setCurrentFolder("L1T/L1TBPTX/Rate/");
167  if (isAlgo) {
168  meTitle = "Algo " + std::to_string(bit);
169  meTitle += " - ";
170  meTitle += m_algoBit_Alias[bit];
171  meTitle += " Rate";
172  m_meRate[refME] = ibooker.book1D(testName, meTitle, maxNbins, -0.5, double(maxNbins) - 0.5);
173  m_meRate[refME]->setAxisTitle("Lumi Section", 1);
174  m_meRate[refME]->setAxisTitle("Rate (unprescaled) [Hz]", 2);
175  } else {
176  meTitle = "Tech " + std::to_string(bit);
177  meTitle += " - ";
178  meTitle += m_techBit_Alias[bit];
179  meTitle += " Rate";
180  m_meRate[refME] = ibooker.book1D(testName, meTitle, maxNbins, -0.5, double(maxNbins) - 0.5);
181  m_meRate[refME]->setAxisTitle("Lumi Section", 1);
182  m_meRate[refME]->setAxisTitle("Rate (unprescaled) [Hz]", 2);
183  }
184  }
185 
186  //_____________________________________________________________________
187  // Getting the prescale columns definition for this run
190 
191  iSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().get(l1GtPfAlgo);
192  iSetup.get<L1GtPrescaleFactorsTechTrigRcd>().get(l1GtPfTech);
193 
194  if (l1GtPfAlgo.isValid()) {
195  const L1GtPrescaleFactors* m_l1GtPfAlgo = l1GtPfAlgo.product();
196  m_prescaleFactorsAlgoTrig = &(m_l1GtPfAlgo->gtPrescaleFactors());
197  } else {
198  //TODO: Some error handling
199  }
200 
201  if (l1GtPfAlgo.isValid()) {
202  const L1GtPrescaleFactors* m_l1GtPfTech = l1GtPfTech.product();
203  m_prescaleFactorsTechTrig = &(m_l1GtPfTech->gtPrescaleFactors());
204  } else {
205  //TODO: Some error handling
206  }
207 }
208 
210  //empty
211 }
212 
213 //_____________________________________________________________________
214 // Function: beginLuminosityBlock
215 //_____________________________________________________________________
217  if (m_verbose) {
218  cout << "[L1TBPTX] Called beginLuminosityBlock." << endl;
219  }
220 
221  // Updating current LS number
222  m_currentLS = lumiBlock.id().luminosityBlock();
223 
224  // A LS will be valid if BeamMode==STABLE for all events monitored
225  m_currentLSValid = true;
226 
227  for (unsigned i = 0; i < m_monitorBits.size(); i++) {
228  TString triggerName = "";
229  if (m_monitorBits[i].getParameter<bool>("bitType")) {
230  triggerName = "algo_" + std::to_string(m_monitorBits[i].getParameter<int>("bitNumber"));
231  } else {
232  triggerName = "tech_" + std::to_string(m_monitorBits[i].getParameter<int>("bitNumber"));
233  }
234 
235  m_effNumerator[triggerName] = 0;
236  m_effDenominator[triggerName] = 0;
237  m_missFireNumerator[triggerName] = 0;
238  m_missFireDenominator[triggerName] = 0;
239  }
240 }
241 
242 //_____________________________________________________________________
243 // Function: endLuminosityBlock
244 // * Fills LS by LS ration of trigger out of sync
245 //_____________________________________________________________________
246 void L1TBPTX::endLuminosityBlock(LuminosityBlock const& lumiBlock, EventSetup const& c) {
247  //______________________________________________________________________________
248  // Monitoring efficiencies
249  //______________________________________________________________________________
250  if (m_verbose) {
251  cout << "[L1TBPTX] Called endLuminosityBlock." << endl;
252  }
253 
254  // If this LS is valid (i.e. all events recorded with stable beams)
255  if (m_currentLSValid && m_beamConfig.isValid()) {
256  for (unsigned i = 0; i < m_monitorBits.size(); i++) {
257  bool isAlgo = m_monitorBits[i].getParameter<bool>("bitType");
258  TString testName = m_monitorBits[i].getParameter<string>("testName");
259  int bit = m_monitorBits[i].getParameter<int>("bitNumber");
260 
261  TString triggerName;
262  if (isAlgo) {
263  triggerName = "algo_" + std::to_string(bit);
264  } else {
265  triggerName = "tech_" + std::to_string(bit);
266  }
267 
268  double valEff;
269  double valMiss;
270  if (m_effDenominator[triggerName] != 0) {
271  valEff = (double)m_effNumerator[triggerName] / m_effDenominator[triggerName];
272  } else {
273  valEff = 0;
274  }
275  if (m_missFireDenominator[triggerName] != 0) {
276  valMiss = (double)m_missFireNumerator[triggerName] / m_missFireDenominator[triggerName];
277  } else {
278  valMiss = 0;
279  }
280 
281  if (isAlgo) {
282  int bin = m_meAlgoEfficiency[bit]->getTH1()->FindBin(m_currentLS);
283  m_meAlgoEfficiency[bit]->setBinContent(bin, valEff);
284  m_meAlgoMissFire[bit]->setBinContent(bin, 1 - valMiss);
285  } else {
286  int bin = m_meTechEfficiency[bit]->getTH1()->FindBin(m_currentLS);
287  m_meTechEfficiency[bit]->setBinContent(bin, valEff);
288  m_meTechMissFire[bit]->setBinContent(bin, 1 - valMiss);
289  }
290  }
291  }
292 
293  //______________________________________________________________________________
294  // Monitoring rates
295  //______________________________________________________________________________
296  // We are only interested in monitoring lumisections where the the LHC state is
297  // RAMP, FLATTOP, SQUEEZE, ADJUST or STABLE since the bunch configuration and
298  // therefore the BPTX rate will not change.
299 
300  if (m_currentLSValid) {
301  const vector<int>& currentPFAlgo = (*m_prescaleFactorsAlgoTrig).at(m_currentPrescalesIndex);
302  const vector<int>& currentPFTech = (*m_prescaleFactorsTechTrig).at(m_currentPrescalesIndex);
303 
304  for (unsigned i = 0; i < m_monitorRates.size(); i++) {
305  bool isAlgo = m_monitorRates[i].getParameter<bool>("bitType");
306  int bit = m_monitorRates[i].getParameter<int>("bitNumber");
307 
308  pair<bool, int> refME = pair<bool, int>(isAlgo, bit);
309 
310  if (isAlgo) {
311  int bin = m_meRate[refME]->getTH1()->FindBin(m_currentGTLS);
312  int trigPS = currentPFAlgo[bit];
313  double trigRate = (double)trigPS * m_l1Rate[refME];
314  m_meRate[refME]->setBinContent(bin, trigRate);
315 
316  } else {
317  int bin = m_meRate[refME]->getTH1()->FindBin(m_currentGTLS);
318  int trigPS = currentPFTech[bit];
319  double trigRate = (double)trigPS * m_l1Rate[refME];
320  m_meRate[refME]->setBinContent(bin, trigRate);
321  }
322  }
323  }
324 }
325 
326 //_____________________________________________________________________
327 void L1TBPTX::analyze(const Event& iEvent, const EventSetup& eventSetup) {
328  if (m_verbose) {
329  cout << "[L1TBPTX] Called analyze." << endl;
330  }
331 
332  // We only start analyzing if current LS is still valid
333  if (m_currentLSValid) {
334  if (m_verbose) {
335  cout << "[L1TBPTX] -> m_currentLSValid=" << m_currentLSValid << endl;
336  }
337 
338  // Retriving information from GT
340  iEvent.getByToken(m_l1GtEvmSource, gtEvmReadoutRecord);
341 
342  // Determining beam mode and fill number
343  if (gtEvmReadoutRecord.isValid()) {
344  const L1GtfeExtWord& gtfeEvmWord = gtEvmReadoutRecord->gtfeWord();
345  unsigned int lhcBeamMode = gtfeEvmWord.beamMode(); // Updating beam mode
346 
347  if (m_verbose) {
348  cout << "[L1TBPTX] Beam mode: " << lhcBeamMode << endl;
349  }
350 
351  if (lhcBeamMode == RAMP || lhcBeamMode == FLATTOP || lhcBeamMode == SQUEEZE || lhcBeamMode == ADJUST ||
352  lhcBeamMode == STABLE) {
353  if (m_lhcFill == 0) {
354  if (m_verbose) {
355  cout << "[L1TBPTX] No valid bunch structure yet retrived. Attemptting to retrive..." << endl;
356  }
357 
358  m_lhcFill = gtfeEvmWord.lhcFillNumber(); // Getting LHC Fill Number from GT
359 
360  getBeamConfOMDS(); // Getting Beam Configuration from OMDS
361 
362  // We are between RAMP and STABLE so there should be some colliding bunches
363  // in the machine. If 0 colliding bunched are found might be due to a delay
364  // of the update of the database. So we declare this LS as invalid and try
365  // again on the next one.
366  if (m_beamConfig.nCollidingBunches <= 0) {
367  m_lhcFill = 0;
368  m_currentLSValid = false;
369  }
370  }
371  } else {
372  m_currentLSValid = false;
373  }
374 
375  } else {
376  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(ERROR_UNABLE_RETRIVE_PRODUCT);
377  eCount++;
378  m_ErrorMonitor->getTH1()->SetBinContent(ERROR_UNABLE_RETRIVE_PRODUCT, eCount);
379  }
380  }
381 
382  //______________________________________________________________________________
383  // If current LS is valid and Beam Configuration is Valid we analyse this event
384  //______________________________________________________________________________
385  if (m_currentLSValid && m_beamConfig.isValid()) {
386  if (m_verbose) {
387  cout << "Current event in valid LS and beam config" << endl;
388  }
389 
390  // Getting Final Decision Logic (FDL) Data from GT
391  edm::Handle<L1GlobalTriggerReadoutRecord> gtReadoutRecordData;
392  iEvent.getByToken(m_l1GtDataDaqInputTag, gtReadoutRecordData);
393 
394  if (gtReadoutRecordData.isValid()) {
395  const vector<L1GtFdlWord>& gtFdlVectorData = gtReadoutRecordData->gtFdlVector();
396 
397  // Getting the index for the fdl data for this event
398  int eventFDL = 0;
399  for (unsigned int i = 0; i < gtFdlVectorData.size(); i++) {
400  if (gtFdlVectorData[i].bxInEvent() == 0) {
401  eventFDL = i;
402  break;
403  }
404  }
405 
406  m_currentPrescalesIndex = gtFdlVectorData[eventFDL].gtPrescaleFactorIndexAlgo();
407 
408  for (unsigned i = 0; i < m_monitorBits.size(); i++) {
409  TString triggerName = "";
410  bool isAlgo = m_monitorBits[i].getParameter<bool>("bitType");
411  int bit = m_monitorBits[i].getParameter<int>("bitNumber");
412  int offset = m_monitorBits[i].getParameter<int>("bitOffset");
413 
414  if (isAlgo) {
415  triggerName = "algo_" + std::to_string(bit);
416  } else {
417  triggerName = "tech_" + std::to_string(bit);
418  }
419 
420  int evBxStart = -2;
421  int evBxEnd = 2;
422 
423  if (offset < 0) {
424  evBxStart += -1 * offset;
425  }
426  if (offset > 0) {
427  evBxEnd += -1 * offset;
428  }
429 
430  for (unsigned a = 0; a < gtFdlVectorData.size(); a++) {
431  int testBx = gtFdlVectorData[a].localBxNr() - offset;
432  bool lhcBxFilled = m_beamConfig.beam1[testBx] && m_beamConfig.beam2[testBx];
433  bool algoFired = false;
434 
435  if (isAlgo) {
436  if (gtFdlVectorData[a].gtDecisionWord()[bit]) {
437  algoFired = true;
438  }
439 
440  } else {
441  if (gtFdlVectorData[a].gtTechnicalTriggerWord()[bit]) {
442  algoFired = true;
443  }
444  }
445 
446  if (lhcBxFilled) {
447  m_effDenominator[triggerName]++;
448  }
449  if (lhcBxFilled && algoFired) {
450  m_effNumerator[triggerName]++;
451  }
452 
453  if (algoFired) {
454  m_missFireNumerator[triggerName]++;
455  }
456  if (algoFired && !lhcBxFilled) {
457  m_missFireNumerator[triggerName]++;
458  }
459  }
460  }
461  }
462  }
463 
464  //______________________________________________________________________________
465  // Rate calculation
466  //______________________________________________________________________________
468  iEvent.getByToken(m_scalersSource, triggerScalers);
469 
470  if (triggerScalers.isValid()) {
471  Level1TriggerScalersCollection::const_iterator itL1TScalers = triggerScalers->begin();
472  Level1TriggerRates trigRates(*itL1TScalers, iEvent.id().run());
473 
474  m_currentGTLS = (*itL1TScalers).lumiSegmentNr();
475 
476  for (unsigned i = 0; i < m_monitorRates.size(); i++) {
477  bool isAlgo = m_monitorRates[i].getParameter<bool>("bitType");
478  int bit = m_monitorRates[i].getParameter<int>("bitNumber");
479 
480  pair<bool, int> refTrig = pair<bool, int>(isAlgo, bit);
481 
482  if (isAlgo) {
483  m_l1Rate[refTrig] = trigRates.gtAlgoCountsRate()[bit];
484  } else {
485  m_l1Rate[refTrig] = trigRates.gtTechCountsRate()[bit];
486  }
487  }
488  }
489 }
490 
491 //_____________________________________________________________________
492 // Method: getBunchStructureOMDS
493 // Description: Attempt to retrive Beam Configuration from OMDS and if
494 // we find error handle it
495 //_____________________________________________________________________
497  if (m_verbose) {
498  cout << "[L1TBPTX] Called getBeamConfOMDS()" << endl;
499  }
500 
501  //Getting connection paremeters
502  string oracleDB = m_parameters.getParameter<string>("oracleDB");
503  string pathCondDB = m_parameters.getParameter<string>("pathCondDB");
504 
505  // Connecting to OMDS
506  L1TOMDSHelper myOMDSHelper = L1TOMDSHelper();
507  int conError;
508  myOMDSHelper.connect(oracleDB, pathCondDB, conError);
509 
510  if (conError == L1TOMDSHelper::NO_ERROR) {
511  if (m_verbose) {
512  cout << "[L1TBPTX] Connected to DB with no error." << endl;
513  }
514 
515  int errorRetrive;
516  m_beamConfig = myOMDSHelper.getBeamConfiguration(m_lhcFill, errorRetrive);
517 
518  if (errorRetrive == L1TOMDSHelper::NO_ERROR) {
519  if (m_verbose) {
520  cout << "[L1TBPTX] Retriving LHC Bunch Structure: NO_ERROR" << endl;
521  cout << "[L1TSync] -> LHC Bunch Structure valid=" << m_beamConfig.m_valid
522  << " nBunches=" << m_beamConfig.nCollidingBunches << endl;
523  }
524  } else if (errorRetrive == L1TOMDSHelper::WARNING_DB_QUERY_FAILED) {
525  if (m_verbose) {
526  cout << "[L1TBPTX] Retriving LHC Bunch Structure: WARNING_DB_QUERY_FAILED" << endl;
527  }
528 
529  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(WARNING_DB_QUERY_FAILED);
530  eCount++;
531  m_ErrorMonitor->getTH1()->SetBinContent(WARNING_DB_QUERY_FAILED, eCount);
532  } else if (errorRetrive == L1TOMDSHelper::WARNING_DB_INCORRECT_NBUNCHES) {
533  if (m_verbose) {
534  cout << "[L1TBPTX] Retriving LHC Bunch Structure: WARNING_DB_INCORRECT_NBUNCHES" << endl;
535  }
536 
537  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(WARNING_DB_INCORRECT_NBUNCHES);
538  eCount++;
539  m_ErrorMonitor->getTH1()->SetBinContent(WARNING_DB_INCORRECT_NBUNCHES, eCount);
540  } else {
541  if (m_verbose) {
542  cout << "[L1TBPTX] Retriving LHC Bunch Structure: UNKNOWN" << endl;
543  }
544  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(UNKNOWN);
545  eCount++;
546  m_ErrorMonitor->getTH1()->SetBinContent(UNKNOWN, eCount);
547  }
548 
549  } else if (conError == L1TOMDSHelper::WARNING_DB_CONN_FAILED) {
550  if (m_verbose) {
551  cout << "[L1TBPTX] Connection to DB: WARNING_DB_CONN_FAILED" << endl;
552  }
553  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(WARNING_DB_CONN_FAILED);
554  eCount++;
555  m_ErrorMonitor->getTH1()->SetBinContent(WARNING_DB_CONN_FAILED, eCount);
556  } else {
557  if (m_verbose) {
558  cout << "[L1TBPTX] Connection to DB: UNKNOWN" << endl;
559  }
560  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(UNKNOWN);
561  eCount++;
562  m_ErrorMonitor->getTH1()->SetBinContent(UNKNOWN, eCount);
563  }
564 }
565 
566 //_____________________________________________________________________
567 // Method: doFractionInSync
568 // Description: Produce plot with the fraction of in sync trigger for
569 // LS blocks with enough statistics.
570 // Variable: iForce - Forces closing of all blocks and calculation of
571 // the respective fractions
572 // Variable: iBad - (Only works with iForce=true) Forces the current
573 // all current blocks to be marked as bad
574 //_____________________________________________________________________
575 void L1TBPTX::doFractionInSync(bool iForce, bool iBad) {}
576 
577 //_____________________________________________________________________
578 // Method: certifyLSBlock
579 // Description: Fill the trigger certification plot by blocks
580 // Variable: iTrigger - Which trigger to certify
581 // Variable: iInitLs - Blocks initial LS
582 // Variable: iEndLs - Blocks end LS
583 // Variable: iValue - Value to be used to fill
584 //_____________________________________________________________________
585 void L1TBPTX::certifyLSBlock(string iTrigger, int iInitLs, int iEndLs, float iValue) {}
L1TOMDSHelper
Definition: L1TOMDSHelper.h:50
L1TBPTX::L1TBPTX
L1TBPTX(const edm::ParameterSet &ps)
Definition: L1TBPTX.cc:33
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
L1GtTriggerMenu.h
LumiScalers.h
mps_fire.i
i
Definition: mps_fire.py:428
L1GtPrescaleFactors
Definition: L1GtPrescaleFactors.h:32
L1TBPTX_cfi.oracleDB
oracleDB
Definition: L1TBPTX_cfi.py:14
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
edm
HLT enums.
Definition: AlignableModifier.h:19
L1GtTriggerMenuRcd.h
gather_cfg.cout
cout
Definition: gather_cfg.py:144
L1GlobalTriggerEvmReadoutRecord::gtfeWord
const L1GtfeExtWord gtfeWord() const
get / set GTFE word (record) in the GT readout record
Definition: L1GlobalTriggerEvmReadoutRecord.cc:249
L1GtPrescaleFactors::gtPrescaleFactors
const std::vector< std::vector< int > > & gtPrescaleFactors() const
get the prescale factors by reference
Definition: L1GtPrescaleFactors.h:45
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
L1TBPTX::doFractionInSync
void doFractionInSync(bool iForce=false, bool iBad=false)
Definition: L1TBPTX.cc:575
HIPAlignmentAlgorithm_cfi.algoName
algoName
Definition: HIPAlignmentAlgorithm_cfi.py:5
DQMStore.h
L1TBPTX::getBeamConfOMDS
void getBeamConfOMDS()
Definition: L1TBPTX.cc:496
L1TOMDSHelper::WARNING_DB_QUERY_FAILED
Definition: L1TOMDSHelper.h:52
edm::Handle
Definition: AssociativeIterator.h:50
L1GtPrescaleFactorsTechTrigRcd
Definition: L1GtPrescaleFactorsTechTrigRcd.h:38
L1TBPTX_cfi.pathCondDB
pathCondDB
Definition: L1TBPTX_cfi.py:15
cmsdt::algo
algo
Definition: constants.h:164
L1TOMDSHelper::NO_ERROR
Definition: L1TOMDSHelper.h:52
Level1TriggerRates
Definition: Level1TriggerRates.h:30
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
CItAlgo
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
Definition: L1GtTriggerMenuFwd.h:38
L1TBPTX::analyze
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: L1TBPTX.cc:327
L1TBPTX::endLuminosityBlock
void endLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c) override
Definition: L1TBPTX.cc:246
L1GtTriggerMenuRcd
Definition: L1GtTriggerMenuRcd.h:32
L1TBPTX::~L1TBPTX
~L1TBPTX() override
Definition: L1TBPTX.cc:65
edm::ESHandle
Definition: DTSurvey.h:22
L1TBPTX_cfi.testName
testName
Definition: L1TBPTX_cfi.py:24
L1TBPTX::dqmBeginRun
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
Definition: L1TBPTX.cc:209
optionsL1T.menu
menu
Definition: optionsL1T.py:29
edm::ParameterSet
Definition: ParameterSet.h:47
a
double a
Definition: hdecay.h:119
L1GtTriggerMenu
Definition: L1GtTriggerMenu.h:48
L1GtfeExtWord::lhcFillNumber
const cms_uint32_t lhcFillNumber() const
Definition: L1GtfeExtWord.cc:195
edm::get
T const & get(Event const &event, InputTag const &tag) noexcept(false)
Definition: Event.h:671
L1GtMuonTemplate.h
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::LuminosityBlockID::luminosityBlock
LuminosityBlockNumber_t luminosityBlock() const
Definition: LuminosityBlockID.h:42
edm::LuminosityBlockBase::id
LuminosityBlockID id() const
Definition: LuminosityBlockBase.h:44
dqm::impl::MonitorElement::setBinLabel
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:771
L1GtPrescaleFactorsAlgoTrigRcd.h
L1TBPTX::beginLuminosityBlock
void beginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c) override
Definition: L1TBPTX.cc:216
edm::EventSetup
Definition: EventSetup.h:57
L1TBPTX::certifyLSBlock
void certifyLSBlock(std::string iTrigger, int iInitLs, int iEndLs, float iValue)
Definition: L1TBPTX.cc:585
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
L1TOMDSHelper::WARNING_DB_CONN_FAILED
Definition: L1TOMDSHelper.h:52
edm::ESHandleBase::isValid
bool isValid() const
Definition: ESHandle.h:44
L1GtfeExtWord
Definition: L1GtfeExtWord.h:31
L1TBPTX.h
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
L1TMenuHelper.h
SiStripSubdetector::UNKNOWN
Definition: SiStripEnums.h:5
std
Definition: JetResolutionObject.h:76
ConditionsInEdm.h
Level1TriggerRates.h
dqm::implementation::IBooker
Definition: DQMStore.h:43
L1GtTriggerMenuFwd.h
L1GtPrescaleFactorsAlgoTrigRcd
Definition: L1GtPrescaleFactorsAlgoTrigRcd.h:38
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
edm::Event
Definition: Event.h:73
L1TOMDSHelper::WARNING_DB_INCORRECT_NBUNCHES
Definition: L1TOMDSHelper.h:52
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
L1GtfeExtWord::beamMode
const cms_uint16_t beamMode() const
Definition: L1GtfeExtWord.cc:215
edm::InputTag
Definition: InputTag.h:15
L1TBPTX::bookHistograms
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override
BeginRun.
Definition: L1TBPTX.cc:70
L1GtPrescaleFactors.h
L1GlobalTriggerReadoutRecord::gtFdlVector
const std::vector< L1GtFdlWord > gtFdlVector() const
get the vector of L1GtFdlWord
Definition: L1GlobalTriggerReadoutRecord.h:119
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
PDWG_DiPhoton_SD_cff.triggerName
triggerName
Definition: PDWG_DiPhoton_SD_cff.py:37
L1GtPrescaleFactorsTechTrigRcd.h