CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EBTestPulseClient.cc
Go to the documentation of this file.
1 /*
2  * \file EBTestPulseClient.cc
3  *
4  * $Date: 2012/04/27 13:45:59 $
5  * $Revision: 1.240 $
6  * \author G. Della Ricca
7  * \author F. Cossutti
8  *
9 */
10 
11 #include <memory>
12 #include <iostream>
13 #include <fstream>
14 #include <iomanip>
15 #include <math.h>
16 
18 
21 
22 #ifdef WITH_ECAL_COND_DB
31 #endif
32 
34 
37 
39 
41 
42  // cloneME switch
43  cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
44 
45  // verbose switch
46  verbose_ = ps.getUntrackedParameter<bool>("verbose", true);
47 
48  // debug switch
49  debug_ = ps.getUntrackedParameter<bool>("debug", false);
50 
51  // prefixME path
52  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
53 
54  // enableCleanup_ switch
55  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
56 
57  // vector of selected Super Modules (Defaults to all 36).
58  superModules_.reserve(36);
59  for ( unsigned int i = 1; i <= 36; i++ ) superModules_.push_back(i);
60  superModules_ = ps.getUntrackedParameter<std::vector<int> >("superModules", superModules_);
61 
62  MGPAGains_.reserve(3);
63  for ( unsigned int i = 1; i <= 3; i++ ) MGPAGains_.push_back(i);
64  MGPAGains_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGains", MGPAGains_);
65 
66  MGPAGainsPN_.reserve(2);
67  for ( unsigned int i = 1; i <= 3; i++ ) MGPAGainsPN_.push_back(i);
68  MGPAGainsPN_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGainsPN", MGPAGainsPN_);
69 
70  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
71 
72  int ism = superModules_[i];
73 
74  ha01_[ism-1] = 0;
75  ha02_[ism-1] = 0;
76  ha03_[ism-1] = 0;
77 
78  hs01_[ism-1] = 0;
79  hs02_[ism-1] = 0;
80  hs03_[ism-1] = 0;
81 
82  i01_[ism-1] = 0;
83  i02_[ism-1] = 0;
84  i03_[ism-1] = 0;
85  i04_[ism-1] = 0;
86 
87  }
88 
89  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
90 
91  int ism = superModules_[i];
92 
93  meg01_[ism-1] = 0;
94  meg02_[ism-1] = 0;
95  meg03_[ism-1] = 0;
96 
97  meg04_[ism-1] = 0;
98  meg05_[ism-1] = 0;
99 
100  mea01_[ism-1] = 0;
101  mea02_[ism-1] = 0;
102  mea03_[ism-1] = 0;
103 
104  mer04_[ism-1] = 0;
105  mer05_[ism-1] = 0;
106 
107  me_hs01_[ism-1] = 0;
108  me_hs02_[ism-1] = 0;
109  me_hs03_[ism-1] = 0;
110 
111  }
112 
113  percentVariation_ = 0.2;
114  RMSThreshold_ = 300.0;
115 
116  amplitudeThreshold_ = 100.;
117 
118  amplitudeThresholdPnG01_ = 200./16.;
120 
121  pedPnExpectedMean_[0] = 750.0;
122  pedPnExpectedMean_[1] = 750.0;
123 
124  pedPnDiscrepancyMean_[0] = 100.0;
125  pedPnDiscrepancyMean_[1] = 100.0;
126 
127  pedPnRMSThreshold_[0] = 999.;
128  pedPnRMSThreshold_[1] = 999.;
129 
130 }
131 
133 
134 }
135 
137 
139 
140  if ( debug_ ) std::cout << "EBTestPulseClient: beginJob" << std::endl;
141 
142  ievt_ = 0;
143  jevt_ = 0;
144 
145 }
146 
148 
149  if ( debug_ ) std::cout << "EBTestPulseClient: beginRun" << std::endl;
150 
151  jevt_ = 0;
152 
153  this->setup();
154 
155 }
156 
158 
159  if ( debug_ ) std::cout << "EBTestPulseClient: std::endlJob, ievt = " << ievt_ << std::endl;
160 
161  this->cleanup();
162 
163 }
164 
166 
167  if ( debug_ ) std::cout << "EBTestPulseClient: std::endlRun, jevt = " << jevt_ << std::endl;
168 
169  this->cleanup();
170 
171 }
172 
174 
175  std::string name;
176 
177  dqmStore_->setCurrentFolder( prefixME_ + "/EBTestPulseClient" );
178 
179  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
180 
181  int ism = superModules_[i];
182 
183  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
184  if ( meg01_[ism-1] ) dqmStore_->removeElement( meg01_[ism-1]->getName() );
185  name = "EBTPT test pulse quality G01 " + Numbers::sEB(ism);
186  meg01_[ism-1] = dqmStore_->book2D(name, name, 85, 0., 85., 20, 0., 20.);
187  meg01_[ism-1]->setAxisTitle("ieta", 1);
188  meg01_[ism-1]->setAxisTitle("iphi", 2);
189  }
190  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
191  if ( meg02_[ism-1] ) dqmStore_->removeElement( meg02_[ism-1]->getName() );
192  name = "EBTPT test pulse quality G06 " + Numbers::sEB(ism);
193  meg02_[ism-1] = dqmStore_->book2D(name, name, 85, 0., 85., 20, 0., 20.);
194  meg02_[ism-1]->setAxisTitle("ieta", 1);
195  meg02_[ism-1]->setAxisTitle("iphi", 2);
196  }
197  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
198  if ( meg03_[ism-1] ) dqmStore_->removeElement( meg03_[ism-1]->getName() );
199  name = "EBTPT test pulse quality G12 " + Numbers::sEB(ism);
200  meg03_[ism-1] = dqmStore_->book2D(name, name, 85, 0., 85., 20, 0., 20.);
201  meg03_[ism-1]->setAxisTitle("ieta", 1);
202  meg03_[ism-1]->setAxisTitle("iphi", 2);
203  }
204 
205  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
206  if ( meg04_[ism-1] ) dqmStore_->removeElement( meg04_[ism-1]->getName() );
207  name = "EBTPT test pulse quality PNs G01 " + Numbers::sEB(ism);
208  meg04_[ism-1] = dqmStore_->book2D(name, name, 10, 0., 10., 1, 0., 5.);
209  meg04_[ism-1]->setAxisTitle("pseudo-strip", 1);
210  meg04_[ism-1]->setAxisTitle("channel", 2);
211  }
212  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
213  if ( meg05_[ism-1] ) dqmStore_->removeElement( meg05_[ism-1]->getName() );
214  name = "EBTPT test pulse quality PNs G16 " + Numbers::sEB(ism);
215  meg05_[ism-1] = dqmStore_->book2D(name, name, 10, 0., 10., 1, 0., 5.);
216  meg05_[ism-1]->setAxisTitle("pseudo-strip", 1);
217  meg05_[ism-1]->setAxisTitle("channel", 2);
218  }
219 
220  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
221  if ( mea01_[ism-1] ) dqmStore_->removeElement( mea01_[ism-1]->getName() );
222  name = "EBTPT test pulse amplitude G01 " + Numbers::sEB(ism);
223  mea01_[ism-1] = dqmStore_->book1D(name, name, 1700, 0., 1700.);
224  mea01_[ism-1]->setAxisTitle("channel", 1);
225  mea01_[ism-1]->setAxisTitle("amplitude", 2);
226  }
227  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
228  if ( mea02_[ism-1] ) dqmStore_->removeElement( mea02_[ism-1]->getName() );
229  name = "EBTPT test pulse amplitude G06 " + Numbers::sEB(ism);
230  mea02_[ism-1] = dqmStore_->book1D(name, name, 1700, 0., 1700.);
231  mea02_[ism-1]->setAxisTitle("channel", 1);
232  mea02_[ism-1]->setAxisTitle("amplitude", 2);
233  }
234  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
235  if ( mea03_[ism-1] ) dqmStore_->removeElement( mea03_[ism-1]->getName() );
236  name = "EBTPT test pulse amplitude G12 " + Numbers::sEB(ism);
237  mea03_[ism-1] = dqmStore_->book1D(name, name, 1700, 0., 1700.);
238  mea03_[ism-1]->setAxisTitle("channel", 1);
239  mea03_[ism-1]->setAxisTitle("amplitude", 2);
240  }
241 
242  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
243  if ( mer04_[ism-1] ) dqmStore_->removeElement( mer04_[ism-1]->getName() );
244  name = "EBTPT PNs pedestal rms " + Numbers::sEB(ism) + " G01";
245  mer04_[ism-1] = dqmStore_->book1D(name, name, 100, 0., 10.);
246  mer04_[ism-1]->setAxisTitle("rms", 1);
247  }
248  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
249  if ( mer05_[ism-1] ) dqmStore_->removeElement( mer05_[ism-1]->getName() );
250  name = "EBTPT PNs pedestal rms " + Numbers::sEB(ism) + " G16";
251  mer05_[ism-1] = dqmStore_->book1D(name, name, 100, 0., 10.);
252  mer05_[ism-1]->setAxisTitle("rms", 1);
253  }
254 
255  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
256  if ( me_hs01_[ism-1] ) dqmStore_->removeElement( me_hs01_[ism-1]->getName() );
257  name = "EBTPT test pulse shape G01 " + Numbers::sEB(ism);
258  me_hs01_[ism-1] = dqmStore_->book1D(name, name, 10, 0., 10.);
259  me_hs01_[ism-1]->setAxisTitle("sample", 1);
260  me_hs01_[ism-1]->setAxisTitle("amplitude", 2);
261  }
262  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
263  if ( me_hs02_[ism-1] ) dqmStore_->removeElement( me_hs02_[ism-1]->getName() );
264  name = "EBTPT test pulse shape G06 " + Numbers::sEB(ism);
265  me_hs02_[ism-1] = dqmStore_->book1D(name, name, 10, 0., 10.);
266  me_hs02_[ism-1]->setAxisTitle("sample", 1);
267  me_hs02_[ism-1]->setAxisTitle("amplitude", 2);
268  }
269  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
270  if ( me_hs03_[ism-1] ) dqmStore_->removeElement( me_hs03_[ism-1]->getName() );
271  name = "EBTPT test pulse shape G12 " + Numbers::sEB(ism);
272  me_hs03_[ism-1] = dqmStore_->book1D(name, name, 10, 0., 10.);
273  me_hs03_[ism-1]->setAxisTitle("sample", 1);
274  me_hs03_[ism-1]->setAxisTitle("amplitude", 2);
275  }
276 
277  }
278 
279  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
280 
281  int ism = superModules_[i];
282 
283  if ( meg01_[ism-1] ) meg01_[ism-1]->Reset();
284  if ( meg02_[ism-1] ) meg02_[ism-1]->Reset();
285  if ( meg03_[ism-1] ) meg03_[ism-1]->Reset();
286 
287  if ( meg04_[ism-1] ) meg04_[ism-1]->Reset();
288  if ( meg05_[ism-1] ) meg05_[ism-1]->Reset();
289 
290  for ( int ie = 1; ie <= 85; ie++ ) {
291  for ( int ip = 1; ip <= 20; ip++ ) {
292 
293  if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent( ie, ip, 2. );
294  if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent( ie, ip, 2. );
295  if ( meg03_[ism-1] ) meg03_[ism-1]->setBinContent( ie, ip, 2. );
296 
297  }
298  }
299 
300  for ( int i = 1; i <= 10; i++ ) {
301 
302  if ( meg04_[ism-1] ) meg04_[ism-1]->setBinContent( i, 1, 2. );
303  if ( meg05_[ism-1] ) meg05_[ism-1]->setBinContent( i, 1, 2. );
304 
305  }
306 
307  if ( mea01_[ism-1] ) mea01_[ism-1]->Reset();
308  if ( mea02_[ism-1] ) mea02_[ism-1]->Reset();
309  if ( mea03_[ism-1] ) mea03_[ism-1]->Reset();
310 
311  if ( mer04_[ism-1] ) mer04_[ism-1]->Reset();
312  if ( mer05_[ism-1] ) mer05_[ism-1]->Reset();
313 
314  if ( me_hs01_[ism-1] ) me_hs01_[ism-1]->Reset();
315  if ( me_hs02_[ism-1] ) me_hs02_[ism-1]->Reset();
316  if ( me_hs03_[ism-1] ) me_hs03_[ism-1]->Reset();
317 
318  }
319 
320 }
321 
323 
324  if ( ! enableCleanup_ ) return;
325 
326  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
327 
328  int ism = superModules_[i];
329 
330  if ( cloneME_ ) {
331  if ( ha01_[ism-1] ) delete ha01_[ism-1];
332  if ( ha02_[ism-1] ) delete ha02_[ism-1];
333  if ( ha03_[ism-1] ) delete ha03_[ism-1];
334 
335  if ( hs01_[ism-1] ) delete hs01_[ism-1];
336  if ( hs02_[ism-1] ) delete hs02_[ism-1];
337  if ( hs03_[ism-1] ) delete hs03_[ism-1];
338 
339  if ( i01_[ism-1] ) delete i01_[ism-1];
340  if ( i02_[ism-1] ) delete i02_[ism-1];
341  if ( i03_[ism-1] ) delete i03_[ism-1];
342  if ( i04_[ism-1] ) delete i04_[ism-1];
343  }
344 
345  ha01_[ism-1] = 0;
346  ha02_[ism-1] = 0;
347  ha03_[ism-1] = 0;
348 
349  hs01_[ism-1] = 0;
350  hs02_[ism-1] = 0;
351  hs03_[ism-1] = 0;
352 
353  i01_[ism-1] = 0;
354  i02_[ism-1] = 0;
355  i03_[ism-1] = 0;
356  i04_[ism-1] = 0;
357 
358  }
359 
360  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
361 
362  int ism = superModules_[i];
363 
364  dqmStore_->setCurrentFolder( prefixME_ + "/EBTestPulseClient" );
365 
366  if ( meg01_[ism-1] ) dqmStore_->removeElement( meg01_[ism-1]->getName() );
367  meg01_[ism-1] = 0;
368  if ( meg02_[ism-1] ) dqmStore_->removeElement( meg02_[ism-1]->getName() );
369  meg02_[ism-1] = 0;
370  if ( meg03_[ism-1] ) dqmStore_->removeElement( meg03_[ism-1]->getName() );
371  meg03_[ism-1] = 0;
372 
373  if ( meg04_[ism-1] ) dqmStore_->removeElement( meg04_[ism-1]->getName() );
374  meg04_[ism-1] = 0;
375  if ( meg05_[ism-1] ) dqmStore_->removeElement( meg05_[ism-1]->getName() );
376  meg05_[ism-1] = 0;
377 
378  if ( mea01_[ism-1] ) dqmStore_->removeElement( mea01_[ism-1]->getName() );
379  mea01_[ism-1] = 0;
380  if ( mea02_[ism-1] ) dqmStore_->removeElement( mea02_[ism-1]->getName() );
381  mea02_[ism-1] = 0;
382  if ( mea03_[ism-1] ) dqmStore_->removeElement( mea03_[ism-1]->getName() );
383  mea03_[ism-1] = 0;
384 
385  if ( mer04_[ism-1] ) dqmStore_->removeElement( mer04_[ism-1]->getName() );
386  mer04_[ism-1] = 0;
387  if ( mer05_[ism-1] ) dqmStore_->removeElement( mer05_[ism-1]->getName() );
388  mer05_[ism-1] = 0;
389 
390  if ( me_hs01_[ism-1] ) dqmStore_->removeElement( me_hs01_[ism-1]->getName() );
391  me_hs01_[ism-1] = 0;
392  if ( me_hs02_[ism-1] ) dqmStore_->removeElement( me_hs02_[ism-1]->getName() );
393  me_hs02_[ism-1] = 0;
394  if ( me_hs03_[ism-1] ) dqmStore_->removeElement( me_hs03_[ism-1]->getName() );
395  me_hs03_[ism-1] = 0;
396 
397  }
398 
399 }
400 
401 #ifdef WITH_ECAL_COND_DB
402 bool EBTestPulseClient::writeDb(EcalCondDBInterface* econn, RunIOV* runiov, MonRunIOV* moniov, bool& status) {
403 
404  status = true;
405 
406  EcalLogicID ecid;
407 
409  std::map<EcalLogicID, MonTestPulseDat> dataset1;
410  MonPulseShapeDat shape;
411  std::map<EcalLogicID, MonPulseShapeDat> dataset2;
412 
413  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
414 
415  int ism = superModules_[i];
416 
417  if ( verbose_ ) {
418  std::cout << " " << Numbers::sEB(ism) << " (ism=" << ism << ")" << std::endl;
419  std::cout << std::endl;
420  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
422  }
423  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
425  }
426  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
428  }
429  }
430 
431  for ( int ie = 1; ie <= 85; ie++ ) {
432  for ( int ip = 1; ip <= 20; ip++ ) {
433 
434  bool update01;
435  bool update02;
436  bool update03;
437 
438  float num01, num02, num03;
439  float mean01, mean02, mean03;
440  float rms01, rms02, rms03;
441 
442  update01 = UtilsClient::getBinStatistics(ha01_[ism-1], ie, ip, num01, mean01, rms01);
443  update02 = UtilsClient::getBinStatistics(ha02_[ism-1], ie, ip, num02, mean02, rms02);
444  update03 = UtilsClient::getBinStatistics(ha03_[ism-1], ie, ip, num03, mean03, rms03);
445 
446  if ( update01 || update02 || update03 ) {
447 
448  if ( Numbers::icEB(ism, ie, ip) == 1 ) {
449 
450  if ( verbose_ ) {
451  std::cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << std::endl;
452  std::cout << "G01 (" << ie << "," << ip << ") " << num01 << " " << mean01 << " " << rms01 << std::endl;
453  std::cout << "G06 (" << ie << "," << ip << ") " << num02 << " " << mean02 << " " << rms02 << std::endl;
454  std::cout << "G12 (" << ie << "," << ip << ") " << num03 << " " << mean03 << " " << rms03 << std::endl;
455  std::cout << std::endl;
456  }
457 
458  }
459 
460  adc.setADCMeanG1(mean01);
461  adc.setADCRMSG1(rms01);
462 
463  adc.setADCMeanG6(mean02);
464  adc.setADCRMSG6(rms02);
465 
466  adc.setADCMeanG12(mean03);
467  adc.setADCRMSG12(rms03);
468 
469  if ( UtilsClient::getBinStatus(meg01_[ism-1], ie, ip) &&
470  UtilsClient::getBinStatus(meg02_[ism-1], ie, ip) &&
471  UtilsClient::getBinStatus(meg03_[ism-1], ie, ip) ) {
472  adc.setTaskStatus(true);
473  } else {
474  adc.setTaskStatus(false);
475  }
476 
477  status = status && UtilsClient::getBinQuality(meg01_[ism-1], ie, ip) &&
478  UtilsClient::getBinQuality(meg02_[ism-1], ie, ip) &&
479  UtilsClient::getBinQuality(meg03_[ism-1], ie, ip);
480 
481  if ( Numbers::icEB(ism, ie, ip) == 1 ) {
482 
483  std::vector<float> sample01, sample02, sample03;
484 
485  sample01.clear();
486  sample02.clear();
487  sample03.clear();
488 
489  if ( me_hs01_[ism-1] ) {
490  for ( int i = 1; i <= 10; i++ ) {
491  sample01.push_back(int(me_hs01_[ism-1]->getBinContent(i)));
492  }
493  } else {
494  for ( int i = 1; i <= 10; i++ ) { sample01.push_back(-1.); }
495  }
496 
497  if ( me_hs02_[ism-1] ) {
498  for ( int i = 1; i <= 10; i++ ) {
499  sample02.push_back(int(me_hs02_[ism-1]->getBinContent(i)));
500  }
501  } else {
502  for ( int i = 1; i <= 10; i++ ) { sample02.push_back(-1.); }
503  }
504 
505  if ( me_hs03_[ism-1] ) {
506  for ( int i = 1; i <= 10; i++ ) {
507  sample03.push_back(int(me_hs03_[ism-1]->getBinContent(i)));
508  }
509  } else {
510  for ( int i = 1; i <= 10; i++ ) { sample03.push_back(-1.); }
511  }
512 
513  if ( verbose_ ) {
514  std::cout << "sample01 = " << std::flush;
515  for ( unsigned int i = 0; i < sample01.size(); i++ ) {
516  std::cout << sample01[i] << " " << std::flush;
517  }
518  std::cout << std::endl;
519 
520  std::cout << "sample02 = " << std::flush;
521  for ( unsigned int i = 0; i < sample02.size(); i++ ) {
522  std::cout << sample02[i] << " " << std::flush;
523  }
524  std::cout << std::endl;
525 
526  std::cout << "sample03 = " << std::flush;
527  for ( unsigned int i = 0; i < sample03.size(); i++ ) {
528  std::cout << sample03[i] << " " << std::flush;
529  }
530  std::cout << std::endl;
531  }
532 
533  if ( verbose_ ) std::cout << std::endl;
534 
535  shape.setSamples(sample01, 1);
536  shape.setSamples(sample02, 6);
537  shape.setSamples(sample03, 12);
538 
539  }
540 
541  int ic = Numbers::indexEB(ism, ie, ip);
542 
543  if ( econn ) {
544  ecid = LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic);
545  dataset1[ecid] = adc;
546  if ( Numbers::icEB(ism, ie, ip) == 1 ) dataset2[ecid] = shape;
547  }
548 
549  }
550 
551  }
552  }
553 
554  }
555 
556  if ( econn ) {
557  try {
558  if ( verbose_ ) std::cout << "Inserting MonTestPulseDat ..." << std::endl;
559  if ( dataset1.size() != 0 ) econn->insertDataArraySet(&dataset1, moniov);
560  if ( dataset2.size() != 0 ) econn->insertDataSet(&dataset2, moniov);
561  if ( verbose_ ) std::cout << "done." << std::endl;
562  } catch (std::runtime_error &e) {
563  std::cerr << e.what() << std::endl;
564  }
565  }
566 
567  if ( verbose_ ) std::cout << std::endl;
568 
569  MonPNMGPADat pn;
570  std::map<EcalLogicID, MonPNMGPADat> dataset3;
571 
572  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
573 
574  int ism = superModules_[i];
575 
576  if ( verbose_ ) {
577  std::cout << " " << Numbers::sEB(ism) << " (ism=" << ism << ")" << std::endl;
578  std::cout << std::endl;
579  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
580  UtilsClient::printBadChannels(meg04_[ism-1], i01_[ism-1]);
581  UtilsClient::printBadChannels(meg04_[ism-1], i03_[ism-1]);
582  }
583  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
584  UtilsClient::printBadChannels(meg05_[ism-1], i02_[ism-1]);
585  UtilsClient::printBadChannels(meg05_[ism-1], i04_[ism-1]);
586  }
587  }
588 
589  for ( int i = 1; i <= 10; i++ ) {
590 
591  bool update01;
592  bool update02;
593  bool update03;
594  bool update04;
595 
596  float num01, num02, num03, num04;
597  float mean01, mean02, mean03, mean04;
598  float rms01, rms02, rms03, rms04;
599 
600  update01 = UtilsClient::getBinStatistics(i01_[ism-1], i, 0, num01, mean01, rms01);
601  update02 = UtilsClient::getBinStatistics(i02_[ism-1], i, 0, num02, mean02, rms02);
602  update03 = UtilsClient::getBinStatistics(i03_[ism-1], i, 1, num03, mean03, rms03);
603  update04 = UtilsClient::getBinStatistics(i04_[ism-1], i, 1, num04, mean04, rms04);
604 
605  if ( update01 || update02 || update03 || update04 ) {
606 
607  if ( i == 1 ) {
608 
609  if ( verbose_ ) {
610  std::cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << std::endl;
611  std::cout << "PNs (" << i << ") G01 " << num01 << " " << mean01 << " " << rms01 << " " << num03 << " " << mean03 << " " << rms03 << std::endl;
612  std::cout << "PNs (" << i << ") G16 " << num02 << " " << mean02 << " " << rms02 << " " << num04 << " " << mean04 << " " << rms04 << std::endl;
613  std::cout << std::endl;
614  }
615 
616  }
617 
618  pn.setADCMeanG1(mean01);
619  pn.setADCRMSG1(rms01);
620 
621  pn.setPedMeanG1(mean03);
622  pn.setPedRMSG1(rms03);
623 
624  pn.setADCMeanG16(mean02);
625  pn.setADCRMSG16(rms02);
626 
627  pn.setPedMeanG16(mean04);
628  pn.setPedRMSG16(rms04);
629 
630  if ( UtilsClient::getBinStatus(meg04_[ism-1], i, 1) &&
631  UtilsClient::getBinStatus(meg05_[ism-1], i, 1) ) {
632  pn.setTaskStatus(true);
633  } else {
634  pn.setTaskStatus(false);
635  }
636 
637  status = status && UtilsClient::getBinQuality(meg04_[ism-1], i, 1) &&
638  UtilsClient::getBinQuality(meg05_[ism-1], i, 1);
639 
640  if ( econn ) {
641  ecid = LogicID::getEcalLogicID("EB_LM_PN", Numbers::iSM(ism, EcalBarrel), i-1);
642  dataset3[ecid] = pn;
643  }
644 
645  }
646 
647  }
648 
649  }
650 
651  if ( econn ) {
652  try {
653  if ( verbose_ ) std::cout << "Inserting MonPNMGPADat ..." << std::endl;
654  if ( dataset3.size() != 0 ) econn->insertDataArraySet(&dataset3, moniov);
655  if ( verbose_ ) std::cout << "done." << std::endl;
656  } catch (std::runtime_error &e) {
657  std::cerr << e.what() << std::endl;
658  }
659  }
660 
661  return true;
662 
663 }
664 #endif
665 
667 
668  ievt_++;
669  jevt_++;
670  if ( ievt_ % 10 == 0 ) {
671  if ( debug_ ) std::cout << "EBTestPulseClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl;
672  }
673 
674  uint32_t bits01 = 0;
677 
678  uint32_t bits02 = 0;
681 
682  uint32_t bits03 = 0;
685 
686  uint32_t bits04 = 0;
689 
690  uint32_t bits05 = 0;
693 
694 
695  MonitorElement* me;
696 
697  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
698 
699  int ism = superModules_[i];
700 
701  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
702 
703  me = dqmStore_->get( prefixME_ + "/EBTestPulseTask/Gain01/EBTPT amplitude " + Numbers::sEB(ism) + " G01" );
704  ha01_[ism-1] = UtilsClient::getHisto( me, cloneME_, ha01_[ism-1] );
705 
706  }
707 
708  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
709 
710  me = dqmStore_->get( prefixME_ + "/EBTestPulseTask/Gain06/EBTPT amplitude " + Numbers::sEB(ism) + " G06" );
711  ha02_[ism-1] = UtilsClient::getHisto( me, cloneME_, ha02_[ism-1] );
712 
713  }
714 
715  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
716 
717  me = dqmStore_->get( prefixME_ + "/EBTestPulseTask/Gain12/EBTPT amplitude " + Numbers::sEB(ism) + " G12" );
718  ha03_[ism-1] = UtilsClient::getHisto( me, cloneME_, ha03_[ism-1] );
719 
720  }
721 
722  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
723 
724  me = dqmStore_->get( prefixME_ + "/EBTestPulseTask/Gain01/EBTPT shape " + Numbers::sEB(ism) + " G01" );
725  hs01_[ism-1] = UtilsClient::getHisto( me, cloneME_, hs01_[ism-1] );
726 
727  }
728 
729  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
730 
731  me = dqmStore_->get( prefixME_ + "/EBTestPulseTask/Gain06/EBTPT shape " + Numbers::sEB(ism) + " G06" );
732  hs02_[ism-1] = UtilsClient::getHisto( me, cloneME_, hs02_[ism-1] );
733 
734  }
735 
736  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
737 
738  me = dqmStore_->get( prefixME_ + "/EBTestPulseTask/Gain12/EBTPT shape " + Numbers::sEB(ism) + " G12" );
739  hs03_[ism-1] = UtilsClient::getHisto( me, cloneME_, hs03_[ism-1] );
740 
741  }
742 
743  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
744 
745  me = dqmStore_->get( prefixME_ + "/EBTestPulseTask/PN/Gain01/EBTPT PNs amplitude " + Numbers::sEB(ism) + " G01" );
746  i01_[ism-1] = UtilsClient::getHisto( me, cloneME_, i01_[ism-1] );
747 
748  }
749 
750 
751  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
752 
753  me = dqmStore_->get( prefixME_ + "/EBTestPulseTask/PN/Gain16/EBTPT PNs amplitude " + Numbers::sEB(ism) + " G16" );
754  i02_[ism-1] = UtilsClient::getHisto( me, cloneME_, i02_[ism-1] );
755 
756  }
757 
758  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
759 
760  me = dqmStore_->get( prefixME_ + "/EBTestPulseTask/PN/Gain01/EBTPT PNs pedestal " + Numbers::sEB(ism) + " G01" );
761  i03_[ism-1] = UtilsClient::getHisto( me, cloneME_, i03_[ism-1] );
762 
763  }
764 
765  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
766 
767  me = dqmStore_->get( prefixME_ + "/EBTestPulseTask/PN/Gain16/EBTPT PNs pedestal " + Numbers::sEB(ism) + " G16" );
768  i04_[ism-1] = UtilsClient::getHisto( me, cloneME_, i04_[ism-1] );
769 
770  }
771 
772  if ( meg01_[ism-1] ) meg01_[ism-1]->Reset();
773  if ( meg02_[ism-1] ) meg02_[ism-1]->Reset();
774  if ( meg03_[ism-1] ) meg03_[ism-1]->Reset();
775 
776  if ( meg04_[ism-1] ) meg04_[ism-1]->Reset();
777  if ( meg05_[ism-1] ) meg05_[ism-1]->Reset();
778 
779  if ( mea01_[ism-1] ) mea01_[ism-1]->Reset();
780  if ( mea02_[ism-1] ) mea02_[ism-1]->Reset();
781  if ( mea03_[ism-1] ) mea03_[ism-1]->Reset();
782 
783  if ( mer04_[ism-1] ) mer04_[ism-1]->Reset();
784  if ( mer05_[ism-1] ) mer05_[ism-1]->Reset();
785 
786  if ( me_hs01_[ism-1] ) me_hs01_[ism-1]->Reset();
787  if ( me_hs02_[ism-1] ) me_hs02_[ism-1]->Reset();
788  if ( me_hs03_[ism-1] ) me_hs03_[ism-1]->Reset();
789 
790  float meanAmpl01, meanAmpl02, meanAmpl03;
791 
792  int nCry01, nCry02, nCry03;
793 
794  meanAmpl01 = meanAmpl02 = meanAmpl03 = 0.;
795 
796  nCry01 = nCry02 = nCry03 = 0;
797 
798  for ( int ie = 1; ie <= 85; ie++ ) {
799  for ( int ip = 1; ip <= 20; ip++ ) {
800 
801  bool update01;
802  bool update02;
803  bool update03;
804 
805  float num01, num02, num03;
806  float mean01, mean02, mean03;
807  float rms01, rms02, rms03;
808 
809  update01 = UtilsClient::getBinStatistics(ha01_[ism-1], ie, ip, num01, mean01, rms01);
810  update02 = UtilsClient::getBinStatistics(ha02_[ism-1], ie, ip, num02, mean02, rms02);
811  update03 = UtilsClient::getBinStatistics(ha03_[ism-1], ie, ip, num03, mean03, rms03);
812 
813  if ( update01 ) {
814  meanAmpl01 += mean01;
815  nCry01++;
816  }
817 
818  if ( update02 ) {
819  meanAmpl02 += mean02;
820  nCry02++;
821  }
822 
823  if ( update03 ) {
824  meanAmpl03 += mean03;
825  nCry03++;
826  }
827 
828  }
829  }
830 
831  if ( nCry01 > 0 ) meanAmpl01 /= float (nCry01);
832  if ( nCry02 > 0 ) meanAmpl02 /= float (nCry02);
833  if ( nCry03 > 0 ) meanAmpl03 /= float (nCry03);
834 
835  for ( int ie = 1; ie <= 85; ie++ ) {
836  for ( int ip = 1; ip <= 20; ip++ ) {
837 
838  if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent( ie, ip, 2. );
839  if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent( ie, ip, 2. );
840  if ( meg03_[ism-1] ) meg03_[ism-1]->setBinContent( ie, ip, 2. );
841 
842  bool update01;
843  bool update02;
844  bool update03;
845 
846  float num01, num02, num03;
847  float mean01, mean02, mean03;
848  float rms01, rms02, rms03;
849 
850  update01 = UtilsClient::getBinStatistics(ha01_[ism-1], ie, ip, num01, mean01, rms01);
851  update02 = UtilsClient::getBinStatistics(ha02_[ism-1], ie, ip, num02, mean02, rms02);
852  update03 = UtilsClient::getBinStatistics(ha03_[ism-1], ie, ip, num03, mean03, rms03);
853 
854  if ( update01 ) {
855 
856  float val;
857 
858  val = 1.;
859  if ( std::abs(mean01 - meanAmpl01) > std::abs(percentVariation_ * meanAmpl01) || mean01 < amplitudeThreshold_ )
860  val = 0.;
861  if ( rms01 > RMSThreshold_ )
862  val = 0.;
863  if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent( ie, ip, val );
864 
865  int ic = Numbers::icEB(ism, ie, ip);
866 
867  if ( mea01_[ism-1] ) {
868  if ( mean01 > 0. ) {
869  mea01_[ism-1]->setBinContent( ic, mean01 );
870  mea01_[ism-1]->setBinError( ic, rms01 );
871  } else {
872  mea01_[ism-1]->setEntries( 1.+mea01_[ism-1]->getEntries() );
873  }
874  }
875 
876  }
877 
878  if ( update02 ) {
879 
880  float val;
881 
882  val = 1.;
883  if ( std::abs(mean02 - meanAmpl02) > std::abs(percentVariation_ * meanAmpl02) || mean02 < amplitudeThreshold_ )
884  val = 0.;
885  if ( rms02 > RMSThreshold_ )
886  val = 0.;
887  if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent( ie, ip, val );
888 
889  int ic = Numbers::icEB(ism, ie, ip);
890 
891  if ( mea02_[ism-1] ) {
892  if ( mean02 > 0. ) {
893  mea02_[ism-1]->setBinContent( ic, mean02 );
894  mea02_[ism-1]->setBinError( ic, rms02 );
895  } else {
896  mea02_[ism-1]->setEntries( 1.+mea02_[ism-1]->getEntries() );
897  }
898  }
899 
900  }
901 
902  if ( update03 ) {
903 
904  float val;
905 
906  val = 1.;
907  if ( std::abs(mean03 - meanAmpl03) > std::abs(percentVariation_ * meanAmpl03) || mean03 < amplitudeThreshold_ )
908  val = 0.;
909  if ( rms03 > RMSThreshold_ )
910  val = 0.;
911  if ( meg03_[ism-1] ) meg03_[ism-1]->setBinContent( ie, ip, val );
912 
913  int ic = Numbers::icEB(ism, ie, ip);
914 
915  if ( mea03_[ism-1] ) {
916  if ( mean03 > 0. ) {
917  mea03_[ism-1]->setBinContent( ic, mean03 );
918  mea03_[ism-1]->setBinError( ic, rms03 );
919  } else {
920  mea03_[ism-1]->setEntries( 1.+mea03_[ism-1]->getEntries() );
921  }
922  }
923 
924  }
925 
926  if ( Masks::maskChannel(ism, ie, ip, bits01, EcalBarrel) ) UtilsClient::maskBinContent( meg01_[ism-1], ie, ip );
927  if ( Masks::maskChannel(ism, ie, ip, bits02, EcalBarrel) ) UtilsClient::maskBinContent( meg02_[ism-1], ie, ip );
928  if ( Masks::maskChannel(ism, ie, ip, bits03, EcalBarrel) ) UtilsClient::maskBinContent( meg03_[ism-1], ie, ip );
929 
930  }
931  }
932 
933  for ( int i = 1; i <= 10; i++ ) {
934 
935  if ( meg04_[ism-1] ) meg04_[ism-1]->setBinContent( i, 1, 2. );
936  if ( meg05_[ism-1] ) meg05_[ism-1]->setBinContent( i, 1, 2. );
937 
938  bool update01;
939  bool update02;
940  bool update03;
941  bool update04;
942 
943  float num01, num02, num03, num04;
944  float mean01, mean02, mean03, mean04;
945  float rms01, rms02, rms03, rms04;
946 
947  update01 = UtilsClient::getBinStatistics(i01_[ism-1], i, 0, num01, mean01, rms01);
948  update02 = UtilsClient::getBinStatistics(i02_[ism-1], i, 0, num02, mean02, rms02);
949  update03 = UtilsClient::getBinStatistics(i03_[ism-1], i, 0, num03, mean03, rms03);
950  update04 = UtilsClient::getBinStatistics(i04_[ism-1], i, 0, num04, mean04, rms04);
951 
952  if ( mer04_[ism-1] ) mer04_[ism-1]->Fill(rms03);
953  if ( mer05_[ism-1] ) mer05_[ism-1]->Fill(rms04);
954 
955  if ( update01 && update03 ) {
956 
957  float val;
958 
959  val = 1.;
960  if ( mean01 < amplitudeThresholdPnG01_ )
961  val = 0.;
962  if ( mean03 < pedPnExpectedMean_[0] - pedPnDiscrepancyMean_[0] ||
963  pedPnExpectedMean_[0] + pedPnDiscrepancyMean_[0] < mean03)
964  val = 0.;
965  if ( rms03 > pedPnRMSThreshold_[0] )
966  val = 0.;
967  if ( meg04_[ism-1] ) meg04_[ism-1]->setBinContent(i, 1, val);
968 
969  }
970 
971  if ( update02 && update04 ) {
972 
973  float val;
974 
975  val = 1.;
976  if ( mean02 < amplitudeThresholdPnG16_ )
977  val = 0.;
978  if ( mean04 < pedPnExpectedMean_[1] - pedPnDiscrepancyMean_[1] ||
979  pedPnExpectedMean_[1] + pedPnDiscrepancyMean_[1] < mean04)
980  val = 0.;
981  if ( rms04 > pedPnRMSThreshold_[1] )
982  val = 0.;
983  if ( meg05_[ism-1] ) meg05_[ism-1]->setBinContent(i, 1, val);
984 
985  }
986 
987  if ( Masks::maskPn(ism, i, bits01|bits04, EcalBarrel) ) UtilsClient::maskBinContent( meg04_[ism-1], i, 1 );
988  if ( Masks::maskPn(ism, i, bits03|bits05, EcalBarrel) ) UtilsClient::maskBinContent( meg05_[ism-1], i, 1 );
989 
990  }
991 
992  for ( int i = 1; i <= 10; i++ ) {
993 
994  if ( hs01_[ism-1] ) {
995  int ic = UtilsClient::getFirstNonEmptyChannel( hs01_[ism-1] );
996  if ( me_hs01_[ism-1] ) {
997  me_hs01_[ism-1]->setBinContent( i, hs01_[ism-1]->GetBinContent(ic, i) );
998  me_hs01_[ism-1]->setBinError( i, hs01_[ism-1]->GetBinError(ic, i) );
999  }
1000  }
1001 
1002  if ( hs02_[ism-1] ) {
1003  int ic = UtilsClient::getFirstNonEmptyChannel( hs02_[ism-1] );
1004  if ( me_hs02_[ism-1] ) {
1005  me_hs02_[ism-1]->setBinContent( i, hs02_[ism-1]->GetBinContent(ic, i) );
1006  me_hs02_[ism-1]->setBinError( i, hs02_[ism-1]->GetBinError(ic, i) );
1007  }
1008  }
1009 
1010  if ( hs03_[ism-1] ) {
1011  int ic = UtilsClient::getFirstNonEmptyChannel( hs03_[ism-1] );
1012  if ( me_hs03_[ism-1] ) {
1013  me_hs03_[ism-1]->setBinContent( i, hs03_[ism-1]->GetBinContent(ic, i) );
1014  me_hs03_[ism-1]->setBinError( i, hs03_[ism-1]->GetBinError(ic, i) );
1015  }
1016  }
1017 
1018  }
1019 
1020  }
1021 
1022 }
1023 
int adc(sample_type sample)
get the ADC sample (12 bits)
float pedPnDiscrepancyMean_[2]
TProfile * i02_[36]
Cache logicID vector from database.
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
void setPedRMSG1(float mean)
Definition: MonPNMGPADat.h:36
void setBinContent(int binx, double content)
set content of bin (1-D)
static bool maskChannel(int ism, int i1, int i2, uint32_t bits, const EcalSubdetector subdet)
Definition: Masks.cc:60
static const int TESTPULSE_LOW_GAIN_RMS_ERROR
MonitorElement * meg05_[36]
TProfile2D * ha02_[36]
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:717
void setADCRMSG1(float rms)
void endJob(void)
EndJob.
void setup(void)
Setup.
static T getHisto(const MonitorElement *me, bool clone=false, T ret=0)
Returns the histogram contained by the Monitor Element.
Definition: UtilsClient.h:91
Some &quot;id&quot; conversions.
static std::string sEB(const unsigned ism)
Definition: Numbers.cc:94
void beginRun(void)
BeginRun.
static const int PEDESTAL_HIGH_GAIN_MEAN_ERROR
static bool getBinQuality(const MonitorElement *me, const int ix, const int iy)
Returns true if the bin quality is good or masked.
Definition: UtilsClient.cc:201
TProfile2D * ha03_[36]
MonitorElement * meg03_[36]
MonitorElement * mea01_[36]
MonitorElement * me_hs03_[36]
MonitorElement * meg02_[36]
#define abs(x)
Definition: mlp_lapack.h:159
void beginJob(void)
BeginJob.
void setADCMeanG1(float mean)
void setADCMeanG6(float mean)
MonitorElement * mer05_[36]
static const int TESTPULSE_MIDDLE_GAIN_MEAN_ERROR
void setTaskStatus(bool status)
Definition: MonPNMGPADat.h:45
static const int PEDESTAL_LOW_GAIN_RMS_ERROR
static unsigned icEB(const unsigned ism, const unsigned ix, const unsigned iy)
Definition: Numbers.cc:729
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
static void maskBinContent(const MonitorElement *me, const int ix, const int iy)
Mask the bin content.
Definition: UtilsClient.cc:231
void cleanup(void)
Cleanup.
MonitorElement * mea03_[36]
static const int PEDESTAL_HIGH_GAIN_RMS_ERROR
static bool maskPn(int ism, int i1, uint32_t bits, const EcalSubdetector subdet)
Definition: Masks.cc:112
void setSamples(std::vector< float > &samples, int gain)
void Fill(long long x)
static bool getBinStatus(const MonitorElement *me, const int ix, const int iy)
Returns true if the bin status is red/dark red.
Definition: UtilsClient.cc:216
MonitorElement * mea02_[36]
static const int TESTPULSE_MIDDLE_GAIN_RMS_ERROR
void setADCMeanG12(float mean)
void setADCMeanG16(float mean)
Definition: MonPNMGPADat.h:27
EBTestPulseClient(const edm::ParameterSet &ps)
Constructor.
std::vector< int > MGPAGainsPN_
std::vector< int > MGPAGains_
void setTaskStatus(bool status)
void removeElement(const std::string &name)
Definition: DQMStore.cc:2572
channel masking
TProfile2D * hs03_[36]
static const int TESTPULSE_HIGH_GAIN_RMS_ERROR
static unsigned indexEB(const unsigned ism, const unsigned ie, const unsigned ip)
Definition: Numbers.cc:698
void setADCRMSG12(float rms)
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
MonitorElement * meg04_[36]
std::string getName(Reflex::Type &cc)
Definition: ClassFiller.cc:18
void setEntries(double nentries)
set # of entries
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1468
TProfile * i01_[36]
Ecal Monitor Utils for Client.
static const int PEDESTAL_LOW_GAIN_MEAN_ERROR
virtual ~EBTestPulseClient()
Destructor.
static bool getBinStatistics(TH1 *histo, const int ix, const int iy, float &num, float &mean, float &rms, float minEntries=1.)
Returns true if the bin contains good statistical data.
Definition: UtilsClient.cc:74
TProfile2D * ha01_[36]
static const int TESTPULSE_LOW_GAIN_MEAN_ERROR
void setADCRMSG6(float rms)
void endRun(void)
EndRun.
MonitorElement * me_hs02_[36]
void setPedMeanG16(float mean)
Definition: MonPNMGPADat.h:39
void setADCRMSG1(float mean)
Definition: MonPNMGPADat.h:24
TProfile2D * hs01_[36]
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
Definition: Numbers.cc:246
TProfile * i03_[36]
void setADCMeanG1(float mean)
Definition: MonPNMGPADat.h:21
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
std::vector< int > superModules_
tuple cout
Definition: gather_cfg.py:121
void insertDataSet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
MonitorElement * mer04_[36]
static const int TESTPULSE_HIGH_GAIN_MEAN_ERROR
tuple status
Definition: ntuplemaker.py:245
void setADCRMSG16(float mean)
Definition: MonPNMGPADat.h:30
MonitorElement * me_hs01_[36]
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:845
static EcalLogicID getEcalLogicID(const char *name, const int id1=EcalLogicID::NULLID, const int id2=EcalLogicID::NULLID, const int id3=EcalLogicID::NULLID)
Definition: LogicID.h:31
MonitorElement * meg01_[36]
Definition: RunIOV.h:13
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
TProfile2D * hs02_[36]
void setPedMeanG1(float mean)
Definition: MonPNMGPADat.h:33
static void printBadChannels(const MonitorElement *me, TH1 *hi, bool positive_only=false)
Print the bad channels.
Definition: UtilsClient.cc:14
void analyze(void)
Analyze.
void setPedRMSG16(float mean)
Definition: MonPNMGPADat.h:42
TProfile * i04_[36]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
static int getFirstNonEmptyChannel(const TProfile2D *histo)
Find the first non empty bin.
Definition: UtilsClient.cc:246