CMS 3D CMS Logo

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