CMS 3D CMS Logo

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