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