CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EELedClient.cc
Go to the documentation of this file.
1 /*
2  * \file EELedClient.cc
3  *
4  * \author G. Della Ricca
5  * \author G. Franzoni
6  *
7 */
8 
9 #include <memory>
10 #include <iostream>
11 #include <fstream>
12 #include <iomanip>
13 #include <math.h>
14 
16 
19 
20 #ifdef WITH_ECAL_COND_DB
32 #endif
33 
35 
38 
40 
42 
44 
45  // cloneME switch
46  cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
47 
48  // verbose switch
49  verbose_ = ps.getUntrackedParameter<bool>("verbose", true);
50 
51  // debug switch
52  debug_ = ps.getUntrackedParameter<bool>("debug", false);
53 
54  // prefixME path
55  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
56 
57  // enableCleanup_ switch
58  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
59 
60  // vector of selected Super Modules (Defaults to all 18).
61  superModules_.reserve(18);
62  for ( unsigned int i = 1; i <= 18; i++ ) superModules_.push_back(i);
63  superModules_ = ps.getUntrackedParameter<std::vector<int> >("superModules", superModules_);
64 
65  ledWavelengths_.reserve(2);
66  for ( unsigned int i = 1; i <= 2; i++ ) ledWavelengths_.push_back(i);
67  ledWavelengths_ = ps.getUntrackedParameter<std::vector<int> >("ledWavelengths", ledWavelengths_);
68 
69  if ( verbose_ ) {
70  std::cout << " Led wavelengths:" << std::endl;
71  for ( unsigned int i = 0; i < ledWavelengths_.size(); i++ ) {
72  std::cout << " " << ledWavelengths_[i];
73  }
74  std::cout << std::endl;
75  }
76 
77  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
78 
79  int ism = superModules_[i];
80 
81  h01_[ism-1] = 0;
82  h02_[ism-1] = 0;
83  h03_[ism-1] = 0;
84  h04_[ism-1] = 0;
85 
86  h09_[ism-1] = 0;
87  h10_[ism-1] = 0;
88 
89  hs01_[ism-1] = 0;
90  hs02_[ism-1] = 0;
91 
92  i01_[ism-1] = 0;
93  i02_[ism-1] = 0;
94 
95  i05_[ism-1] = 0;
96  i06_[ism-1] = 0;
97 
98  i09_[ism-1] = 0;
99  i10_[ism-1] = 0;
100 
101  i13_[ism-1] = 0;
102  i14_[ism-1] = 0;
103 
104  }
105 
106  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
107 
108  int ism = superModules_[i];
109 
110  meg01_[ism-1] = 0;
111  meg02_[ism-1] = 0;
112 
113  meg05_[ism-1] = 0;
114  meg06_[ism-1] = 0;
115 
116  meg09_[ism-1] = 0;
117  meg10_[ism-1] = 0;
118 
119  mea01_[ism-1] = 0;
120  mea02_[ism-1] = 0;
121 
122  met01_[ism-1] = 0;
123  met02_[ism-1] = 0;
124 
125  metav01_[ism-1] = 0;
126  metav02_[ism-1] = 0;
127 
128  metrms01_[ism-1] = 0;
129  metrms02_[ism-1] = 0;
130 
131  meaopn01_[ism-1] = 0;
132  meaopn02_[ism-1] = 0;
133 
134  mepnprms01_[ism-1] = 0;
135  mepnprms02_[ism-1] = 0;
136 
137  mepnprms05_[ism-1] = 0;
138  mepnprms06_[ism-1] = 0;
139 
140  me_hs01_[ism-1] = 0;
141  me_hs02_[ism-1] = 0;
142 
143  }
144 
145  percentVariation01_ = 999.; // not used nor not normalized VPTs
146  percentVariation03_ = 999.; // not used nor not normalized VPTs
147 
150 
151  rmsThreshold01_ = 10.;
152  rmsThreshold03_ = 10.;
153 
156 
157  pedPnExpectedMean_[0] = 750.0;
158  pedPnExpectedMean_[1] = 750.0;
159 
160  pedPnDiscrepancyMean_[0] = 100.0;
161  pedPnDiscrepancyMean_[1] = 100.0;
162 
163  pedPnRMSThreshold_[0] = 10.;
164  pedPnRMSThreshold_[1] = 10.;
165 
166 }
167 
169 
170 }
171 
173 
175 
176  if ( debug_ ) std::cout << "EELedClient: beginJob" << std::endl;
177 
178  ievt_ = 0;
179  jevt_ = 0;
180 
181 }
182 
184 
185  if ( debug_ ) std::cout << "EELedClient: beginRun" << std::endl;
186 
187  jevt_ = 0;
188 
189  this->setup();
190 
191 }
192 
194 
195  if ( debug_ ) std::cout << "EELedClient: endJob, ievt = " << ievt_ << std::endl;
196 
197  this->cleanup();
198 
199 }
200 
202 
203  if ( debug_ ) std::cout << "EELedClient: endRun, jevt = " << jevt_ << std::endl;
204 
205  this->cleanup();
206 
207 }
208 
209 void EELedClient::setup(void) {
210 
212 
213  dqmStore_->setCurrentFolder( prefixME_ + "/EELedClient" );
214 
215  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
216 
217  int ism = superModules_[i];
218 
219  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
220  if ( meg01_[ism-1] ) dqmStore_->removeElement( meg01_[ism-1]->getName() );
221  name = "EELDT led quality L1 " + Numbers::sEE(ism);
222  meg01_[ism-1] = dqmStore_->book2D(name, name, 50, Numbers::ix0EE(ism)+0., Numbers::ix0EE(ism)+50., 50, Numbers::iy0EE(ism)+0., Numbers::iy0EE(ism)+50.);
223  meg01_[ism-1]->setAxisTitle("ix", 1);
224  if ( ism >= 1 && ism <= 9 ) meg01_[ism-1]->setAxisTitle("101-ix", 1);
225  meg01_[ism-1]->setAxisTitle("iy", 2);
226  }
227  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
228  if ( meg02_[ism-1] ) dqmStore_->removeElement( meg02_[ism-1]->getName() );
229  name = "EELDT led quality L2 " + Numbers::sEE(ism);
230  meg02_[ism-1] = dqmStore_->book2D(name, name, 50, Numbers::ix0EE(ism)+0., Numbers::ix0EE(ism)+50., 50, Numbers::iy0EE(ism)+0., Numbers::iy0EE(ism)+50.);
231  meg02_[ism-1]->setAxisTitle("ix", 1);
232  if ( ism >= 1 && ism <= 9 ) meg02_[ism-1]->setAxisTitle("101-ix", 1);
233  meg02_[ism-1]->setAxisTitle("iy", 2);
234  }
235 
236  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
237  if ( meg05_[ism-1] ) dqmStore_->removeElement( meg05_[ism-1]->getName() );
238  name = "EELDT led quality L1 PNs G01 " + Numbers::sEE(ism);
239  meg05_[ism-1] = dqmStore_->book2D(name, name, 10, 0., 10., 1, 0., 5.);
240  meg05_[ism-1]->setAxisTitle("pseudo-strip", 1);
241  meg05_[ism-1]->setAxisTitle("channel", 2);
242  }
243  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
244  if ( meg06_[ism-1] ) dqmStore_->removeElement( meg06_[ism-1]->getName() );
245  name = "EELDT led quality L2 PNs G01 " + Numbers::sEE(ism);
246  meg06_[ism-1] = dqmStore_->book2D(name, name, 10, 0., 10., 1, 0., 5.);
247  meg06_[ism-1]->setAxisTitle("pseudo-strip", 1);
248  meg06_[ism-1]->setAxisTitle("channel", 2);
249  }
250 
251  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
252  if ( meg09_[ism-1] ) dqmStore_->removeElement( meg09_[ism-1]->getName() );
253  name = "EELDT led quality L1 PNs G16 " + Numbers::sEE(ism);
254  meg09_[ism-1] = dqmStore_->book2D(name, name, 10, 0., 10., 1, 0., 5.);
255  meg09_[ism-1]->setAxisTitle("pseudo-strip", 1);
256  meg09_[ism-1]->setAxisTitle("channel", 2);
257  }
258  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
259  if ( meg10_[ism-1] ) dqmStore_->removeElement( meg10_[ism-1]->getName() );
260  name = "EELDT led quality L2 PNs G16 " + Numbers::sEE(ism);
261  meg10_[ism-1] = dqmStore_->book2D(name, name, 10, 0., 10., 1, 0., 5.);
262  meg10_[ism-1]->setAxisTitle("pseudo-strip", 1);
263  meg10_[ism-1]->setAxisTitle("channel", 2);
264  }
265 
266  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
267  if ( mea01_[ism-1] ) dqmStore_->removeElement( mea01_[ism-1]->getName() );;
268  name = "EELDT amplitude L1 " + Numbers::sEE(ism);
269  mea01_[ism-1] = dqmStore_->book1D(name, name, 850, 0., 850.);
270  mea01_[ism-1]->setAxisTitle("channel", 1);
271  mea01_[ism-1]->setAxisTitle("amplitude", 2);
272  }
273  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
274  if ( mea02_[ism-1] ) dqmStore_->removeElement( mea02_[ism-1]->getName() );
275  name = "EELDT amplitude L2 " + Numbers::sEE(ism);
276  mea02_[ism-1] = dqmStore_->book1D(name, name, 850, 0., 850.);
277  mea02_[ism-1]->setAxisTitle("channel", 1);
278  mea02_[ism-1]->setAxisTitle("amplitude", 2);
279  }
280 
281  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
282  if ( met01_[ism-1] ) dqmStore_->removeElement( met01_[ism-1]->getName() );
283  name = "EELDT led timing L1 " + Numbers::sEE(ism);
284  met01_[ism-1] = dqmStore_->book1D(name, name, 850, 0., 850.);
285  met01_[ism-1]->setAxisTitle("channel", 1);
286  met01_[ism-1]->setAxisTitle("jitter", 2);
287  }
288  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
289  if ( met02_[ism-1] ) dqmStore_->removeElement( met02_[ism-1]->getName() );
290  name = "EELDT led timing L2 " + Numbers::sEE(ism);
291  met02_[ism-1] = dqmStore_->book1D(name, name, 850, 0., 850.);
292  met02_[ism-1]->setAxisTitle("channel", 1);
293  met02_[ism-1]->setAxisTitle("jitter", 2);
294  }
295 
296  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
297  if ( metav01_[ism-1] ) dqmStore_->removeElement( metav01_[ism-1]->getName() );
298  name = "EELDT led timing mean L1 " + Numbers::sEE(ism);
299  metav01_[ism-1] = dqmStore_->book1D(name, name, 100, 0., 10.);
300  metav01_[ism-1]->setAxisTitle("mean", 1);
301  }
302  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
303  if ( metav02_[ism-1] ) dqmStore_->removeElement( metav02_[ism-1]->getName() );
304  name = "EELDT led timing mean L2 " + Numbers::sEE(ism);
305  metav02_[ism-1] = dqmStore_->book1D(name, name, 100, 0., 10.);
306  metav02_[ism-1]->setAxisTitle("mean", 1);
307  }
308 
309  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
310  if ( metrms01_[ism-1] ) dqmStore_->removeElement( metrms01_[ism-1]->getName() );
311  name = "EELDT led timing rms L1 " + Numbers::sEE(ism);
312  metrms01_[ism-1] = dqmStore_->book1D(name, name, 100, 0., 0.5);
313  metrms01_[ism-1]->setAxisTitle("rms", 1);
314  }
315  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
316  if ( metrms02_[ism-1] ) dqmStore_->removeElement( metrms02_[ism-1]->getName() );
317  name = "EELDT led timing rms L2 " + Numbers::sEE(ism);
318  metrms02_[ism-1] = dqmStore_->book1D(name, name, 100, 0., 0.5);
319  metrms02_[ism-1]->setAxisTitle("rms", 1);
320  }
321 
322  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
323  if ( meaopn01_[ism-1] ) dqmStore_->removeElement( meaopn01_[ism-1]->getName() );
324  name = "EELDT amplitude over PN L1 " + Numbers::sEE(ism);
325  meaopn01_[ism-1] = dqmStore_->book1D(name, name, 850, 0., 850.);
326  meaopn01_[ism-1]->setAxisTitle("channel", 1);
327  meaopn01_[ism-1]->setAxisTitle("amplitude/PN", 2);
328  }
329  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
330  if ( meaopn02_[ism-1] ) dqmStore_->removeElement( meaopn02_[ism-1]->getName() );
331  name = "EELDT amplitude over PN L2 " + Numbers::sEE(ism);
332  meaopn02_[ism-1] = dqmStore_->book1D(name, name, 850, 0., 850.);
333  meaopn02_[ism-1]->setAxisTitle("channel", 1);
334  meaopn02_[ism-1]->setAxisTitle("amplitude/PN", 2);
335  }
336 
337  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
338  if ( mepnprms01_[ism-1] ) dqmStore_->removeElement( mepnprms01_[ism-1]->getName() );
339  name = "EELDT PNs pedestal rms " + Numbers::sEE(ism) + " G01 L1";
340  mepnprms01_[ism-1] = dqmStore_->book1D(name, name, 100, 0., 10.);
341  mepnprms01_[ism-1]->setAxisTitle("rms", 1);
342  }
343  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
344  if ( mepnprms02_[ism-1] ) dqmStore_->removeElement( mepnprms02_[ism-1]->getName() );
345  name = "EELDT PNs pedestal rms " + Numbers::sEE(ism) + " G01 L2";
346  mepnprms02_[ism-1] = dqmStore_->book1D(name, name, 100, 0., 10.);
347  mepnprms02_[ism-1]->setAxisTitle("rms", 1);
348  }
349 
350  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
351  if ( mepnprms05_[ism-1] ) dqmStore_->removeElement( mepnprms05_[ism-1]->getName() );
352  name = "EELDT PNs pedestal rms " + Numbers::sEE(ism) + " G16 L1";
353  mepnprms05_[ism-1] = dqmStore_->book1D(name, name, 100, 0., 10.);
354  mepnprms05_[ism-1]->setAxisTitle("rms", 1);
355  }
356  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
357  if ( mepnprms06_[ism-1] ) dqmStore_->removeElement( mepnprms06_[ism-1]->getName() );
358  name = "EELDT PNs pedestal rms " + Numbers::sEE(ism) + " G16 L2";
359  mepnprms06_[ism-1] = dqmStore_->book1D(name, name, 100, 0., 10.);
360  mepnprms06_[ism-1]->setAxisTitle("rms", 1);
361  }
362 
363  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
364  if ( me_hs01_[ism-1] ) dqmStore_->removeElement( me_hs01_[ism-1]->getName() );
365  name = "EELDT led shape L1 " + Numbers::sEE(ism);
366  me_hs01_[ism-1] = dqmStore_->book1D(name, name, 10, 0., 10.);
367  me_hs01_[ism-1]->setAxisTitle("sample", 1);
368  me_hs01_[ism-1]->setAxisTitle("amplitude", 2);
369  }
370  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
371  if ( me_hs02_[ism-1] ) dqmStore_->removeElement( me_hs02_[ism-1]->getName() );
372  name = "EELDT led shape L2 " + Numbers::sEE(ism);
373  me_hs02_[ism-1] = dqmStore_->book1D(name, name, 10, 0., 10.);
374  me_hs02_[ism-1]->setAxisTitle("sample", 1);
375  me_hs02_[ism-1]->setAxisTitle("amplitude", 2);
376  }
377 
378  }
379 
380  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
381 
382  int ism = superModules_[i];
383 
384  if ( meg01_[ism-1] ) meg01_[ism-1]->Reset();
385  if ( meg02_[ism-1] ) meg02_[ism-1]->Reset();
386 
387  if ( meg05_[ism-1] ) meg05_[ism-1]->Reset();
388  if ( meg06_[ism-1] ) meg06_[ism-1]->Reset();
389 
390  if ( meg09_[ism-1] ) meg09_[ism-1]->Reset();
391  if ( meg10_[ism-1] ) meg10_[ism-1]->Reset();
392 
393  for ( int ix = 1; ix <= 50; ix++ ) {
394  for ( int iy = 1; iy <= 50; iy++ ) {
395 
396  if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent( ix, iy, 6. );
397  if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent( ix, iy, 6. );
398 
399  int jx = ix + Numbers::ix0EE(ism);
400  int jy = iy + Numbers::iy0EE(ism);
401 
402  if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
403 
404  if ( Numbers::validEE(ism, jx, jy) ) {
405  if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent( ix, iy, 2. );
406  if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent( ix, iy, 2. );
407  }
408 
409  }
410  }
411 
412  for ( int i = 1; i <= 10; i++ ) {
413 
414  if ( meg05_[ism-1] ) meg05_[ism-1]->setBinContent( i, 1, 6. );
415  if ( meg06_[ism-1] ) meg06_[ism-1]->setBinContent( i, 1, 6. );
416 
417  if ( meg09_[ism-1] ) meg09_[ism-1]->setBinContent( i, 1, 6. );
418  if ( meg10_[ism-1] ) meg10_[ism-1]->setBinContent( i, 1, 6. );
419 
420  // non-existing mem
421  if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) ) continue;
422  if ( (ism >= 12 && ism <= 13) || (ism >= 16 && ism <= 18) ) continue;
423 
424  if ( meg05_[ism-1] ) meg05_[ism-1]->setBinContent( i, 1, 2. );
425  if ( meg06_[ism-1] ) meg06_[ism-1]->setBinContent( i, 1, 2. );
426 
427  if ( meg09_[ism-1] ) meg09_[ism-1]->setBinContent( i, 1, 2. );
428  if ( meg10_[ism-1] ) meg10_[ism-1]->setBinContent( i, 1, 2. );
429 
430  }
431 
432  if ( mea01_[ism-1] ) mea01_[ism-1]->Reset();
433  if ( mea02_[ism-1] ) mea02_[ism-1]->Reset();
434 
435  if ( met01_[ism-1] ) met01_[ism-1]->Reset();
436  if ( met02_[ism-1] ) met02_[ism-1]->Reset();
437 
438  if ( metav01_[ism-1] ) metav01_[ism-1]->Reset();
439  if ( metav02_[ism-1] ) metav02_[ism-1]->Reset();
440 
441  if ( metrms01_[ism-1] ) metrms01_[ism-1]->Reset();
442  if ( metrms02_[ism-1] ) metrms02_[ism-1]->Reset();
443 
444  if ( meaopn01_[ism-1] ) meaopn01_[ism-1]->Reset();
445  if ( meaopn02_[ism-1] ) meaopn02_[ism-1]->Reset();
446 
447  if ( mepnprms01_[ism-1] ) mepnprms01_[ism-1]->Reset();
448  if ( mepnprms02_[ism-1] ) mepnprms02_[ism-1]->Reset();
449 
450  if ( mepnprms05_[ism-1] ) mepnprms05_[ism-1]->Reset();
451  if ( mepnprms06_[ism-1] ) mepnprms06_[ism-1]->Reset();
452 
453  if ( me_hs01_[ism-1] ) me_hs01_[ism-1]->Reset();
454  if ( me_hs02_[ism-1] ) me_hs02_[ism-1]->Reset();
455 
456  }
457 
458 }
459 
461 
462  if ( ! enableCleanup_ ) return;
463 
464  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
465 
466  int ism = superModules_[i];
467 
468  if ( cloneME_ ) {
469  if ( h01_[ism-1] ) delete h01_[ism-1];
470  if ( h02_[ism-1] ) delete h02_[ism-1];
471  if ( h03_[ism-1] ) delete h03_[ism-1];
472  if ( h04_[ism-1] ) delete h04_[ism-1];
473 
474  if ( h09_[ism-1] ) delete h09_[ism-1];
475  if ( h10_[ism-1] ) delete h10_[ism-1];
476 
477  if ( hs01_[ism-1] ) delete hs01_[ism-1];
478  if ( hs02_[ism-1] ) delete hs02_[ism-1];
479 
480  if ( i01_[ism-1] ) delete i01_[ism-1];
481  if ( i02_[ism-1] ) delete i02_[ism-1];
482 
483  if ( i05_[ism-1] ) delete i05_[ism-1];
484  if ( i06_[ism-1] ) delete i06_[ism-1];
485 
486  if ( i09_[ism-1] ) delete i09_[ism-1];
487  if ( i10_[ism-1] ) delete i10_[ism-1];
488 
489  if ( i13_[ism-1] ) delete i13_[ism-1];
490  if ( i14_[ism-1] ) delete i14_[ism-1];
491  }
492 
493  h01_[ism-1] = 0;
494  h02_[ism-1] = 0;
495  h03_[ism-1] = 0;
496  h04_[ism-1] = 0;
497 
498  h09_[ism-1] = 0;
499  h10_[ism-1] = 0;
500 
501  hs01_[ism-1] = 0;
502  hs02_[ism-1] = 0;
503 
504  i01_[ism-1] = 0;
505  i02_[ism-1] = 0;
506 
507  i05_[ism-1] = 0;
508  i06_[ism-1] = 0;
509 
510  i09_[ism-1] = 0;
511  i10_[ism-1] = 0;
512 
513  i13_[ism-1] = 0;
514  i14_[ism-1] = 0;
515 
516  }
517 
518  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
519 
520  int ism = superModules_[i];
521 
522  dqmStore_->setCurrentFolder( prefixME_ + "/EELedClient" );
523 
524  if ( meg01_[ism-1] ) dqmStore_->removeElement( meg01_[ism-1]->getName() );
525  meg01_[ism-1] = 0;
526  if ( meg02_[ism-1] ) dqmStore_->removeElement( meg02_[ism-1]->getName() );
527  meg02_[ism-1] = 0;
528 
529  if ( meg05_[ism-1] ) dqmStore_->removeElement( meg05_[ism-1]->getName() );
530  meg05_[ism-1] = 0;
531  if ( meg06_[ism-1] ) dqmStore_->removeElement( meg06_[ism-1]->getName() );
532  meg06_[ism-1] = 0;
533 
534  if ( meg09_[ism-1] ) dqmStore_->removeElement( meg09_[ism-1]->getName() );
535  meg09_[ism-1] = 0;
536  if ( meg10_[ism-1] ) dqmStore_->removeElement( meg10_[ism-1]->getName() );
537  meg10_[ism-1] = 0;
538 
539  if ( mea01_[ism-1] ) dqmStore_->removeElement( mea01_[ism-1]->getName() );
540  mea01_[ism-1] = 0;
541  if ( mea02_[ism-1] ) dqmStore_->removeElement( mea02_[ism-1]->getName() );
542  mea02_[ism-1] = 0;
543 
544  if ( met01_[ism-1] ) dqmStore_->removeElement( met01_[ism-1]->getName() );
545  met01_[ism-1] = 0;
546  if ( met02_[ism-1] ) dqmStore_->removeElement( met02_[ism-1]->getName() );
547  met02_[ism-1] = 0;
548 
549  if ( metav01_[ism-1] ) dqmStore_->removeElement( metav01_[ism-1]->getName() );
550  metav01_[ism-1] = 0;
551  if ( metav02_[ism-1] ) dqmStore_->removeElement( metav02_[ism-1]->getName() );
552  metav02_[ism-1] = 0;
553 
554  if ( metrms01_[ism-1] ) dqmStore_->removeElement( metrms01_[ism-1]->getName() );
555  metrms01_[ism-1] = 0;
556  if ( metrms02_[ism-1] ) dqmStore_->removeElement( metrms02_[ism-1]->getName() );
557  metrms02_[ism-1] = 0;
558 
559  if ( meaopn01_[ism-1] ) dqmStore_->removeElement( meaopn01_[ism-1]->getName() );
560  meaopn01_[ism-1] = 0;
561  if ( meaopn02_[ism-1] ) dqmStore_->removeElement( meaopn02_[ism-1]->getName() );
562  meaopn02_[ism-1] = 0;
563 
564  if ( mepnprms01_[ism-1] ) dqmStore_->removeElement( mepnprms01_[ism-1]->getName() );
565  mepnprms01_[ism-1] = 0;
566  if ( mepnprms02_[ism-1] ) dqmStore_->removeElement( mepnprms02_[ism-1]->getName() );
567  mepnprms02_[ism-1] = 0;
568 
569  if ( mepnprms05_[ism-1] ) dqmStore_->removeElement( mepnprms05_[ism-1]->getName() );
570  mepnprms05_[ism-1] = 0;
571  if ( mepnprms06_[ism-1] ) dqmStore_->removeElement( mepnprms06_[ism-1]->getName() );
572  mepnprms06_[ism-1] = 0;
573 
574  if ( me_hs01_[ism-1] ) dqmStore_->removeElement( me_hs01_[ism-1]->getName() );
575  me_hs01_[ism-1] = 0;
576  if ( me_hs02_[ism-1] ) dqmStore_->removeElement( me_hs02_[ism-1]->getName() );
577  me_hs02_[ism-1] = 0;
578 
579  }
580 
581 }
582 
583 #ifdef WITH_ECAL_COND_DB
584 bool EELedClient::writeDb(EcalCondDBInterface* econn, RunIOV* runiov, MonRunIOV* moniov, bool& status) {
585 
586  status = true;
587 
588  EcalLogicID ecid;
589 
590  MonLed1Dat vpt_l1;
591  std::map<EcalLogicID, MonLed1Dat> dataset1_l1;
592  MonLed2Dat vpt_l2;
593  std::map<EcalLogicID, MonLed2Dat> dataset1_l2;
594 
595  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
596 
597  int ism = superModules_[i];
598 
599  if ( verbose_ ) {
600  std::cout << " " << Numbers::sEE(ism) << " (ism=" << ism << ")" << std::endl;
601  std::cout << std::endl;
602  }
603 
604  if ( verbose_ ) {
605  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
606  UtilsClient::printBadChannels(meg01_[ism-1], h01_[ism-1]);
607  }
608  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
609  UtilsClient::printBadChannels(meg02_[ism-1], h03_[ism-1]);
610  }
611  }
612 
613  for ( int ix = 1; ix <= 50; ix++ ) {
614  for ( int iy = 1; iy <= 50; iy++ ) {
615 
616  int jx = ix + Numbers::ix0EE(ism);
617  int jy = iy + Numbers::iy0EE(ism);
618 
619  if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
620 
621  if ( ! Numbers::validEE(ism, jx, jy) ) continue;
622 
623  bool update01;
624  bool update02;
625  bool update03;
626  bool update04;
627 
628  float num01, num02, num03, num04;
629  float mean01, mean02, mean03, mean04;
630  float rms01, rms02, rms03, rms04;
631 
632  update01 = UtilsClient::getBinStatistics(h01_[ism-1], ix, iy, num01, mean01, rms01);
633  update02 = UtilsClient::getBinStatistics(h02_[ism-1], ix, iy, num02, mean02, rms02);
634  update03 = UtilsClient::getBinStatistics(h03_[ism-1], ix, iy, num03, mean03, rms03);
635  update04 = UtilsClient::getBinStatistics(h04_[ism-1], ix, iy, num04, mean04, rms04);
636 
637  if ( update01 || update02 ) {
638 
639  if ( Numbers::icEE(ism, jx, jy) == 1 ) {
640 
641  if ( verbose_ ) {
642  std::cout << "Preparing dataset for " << Numbers::sEE(ism) << " (ism=" << ism << ")" << std::endl;
643  std::cout << "L1 (" << Numbers::ix0EE(i+1)+ix << "," << Numbers::iy0EE(i+1)+iy << ") " << num01 << " " << mean01 << " " << rms01 << std::endl;
644  std::cout << std::endl;
645  }
646 
647  }
648 
649  vpt_l1.setVPTMean(mean01);
650  vpt_l1.setVPTRMS(rms01);
651 
652  vpt_l1.setVPTOverPNMean(mean02);
653  vpt_l1.setVPTOverPNRMS(rms02);
654 
655  if ( UtilsClient::getBinStatus(meg01_[ism-1], ix, iy) ) {
656  vpt_l1.setTaskStatus(true);
657  } else {
658  vpt_l1.setTaskStatus(false);
659  }
660 
661  status = status && UtilsClient::getBinQuality(meg01_[ism-1], ix, iy);
662 
663  int ic = Numbers::indexEE(ism, jx, jy);
664 
665  if ( ic == -1 ) continue;
666 
667  if ( econn ) {
668  ecid = LogicID::getEcalLogicID("EE_crystal_number", Numbers::iSM(ism, EcalEndcap), ic);
669  dataset1_l1[ecid] = vpt_l1;
670  }
671 
672  }
673 
674  if ( update03 || update04 ) {
675 
676  if ( Numbers::icEE(ism, jx, jy) == 1 ) {
677 
678  if ( verbose_ ) {
679  std::cout << "Preparing dataset for " << Numbers::sEE(ism) << " (ism=" << ism << ")" << std::endl;
680  std::cout << "L2 (" << Numbers::ix0EE(i+1)+ix << "," << Numbers::iy0EE(i+1)+iy << ") " << num03 << " " << mean03 << " " << rms03 << std::endl;
681  std::cout << std::endl;
682  }
683 
684  }
685 
686  vpt_l2.setVPTMean(mean03);
687  vpt_l2.setVPTRMS(rms03);
688 
689  vpt_l2.setVPTOverPNMean(mean04);
690  vpt_l2.setVPTOverPNRMS(rms04);
691 
692  if ( UtilsClient::getBinStatus(meg02_[ism-1], ix, iy) ) {
693  vpt_l2.setTaskStatus(true);
694  } else {
695  vpt_l2.setTaskStatus(false);
696  }
697 
698  status = status && UtilsClient::getBinQuality(meg02_[ism-1], ix, iy);
699 
700  int ic = Numbers::indexEE(ism, jx, jy);
701 
702  if ( ic == -1 ) continue;
703 
704  if ( econn ) {
705  ecid = LogicID::getEcalLogicID("EE_crystal_number", Numbers::iSM(ism, EcalEndcap), ic);
706  dataset1_l2[ecid] = vpt_l2;
707  }
708 
709  }
710 
711  }
712  }
713 
714  }
715 
716  if ( econn ) {
717  try {
718  if ( verbose_ ) std::cout << "Inserting MonLedDat ..." << std::endl;
719  if ( dataset1_l1.size() != 0 ) econn->insertDataArraySet(&dataset1_l1, moniov);
720  if ( dataset1_l2.size() != 0 ) econn->insertDataArraySet(&dataset1_l2, moniov);
721  if ( verbose_ ) std::cout << "done." << std::endl;
722  } catch (std::runtime_error &e) {
723  std::cerr << e.what() << std::endl;
724  }
725  }
726 
727  if ( verbose_ ) std::cout << std::endl;
728 
729  MonPNLed1Dat pn_l1;
730  std::map<EcalLogicID, MonPNLed1Dat> dataset2_l1;
731  MonPNLed2Dat pn_l2;
732  std::map<EcalLogicID, MonPNLed2Dat> dataset2_l2;
733 
734  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
735 
736  int ism = superModules_[i];
737 
738  if ( verbose_ ) {
739  std::cout << " " << Numbers::sEE(ism) << " (ism=" << ism << ")" << std::endl;
740  std::cout << std::endl;
741  }
742 
743  if ( verbose_ ) {
744  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
745  UtilsClient::printBadChannels(meg05_[ism-1], i01_[ism-1]);
746  UtilsClient::printBadChannels(meg05_[ism-1], i05_[ism-1]);
747  }
748  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
749  UtilsClient::printBadChannels(meg06_[ism-1], i02_[ism-1]);
750  UtilsClient::printBadChannels(meg06_[ism-1], i06_[ism-1]);
751  }
752 
753  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
754  UtilsClient::printBadChannels(meg09_[ism-1], i09_[ism-1]);
755  UtilsClient::printBadChannels(meg09_[ism-1], i13_[ism-1]);
756  }
757  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
758  UtilsClient::printBadChannels(meg10_[ism-1], i10_[ism-1]);
759  UtilsClient::printBadChannels(meg10_[ism-1], i14_[ism-1]);
760  }
761  }
762 
763  for ( int i = 1; i <= 10; i++ ) {
764 
765  bool update01;
766  bool update02;
767 
768  bool update05;
769  bool update06;
770 
771  bool update09;
772  bool update10;
773 
774  bool update13;
775  bool update14;
776 
777  float num01, num02, num05, num06;
778  float num09, num10, num13, num14;
779  float mean01, mean02, mean05, mean06;
780  float mean09, mean10, mean13, mean14;
781  float rms01, rms02, rms05, rms06;
782  float rms09, rms10, rms13, rms14;
783 
784  update01 = UtilsClient::getBinStatistics(i01_[ism-1], i, 0, num01, mean01, rms01);
785  update02 = UtilsClient::getBinStatistics(i02_[ism-1], i, 0, num02, mean02, rms02);
786 
787  update05 = UtilsClient::getBinStatistics(i05_[ism-1], i, 0, num05, mean05, rms05);
788  update06 = UtilsClient::getBinStatistics(i06_[ism-1], i, 0, num06, mean06, rms06);
789 
790  update09 = UtilsClient::getBinStatistics(i09_[ism-1], i, 0, num09, mean09, rms09);
791  update10 = UtilsClient::getBinStatistics(i10_[ism-1], i, 0, num10, mean10, rms10);
792 
793  update13 = UtilsClient::getBinStatistics(i13_[ism-1], i, 0, num13, mean13, rms13);
794  update14 = UtilsClient::getBinStatistics(i14_[ism-1], i, 0, num14, mean14, rms14);
795 
796  if ( update01 || update05 || update09 || update13 ) {
797 
798  if ( i == 1 ) {
799 
800  if ( verbose_ ) {
801  std::cout << "Preparing dataset for " << Numbers::sEE(ism) << " (ism=" << ism << ")" << std::endl;
802  std::cout << "PNs (" << i << ") L1 G01 " << num01 << " " << mean01 << " " << rms01 << std::endl;
803  std::cout << "PNs (" << i << ") L1 G16 " << num09 << " " << mean09 << " " << rms09 << std::endl;
804  std::cout << std::endl;
805  }
806 
807  }
808 
809  pn_l1.setADCMeanG1(mean01);
810  pn_l1.setADCRMSG1(rms01);
811 
812  pn_l1.setPedMeanG1(mean05);
813  pn_l1.setPedRMSG1(rms05);
814 
815  pn_l1.setADCMeanG16(mean09);
816  pn_l1.setADCRMSG16(rms09);
817 
818  pn_l1.setPedMeanG16(mean13);
819  pn_l1.setPedRMSG16(rms13);
820 
821  if ( UtilsClient::getBinStatus(meg05_[ism-1], i, 1) ||
822  UtilsClient::getBinStatus(meg09_[ism-1], i, 1) ) {
823  pn_l1.setTaskStatus(true);
824  } else {
825  pn_l1.setTaskStatus(false);
826  }
827 
828  status = status && ( UtilsClient::getBinQuality(meg05_[ism-1], i, 1) ||
829  UtilsClient::getBinQuality(meg09_[ism-1], i, 1) );
830 
831  if ( econn ) {
832  ecid = LogicID::getEcalLogicID("EE_LM_PN", Numbers::iSM(ism, EcalEndcap), i-1);
833  dataset2_l1[ecid] = pn_l1;
834  }
835 
836  }
837 
838  if ( update02 || update06 || update10 || update14 ) {
839 
840  if ( i == 1 ) {
841 
842  if ( verbose_ ) {
843  std::cout << "Preparing dataset for " << Numbers::sEE(ism) << " (ism=" << ism << ")" << std::endl;
844  std::cout << "PNs (" << i << ") L2 G01 " << num02 << " " << mean02 << " " << rms02 << std::endl;
845  std::cout << "PNs (" << i << ") L2 G16 " << num10 << " " << mean10 << " " << rms10 << std::endl;
846  std::cout << std::endl;
847  }
848 
849  }
850 
851  pn_l2.setADCMeanG1(mean02);
852  pn_l2.setADCRMSG1(rms02);
853 
854  pn_l2.setPedMeanG1(mean06);
855  pn_l2.setPedRMSG1(rms06);
856 
857  pn_l2.setADCMeanG16(mean10);
858  pn_l2.setADCRMSG16(rms10);
859 
860  pn_l2.setPedMeanG16(mean14);
861  pn_l2.setPedRMSG16(rms14);
862 
863  if ( UtilsClient::getBinStatus(meg06_[ism-1], i, 1) ||
864  UtilsClient::getBinStatus(meg10_[ism-1], i, 1) ) {
865  pn_l2.setTaskStatus(true);
866  } else {
867  pn_l2.setTaskStatus(false);
868  }
869 
870  status = status && ( UtilsClient::getBinQuality(meg06_[ism-1], i, 1) ||
871  UtilsClient::getBinQuality(meg10_[ism-1], i, 1) );
872 
873  if ( econn ) {
874  ecid = LogicID::getEcalLogicID("EE_LM_PN", Numbers::iSM(ism, EcalEndcap), i-1);
875  dataset2_l2[ecid] = pn_l2;
876  }
877 
878  }
879 
880  }
881 
882  }
883 
884  if ( econn ) {
885  try {
886  if ( verbose_ ) std::cout << "Inserting MonPnDat ..." << std::endl;
887  if ( dataset2_l1.size() != 0 ) econn->insertDataArraySet(&dataset2_l1, moniov);
888  if ( dataset2_l2.size() != 0 ) econn->insertDataArraySet(&dataset2_l2, moniov);
889  if ( verbose_ ) std::cout << "done." << std::endl;
890  } catch (std::runtime_error &e) {
891  std::cerr << e.what() << std::endl;
892  }
893  }
894 
895  if ( verbose_ ) std::cout << std::endl;
896 
898  std::map<EcalLogicID, MonTimingLed1CrystalDat> dataset3_l1;
900  std::map<EcalLogicID, MonTimingLed2CrystalDat> dataset3_l2;
901 
902  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
903 
904  int ism = superModules_[i];
905 
906  if ( verbose_ ) {
907  std::cout << " " << Numbers::sEE(ism) << " (ism=" << ism << ")" << std::endl;
908  std::cout << std::endl;
909  }
910 
911  for ( int ix = 1; ix <= 50; ix++ ) {
912  for ( int iy = 1; iy <= 50; iy++ ) {
913 
914  int jx = ix + Numbers::ix0EE(ism);
915  int jy = iy + Numbers::iy0EE(ism);
916 
917  if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
918 
919  if ( ! Numbers::validEE(ism, jx, jy) ) continue;
920 
921  bool update01;
922  bool update02;
923 
924  float num01, num02;
925  float mean01, mean02;
926  float rms01, rms02;
927 
928  update01 = UtilsClient::getBinStatistics(h09_[ism-1], ix, iy, num01, mean01, rms01);
929  update02 = UtilsClient::getBinStatistics(h10_[ism-1], ix, iy, num02, mean02, rms02);
930 
931  if ( update01 ) {
932 
933  if ( Numbers::icEE(ism, jx, jy) == 1 ) {
934 
935  if ( verbose_ ) {
936  std::cout << "Preparing dataset for " << Numbers::sEE(ism) << " (ism=" << ism << ")" << std::endl;
937  std::cout << "L1 crystal (" << Numbers::ix0EE(i+1)+ix << "," << Numbers::iy0EE(i+1)+iy << ") " << num01 << " " << mean01 << " " << rms01 << std::endl;
938  std::cout << std::endl;
939  }
940 
941  }
942 
943  t_l1.setTimingMean(mean01);
944  t_l1.setTimingRMS(rms01);
945 
946  if ( UtilsClient::getBinStatus(meg01_[ism-1], ix, iy) ) {
947  t_l1.setTaskStatus(true);
948  } else {
949  t_l1.setTaskStatus(false);
950  }
951 
952  status = status && UtilsClient::getBinQuality(meg01_[ism-1], ix, iy);
953 
954  int ic = Numbers::indexEE(ism, jx, jy);
955 
956  if ( ic == -1 ) continue;
957 
958  if ( econn ) {
959  ecid = LogicID::getEcalLogicID("EE_crystal_number", Numbers::iSM(ism, EcalEndcap), ic);
960  dataset3_l1[ecid] = t_l1;
961  }
962 
963  }
964 
965  if ( update02 ) {
966 
967  if ( Numbers::icEE(ism, jx, jy) == 1 ) {
968 
969  if ( verbose_ ) {
970  std::cout << "Preparing dataset for " << Numbers::sEE(ism) << " (ism=" << ism << ")" << std::endl;
971  std::cout << "L2 crystal (" << Numbers::ix0EE(i+1)+ix << "," << Numbers::iy0EE(i+1)+iy << ") " << num02 << " " << mean02 << " " << rms02 << std::endl;
972  std::cout << std::endl;
973  }
974 
975  }
976 
977  t_l2.setTimingMean(mean02);
978  t_l2.setTimingRMS(rms02);
979 
980  if ( UtilsClient::getBinStatus(meg02_[ism-1], ix, iy) ) {
981  t_l2.setTaskStatus(true);
982  } else {
983  t_l2.setTaskStatus(false);
984  }
985 
986  status = status && UtilsClient::getBinQuality(meg02_[ism-1], ix, iy);
987 
988  int ic = Numbers::indexEE(ism, jx, jy);
989 
990  if ( ic == -1 ) continue;
991 
992  if ( econn ) {
993  ecid = LogicID::getEcalLogicID("EE_crystal_number", Numbers::iSM(ism, EcalEndcap), ic);
994  dataset3_l2[ecid] = t_l2;
995  }
996 
997  }
998 
999  }
1000  }
1001 
1002  }
1003 
1004  if ( econn ) {
1005  try {
1006  if ( verbose_ ) std::cout << "Inserting MonTimingLaserCrystalDat ..." << std::endl;
1007  if ( dataset3_l1.size() != 0 ) econn->insertDataArraySet(&dataset3_l1, moniov);
1008  if ( dataset3_l2.size() != 0 ) econn->insertDataArraySet(&dataset3_l2, moniov);
1009  if ( verbose_ ) std::cout << "done." << std::endl;
1010  } catch (std::runtime_error &e) {
1011  std::cerr << e.what() << std::endl;
1012  }
1013  }
1014 
1015  return true;
1016 
1017 }
1018 #endif
1019 
1021 
1022  ievt_++;
1023  jevt_++;
1024  if ( ievt_ % 10 == 0 ) {
1025  if ( debug_ ) std::cout << "EELedClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl;
1026  }
1027 
1028  uint32_t bits01 = 0;
1029  bits01 |= 1 << EcalDQMStatusHelper::LED_MEAN_ERROR;
1030  bits01 |= 1 << EcalDQMStatusHelper::LED_RMS_ERROR;
1031 
1032  uint32_t bits02 = 0;
1035 
1036  uint32_t bits03 = 0;
1039 
1040  uint32_t bits04 = 0;
1043 
1044  MonitorElement* me;
1045 
1046  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
1047 
1048  int ism = superModules_[i];
1049 
1050  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
1051 
1052  me = dqmStore_->get( prefixME_ + "/EELedTask/Led1/EELDT amplitude " + Numbers::sEE(ism) + " L1" );
1053  h01_[ism-1] = UtilsClient::getHisto( me, cloneME_, h01_[ism-1] );
1054 
1055  me = dqmStore_->get( prefixME_ + "/EELedTask/Led1/EELDT amplitude over PN " + Numbers::sEE(ism) + " L1" );
1056  h02_[ism-1] = UtilsClient::getHisto( me, cloneME_, h02_[ism-1] );
1057 
1058  }
1059 
1060  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
1061 
1062  me = dqmStore_->get( prefixME_ + "/EELedTask/Led2/EELDT amplitude " + Numbers::sEE(ism) + " L2" );
1063  h03_[ism-1] = UtilsClient::getHisto( me, cloneME_, h03_[ism-1] );
1064 
1065  me = dqmStore_->get( prefixME_ + "/EELedTask/Led2/EELDT amplitude over PN " + Numbers::sEE(ism) + " L2" );
1066  h04_[ism-1] = UtilsClient::getHisto( me, cloneME_, h04_[ism-1] );
1067 
1068  }
1069 
1070  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
1071 
1072  me = dqmStore_->get( prefixME_ + "/EELedTask/Led1/EELDT timing " + Numbers::sEE(ism) + " L1" );
1073  h09_[ism-1] = UtilsClient::getHisto( me, cloneME_, h09_[ism-1] );
1074 
1075  }
1076 
1077  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
1078 
1079  me = dqmStore_->get( prefixME_ + "/EELedTask/Led2/EELDT timing " + Numbers::sEE(ism) + " L2" );
1080  h10_[ism-1] = UtilsClient::getHisto( me, cloneME_, h10_[ism-1] );
1081 
1082  }
1083 
1084  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
1085 
1086  me = dqmStore_->get( prefixME_ + "/EELedTask/Led1/EELDT shape " + Numbers::sEE(ism) + " L1" );
1087  hs01_[ism-1] = UtilsClient::getHisto( me, cloneME_, hs01_[ism-1] );
1088 
1089  }
1090 
1091  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
1092 
1093  me = dqmStore_->get( prefixME_ + "/EELedTask/Led2/EELDT shape " + Numbers::sEE(ism) + " L2" );
1094  hs02_[ism-1] = UtilsClient::getHisto( me, cloneME_, hs02_[ism-1] );
1095 
1096  }
1097 
1098  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
1099 
1100  me = dqmStore_->get( prefixME_ + "/EELedTask/Led1/PN/Gain01/EELDT PNs amplitude " + Numbers::sEE(ism) + " G01 L1" );
1101  i01_[ism-1] = UtilsClient::getHisto( me, cloneME_, i01_[ism-1] );
1102 
1103  }
1104 
1105  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
1106 
1107  me = dqmStore_->get( prefixME_ + "/EELedTask/Led2/PN/Gain01/EELDT PNs amplitude " + Numbers::sEE(ism) + " G01 L2" );
1108  i02_[ism-1] = UtilsClient::getHisto( me, cloneME_, i02_[ism-1] );
1109 
1110  }
1111 
1112  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
1113 
1114  me = dqmStore_->get( prefixME_ + "/EELedTask/Led1/PN/Gain01/EELDT PNs pedestal " + Numbers::sEE(ism) + " G01 L1" );
1115  i05_[ism-1] = UtilsClient::getHisto( me, cloneME_, i05_[ism-1] );
1116 
1117  }
1118 
1119  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
1120 
1121  me = dqmStore_->get( prefixME_ + "/EELedTask/Led2/PN/Gain01/EELDT PNs pedestal " + Numbers::sEE(ism) + " G01 L2" );
1122  i06_[ism-1] = UtilsClient::getHisto( me, cloneME_, i06_[ism-1] );
1123 
1124  }
1125 
1126  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
1127 
1128  me = dqmStore_->get( prefixME_ + "/EELedTask/Led1/PN/Gain16/EELDT PNs amplitude " + Numbers::sEE(ism) + " G16 L1" );
1129  i09_[ism-1] = UtilsClient::getHisto( me, cloneME_, i09_[ism-1] );
1130 
1131  }
1132 
1133  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
1134 
1135  me = dqmStore_->get( prefixME_ + "/EELedTask/Led2/PN/Gain16/EELDT PNs amplitude " + Numbers::sEE(ism) + " G16 L2" );
1136  i10_[ism-1] = UtilsClient::getHisto( me, cloneME_, i10_[ism-1] );
1137 
1138  }
1139 
1140  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
1141 
1142  me = dqmStore_->get( prefixME_ + "/EELedTask/Led1/PN/Gain16/EELDT PNs pedestal " + Numbers::sEE(ism) + " G16 L1" );
1143  i13_[ism-1] = UtilsClient::getHisto( me, cloneME_, i13_[ism-1] );
1144 
1145  }
1146 
1147  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
1148 
1149  me = dqmStore_->get( prefixME_ + "/EELedTask/Led2/PN/Gain16/EELDT PNs pedestal " + Numbers::sEE(ism) + " G16 L2" );
1150  i14_[ism-1] = UtilsClient::getHisto( me, cloneME_, i14_[ism-1] );
1151 
1152  }
1153 
1154  if ( meg01_[ism-1] ) meg01_[ism-1]->Reset();
1155  if ( meg02_[ism-1] ) meg02_[ism-1]->Reset();
1156 
1157  if ( meg05_[ism-1] ) meg05_[ism-1]->Reset();
1158  if ( meg06_[ism-1] ) meg06_[ism-1]->Reset();
1159 
1160  if ( meg09_[ism-1] ) meg09_[ism-1]->Reset();
1161  if ( meg10_[ism-1] ) meg10_[ism-1]->Reset();
1162 
1163  if ( mea01_[ism-1] ) mea01_[ism-1]->Reset();
1164  if ( mea02_[ism-1] ) mea02_[ism-1]->Reset();
1165 
1166  if ( met01_[ism-1] ) met01_[ism-1]->Reset();
1167  if ( met02_[ism-1] ) met02_[ism-1]->Reset();
1168 
1169  if ( metav01_[ism-1] ) metav01_[ism-1]->Reset();
1170  if ( metav02_[ism-1] ) metav02_[ism-1]->Reset();
1171 
1172  if ( metrms01_[ism-1] ) metrms01_[ism-1]->Reset();
1173  if ( metrms02_[ism-1] ) metrms02_[ism-1]->Reset();
1174 
1175  if ( meaopn01_[ism-1] ) meaopn01_[ism-1]->Reset();
1176  if ( meaopn02_[ism-1] ) meaopn02_[ism-1]->Reset();
1177 
1178  if ( mepnprms01_[ism-1] ) mepnprms01_[ism-1]->Reset();
1179  if ( mepnprms02_[ism-1] ) mepnprms02_[ism-1]->Reset();
1180 
1181  if ( me_hs01_[ism-1] ) me_hs01_[ism-1]->Reset();
1182  if ( me_hs02_[ism-1] ) me_hs02_[ism-1]->Reset();
1183 
1184  float meanAmplL1, meanAmplL2;
1185 
1186  int nCryL1, nCryL2;
1187 
1188  meanAmplL1 = meanAmplL2 = 0.;
1189 
1190  nCryL1 = nCryL2 = 0;
1191 
1192  for ( int ix = 1; ix <= 50; ix++ ) {
1193  for ( int iy = 1; iy <= 50; iy++ ) {
1194 
1195  bool update01;
1196  bool update02;
1197 
1198  float num01, num02;
1199  float mean01, mean02;
1200  float rms01, rms02;
1201 
1202  update01 = UtilsClient::getBinStatistics(h01_[ism-1], ix, iy, num01, mean01, rms01);
1203  update02 = UtilsClient::getBinStatistics(h03_[ism-1], ix, iy, num02, mean02, rms02);
1204 
1205  if ( update01 ) {
1206  meanAmplL1 += mean01;
1207  nCryL1++;
1208  }
1209 
1210  if ( update02 ) {
1211  meanAmplL2 += mean02;
1212  nCryL2++;
1213  }
1214 
1215  }
1216  }
1217 
1218  if ( nCryL1 > 0 ) meanAmplL1 /= float (nCryL1);
1219  if ( nCryL2 > 0 ) meanAmplL2 /= float (nCryL2);
1220 
1221  for ( int ix = 1; ix <= 50; ix++ ) {
1222  for ( int iy = 1; iy <= 50; iy++ ) {
1223 
1224  if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent( ix, iy, 6.);
1225  if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent( ix, iy, 6.);
1226 
1227  int jx = ix + Numbers::ix0EE(ism);
1228  int jy = iy + Numbers::iy0EE(ism);
1229 
1230  if ( ism >= 1 && ism <= 9 ) jx = 101 - jx;
1231 
1232  if ( Numbers::validEE(ism, jx, jy) ) {
1233  if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent( ix, iy, 2.);
1234  if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent( ix, iy, 2.);
1235  }
1236 
1237  bool update01;
1238  bool update02;
1239  bool update03;
1240  bool update04;
1241 
1242  bool update09;
1243  bool update10;
1244 
1245  float num01, num02, num03, num04;
1246  float num09, num10;
1247  float mean01, mean02, mean03, mean04;
1248  float mean09, mean10;
1249  float rms01, rms02, rms03, rms04;
1250  float rms09, rms10;
1251 
1252  update01 = UtilsClient::getBinStatistics(h01_[ism-1], ix, iy, num01, mean01, rms01);
1253  update02 = UtilsClient::getBinStatistics(h02_[ism-1], ix, iy, num02, mean02, rms02);
1254  update03 = UtilsClient::getBinStatistics(h03_[ism-1], ix, iy, num03, mean03, rms03);
1255  update04 = UtilsClient::getBinStatistics(h04_[ism-1], ix, iy, num04, mean04, rms04);
1256 
1257  update09 = UtilsClient::getBinStatistics(h09_[ism-1], ix, iy, num09, mean09, rms09);
1258  update10 = UtilsClient::getBinStatistics(h10_[ism-1], ix, iy, num10, mean10, rms10);
1259 
1260  if ( update01 ) {
1261 
1262  float val;
1263 
1264  val = 1.;
1265  if ( mean01 < amplitudeThreshold01_ || rms01 > rmsThreshold01_ )
1266  val = 0.;
1267  if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent( ix, iy, val );
1268 
1269  int ic = Numbers::icEE(ism, jx, jy);
1270 
1271  if ( ic != -1 ) {
1272  if ( mea01_[ism-1] ) {
1273  if ( mean01 > 0. ) {
1274  mea01_[ism-1]->setBinContent( ic, mean01 );
1275  mea01_[ism-1]->setBinError( ic, rms01 );
1276  } else {
1277  mea01_[ism-1]->setEntries( 1.+mea01_[ism-1]->getEntries() );
1278  }
1279  }
1280  }
1281 
1282  }
1283 
1284  if ( update03 ) {
1285 
1286  float val;
1287 
1288  val = 1.;
1289  if ( mean03 < amplitudeThreshold03_ || rms03 > rmsThreshold03_ )
1290  val = 0.;
1291  if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent( ix, iy, val );
1292 
1293  int ic = Numbers::icEE(ism, jx, jy);
1294 
1295  if ( ic != -1 ) {
1296  if ( mea02_[ism-1] ) {
1297  if ( mean03 > 0. ) {
1298  mea02_[ism-1]->setBinContent( ic, mean03 );
1299  mea02_[ism-1]->setBinError( ic, rms03 );
1300  } else {
1301  mea02_[ism-1]->setEntries( 1.+mea02_[ism-1]->getEntries() );
1302  }
1303  }
1304  }
1305 
1306  }
1307 
1308  if ( Masks::maskChannel(ism, ix, iy, bits01, EcalEndcap) ) {
1309  UtilsClient::maskBinContent( meg01_[ism-1], ix, iy );
1310  UtilsClient::maskBinContent( meg02_[ism-1], ix, iy );
1311  }
1312 
1313  if ( update02 ) {
1314 
1315  int ic = Numbers::icEE(ism, jx, jy);
1316 
1317  if ( ic != -1 ) {
1318  if ( meaopn01_[ism-1] ) {
1319  if ( mean02 > 0. ) {
1320  meaopn01_[ism-1]->setBinContent( ic, mean02 );
1321  meaopn01_[ism-1]->setBinError( ic, rms02 );
1322  } else {
1323  meaopn01_[ism-1]->setEntries( 1.+meaopn01_[ism-1]->getEntries() );
1324  }
1325  }
1326  }
1327 
1328  }
1329 
1330  if ( update04 ) {
1331 
1332  int ic = Numbers::icEE(ism, jx, jy);
1333 
1334  if ( ic != -1 ) {
1335  if ( meaopn02_[ism-1] ) {
1336  if ( mean04 > 0. ) {
1337  meaopn02_[ism-1]->setBinContent( ic, mean04 );
1338  meaopn02_[ism-1]->setBinError( ic, rms04 );
1339  } else {
1340  meaopn02_[ism-1]->setEntries( 1.+meaopn02_[ism-1]->getEntries() );
1341  }
1342  }
1343  }
1344 
1345  }
1346 
1347  if ( update09 ) {
1348 
1349  int ic = Numbers::icEE(ism, jx, jy);
1350 
1351  if ( ic != -1 ) {
1352  if ( met01_[ism-1] ) {
1353  if ( mean09 > 0. ) {
1354  met01_[ism-1]->setBinContent( ic, mean09 );
1355  met01_[ism-1]->setBinError( ic, rms09 );
1356  } else {
1357  met01_[ism-1]->setEntries(1.+met01_[ism-1]->getEntries());
1358  }
1359  }
1360 
1361  if ( metav01_[ism-1] ) metav01_[ism-1] ->Fill(mean09);
1362  if ( metrms01_[ism-1] ) metrms01_[ism-1]->Fill(rms09);
1363  }
1364 
1365  }
1366 
1367  if ( update10 ) {
1368 
1369  int ic = Numbers::icEE(ism, jx, jy);
1370 
1371  if ( ic != -1 ) {
1372  if ( met02_[ism-1] ) {
1373  if ( mean10 > 0. ) {
1374  met02_[ism-1]->setBinContent( ic, mean10 );
1375  met02_[ism-1]->setBinError( ic, rms10 );
1376  } else {
1377  met02_[ism-1]->setEntries(1.+met02_[ism-1]->getEntries());
1378  }
1379  }
1380 
1381  if ( metav02_[ism-1] ) metav02_[ism-1] ->Fill(mean10);
1382  if ( metrms02_[ism-1] ) metrms02_[ism-1]->Fill(rms10);
1383  }
1384 
1385  }
1386 
1387  }
1388  }
1389 
1390  for ( int i = 1; i <= 10; i++ ) {
1391 
1392  if ( meg05_[ism-1] ) meg05_[ism-1]->setBinContent( i, 1, 6. );
1393  if ( meg06_[ism-1] ) meg06_[ism-1]->setBinContent( i, 1, 6. );
1394 
1395  if ( meg09_[ism-1] ) meg09_[ism-1]->setBinContent( i, 1, 6. );
1396  if ( meg10_[ism-1] ) meg10_[ism-1]->setBinContent( i, 1, 6. );
1397 
1398  // non-existing mem
1399  if ( (ism >= 3 && ism <= 4) || (ism >= 7 && ism <= 9) ) continue;
1400  if ( (ism >= 12 && ism <= 13) || (ism >= 16 && ism <= 18) ) continue;
1401 
1402  if ( meg05_[ism-1] ) meg05_[ism-1]->setBinContent( i, 1, 2. );
1403  if ( meg06_[ism-1] ) meg06_[ism-1]->setBinContent( i, 1, 2. );
1404 
1405  if ( meg09_[ism-1] ) meg09_[ism-1]->setBinContent( i, 1, 2. );
1406  if ( meg10_[ism-1] ) meg10_[ism-1]->setBinContent( i, 1, 2. );
1407 
1408  bool update01;
1409  bool update02;
1410 
1411  bool update05;
1412  bool update06;
1413 
1414  bool update09;
1415  bool update10;
1416 
1417  bool update13;
1418  bool update14;
1419 
1420  float num01, num02, num05, num06;
1421  float num09, num10, num13, num14;
1422  float mean01, mean02, mean05, mean06;
1423  float mean09, mean10, mean13, mean14;
1424  float rms01, rms02, rms05, rms06;
1425  float rms09, rms10, rms13, rms14;
1426 
1427  update01 = UtilsClient::getBinStatistics(i01_[ism-1], i, 0, num01, mean01, rms01);
1428  update02 = UtilsClient::getBinStatistics(i02_[ism-1], i, 0, num02, mean02, rms02);
1429 
1430  update05 = UtilsClient::getBinStatistics(i05_[ism-1], i, 0, num05, mean05, rms05);
1431  update06 = UtilsClient::getBinStatistics(i06_[ism-1], i, 0, num06, mean06, rms06);
1432 
1433  update09 = UtilsClient::getBinStatistics(i09_[ism-1], i, 0, num09, mean09, rms09);
1434  update10 = UtilsClient::getBinStatistics(i10_[ism-1], i, 0, num10, mean10, rms10);
1435 
1436  update13 = UtilsClient::getBinStatistics(i13_[ism-1], i, 0, num13, mean13, rms13);
1437  update14 = UtilsClient::getBinStatistics(i14_[ism-1], i, 0, num14, mean14, rms14);
1438 
1439  if ( update01 && update05 ) {
1440 
1441  float val;
1442 
1443  val = 1.;
1444  if ( mean01 < amplitudeThresholdPnG01_ )
1445  val = 0.;
1446  if ( mean05 < pedPnExpectedMean_[0] - pedPnDiscrepancyMean_[0] ||
1447  pedPnExpectedMean_[0] + pedPnDiscrepancyMean_[0] < mean05)
1448  val = 0.;
1449  if ( rms05 > pedPnRMSThreshold_[0] )
1450  val = 0.;
1451 
1452  if ( meg05_[ism-1] ) meg05_[ism-1]->setBinContent(i, 1, val);
1453  if ( mepnprms01_[ism-1] ) mepnprms01_[ism-1]->Fill(rms05);
1454 
1455  }
1456 
1457  if ( update02 && update06 ) {
1458 
1459  float val;
1460 
1461  val = 1.;
1462  if ( mean02 < amplitudeThresholdPnG01_ )
1463  val = 0.;
1464  if ( mean06 < pedPnExpectedMean_[0] - pedPnDiscrepancyMean_[0] ||
1465  pedPnExpectedMean_[0] + pedPnDiscrepancyMean_[0] < mean06)
1466  val = 0.;
1467  if ( rms06 > pedPnRMSThreshold_[0] )
1468  val = 0.;
1469 
1470  if ( meg06_[ism-1] ) meg06_[ism-1]->setBinContent(i, 1, val);
1471  if ( mepnprms02_[ism-1] ) mepnprms02_[ism-1]->Fill(rms06);
1472 
1473  }
1474 
1475  if ( update09 && update13 ) {
1476 
1477  float val;
1478 
1479  val = 1.;
1480  if ( mean09 < amplitudeThresholdPnG16_ )
1481  val = 0.;
1482  if ( mean13 < pedPnExpectedMean_[1] - pedPnDiscrepancyMean_[1] ||
1483  pedPnExpectedMean_[1] + pedPnDiscrepancyMean_[1] < mean13)
1484  val = 0.;
1485  if ( rms13 > pedPnRMSThreshold_[1] )
1486  val = 0.;
1487 
1488  if ( meg09_[ism-1] ) meg09_[ism-1]->setBinContent(i, 1, val);
1489  if ( mepnprms05_[ism-1] ) mepnprms05_[ism-1]->Fill(rms13);
1490 
1491  }
1492 
1493  if ( update10 && update14 ) {
1494 
1495  float val;
1496 
1497  val = 1.;
1498  if ( mean10 < amplitudeThresholdPnG16_ )
1499  val = 0.;
1500  // if ( mean14 < pedestalThresholdPn_ )
1501  if ( mean14 < pedPnExpectedMean_[1] - pedPnDiscrepancyMean_[1] ||
1502  pedPnExpectedMean_[1] + pedPnDiscrepancyMean_[1] < mean14)
1503  val = 0.;
1504  if ( rms14 > pedPnRMSThreshold_[1] )
1505  val = 0.;
1506 
1507  if ( meg10_[ism-1] ) meg10_[ism-1]->setBinContent(i, 1, val);
1508  if ( mepnprms06_[ism-1] ) mepnprms06_[ism-1]->Fill(rms14);
1509 
1510  }
1511 
1512  if ( Masks::maskPn(ism, i, bits01|bits03, EcalEndcap) ) {
1513  UtilsClient::maskBinContent( meg05_[ism-1], i, 1 );
1514  UtilsClient::maskBinContent( meg06_[ism-1], i, 1 );
1515  }
1516 
1517  if ( Masks::maskPn(ism, i, bits01|bits04, EcalEndcap) ) {
1518  UtilsClient::maskBinContent( meg09_[ism-1], i, 1 );
1519  UtilsClient::maskBinContent( meg10_[ism-1], i, 1 );
1520  }
1521 
1522  }
1523 
1524  for ( int i = 1; i <= 10; i++ ) {
1525 
1526  if ( hs01_[ism-1] ) {
1527  int ic = UtilsClient::getFirstNonEmptyChannel( hs01_[ism-1] );
1528  if ( me_hs01_[ism-1] ) {
1529  me_hs01_[ism-1]->setBinContent( i, hs01_[ism-1]->GetBinContent(ic, i) );
1530  me_hs01_[ism-1]->setBinError( i, hs01_[ism-1]->GetBinError(ic, i) );
1531  }
1532  }
1533 
1534  if ( hs02_[ism-1] ) {
1535  int ic = UtilsClient::getFirstNonEmptyChannel( hs02_[ism-1] );
1536  if ( me_hs02_[ism-1] ) {
1537  me_hs02_[ism-1]->setBinContent( i, hs02_[ism-1]->GetBinContent(ic, i) );
1538  me_hs02_[ism-1]->setBinError( i, hs02_[ism-1]->GetBinError(ic, i) );
1539  }
1540  }
1541 
1542  }
1543 
1544  }
1545 
1546 }
1547 
void setPedMeanG1(float mean)
Definition: MonPNLed2Dat.h:33
Cache logicID vector from database.
static const int LED_MEAN_ERROR
float rmsThreshold01_
Definition: EELedClient.h:151
T getUntrackedParameter(std::string const &, T const &) const
static std::string sEE(const unsigned ism)
Definition: Numbers.cc:223
MonitorElement * meg09_[18]
Definition: EELedClient.h:108
int i
Definition: DBlmapReader.cc:9
static bool validEE(const unsigned ism, const unsigned ix, const unsigned iy)
Definition: Numbers.cc:829
DQMStore * dqmStore_
Definition: EELedClient.h:89
TProfile2D * h10_[18]
Definition: EELedClient.h:97
void setPedRMSG1(float mean)
Definition: MonPNLed1Dat.h:36
void setup(void)
Setup.
Definition: EELedClient.cc:209
void setBinContent(int binx, double content)
set content of bin (1-D)
float amplitudeThreshold03_
Definition: EELedClient.h:150
static bool maskChannel(int ism, int i1, int i2, uint32_t bits, const EcalSubdetector subdet)
Definition: Masks.cc:57
MonitorElement * meg06_[18]
Definition: EELedClient.h:106
void endJob(void)
EndJob.
Definition: EELedClient.cc:193
static unsigned icEE(const unsigned ism, const unsigned ix, const unsigned iy)
Definition: Numbers.cc:736
TProfile2D * h09_[18]
Definition: EELedClient.h:96
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
TProfile2D * hs01_[18]
Definition: EELedClient.h:99
static T getHisto(const MonitorElement *me, bool clone=false, T ret=0)
Returns the histogram contained by the Monitor Element.
Definition: UtilsClient.h:89
void setPedRMSG1(float mean)
Definition: MonPNLed2Dat.h:36
void setADCMeanG1(float mean)
Definition: MonPNLed2Dat.h:21
Some &quot;id&quot; conversions.
TProfile * i06_[18]
Definition: EELedClient.h:139
MonitorElement * met02_[18]
Definition: EELedClient.h:115
EELedClient(const edm::ParameterSet &ps)
Constructor.
Definition: EELedClient.cc:43
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
TProfile * i10_[18]
Definition: EELedClient.h:142
MonitorElement * mepnprms05_[18]
Definition: EELedClient.h:129
void setVPTOverPNMean(float mean)
Definition: MonLed2Dat.h:27
float amplitudeThresholdPnG01_
Definition: EELedClient.h:155
void setPedMeanG1(float mean)
Definition: MonPNLed1Dat.h:33
MonitorElement * meg10_[18]
Definition: EELedClient.h:109
MonitorElement * met01_[18]
Definition: EELedClient.h:114
static int ix0EE(const unsigned ism)
Definition: Numbers.cc:770
bool cloneME_
Definition: EELedClient.h:77
static const int PEDESTAL_LOW_GAIN_RMS_ERROR
void setTimingMean(float mean)
Definition: ITimingDat.h:45
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
float pedPnDiscrepancyMean_[2]
Definition: EELedClient.h:158
static const int PEDESTAL_HIGH_GAIN_RMS_ERROR
static bool maskPn(int ism, int i1, uint32_t bits, const EcalSubdetector subdet)
Definition: Masks.cc:109
MonitorElement * meaopn02_[18]
Definition: EELedClient.h:124
static int iy0EE(const unsigned ism)
Definition: Numbers.cc:809
float amplitudeThresholdPnG16_
Definition: EELedClient.h:156
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
TProfile2D * h03_[18]
Definition: EELedClient.h:93
float amplitudeThreshold01_
Definition: EELedClient.h:150
void setVPTMean(float mean)
Definition: MonLed2Dat.h:21
float pedPnRMSThreshold_[2]
Definition: EELedClient.h:159
void setTaskStatus(bool status)
Definition: MonPNLed2Dat.h:45
std::string prefixME_
Definition: EELedClient.h:82
MonitorElement * mepnprms06_[18]
Definition: EELedClient.h:130
void setADCRMSG16(float mean)
Definition: MonPNLed1Dat.h:30
TProfile * i05_[18]
Definition: EELedClient.h:138
std::vector< int > ledWavelengths_
Definition: EELedClient.h:87
void setADCMeanG16(float mean)
Definition: MonPNLed1Dat.h:27
void setVPTOverPNRMS(float rms)
Definition: MonLed2Dat.h:30
void setPedMeanG16(float mean)
Definition: MonPNLed2Dat.h:39
void setVPTOverPNMean(float mean)
Definition: MonLed1Dat.h:27
MonitorElement * metrms01_[18]
Definition: EELedClient.h:120
bool verbose_
Definition: EELedClient.h:79
MonitorElement * meg05_[18]
Definition: EELedClient.h:105
void setTaskStatus(bool status)
Definition: MonLed1Dat.h:33
void setTaskStatus(bool status)
Definition: MonLed2Dat.h:33
void setVPTRMS(float rms)
Definition: MonLed2Dat.h:24
void removeElement(const std::string &name)
Definition: DQMStore.cc:2772
void setTaskStatus(bool status)
Definition: MonPNLed1Dat.h:45
channel masking
void cleanup(void)
Cleanup.
Definition: EELedClient.cc:460
MonitorElement * metav02_[18]
Definition: EELedClient.h:118
MonitorElement * me_hs01_[18]
Definition: EELedClient.h:132
float rmsThreshold03_
Definition: EELedClient.h:151
void endRun(void)
EndRun.
Definition: EELedClient.cc:201
void setADCMeanG16(float mean)
Definition: MonPNLed2Dat.h:27
static const int LED_TIMING_MEAN_ERROR
void setADCRMSG1(float mean)
Definition: MonPNLed1Dat.h:24
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
void setPedMeanG16(float mean)
Definition: MonPNLed1Dat.h:39
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:1623
void analyze(void)
Analyze.
MonitorElement * meaopn01_[18]
Definition: EELedClient.h:123
TProfile2D * hs02_[18]
Definition: EELedClient.h:100
TProfile * i13_[18]
Definition: EELedClient.h:144
void setADCRMSG16(float mean)
Definition: MonPNLed2Dat.h:30
void setADCRMSG1(float mean)
Definition: MonPNLed2Dat.h:24
TProfile * i02_[18]
Definition: EELedClient.h:136
Ecal Monitor Utils for Client.
static const int PEDESTAL_LOW_GAIN_MEAN_ERROR
void setPedRMSG16(float mean)
Definition: MonPNLed1Dat.h:42
void setTaskStatus(bool status)
Definition: ITimingDat.h:51
std::vector< int > superModules_
Definition: EELedClient.h:86
bool enableCleanup_
Definition: EELedClient.h:84
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
void setVPTRMS(float rms)
Definition: MonLed1Dat.h:24
TProfile * i09_[18]
Definition: EELedClient.h:141
MonitorElement * meg01_[18]
Definition: EELedClient.h:102
static const int LED_TIMING_RMS_ERROR
void beginJob(void)
BeginJob.
Definition: EELedClient.cc:172
void setTimingRMS(float rms)
Definition: ITimingDat.h:48
TProfile2D * h04_[18]
Definition: EELedClient.h:94
MonitorElement * mepnprms01_[18]
Definition: EELedClient.h:126
void setADCMeanG1(float mean)
Definition: MonPNLed1Dat.h:21
virtual ~EELedClient()
Destructor.
Definition: EELedClient.cc:168
void beginRun(void)
BeginRun.
Definition: EELedClient.cc:183
MonitorElement * mea02_[18]
Definition: EELedClient.h:112
TProfile2D * h02_[18]
Definition: EELedClient.h:92
TProfile2D * h01_[18]
Definition: EELedClient.h:91
MonitorElement * metav01_[18]
Definition: EELedClient.h:117
float percentVariation01_
Definition: EELedClient.h:149
MonitorElement * mepnprms02_[18]
Definition: EELedClient.h:127
TProfile * i14_[18]
Definition: EELedClient.h:145
static unsigned indexEE(const unsigned ism, const unsigned ix, const unsigned iy)
Definition: Numbers.cc:709
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
Definition: Numbers.cc:243
TProfile * i01_[18]
Definition: EELedClient.h:135
void setPedRMSG16(float mean)
Definition: MonPNLed2Dat.h:42
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
tuple cout
Definition: gather_cfg.py:121
static const int LED_RMS_ERROR
void setVPTMean(float mean)
Definition: MonLed1Dat.h:21
MonitorElement * metrms02_[18]
Definition: EELedClient.h:121
void setVPTOverPNRMS(float rms)
Definition: MonLed1Dat.h:30
tuple status
Definition: ntuplemaker.py:245
float pedPnExpectedMean_[2]
Definition: EELedClient.h:157
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:1000
static EcalLogicID getEcalLogicID(const char *name, const int id1=EcalLogicID::NULLID, const int id2=EcalLogicID::NULLID, const int id3=EcalLogicID::NULLID)
Definition: LogicID.h:29
Definition: RunIOV.h:13
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
float percentVariation03_
Definition: EELedClient.h:149
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)
static void printBadChannels(const MonitorElement *me, TH1 *hi, bool positive_only=false)
Print the bad channels.
Definition: UtilsClient.cc:14
MonitorElement * meg02_[18]
Definition: EELedClient.h:103
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
static int getFirstNonEmptyChannel(const TProfile2D *histo)
Find the first non empty bin.
Definition: UtilsClient.cc:246
MonitorElement * mea01_[18]
Definition: EELedClient.h:111
MonitorElement * me_hs02_[18]
Definition: EELedClient.h:133