CMS 3D CMS Logo

HLTScalersClient.cc
Go to the documentation of this file.
1 //
2 // Revision 1.19 2010/07/20 02:58:27 wmtan
3 // Add missing #include files
4 //
5 // Revision 1.18 2010/04/02 20:48:12 wittich
6 // updates to scale entries by received number of FU's
7 //
8 // Revision 1.17 2010/03/17 20:56:19 wittich
9 // Check for good updates based on mergeCount values
10 // add code for rates normalized per FU
11 //
12 // Revision 1.16 2010/03/16 22:19:19 wittich
13 // updates for per-LS normalization for variable
14 // number of FU's sending information back to the clients.
15 //
16 // Revision 1.15 2010/02/11 23:55:18 wittich
17 // - adapt to shorter Lumi Section length
18 // - fix bug in how history of counts was filled
19 //
20 // Revision 1.14 2010/02/02 11:44:20 wittich
21 // more diagnostics for online scalers
22 //
23 // Revision 1.13 2009/12/15 20:41:16 wittich
24 // better hlt scalers client
25 //
26 // Revision 1.12 2009/11/22 13:33:05 puigh
27 // clean beginJob
28 //
29 // Revision 1.11 2009/11/07 03:35:05 lorenzo
30 // fixed binning
31 //
32 // Revision 1.10 2009/11/04 06:00:05 lorenzo
33 // changed folders
34 //
35 
37 
38 #include <cassert>
39 #include <numeric>
40 
42 
50 
51 
54 
55 
56 using edm::LogInfo;
57 using edm::LogWarning;
58 
59 // I am not sure this is right at more than 10%
60 #define SECS_PER_LUMI_SECTION 23.31
61 const int kPerHisto = 20;
62 
63 
64 
65 
68  dbe_(nullptr),
69  nLumi_(0),
70  currentRate_(nullptr),
71  currentLumiBlockNumber_(0),
72  first_(true), missingPathNames_(true),
73  folderName_(ps.getUntrackedParameter<std::string>("dqmFolder",
74  "HLT/HLScalers_EvF")),
75  kRateIntegWindow_(ps.getUntrackedParameter<unsigned int>("rateIntegWindow",
76  3)),
77  processName_(ps.getParameter<std::string>("processName")),
78  ignores_(),
79  debug_(ps.getUntrackedParameter<bool>("debugDump", false)),
80  maxFU_(ps.getUntrackedParameter<unsigned int>("maxFU", false)),
81  recentOverallCountsPerLS_(kRateIntegWindow_),
82  recentNormedOverallCountsPerLS_(2)
83 {
84  LogDebug("HLTScalersClient") << "constructor" ;
85  if ( debug_ ) {
86  textfile_.open("debug.txt");
87  if ( ! textfile_ ) {
88  std::cout << "constructor: can't open text file" << std::endl;
89  }
90  }
91  // get back-end interface
93  dbe_->setVerbose(1);
95 
96 
97  std::string rawdir(folderName_ + "/raw");
98  dbe_->setCurrentFolder(rawdir);
99  hltRate_ = dbe_->book1D("hltRate", "Overall HLT Accept rate vs LS",
102  hltNormRate_ = dbe_->book1D("hltRateNorm",
103  "Overall HLT Accept rate vs LS, scaled",
105  hltCount_= dbe_->book1D("hltCount", "Overall HLT Counts vs LS",
107 // hltCountN_= dbe_->book1D("hltCountN", "Overall HLT Counts per LS vs LS",
108 // MAX_LUMI_SEG_HLT, -0.5, MAX_LUMI_SEG_HLT-0.5);
109  mergeCount_= dbe_->book1D("mergeCount", "Number of merge counts vs LS",
111 
112 
113 
114  updates_ = dbe_->book1D("updates", "Status of Updates", 2, 0, 2);
115  updates_->setBinLabel(1, "Good Updates");
116  updates_->setBinLabel(2, "Incomplete Updates");
117 
118 
119 } // end constructor
120 
121 
124 {
125  LogDebug("HLTScalersClient") << "beingJob" ;
126  if (dbe_) {
128  }
129  first_ = true;
130  missingPathNames_ = true;
131 }
132 
133 
136 {
137  missingPathNames_ = true;
138  first_ = true;
139  LogDebug("HLTScalersClient") << "beginRun, run " << run.id();
140 
141 } // beginRun
142 
145 {
146  missingPathNames_ = true;
147  first_ = true;
148 }
149 
150 
154  const edm::EventSetup& c)
155 {
156  nLumi_ = lumiSeg.id().luminosityBlock();
157  // PWDEBUG
158  if ( first_ && debug_)
160  // PWDEBUG END
161 
162  // get raw data
163  std::string scalHisto = folderName_ + "/raw/hltScalers";
164  MonitorElement *scalers = dbe_->get(scalHisto);
165  if ( scalers == nullptr ) {
166  LogDebug("HLTScalersClient") << "cannot get hlt scalers histogram, "
167  << "bailing out.";
168  if ( debug_ )
169  std::cout << "No scalers ? Looking for "
170  << scalHisto
171  << std::endl;
172  return;
173  }
174 
175 
176  int npaths = scalers->getNbinsX();
177  if ( npaths > MAX_PATHS ) npaths = MAX_PATHS; // HARD CODE FOR NOW
178  LogDebug("HLTScalersClient") << "I see " << npaths << " paths. ";
179 
180  // set the bin labels on the first go-through
181  // I need to do this here because we don't have the paths yet
182  // on begin-run. I should do this in a less ugly way (see FV?)
183  if ( first_) {
184  std::string rawdir(folderName_ + "/raw");
185 
186  LogDebug("HLTScalersClient") << "Setting up paths on first endLumiBlock "
187  << npaths;
188  dbe_->setCurrentFolder(rawdir);
189  currentRate_ = dbe_->book1D("cur_rate",
190  "current lumi section rate per path",
191  npaths, -0.5, npaths-0.5);
192  currentNormRate_ = dbe_->book1D("cur_rate_norm",
193  "current norm. lumi section rate per path",
194  npaths, -0.5, npaths-0.5);
195  recentPathCountsPerLS_.reserve(npaths);
196  recentNormedPathCountsPerLS_.reserve(npaths);
197  char rates_subfolder[256]; snprintf(rates_subfolder, 256, "%s/RateHistory",
198  folderName_.c_str());
199  char counts_subfolder[256]; snprintf(counts_subfolder, 256,
200  "%s/CountHistory",
201  folderName_.c_str());
202 
203  hltCurrentRate_. reserve(npaths);
204  rateHistories_. reserve(npaths);
205  countHistories_. reserve(npaths);
206  hltCurrentNormRate_.reserve(npaths);
207  rateNormHistories_. reserve(npaths);
208 
209  dbe_->setCurrentFolder(folderName_); // these belong in top-level
210  for (int i = 0; i < npaths; ++i ) {
211  dbe_->setCurrentFolder(std::string(rates_subfolder)+"/raw");
212 
213  char name[256]; snprintf(name, 256, "raw_rate_p%03d", i);
214  // LogDebug("HLTScalersClient") << "name " << i << " is " << name ;
215  rateHistories_.push_back(dbe_->book1D(name, name, MAX_LUMI_SEG_HLT,
216  -0.5, MAX_LUMI_SEG_HLT-0.5));
217  snprintf(name, 256, "norm_rate_p%03d", i);
218  dbe_->setCurrentFolder(rates_subfolder);
219  rateNormHistories_.push_back(dbe_->book1D(name, name, MAX_LUMI_SEG_HLT,
220  -0.5, MAX_LUMI_SEG_HLT-0.5));
221  dbe_->setCurrentFolder(counts_subfolder);
222  snprintf(name, 256, "counts_p%03d", i);
223  countHistories_.push_back(dbe_->book1D(name, name, MAX_LUMI_SEG_HLT,
224  -0.5, MAX_LUMI_SEG_HLT-0.5));
225  // prefill the data structures
228  }
230 
231 
232  // split hlt scalers up into groups of 20
233  const int maxlen = 40;
234  char metitle[maxlen]; //histo name
235  char mename[maxlen]; //ME name
236  int numHistos = int(npaths/kPerHisto); // this hasta be w/o remainders
237 
238  int remainder = npaths%kPerHisto;
239  if ( remainder ) numHistos += 1;
240 
241  for( int k = 0; k < numHistos; k++ ) {
242  int npath_low = kPerHisto*k;
243  int npath_high = kPerHisto*(k+1)-1;
244  snprintf(mename, maxlen, "hltScalers_%0d", k);
245  snprintf(metitle, maxlen, "HLT scalers - Paths %d to %d", npath_low,
246  npath_high);
247  dbe_->setCurrentFolder(rawdir);
248  hltCurrentRate_.push_back(dbe_->book1D(mename, metitle, kPerHisto,
249  -0.5 + npath_low, npath_high+0.5));
250  dbe_->setCurrentFolder(folderName_); // these belong in top-level
251  snprintf(mename, maxlen, "hltScalersNorm_%0d", k);
252  snprintf(metitle, maxlen,
253  "HLT Rate (scaled) - Paths %d to %d", npath_low, npath_high);
254  hltCurrentNormRate_.push_back(dbe_->book1D(mename, metitle, kPerHisto,
255  -0.5 + npath_low,
256  npath_high+0.5));
257  }
258 
259  first_ = false;
260 
261 
262 
263  }
264 
265  if ( missingPathNames_) {
266  // first try the scalers histogram and see if the bin names are set
267  for ( int i = 0; i < npaths; ++i ) {
268  // needs to be i+1 since root bins start at 1
269  const char* name = scalers->getTH1()->GetXaxis()->GetBinLabel(i+1);
270  if ( name && (strlen(name) > 0)) {
271  if ( debug_ ) {
272  std::cout << "path " << i << " name is " << name << std::endl;
273  }
274  int whichHisto = i/kPerHisto;
275  int whichBin = i%kPerHisto + 1;
276  char pname[256];
277  hltCurrentRate_[whichHisto]->setBinLabel(whichBin, name);
278  hltCurrentNormRate_[whichHisto]->setBinLabel(whichBin, name);
279  snprintf(pname, 256, "Rate - path %s (Path # %03d)", name, i);
280  rateHistories_[i] ->setTitle(pname);
281  rateNormHistories_[i]->setTitle(pname);
282  snprintf(pname, 256, "Counts - path %s (Path # %03d)", name, i);
283  countHistories_[i]->setTitle(pname);
284 
285  currentRate_->setBinLabel(i+1, name);
286  currentNormRate_->setBinLabel(i+1, name);
287 
288  missingPathNames_ = false;
289  }
290  }
291 
292  }
293  // MEGA-HACK
294  if ( missingPathNames_) {
295  // if that didn't work we load 'em from a text file. damn straight.
296  int ipath = 1;
297  std::ifstream names("names.dat");
298  if ( ! names ) {
299  if ( debug_ ) {
300  std::ostringstream msg;
301  msg << "open of " << "names.dat";
302  perror(msg.str().c_str());
303  }
304  }
305  else { // open succeeded
306  missingPathNames_ = false;
308  while ( ! names.eof() ) {
309  getline(names, line);
310  std::istringstream fnames(line);
311  std::string label; int bin;
312  if ( fnames.str().find("#") == 0 ) // skip comment lines
313  continue;
314  if ( fnames >> bin >> label ) {
315  if ( debug_ ) {
316  std::cout << bin << "--" << label << "(" << ipath << ")"
317  << std::endl;
318  }
319  currentRate_->setBinLabel(ipath, label);
320  currentNormRate_->setBinLabel(ipath, label);
321  countHistories_[ipath-1]->setTitle(label);
322  rateHistories_[ipath-1]->setTitle(label);
323  rateNormHistories_[ipath-1]->setTitle(label);
324  int whichHisto = (ipath-1)/kPerHisto;
325  int whichBin = (ipath-1)%kPerHisto +1;
326  hltCurrentRate_[whichHisto]->setBinLabel(whichBin, label);
327  hltCurrentNormRate_[whichHisto]->setBinLabel(whichBin, label);
328  ++ipath;
329  if ( ipath > npaths )
330  break;
331  } //
332  } // loop lines
333  } // open ok
334  }
335 
336 
337  // END SETUP
338 
339  std::string nLumiHisto(folderName_ + "/nLumiBlock");
340  MonitorElement *nLumi = dbe_->get(nLumiHisto);
341  if ( nLumi == nullptr ) {
342  nLumiHisto = folderName_ + "/raw/nLumiBlock";
343  nLumi = dbe_->get(nLumiHisto);
344  }
345  int testval = (nLumi!=nullptr?nLumi->getIntValue():-1);
346  LogDebug("HLTScalersClient") << "Lumi Block from DQM: "
347  << testval
348  << ", local is " << nLumi_;
349  int nL = (nLumi!=nullptr?nLumi->getIntValue():nLumi_);
350  if ( nL > MAX_LUMI_SEG_HLT ) {
351  LogDebug("HLTScalersClient") << "Too many Lumi segments, "
352  << nL << " is greater than MAX_LUMI_SEG_HLT,"
353  << " wrapping to "
354  << (nL%MAX_LUMI_SEG_HLT);
355  //nL = MAX_LUMI_SEG_HLT;
356  nL = nL%MAX_LUMI_SEG_HLT;
357  }
358 
359  // merging counts
360  double num_fu = -1.0;
361  std::string mergeName(folderName_ + "/raw/hltMerge");
362  MonitorElement *merge = dbe_->get(mergeName);
363  if ( merge != nullptr ) {
364  num_fu = merge->getBinContent(1);
365  if ( debug_ ) {
366  std::cout << "Number of received entries: " << num_fu
367  << std::endl;
368  }
369  mergeCount_->Fill(nL,num_fu);
370  }
371  // end
372 
373 
374  // evaluate the data
375  // loop over current counts
376 
377  // this gets filled for all times. Mainly for debugging.
378  for ( int i = 1; i <= npaths; ++i ) { // bins start at 1
379  double current_count = scalers->getBinContent(i);
380  // nb that this will now _overwrite_ some settings
381  countHistories_[i-1]->setBinContent(nL, current_count); // good or bad
382  }
383 
384  std::string overallScalerName(folderName_ + "/raw/hltOverallScaler");
385  MonitorElement *hltScaler = dbe_->get(overallScalerName);
386  if ( hltScaler != nullptr ) {
387  double current_count = hltScaler->getBinContent(1);
388  hltCount_->setBinContent(nL,current_count);
389  recentOverallCountsPerLS_.update(CountLS_t(nL,current_count));
390  std::pair<double,double> sl = getSlope_(recentOverallCountsPerLS_);
391  double slope = sl.first; double slope_err = sl.second;
392  if ( slope > 0 ) {
393  hltRate_->setBinContent(nL,slope);
394  if ( ! edm::isNotFinite(slope_err ) && (slope_err >= 0 ) )
395  hltRate_->setBinError(nL,slope_err);
396  }
397  } // found histo
398 
399 
400 
401  if ( num_fu >= 0.95*maxFU_ ) {
402  if ( num_fu > maxFU_ ) {
403  maxFU_ = num_fu;
404  if ( debug_ )
405  std::cout << "maxFU is now " << maxFU_ << std::endl;
406  }
407  // good data
408  for ( int i = 1; i <= npaths; ++i ) { // bins start at 1
409  double current_count = scalers->getBinContent(i);
410  // DEBUG
411  if ( ! recentPathCountsPerLS_[i-1].empty() && debug_ )
412  std::cout << i << "\t-> good one: new => cnt, ls = "
413  << current_count << ", " << nL
414  << ", old = "
415  << recentPathCountsPerLS_[i-1].back().second << "\t"
416  << recentPathCountsPerLS_[i-1].back().first
417  << std::endl;
418  // END DEBUG
419  recentPathCountsPerLS_[i-1].update(CountLS_t(nL,current_count));
420 
421  // NB: we do not fill a new entry in the rate histo if we can't
422  // calculate it
423  std::pair<double,double> sl = getSlope_(recentPathCountsPerLS_[i-1]);
424  double slope = sl.first; double slope_err = sl.second;
425  //rateHistories_[i-1]->Fill(nL,slope);
426  if ( slope > 0 ) {
427  rateHistories_[i-1]->setBinContent(nL,slope);
428  // set the current rate(s)
429  hltCurrentRate_[(i-1)/kPerHisto]->setBinContent(i%kPerHisto, slope);
430  currentRate_->setBinContent(i, slope);
431  if ( ! edm::isNotFinite(slope_err ) && (slope_err >= 0 ) ) {
432  currentRate_->setBinError(i, slope_err);
433  hltCurrentRate_[(i-1)/kPerHisto]->setBinError(i%kPerHisto, slope_err);
434  rateHistories_[i-1]->setBinError(nL,slope_err);
435  }
436  }
439 
440  } // loop over paths
441 
442  // ---------------------------- overall rate, absolute counts
443  std::string overallScalerName(folderName_ + "/raw/hltOverallScaler");
444  MonitorElement *hltScaler = dbe_->get(overallScalerName);
445  if ( hltScaler != nullptr ) {
446  double current_count = hltScaler->getBinContent(1);
447  hltCount_->setBinContent(nL,current_count);
448  recentOverallCountsPerLS_.update(CountLS_t(nL,current_count));
449  std::pair<double,double> sl = getSlope_(recentOverallCountsPerLS_);
450  double slope = sl.first; double slope_err = sl.second;
451  if ( slope >= 0 ) {
452  hltRate_->setBinContent(nL,slope);
453  if ( ! edm::isNotFinite(slope_err ) && (slope_err >= 0 ) )
454  hltRate_->setBinError(nL,slope_err);
455  }
456  } // found histo
457  updates_->Fill(0); // good
458  } // check on number of FU's - good data
459  else {
460  updates_->Fill(1); // missing updates
461  }
462 
463  // PW DEBUG
464  if ( debug_ ) {
465  textfile_ << nL << "\t"
466  << npaths << "\t";
467  for ( int i = 0; i < npaths ; ++i ) {
468  textfile_ << scalers->getBinContent(i) << " ";
469  }
470  textfile_ << std::endl;
471  }
472  // end DEBUG
473 
474 
475 #ifdef LATER
476  // ------ overall rate normalized - all data
477  overallScalerName = std::string(folderName_ + "/raw/hltOverallScalerN");
478  hltScaler = dbe_->get(overallScalerName);
479  if ( hltScaler != 0 ) {
480  double cnt = hltScaler->getBinContent(1);
481 // hltCountN_->setBinContent(nL,cnt);
482  if ( debug_ ) {
483  std::cout << "Overall Norm: new => cnt, ls = "
484  << cnt << ", " << nL
485  << ", num_fu = " << num_fu
486  << std::endl;
487  }
489  cnt = recentNormedOverallCountsPerLS_.getCount(nL); // for dupes/partials
490  double slope = cnt / num_fu / SECS_PER_LUMI_SECTION;
491  if ( debug_ ) {
492  std::cout << "Normalized slope = " << slope << std::endl;
493  }
494  if ( slope > 0 )
495  hltNormRate_->setBinContent(nL,slope);
496  }
497  //
498  std::string scalHistoNorm = folderName_ + "/raw/hltScalersN";
499  MonitorElement *scalersN = dbe_->get(scalHistoNorm);
500  if ( scalersN ) {
501  for (int i = 0; i < npaths ; ++i ) {
502  double cnt = scalersN->getBinContent(i);
503  double slope = cnt / num_fu / SECS_PER_LUMI_SECTION;
504  if ( slope > 0 ) {
505  rateNormHistories_[i-1]->setBinContent(nL,slope);
506  // set the current rate(s)
507  hltCurrentNormRate_[(i-1)/kPerHisto]->setBinContent(i%kPerHisto, slope);
509  }
510  }
511  }
512 #else // NOT LATER
513  // ------ overall rate normalized - all data
514  overallScalerName = std::string(folderName_ + "/raw/hltOverallScaler");
515  hltScaler = dbe_->get(overallScalerName);
516  if ( hltScaler != nullptr ) {
517  double cnt = hltScaler->getBinContent(1);
518 // hltCountN_->setBinContent(nL,cnt);
519  float sf = num_fu/maxFU_;
520  if ( debug_ ) {
521  std::cout << "Overall Norm: new => cnt, ls = "
522  << cnt << ", " << nL
523  << ", num_fu = " << num_fu << ", sf = " << sf
524  << std::endl;
525  }
527  cnt = recentNormedOverallCountsPerLS_.getCount(nL); // for dupes/partials
528  std::pair<double,double> sl = getSlope_(recentNormedOverallCountsPerLS_);
529  double slope = sl.first; double slope_err = sl.second;
530  if ( debug_ ) {
531  std::cout << "Normalized slope = " << slope << std::endl;
532  }
533  if ( slope > 0 ) {
534  hltNormRate_->setBinContent(nL,slope);
535  if ( cnt > 0 ) slope_err = slope*sqrt( 2./num_fu + 2./cnt);
536  if ( ! edm::isNotFinite(slope_err ) && (slope_err >= 0 ) )
537  hltNormRate_->setBinError(nL,slope_err);
538  }
539  }
540  //
541  std::string scalHistoNorm = folderName_ + "/raw/hltScalers";
542  MonitorElement *scalersN = dbe_->get(scalHistoNorm);
543  if ( scalersN ) {
544  double sf = num_fu /maxFU_;
545  for (int i = 1; i <= npaths ; ++i ) {
546  double cnt = scalersN->getBinContent(i);
547  recentNormedPathCountsPerLS_[i-1].update(CountLS_t(nL,cnt/sf));
548  std::pair<double,double> sl = getSlope_(recentNormedPathCountsPerLS_[i-1]);
549  double slope = sl.first; double slope_err = sl.second;
550  if ( slope >= 0 ) {
551  rateNormHistories_[i-1]->setBinContent(nL,slope);
552  // set the current rate(s)
553  hltCurrentNormRate_[(i-1)/kPerHisto]->setBinContent(i%kPerHisto, slope);
555  if ( slope_err <= 0 && cnt > 0) {
556  // ignores error on prev point, so scale by sqrt(2)
557  slope_err = slope*sqrt( 2./num_fu + 2./cnt);
558  if ( debug_ ) {
559  std::cout << "Slope err " << i << " = " << slope_err << std::endl;
560  }
561  }
562  if ( ! edm::isNotFinite(slope_err ) && (slope_err >= 0 ) ) {
563  rateNormHistories_[i-1]->setBinError(nL,slope_err);
564  // set the current rate(s)
565  hltCurrentNormRate_[(i-1)/kPerHisto]->setBinError(i%kPerHisto, slope_err);
566  currentNormRate_->setBinError(i, slope_err);
567 
568  }
569 
570  }
571  }
572  }
573 
574 #endif // LATER
575  //
576 
577 
578 
579 }
580 
581 // unused
583 {
584  // nothing to do here
585 }
586 
587 // this is probably overkill. Do a least-squares fit to get slope
588 // note that the data is in units of counts, ls number
589 // but we return a value in Hz...
590 std::pair<double,double>
592 {
593  double slope, sigma_m;
594  if ( points.size() < points.targetSize() ) {
595  return std::pair<double,double>(-1,-1);
596  }
597  // just do a delta if we just want two bins
598  else if ( points.size() == 2 ) {
599  // just do diff and be done with it
600  double delta_ls = points.front().first - points.back().first;
601  double delta_cnt = points.front().second - points.back().second;
602  slope = delta_cnt / delta_ls ;
603  sigma_m = -1;
604  }
605  else { // do a fit
606  double xy = 0;
607  double x = 0;
608  double xsq = 0;
609  double y = 0;
610  double n = double(points.size());
611  for ( auto i(points.begin());
612  i != points.end(); ++i ) {
613  if ( debug_ )
614  std::cout << "x = " << i->first << ", y = " << i->second
615  << std::endl;
616  xy += i->first * i->second;
617  x += i->first;
618  xsq += i->first*i->first;
619  y += i->second;
620  }
621  slope = (n*xy - x*y)/(n*xsq - x*x);
622 
623  // now get the uncertainty on the slope. Need intercept for this.
624  double intercept = (xsq*y - xy*x)/(n*xsq-x*x);
625  double sigma_ysq = 0;
626  for ( auto i (points.begin());
627  i != points.end(); ++i ) {
628  sigma_ysq += pow(( i->second - slope * i->first - intercept),2.);
629  }
630 // if ( debug_ )
631 // std::cout << "chi^2 = " << sigma_ysq << std::endl;
632  sigma_ysq *= 1./(n-2.);
633 
634  sigma_m = sqrt( n*sigma_ysq/(n*xsq - x*x));
635  }
636 
637  // std::cout << "Slope is " << slope << std::endl;
638  slope /= SECS_PER_LUMI_SECTION;
639  if ( sigma_m >0 )
640  sigma_m /= SECS_PER_LUMI_SECTION;
641 // if ( debug_ ) {
642 // std::cout << "Slope = " << slope << " +- " << sigma_m
643 // << std::endl;
644 // std::cout << "intercept is " << intercept
645 // << std::endl;
646 // }
647 
648 
649  return std::pair<double,double>(slope, sigma_m);
650 }
#define LogDebug(id)
LuminosityBlockID id() const
std::ofstream textfile_
Definition: merge.py:1
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
int64_t getIntValue() const
MonitorElement * updates_
void setBinContent(int binx, double content)
set content of bin (1-D)
RunID const & id() const
Definition: RunBase.h:39
static const HistoName names[]
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:1040
std::vector< MonitorElement * > rateHistories_
static const double slope[3]
MonitorElement * currentNormRate_
TH1 * getTH1() const
std::vector< CountLSFifo_t > recentNormedPathCountsPerLS_
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)
#define nullptr
void Fill(long long x)
std::vector< MonitorElement * > hltCurrentNormRate_
bool isNotFinite(T x)
Definition: isFinite.h:10
std::string folderName_
void beginJob(void) override
BeginJob.
#define SECS_PER_LUMI_SECTION
void beginRun(const edm::Run &run, const edm::EventSetup &c) override
BeginRun.
MonitorElement * hltRate_
T sqrt(T t)
Definition: SSEVec.h:18
std::vector< MonitorElement * > countHistories_
void endRun(const edm::Run &run, const edm::EventSetup &c) override
EndRun.
MonitorElement * mergeCount_
unsigned int kRateIntegWindow_
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
void setVerbose(unsigned level)
Definition: DQMStore.cc:710
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
Definition: DQMStore.cc:1812
CountLSFifo_t recentOverallCountsPerLS_
DQMStore * dbe_
MonitorElement * currentRate_
int k[5][pyjets_maxn]
bin
set the eta bin as selection string.
void analyze(const edm::Event &e, const edm::EventSetup &c) override
void showDirStructure() const
Definition: DQMStore.cc:3584
void update(const CountLS_t &T)
std::vector< CountLSFifo_t > recentPathCountsPerLS_
LuminosityBlockNumber_t luminosityBlock() const
tuple msg
Definition: mps_check.py:277
MonitorElement * hltCount_
HLTScalersClient(const edm::ParameterSet &ps)
Constructors.
std::pair< double, double > getSlope_(const CountLSFifo_t &points)
CountLSFifo_t recentNormedOverallCountsPerLS_
double getBinContent(int binx) const
get content of bin (1-D)
#define MAX_LUMI_SEG_HLT
std::vector< MonitorElement * > hltCurrentRate_
const int kPerHisto
int getNbinsX() const
get # of bins in X-axis
MonitorElement * hltNormRate_
#define MAX_PATHS
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:746
Definition: Run.h:43
unsigned int targetSize() const
std::vector< MonitorElement * > rateNormHistories_