CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SPYHistograms.cc
Go to the documentation of this file.
5 
8 
9 using edm::LogError;
10 using edm::LogWarning;
11 using edm::LogInfo;
12 
13 
15 {
16  dqm_ = 0;
17 }
18 
20 {
21 }
22 
23 
24 void
26  std::ostringstream* pDebugStream){
27 
28  getConfigForHistogram(nNoData_,"nNoData",iConfig,pDebugStream);
29  getConfigForHistogram(nLowRange_,"nLowRange",iConfig,pDebugStream);
30  getConfigForHistogram(nHighRange_,"nHighRange",iConfig,pDebugStream);
31  getConfigForHistogram(nMinZero_,"nMinZero",iConfig,pDebugStream);
32  getConfigForHistogram(nMaxSat_,"nMaxSat",iConfig,pDebugStream);
33  getConfigForHistogram(nLowPb_,"nLowPb",iConfig,pDebugStream);
34  getConfigForHistogram(nHighPb_,"nHighPb",iConfig,pDebugStream);
35  getConfigForHistogram(nOutOfSync_,"nOutOfSync",iConfig,pDebugStream);
36  getConfigForHistogram(nOtherPbs_,"nOtherPbs",iConfig,pDebugStream);
37  getConfigForHistogram(nApvErrorBit_,"nApvErrorBit",iConfig,pDebugStream);
38  getConfigForHistogram(nApvAddressError_,"nApvAddressError",iConfig,pDebugStream);
39  getConfigForHistogram(nNegativePeds_,"nNegativePeds",iConfig,pDebugStream);
40 
41  getConfigForHistogram(nNoDatavsTime_,"nNoDatavsTime",iConfig,pDebugStream);
42  getConfigForHistogram(nLowRangevsTime_,"nLowRangevsTime",iConfig,pDebugStream);
43  getConfigForHistogram(nHighRangevsTime_,"nHighRangevsTime",iConfig,pDebugStream);
44  getConfigForHistogram(nMinZerovsTime_,"nMinZerovsTime",iConfig,pDebugStream);
45  getConfigForHistogram(nMaxSatvsTime_,"nMaxSatvsTime",iConfig,pDebugStream);
46  getConfigForHistogram(nLowPbvsTime_,"nLowPbvsTime",iConfig,pDebugStream);
47  getConfigForHistogram(nHighPbvsTime_,"nHighPbvsTime",iConfig,pDebugStream);
48  getConfigForHistogram(nOutOfSyncvsTime_,"nOutOfSyncvsTime",iConfig,pDebugStream);
49  getConfigForHistogram(nOtherPbsvsTime_,"nOtherPbsvsTime",iConfig,pDebugStream);
50  getConfigForHistogram(nApvErrorBitvsTime_,"nApvErrorBitvsTime",iConfig,pDebugStream);
51  getConfigForHistogram(nApvAddressErrorvsTime_,"nApvAddressErrorvsTime",iConfig,pDebugStream);
52  getConfigForHistogram(nNegativePedsvsTime_,"nNegativePedsvsTime",iConfig,pDebugStream);
53 
54  getConfigForHistogram(meanDigitalLowvsTime_,"meanDigitalLowvsTime",iConfig,pDebugStream);
55 
56 
57  getConfigForHistogram(noData_,"NoData",iConfig,pDebugStream);
58  getConfigForHistogram(lowRange_,"LowRange",iConfig,pDebugStream);
59  getConfigForHistogram(highRange_,"HighRange",iConfig,pDebugStream);
60  getConfigForHistogram(minZero_,"MinZero",iConfig,pDebugStream);
61  getConfigForHistogram(maxSat_,"MaxSat",iConfig,pDebugStream);
62  getConfigForHistogram(lowPb_,"LowPb",iConfig,pDebugStream);
63  getConfigForHistogram(highPb_,"HighPb",iConfig,pDebugStream);
64  getConfigForHistogram(outOfSync_,"OutOfSync",iConfig,pDebugStream);
65  getConfigForHistogram(otherPbs_,"OtherPbs",iConfig,pDebugStream);
66  getConfigForHistogram(apvErrorBit_,"ApvErrorBit",iConfig,pDebugStream);
67  getConfigForHistogram(apvAddressError_,"ApvAddressError",iConfig,pDebugStream);
68  getConfigForHistogram(negativePeds_,"NegativePeds",iConfig,pDebugStream);
69 
70  getConfigForHistogram(frameRange_,"FrameRange",iConfig,pDebugStream);
71  getConfigForHistogram(frameMin_,"FrameMin",iConfig,pDebugStream);
72  getConfigForHistogram(frameMax_,"FrameMax",iConfig,pDebugStream);
73  getConfigForHistogram(baseline_,"Baseline",iConfig,pDebugStream);
74 
75  getConfigForHistogram(noDataDetailed_,"NoDataDetailed",iConfig,pDebugStream);
76  getConfigForHistogram(lowRangeDetailed_,"LowRangeDetailed",iConfig,pDebugStream);
77  getConfigForHistogram(highRangeDetailed_,"HighRangeDetailed",iConfig,pDebugStream);
78  getConfigForHistogram(minZeroDetailed_,"MinZeroDetailed",iConfig,pDebugStream);
79  getConfigForHistogram(maxSatDetailed_,"MaxSatDetailed",iConfig,pDebugStream);
80  getConfigForHistogram(lowPbDetailed_,"LowPbDetailed",iConfig,pDebugStream);
81  getConfigForHistogram(highPbDetailed_,"HighPbDetailed",iConfig,pDebugStream);
82  getConfigForHistogram(outOfSyncDetailed_,"OutOfSyncDetailed",iConfig,pDebugStream);
83  getConfigForHistogram(otherPbsDetailed_,"OtherPbsDetailed",iConfig,pDebugStream);
84  getConfigForHistogram(apvErrorBitDetailed_,"ApvErrorBitDetailed",iConfig,pDebugStream);
85  getConfigForHistogram(apvAddressErrorDetailed_,"ApvAddressErrorDetailed",iConfig,pDebugStream);
86  getConfigForHistogram(negativePedsDetailed_,"NegativePedsDetailed",iConfig,pDebugStream);
87 
88  getConfigForHistogram(positionOfFirstHeaderBitDetailed_,"PositionOfFirstHeaderBitDetailed",iConfig,pDebugStream);
89  getConfigForHistogram(positionOfFirstTrailerBitDetailed_,"PositionOfFirstTrailerBitDetailed",iConfig,pDebugStream);
90  getConfigForHistogram(distanceHeaderTrailerDetailed_,"DistanceHeaderTrailerDetailed",iConfig,pDebugStream);
91 
92 }
93 
94 void SPYHistograms::fillGainHistograms(const Trends & aTrendElement, const double aTime) {
95 
96  fillHistogram(meanDigitalLowvsTime_,aTime,aTrendElement.meanDigitalLow);
97 
98 }
99 
100 void SPYHistograms::fillCountersHistograms(const ErrorCounters & aCounter, const double aTime) {
101 
102 
103  fillHistogram(nNoData_,aCounter.nNoData);
104  fillHistogram(nLowRange_,aCounter.nLowRange);
105  fillHistogram(nHighRange_,aCounter.nHighRange);
106  fillHistogram(nMinZero_,aCounter.nMinZero);
107  fillHistogram(nMaxSat_,aCounter.nMaxSat);
108  fillHistogram(nLowPb_,aCounter.nLowPb);
109  fillHistogram(nHighPb_,aCounter.nHighPb);
110  fillHistogram(nOutOfSync_,aCounter.nOOS);
111  fillHistogram(nOtherPbs_,aCounter.nOtherPbs);
112  fillHistogram(nApvErrorBit_,aCounter.nAPVError);
113  fillHistogram(nApvAddressError_,aCounter.nAPVAddressError);
114  fillHistogram(nNegativePeds_,aCounter.nNegPeds);
115 
116  fillHistogram(nNoDatavsTime_,aTime,aCounter.nNoData);
117  fillHistogram(nLowRangevsTime_,aTime,aCounter.nLowRange);
118  fillHistogram(nHighRangevsTime_,aTime,aCounter.nHighRange);
119  fillHistogram(nMinZerovsTime_,aTime,aCounter.nMinZero);
120  fillHistogram(nMaxSatvsTime_,aTime,aCounter.nMaxSat);
121  fillHistogram(nLowPbvsTime_,aTime,aCounter.nLowPb);
122  fillHistogram(nHighPbvsTime_,aTime,aCounter.nHighPb);
123  fillHistogram(nOutOfSyncvsTime_,aTime,aCounter.nOOS);
124  fillHistogram(nOtherPbsvsTime_,aTime,aCounter.nOtherPbs);
125  fillHistogram(nApvErrorBitvsTime_,aTime,aCounter.nAPVError);
126  fillHistogram(nApvAddressErrorvsTime_,aTime,aCounter.nAPVAddressError);
127  fillHistogram(nNegativePedsvsTime_,aTime,aCounter.nNegPeds);
128 
129 
130 }
131 
132 
133 void SPYHistograms::fillFEDHistograms(const Errors & aErr,const unsigned int aFedId) {
134  //else is used when filling the Error struct per channel, to avoid redundancy
135  //use only if here, in case channels in the same FED have different
136  //"exclusive" error types...
137 
138  if (aErr.hasNoData) {
139  //fill in channel loop with delay FPGA number...
140  //fillHistogram(noData_,aFedId);
141  }
142  if (aErr.hasLowRange) {
143  fillHistogram(lowRange_,aFedId);
144  }
145  if (aErr.hasHighRange) {
146  fillHistogram(highRange_,aFedId);
147  }
148  if (aErr.hasMinZero) {
149  fillHistogram(minZero_,aFedId);
150  }
151  if (aErr.hasMaxSat) {
152  fillHistogram(maxSat_,aFedId);
153  }
154  if (aErr.hasLowPb) {
155  fillHistogram(lowPb_,aFedId);
156  }
157  if (aErr.hasHighPb) {
158  fillHistogram(highPb_,aFedId);
159  }
160  if (aErr.hasOOS) {
161  fillHistogram(outOfSync_,aFedId);
162  }
163  if (aErr.hasOtherPbs) {
164  fillHistogram(otherPbs_,aFedId);
165  }
166  if (aErr.hasErrorBit0 || aErr.hasErrorBit1) {
167  fillHistogram(apvErrorBit_,aFedId);
168  }
169  if (aErr.hasAPVAddressError0 || aErr.hasAPVAddressError1) {
170  fillHistogram(apvAddressError_,aFedId);
171  }
172  if (aErr.hasNegPeds) {
173  fillHistogram(negativePeds_,aFedId);
174  }
175 
176 
177 }
178 
179 
181  const sistrip::SpyUtilities::Frame & aFrame,
182  const unsigned int aFedId,
183  const unsigned int aFedChannel) {
184 
185  bookFEDHistograms(aFedId,aErr);
186 
187  if (!aErr.hasNoData) {
188  fillHistogram(frameRange_,sistrip::SpyUtilities::range(aFrame));
189  fillHistogram(frameMin_,aFrame.digitalLow);
190  fillHistogram(frameMax_,aFrame.digitalHigh);
191  fillHistogram(baseline_,aFrame.baseline);
192  }
193 
194  if (aErr.hasNoData) {
195  fillHistogram(noDataDetailedMap_[aFedId],aFedChannel);
196  //fillHistogram(noData_,24*aFedId+static_cast<unsigned int>(aFedChannel/4.));
197  fillHistogram(noData_,static_cast<unsigned int>(aFedChannel/4.));
198  }
199 
200  if (aErr.hasLowRange) {
201  fillHistogram(lowRangeDetailedMap_[aFedId],aFedChannel);
202  }
203  if (aErr.hasHighRange) {
204  fillHistogram(highRangeDetailedMap_[aFedId],aFedChannel);
205  }
206  if (aErr.hasMinZero) {
207  fillHistogram(minZeroDetailedMap_[aFedId],aFedChannel);
208  }
209  if (aErr.hasMaxSat) {
210  fillHistogram(maxSatDetailedMap_[aFedId],aFedChannel);
211  }
212  if (aErr.hasLowPb) {
213  fillHistogram(lowPbDetailedMap_[aFedId],aFedChannel);
214  }
215  if (aErr.hasHighPb) {
216  fillHistogram(highPbDetailedMap_[aFedId],aFedChannel);
217  }
218  if (aErr.hasOOS) {
219  fillHistogram(outOfSyncDetailedMap_[aFedId],aFedChannel);
220  }
221  if (aErr.hasOtherPbs) {
222  fillHistogram(otherPbsDetailedMap_[aFedId],aFedChannel);
223  }
224  if (aErr.hasErrorBit0) {
225  fillHistogram(apvErrorBitDetailedMap_[aFedId],2*aFedChannel);
226  }
227  if (aErr.hasErrorBit1) {
228  fillHistogram(apvErrorBitDetailedMap_[aFedId],2*aFedChannel+1);
229  }
230  if (aErr.hasAPVAddressError0) {
231  fillHistogram(apvAddressErrorDetailedMap_[aFedId],2*aFedChannel);
232  }
233  if (aErr.hasAPVAddressError1) {
234  fillHistogram(apvAddressErrorDetailedMap_[aFedId],2*aFedChannel+1);
235  }
236  if (aErr.hasNegPeds) {
237  fillHistogram(negativePedsDetailedMap_[aFedId],aFedChannel);
238  }
239 
240  fillHistogram(positionOfFirstHeaderBitDetailedMap_[aFedId],aFrame.firstHeaderBit);
241  fillHistogram(positionOfFirstTrailerBitDetailedMap_[aFedId],aFrame.firstTrailerBit);
244  fillHistogram(distanceHeaderTrailerDetailedMap_[aFedId],aFrame.firstTrailerBit-aFrame.firstHeaderBit);
245  else fillHistogram(distanceHeaderTrailerDetailedMap_[aFedId],0);
246 }
247 
248 
250 {
251 
252  dqm_ = dqm;
253  //get FED IDs
254  const unsigned int siStripFedIdMin = sistrip::FED_ID_MIN;
255  const unsigned int siStripFedIdMax = sistrip::FED_ID_MAX;
256 
257  //book FED level histograms: resize boolean so
258  //they will be booked only once for the first event.
259  histosBooked_.resize(siStripFedIdMax+1,false);
260 
261 
262  //book histos
263  bookHistogram(nNoData_,"nNoData",
264  ";n_{noData};n_{entries}",
265  "n_{noData}");
266 
267  bookHistogram(nLowRange_,"nLowRange",
268  ";n_{LowRange};n_{entries}",
269  "n_{LowRange}");
270 
271  bookHistogram(nHighRange_,"nHighRange",
272  ";n_{HighRange};n_{entries}",
273  "n_{HighRange}");
274 
275  bookHistogram(nMinZero_,"nMinZero",
276  ";n_{MinZero};n_{entries}",
277  "n_{MinZero}");
278 
279  bookHistogram(nMaxSat_,"nMaxSat",
280  ";n_{MaxSat};n_{entries}",
281  "n_{MaxSat}");
282 
283  bookHistogram(nLowPb_,"nLowPb",
284  ";n_{lowPb};n_{entries}",
285  "n_{lowPb}");
286 
287  bookHistogram(nHighPb_,"nHighPb",
288  ";n_{highPb};n_{entries}",
289  "n_{highPb}");
290 
291  bookHistogram(nOutOfSync_,"nOutOfSync",
292  ";n_{OOS};n_{entries}",
293  "n_{OOS}");
294 
295  bookHistogram(nOtherPbs_,"nOtherPbs",
296  ";n_{OtherPbs};n_{entries}",
297  "n_{OtherPbs}");
298 
299  bookHistogram(nApvErrorBit_,"nApvErrorBit",
300  ";n_{APVerror};n_{entries}",
301  "n_{APVerror}"
302  );
303 
304  bookHistogram(nApvAddressError_,"nApvAddressError",
305  ";n_{APVAddressError};n_{entries}",
306  "n_{APVAddressError}"
307  );
308 
309  bookHistogram(nNegativePeds_,"nNegativePeds",
310  ";n_{negPeds};n_{entries}",
311  "n_{negPeds}"
312  );
313 
314 
315 
316  bookHistogram(noData_,"NoData",
317  ";delayFPGA;n_{noData}",
318  //24*(siStripFedIdMax+1)-24*siStripFedIdMin,
319  //24*siStripFedIdMin,24*(siStripFedIdMax+1),
320  24,0,24,
321  "delayFPGA index"
322  );
323 
324  bookHistogram(lowRange_,"LowRange",
325  ";fedId;n_{LowRange}",
326  siStripFedIdMax-siStripFedIdMin+1,
327  siStripFedIdMin-0.5,siStripFedIdMax+0.5,
328  "FED-ID"
329  );
330 
331  bookHistogram(highRange_,"HighRange",
332  ";fedId;n_{HighRange}",
333  siStripFedIdMax-siStripFedIdMin+1,
334  siStripFedIdMin-0.5,siStripFedIdMax+0.5,
335  "FED-ID"
336  );
337 
338  bookHistogram(minZero_,"MinZero",
339  ";fedId;n_{MinZero}",
340  siStripFedIdMax-siStripFedIdMin+1,
341  siStripFedIdMin-0.5,siStripFedIdMax+0.5,
342  "FED-ID"
343  );
344 
345  bookHistogram(maxSat_,"MaxSat",
346  ";fedId;n_{MaxSat}",
347  siStripFedIdMax-siStripFedIdMin+1,
348  siStripFedIdMin-0.5,siStripFedIdMax+0.5,
349  "FED-ID"
350  );
351 
352  bookHistogram(lowPb_,"LowPb",
353  ";fedId;n_{lowPb}",
354  siStripFedIdMax-siStripFedIdMin+1,
355  siStripFedIdMin-0.5,siStripFedIdMax+0.5,
356  "FED-ID"
357  );
358 
359  bookHistogram(highPb_,"HighPb",
360  ";fedId;n_{highPb}",
361  siStripFedIdMax-siStripFedIdMin+1,
362  siStripFedIdMin-0.5,siStripFedIdMax+0.5,
363  "FED-ID"
364  );
365 
366  bookHistogram(outOfSync_,"OutOfSync",
367  ";fedId;n_{OOS}",
368  siStripFedIdMax-siStripFedIdMin+1,
369  siStripFedIdMin-0.5,siStripFedIdMax+0.5,
370  "FED-ID"
371  );
372 
373  bookHistogram(otherPbs_,"OtherPbs",
374  ";fedId;n_{OtherPbs}",
375  siStripFedIdMax-siStripFedIdMin+1,
376  siStripFedIdMin-0.5,siStripFedIdMax+0.5,
377  "FED-ID"
378  );
379 
380  bookHistogram(apvErrorBit_,"ApvErrorBit",
381  ";fedId;n_{APVerror}",
382  siStripFedIdMax-siStripFedIdMin+1,
383  siStripFedIdMin-0.5,siStripFedIdMax+0.5,
384  "FED-ID"
385  );
386 
387  bookHistogram(apvAddressError_,"ApvAddressError",
388  ";fedId;n_{APVAddressError}",
389  siStripFedIdMax-siStripFedIdMin+1,
390  siStripFedIdMin-0.5,siStripFedIdMax+0.5,
391  "FED-ID"
392  );
393 
394  bookHistogram(negativePeds_,"NegativePeds",
395  ";fedId;n_{negPeds}",
396  siStripFedIdMax-siStripFedIdMin+1,
397  siStripFedIdMin-0.5,siStripFedIdMax+0.5,
398  "FED-ID"
399  );
400 
401  bookHistogram(frameRange_,"FrameRange",
402  ";range;n_{entries}",
403  1024,0,1024,
404  "range (adc counts)");
405 
406  bookHistogram(frameMin_,"FrameMin",
407  ";Zero-light level;n_{entries}",
408  800,0,800,
409  "Zero-light level (adc counts)");
410 
411  bookHistogram(frameMax_,"FrameMax",
412  ";Tick height;n_{entries}",
413  824,200,1024,
414  "Tick height (adc counts)");
415 
416  bookHistogram(baseline_,"Baseline",
417  ";Baseline;n_{entries}",
418  1024,0,1024,
419  "Baseline (adc counts)");
420 
421 
422 
423  //book histos
424 
425  bookProfile(nNoDatavsTime_,"nNoDatavsTime",
426  ";time;n_{noData}",
427  0,
428  42241,//total number of channels
429  "Time",
430  "n_{noData}");
431 
432  bookProfile(nLowRangevsTime_,"nLowRangevsTime",
433  ";time;n_{LowRange}",
434  0,
435  42241,//total number of channels
436  "Time",
437  "n_{LowRange}");
438 
439  bookProfile(nHighRangevsTime_,"nHighRangevsTime",
440  ";time;n_{HighRange}",
441  0,
442  42241,//total number of channels
443  "Time",
444  "n_{HighRange}");
445 
446 
447  bookProfile(nMinZerovsTime_,"nMinZerovsTime",
448  ";time;n_{MinZero}",
449  0,
450  42241,//total number of channels
451  "Time",
452  "n_{MinZero}");
453 
454  bookProfile(nMaxSatvsTime_,"nMaxSatvsTime",
455  ";time;n_{MaxSat}",
456  0,
457  42241,//total number of channels
458  "Time",
459  "n_{MaxSat}");
460 
461  bookProfile(nLowPbvsTime_,"nLowPbvsTime",
462  ";time;n_{lowPb}",
463  0,
464  42241,//total number of channels
465  "Time",
466  "n_{lowPb}");
467 
468  bookProfile(nHighPbvsTime_,"nHighPbvsTime",
469  ";time;n_{highPb}",
470  0,
471  42241,//total number of channels
472  "Time",
473  "n_{highPb}");
474 
475 
476  bookProfile(nOutOfSyncvsTime_,"nOutOfSyncvsTime",
477  ";time;n_{OOS}",
478  0,
479  42241,//total number of channels
480  "Time",
481  "n_{OOS}");
482 
483  bookProfile(nOtherPbsvsTime_,"nOtherPbsvsTime",
484  ";time;n_{OtherPbs}",
485  0,
486  42241,//total number of channels
487  "Time",
488  "n_{OtherPbs}");
489 
490  bookProfile(nApvErrorBitvsTime_,"nApvErrorBitvsTime",
491  ";time;n_{APVerror}",
492  0,
493  42241,//total number of channels
494  "Time",
495  "n_{APVerror}");
496 
497  bookProfile(nApvAddressErrorvsTime_,"nApvAddressErrorvsTime",
498  ";time;n_{APVAddressError}",
499  0,
500  42241,//total number of channels
501  "Time",
502  "n_{APVAddressError}");
503 
504  bookProfile(nNegativePedsvsTime_,"nNegativePedsvsTime",
505  ";time;n_{negPeds}",
506  0,
507  42241,//total number of channels
508  "Time",
509  "n_{negPeds}");
510 
511 
512 
513  //book histos
514 
515 
516  bookProfile(meanDigitalLowvsTime_,"meanDigitalLowvsTime",
517  ";time;meanDigitalLow",
518  0,
519  800,//maximum for digitalLow
520  "Time",
521  "meanDigitalLow");
522 
523 
524 
525 
526 
527 
528  LogInfo("SPYHistograms") << " ---- Toplevel histograms book ! Number of MEs : "
529  << dqm_->getMEs().size()
530  << std::endl;
531 
532 
533 }
534 
535 void SPYHistograms::bookFEDHistograms(const unsigned int fedId,
536  const Errors & aErr,
537  bool doAll)
538 {
539  if (!histosBooked_[fedId]) {
540  //will do that only once
541 
542  //only if at least one error corresponds to enabled histo....
543  if (!doAll && !(
544  (aErr.hasNoData && noDataDetailed_.enabled) ||
545  (aErr.hasLowRange && lowRangeDetailed_.enabled) ||
546  (aErr.hasHighRange && highRangeDetailed_.enabled) ||
547  (aErr.hasMinZero && minZeroDetailed_.enabled) ||
548  (aErr.hasMaxSat && maxSatDetailed_.enabled) ||
549  (aErr.hasLowPb && lowPbDetailed_.enabled) ||
550  (aErr.hasHighPb && highPbDetailed_.enabled) ||
551  (aErr.hasOOS && outOfSyncDetailed_.enabled) ||
552  (aErr.hasOtherPbs && otherPbsDetailed_.enabled) ||
553  ((aErr.hasErrorBit0 ||aErr.hasErrorBit1) && apvErrorBitDetailed_.enabled) ||
555  (aErr.hasNegPeds && negativePedsDetailed_.enabled)
556  )
557  ) return;
558 
559 
560 
561  SiStripFedKey fedKey(fedId,0,0,0);
562  std::stringstream fedIdStream;
563  fedIdStream << fedId;
564  dqm_->setCurrentFolder(fedKey.path());
565 
566 
567  bookHistogram(noDataDetailed_,
568  noDataDetailedMap_[fedId],
569  "NoDataForFED"+fedIdStream.str(),
570  "No data for FED ID "+fedIdStream.str(),
572  "Channel Index"
573  );
574 
575  bookHistogram(lowRangeDetailed_,
576  lowRangeDetailedMap_[fedId],
577  "LowRangeForFED"+fedIdStream.str(),
578  "Max-min<VAL for FED ID "+fedIdStream.str(),
580  "Channel Index"
581  );
582 
583  bookHistogram(highRangeDetailed_,
584  highRangeDetailedMap_[fedId],
585  "HighRangeForFED"+fedIdStream.str(),
586  "Max-min>VAL for FED ID "+fedIdStream.str(),
588  "Channel Index"
589  );
590 
591  bookHistogram(minZeroDetailed_,
592  minZeroDetailedMap_[fedId],
593  "MinZeroForFED"+fedIdStream.str(),
594  "min=0 for FED ID "+fedIdStream.str(),
596  "Channel Index"
597  );
598 
599  bookHistogram(maxSatDetailed_,
600  maxSatDetailedMap_[fedId],
601  "MaxSatForFED"+fedIdStream.str(),
602  "max=1023 for FED ID "+fedIdStream.str(),
604  "Channel Index"
605  );
606 
607  bookHistogram(lowPbDetailed_,
608  lowPbDetailedMap_[fedId],
609  "LowPbForFED"+fedIdStream.str(),
610  "Pb with digitalLow for FED ID "+fedIdStream.str(),
612  "Channel Index"
613  );
614 
615  bookHistogram(highPbDetailed_,
616  highPbDetailedMap_[fedId],
617  "HighPbForFED"+fedIdStream.str(),
618  "Pb with digitalHigh for FED ID "+fedIdStream.str(),
620  "Channel Index"
621  );
622 
623  bookHistogram(outOfSyncDetailed_,
624  outOfSyncDetailedMap_[fedId],
625  "OutOfSyncForFED"+fedIdStream.str(),
626  "Out-of-sync for FED ID "+fedIdStream.str(),
628  "Channel Index"
629  );
630 
631  bookHistogram(otherPbsDetailed_,
632  otherPbsDetailedMap_[fedId],
633  "OtherPbsForFED"+fedIdStream.str(),
634  "Other issues for FED ID "+fedIdStream.str(),
636  "Channel Index"
637  );
638 
639  bookHistogram(apvErrorBitDetailed_,
641  "ApvErrorBitForFED"+fedIdStream.str(),
642  "APV error for FED ID "+fedIdStream.str(),
644  "APV Index"
645  );
646 
647  bookHistogram(apvAddressErrorDetailed_,
649  "ApvAddressErrorForFED"+fedIdStream.str(),
650  "APV address error for FED ID "+fedIdStream.str(),
652  "APV Index"
653  );
654 
655  bookHistogram(negativePedsDetailed_,
657  "NegativePedsForFED"+fedIdStream.str(),
658  "Negative ped subtr for FED ID "+fedIdStream.str(),
660  "Channel Index"
661  );
662 
663 
664 
665  bookHistogram(positionOfFirstHeaderBitDetailed_,
667  "PositionOfFirstHeaderBitForFED"+fedIdStream.str(),
668  "FED ID "+fedIdStream.str(),
669  300,0,300,
670  "first header bit"
671  );
672 
675  "PositionOfFirstTrailerBitForFED"+fedIdStream.str(),
676  "FED ID "+fedIdStream.str(),
677  15,285,300,
678  "first trailer bit"
679  );
680 
681  bookHistogram(distanceHeaderTrailerDetailed_,
683  "DistanceHeaderTrailerForFED"+fedIdStream.str(),
684  "FED ID "+fedIdStream.str(),
685  300,0,300,
686  "trailer - header"
687  );
688 
689 
690  histosBooked_[fedId] = true;
691 
692  }
693 
694 
695 }
696 
698 {
699  //get FED IDs
700  const unsigned int siStripFedIdMin = FEDNumbering::MINSiStripFEDID;
701  const unsigned int siStripFedIdMax = FEDNumbering::MAXSiStripFEDID;
702  //book them
703  for (unsigned int iFed = siStripFedIdMin; iFed <= siStripFedIdMax; iFed++) {
704  //dummy error object
705  Errors lError;
706  bookFEDHistograms(iFed,lError,true);
707  }
708 }
std::map< unsigned int, MonitorElement * > negativePedsDetailedMap_
HistogramConfig nApvAddressErrorvsTime_
HistogramConfig frameMin_
HistogramConfig negativePedsDetailed_
std::map< unsigned int, MonitorElement * > highPbDetailedMap_
static const uint16_t FED_ID_MIN
HistogramConfig apvAddressError_
HistogramConfig nNegativePedsvsTime_
unsigned int meanDigitalLow
Definition: SPYHistograms.h:19
A container class for generic run and event-related info, information required by the commissioning a...
Definition: SiStripFedKey.h:56
std::map< unsigned int, MonitorElement * > highRangeDetailedMap_
HistogramConfig nHighRangevsTime_
HistogramConfig lowPbDetailed_
HistogramConfig highRange_
HistogramConfig negativePeds_
HistogramConfig maxSat_
static const uint16_t SPY_SAMPLES_PER_CHANNEL
HistogramConfig minZeroDetailed_
HistogramConfig frameMax_
HistogramConfig nOutOfSyncvsTime_
HistogramConfig maxSatDetailed_
HistogramConfig positionOfFirstTrailerBitDetailed_
HistogramConfig noData_
HistogramConfig highPbDetailed_
void initialise(const edm::ParameterSet &iConfig, std::ostringstream *pDebugStream)
std::map< unsigned int, MonitorElement * > minZeroDetailedMap_
std::map< unsigned int, MonitorElement * > positionOfFirstHeaderBitDetailedMap_
std::map< unsigned int, MonitorElement * > lowRangeDetailedMap_
HistogramConfig nOtherPbs_
void fillCountersHistograms(const ErrorCounters &aCounter, const double aTime)
std::map< unsigned int, MonitorElement * > otherPbsDetailedMap_
HistogramConfig outOfSyncDetailed_
HistogramConfig noDataDetailed_
std::map< unsigned int, MonitorElement * > apvAddressErrorDetailedMap_
HistogramConfig positionOfFirstHeaderBitDetailed_
std::map< unsigned int, MonitorElement * > maxSatDetailedMap_
HistogramConfig baseline_
void bookAllFEDHistograms()
std::map< unsigned int, MonitorElement * > noDataDetailedMap_
HistogramConfig lowPb_
HistogramConfig nApvAddressError_
static const uint16_t range(const Frame &aFrame)
std::map< unsigned int, MonitorElement * > apvErrorBitDetailedMap_
HistogramConfig meanDigitalLowvsTime_
std::map< unsigned int, MonitorElement * > lowPbDetailedMap_
const std::string & path() const
Definition: SiStripKey.h:126
HistogramConfig otherPbs_
HistogramConfig outOfSync_
HistogramConfig lowRangeDetailed_
HistogramConfig nHighRange_
void bookFEDHistograms(const unsigned int fedId, const Errors &aErr, bool doAll=false)
HistogramConfig lowRange_
HistogramConfig distanceHeaderTrailerDetailed_
HistogramConfig nNoDatavsTime_
HistogramConfig highPb_
HistogramConfig nHighPbvsTime_
HistogramConfig nLowPb_
Constants and enumerated types for FED/FEC systems.
void fillFEDHistograms(const Errors &aErr, const unsigned int aFedId)
HistogramConfig nMaxSat_
HistogramConfig highRangeDetailed_
HistogramConfig frameRange_
HistogramConfig nOtherPbsvsTime_
void fillGainHistograms(const Trends &aTrendElement, const double aTime)
HistogramConfig nMaxSatvsTime_
void bookTopLevelHistograms(DQMStore *dqm)
HistogramConfig apvAddressErrorDetailed_
HistogramConfig minZero_
HistogramConfig otherPbsDetailed_
HistogramConfig apvErrorBitDetailed_
HistogramConfig nNegativePeds_
std::map< unsigned int, MonitorElement * > distanceHeaderTrailerDetailedMap_
static const uint16_t FEDCH_PER_FED
void fillDetailedHistograms(const Errors &aErr, const sistrip::SpyUtilities::Frame &aFrame, const unsigned int aFedId, const unsigned int aFedChannel)
HistogramConfig nApvErrorBit_
HistogramConfig nNoData_
Definition: SPYHistograms.h:93
HistogramConfig nApvErrorBitvsTime_
HistogramConfig nLowRangevsTime_
static const uint16_t FED_ID_MAX
HistogramConfig nLowRange_
std::vector< bool > histosBooked_
HistogramConfig nMinZerovsTime_
HistogramConfig apvErrorBit_
std::map< unsigned int, MonitorElement * > positionOfFirstTrailerBitDetailedMap_
HistogramConfig nHighPb_
HistogramConfig nMinZero_
std::map< unsigned int, MonitorElement * > outOfSyncDetailedMap_
HistogramConfig nLowPbvsTime_
HistogramConfig nOutOfSync_