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