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 
227 void SPYHistograms::bookTopLevelHistograms(DQMStore::IBooker& ibooker, const TkDetMap*) {
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 
503 void SPYHistograms::bookFEDHistograms(DQMStore::IBooker& ibooker,
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 
680 void SPYHistograms::bookAllFEDHistograms(DQMStore::IBooker& ibooker) {
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 }
FEDNumbering.h
SPYHistograms::ErrorCounters::nHighPb
unsigned int nHighPb
Definition: SPYHistograms.h:26
SPYHistograms::ErrorCounters::nOOS
unsigned int nOOS
Definition: SPYHistograms.h:27
SPYHistograms::frameRange_
HistogramConfig frameRange_
Definition: SPYHistograms.h:131
SPYHistograms::lowPbDetailedMap_
std::map< unsigned int, MonitorElement * > lowPbDetailedMap_
Definition: SPYHistograms.h:159
SPYHistograms::nOtherPbsvsTime_
HistogramConfig nOtherPbsvsTime_
Definition: SPYHistograms.h:111
SPYHistograms::nHighRangevsTime_
HistogramConfig nHighRangevsTime_
Definition: SPYHistograms.h:105
SPYHistograms::Trends
Definition: SPYHistograms.h:15
MessageLogger.h
SPYHistograms::nLowPbvsTime_
HistogramConfig nLowPbvsTime_
Definition: SPYHistograms.h:108
sistrip::SpyUtilities::Frame::firstTrailerBit
uint16_t firstTrailerBit
Definition: SiStripSpyUtilities.h:31
SPYHistograms::lowPbDetailed_
HistogramConfig lowPbDetailed_
Definition: SPYHistograms.h:142
SPYHistograms::Errors::hasAPVAddressError1
bool hasAPVAddressError1
Definition: SPYHistograms.h:50
sistrip::SpyUtilities::Frame::digitalLow
uint16_t digitalLow
Definition: SiStripSpyUtilities.h:28
SPYHistograms::nOutOfSync_
HistogramConfig nOutOfSync_
Definition: SPYHistograms.h:96
SPYHistograms::ErrorCounters::nOtherPbs
unsigned int nOtherPbs
Definition: SPYHistograms.h:30
SPYHistograms::frameMin_
HistogramConfig frameMin_
Definition: SPYHistograms.h:132
SPYHistograms::ErrorCounters::nMaxSat
unsigned int nMaxSat
Definition: SPYHistograms.h:24
SPYHistograms::maxSatDetailedMap_
std::map< unsigned int, MonitorElement * > maxSatDetailedMap_
Definition: SPYHistograms.h:158
SPYHistograms::ErrorCounters
Definition: SPYHistograms.h:19
SPYHistograms::ErrorCounters::nAPVError
unsigned int nAPVError
Definition: SPYHistograms.h:31
edm::LogInfo
Definition: MessageLogger.h:254
SPYHistograms::nOutOfSyncvsTime_
HistogramConfig nOutOfSyncvsTime_
Definition: SPYHistograms.h:110
SPYHistograms::positionOfFirstTrailerBitDetailed_
HistogramConfig positionOfFirstTrailerBitDetailed_
Definition: SPYHistograms.h:151
SPYHistograms::nNegativePedsvsTime_
HistogramConfig nNegativePedsvsTime_
Definition: SPYHistograms.h:114
SPYHistograms::ErrorCounters::nAPVAddressError
unsigned int nAPVAddressError
Definition: SPYHistograms.h:32
SPYHistograms::nOtherPbs_
HistogramConfig nOtherPbs_
Definition: SPYHistograms.h:97
SPYHistograms::meanDigitalLowvsTime_
HistogramConfig meanDigitalLowvsTime_
Definition: SPYHistograms.h:115
sistrip::FED_ID_MIN
static const uint16_t FED_ID_MIN
Definition: ConstantsForHardwareSystems.h:21
SPYHistograms::fillCountersHistograms
void fillCountersHistograms(const ErrorCounters &aCounter, const double aTime)
Definition: SPYHistograms.cc:86
SiStripFedKey
A container class for generic run and event-related info, information required by the commissioning a...
Definition: SiStripFedKey.h:56
ConstantsForHardwareSystems.h
Constants and enumerated types for FED/FEC systems.
SPYHistograms::Errors::hasAPVAddressError0
bool hasAPVAddressError0
Definition: SPYHistograms.h:49
SPYHistograms::highRange_
HistogramConfig highRange_
Definition: SPYHistograms.h:120
SPYHistograms::bookTopLevelHistograms
void bookTopLevelHistograms(DQMStore::IBooker &, const TkDetMap *)
Definition: SPYHistograms.cc:227
SPYHistograms::ErrorCounters::nLowRange
unsigned int nLowRange
Definition: SPYHistograms.h:21
SPYHistograms::highPbDetailedMap_
std::map< unsigned int, MonitorElement * > highPbDetailedMap_
Definition: SPYHistograms.h:160
SPYHistograms::outOfSyncDetailed_
HistogramConfig outOfSyncDetailed_
Definition: SPYHistograms.h:144
SPYHistograms::Errors::hasNoData
bool hasNoData
Definition: SPYHistograms.h:38
SPYHistograms::noDataDetailed_
HistogramConfig noDataDetailed_
Definition: SPYHistograms.h:137
SPYHistograms::Errors::hasNegPeds
bool hasNegPeds
Definition: SPYHistograms.h:51
SPYHistograms::minZeroDetailed_
HistogramConfig minZeroDetailed_
Definition: SPYHistograms.h:140
SPYHistograms::negativePedsDetailedMap_
std::map< unsigned int, MonitorElement * > negativePedsDetailedMap_
Definition: SPYHistograms.h:165
SPYHistograms::positionOfFirstHeaderBitDetailed_
HistogramConfig positionOfFirstHeaderBitDetailed_
Definition: SPYHistograms.h:150
SPYHistograms::frameMax_
HistogramConfig frameMax_
Definition: SPYHistograms.h:133
sistrip::SPY_SAMPLES_PER_CHANNEL
static const uint16_t SPY_SAMPLES_PER_CHANNEL
Definition: SiStripFEDSpyBuffer.h:23
SPYHistograms::highPbDetailed_
HistogramConfig highPbDetailed_
Definition: SPYHistograms.h:143
SPYHistograms::maxSatDetailed_
HistogramConfig maxSatDetailed_
Definition: SPYHistograms.h:141
SPYHistograms::bookAllFEDHistograms
void bookAllFEDHistograms(DQMStore::IBooker &)
Definition: SPYHistograms.cc:680
SPYHistograms::apvErrorBitDetailedMap_
std::map< unsigned int, MonitorElement * > apvErrorBitDetailedMap_
Definition: SPYHistograms.h:163
TkDetMap
Definition: TkDetMap.h:175
SPYHistograms::outOfSyncDetailedMap_
std::map< unsigned int, MonitorElement * > outOfSyncDetailedMap_
Definition: SPYHistograms.h:161
SPYHistograms::outOfSync_
HistogramConfig outOfSync_
Definition: SPYHistograms.h:125
SPYHistograms::nMaxSatvsTime_
HistogramConfig nMaxSatvsTime_
Definition: SPYHistograms.h:107
SPYHistograms::SPYHistograms
SPYHistograms()
Definition: SPYHistograms.cc:13
SPYHistograms::otherPbs_
HistogramConfig otherPbs_
Definition: SPYHistograms.h:126
SPYHistograms::Errors::hasLowPb
bool hasLowPb
Definition: SPYHistograms.h:43
sistrip::SpyUtilities::Frame::baseline
float baseline
Definition: SiStripSpyUtilities.h:32
SPYHistograms::Errors::hasOOS
bool hasOOS
Definition: SPYHistograms.h:45
SPYHistograms::Errors::hasHighPb
bool hasHighPb
Definition: SPYHistograms.h:44
SPYHistograms::minZero_
HistogramConfig minZero_
Definition: SPYHistograms.h:121
SPYHistograms::Errors
Definition: SPYHistograms.h:37
SPYHistograms::ErrorCounters::nLowPb
unsigned int nLowPb
Definition: SPYHistograms.h:25
SPYHistograms::nHighRange_
HistogramConfig nHighRange_
Definition: SPYHistograms.h:91
SPYHistograms::lowRange_
HistogramConfig lowRange_
Definition: SPYHistograms.h:119
SPYHistograms::distanceHeaderTrailerDetailed_
HistogramConfig distanceHeaderTrailerDetailed_
Definition: SPYHistograms.h:152
SPYHistograms::Errors::hasMaxSat
bool hasMaxSat
Definition: SPYHistograms.h:42
SPYHistograms::Errors::hasErrorBit1
bool hasErrorBit1
Definition: SPYHistograms.h:48
edm::LogWarning
Definition: MessageLogger.h:141
SPYHistograms::fillDetailedHistograms
void fillDetailedHistograms(const Errors &aErr, const sistrip::SpyUtilities::Frame &aFrame, const unsigned int aFedId, const unsigned int aFedChannel)
Definition: SPYHistograms.cc:158
SPYHistograms::ErrorCounters::nMinZero
unsigned int nMinZero
Definition: SPYHistograms.h:23
SPYHistograms::nApvErrorBit_
HistogramConfig nApvErrorBit_
Definition: SPYHistograms.h:98
FEDNumbering::MAXSiStripFEDID
Definition: FEDNumbering.h:30
sistrip::SpyUtilities::range
static const uint16_t range(const Frame &aFrame)
Definition: SiStripSpyUtilities.cc:174
SiStripFedKey.h
edm::ParameterSet
Definition: ParameterSet.h:36
edm::LogError
Definition: MessageLogger.h:183
SPYHistograms::baseline_
HistogramConfig baseline_
Definition: SPYHistograms.h:134
SPYHistograms::nLowRangevsTime_
HistogramConfig nLowRangevsTime_
Definition: SPYHistograms.h:104
SiStripKey::path
const std::string & path() const
Definition: SiStripKey.h:121
SPYHistograms::lowRangeDetailedMap_
std::map< unsigned int, MonitorElement * > lowRangeDetailedMap_
Definition: SPYHistograms.h:155
SPYHistograms::noData_
HistogramConfig noData_
Definition: SPYHistograms.h:118
SPYHistograms::ErrorCounters::nNegPeds
unsigned int nNegPeds
Definition: SPYHistograms.h:33
SPYHistograms::ErrorCounters::nHighRange
unsigned int nHighRange
Definition: SPYHistograms.h:22
SPYHistograms::nLowPb_
HistogramConfig nLowPb_
Definition: SPYHistograms.h:94
SPYHistograms::Errors::hasHighRange
bool hasHighRange
Definition: SPYHistograms.h:40
SPYHistograms::ErrorCounters::nNoData
unsigned int nNoData
Definition: SPYHistograms.h:20
SPYHistograms.h
SPYHistograms::apvAddressErrorDetailed_
HistogramConfig apvAddressErrorDetailed_
Definition: SPYHistograms.h:147
l1tstage2_dqm_sourceclient-live_cfg.fedId
fedId
Definition: l1tstage2_dqm_sourceclient-live_cfg.py:88
SPYHistograms::apvAddressErrorDetailedMap_
std::map< unsigned int, MonitorElement * > apvAddressErrorDetailedMap_
Definition: SPYHistograms.h:164
sistrip::FED_ID_MAX
static const uint16_t FED_ID_MAX
Definition: ConstantsForHardwareSystems.h:22
SPYHistograms::Trends::meanDigitalLow
unsigned int meanDigitalLow
Definition: SPYHistograms.h:16
SPYHistograms::nApvAddressErrorvsTime_
HistogramConfig nApvAddressErrorvsTime_
Definition: SPYHistograms.h:113
SPYHistograms::Errors::hasLowRange
bool hasLowRange
Definition: SPYHistograms.h:39
SPYHistograms::positionOfFirstTrailerBitDetailedMap_
std::map< unsigned int, MonitorElement * > positionOfFirstTrailerBitDetailedMap_
Definition: SPYHistograms.h:168
sistrip::SpyUtilities::Frame::firstHeaderBit
uint16_t firstHeaderBit
Definition: SiStripSpyUtilities.h:30
SPYHistograms::histosBooked_
std::vector< bool > histosBooked_
Definition: SPYHistograms.h:171
SPYHistograms::nMinZerovsTime_
HistogramConfig nMinZerovsTime_
Definition: SPYHistograms.h:106
SPYHistograms::positionOfFirstHeaderBitDetailedMap_
std::map< unsigned int, MonitorElement * > positionOfFirstHeaderBitDetailedMap_
Definition: SPYHistograms.h:167
SPYHistograms::highPb_
HistogramConfig highPb_
Definition: SPYHistograms.h:124
SPYHistograms::lowPb_
HistogramConfig lowPb_
Definition: SPYHistograms.h:123
SPYHistograms::~SPYHistograms
~SPYHistograms() override
Definition: SPYHistograms.cc:15
SPYHistograms::apvAddressError_
HistogramConfig apvAddressError_
Definition: SPYHistograms.h:128
SPYHistograms::Errors::hasErrorBit0
bool hasErrorBit0
Definition: SPYHistograms.h:47
SPYHistograms::nHighPbvsTime_
HistogramConfig nHighPbvsTime_
Definition: SPYHistograms.h:109
SPYHistograms::nApvAddressError_
HistogramConfig nApvAddressError_
Definition: SPYHistograms.h:99
sistrip::SpyUtilities::Frame::digitalHigh
uint16_t digitalHigh
Definition: SiStripSpyUtilities.h:29
SPYHistograms::nMaxSat_
HistogramConfig nMaxSat_
Definition: SPYHistograms.h:93
SPYHistograms::nHighPb_
HistogramConfig nHighPb_
Definition: SPYHistograms.h:95
SPYHistograms::fillFEDHistograms
void fillFEDHistograms(const Errors &aErr, const unsigned int aFedId)
Definition: SPYHistograms.cc:114
SPYHistograms::minZeroDetailedMap_
std::map< unsigned int, MonitorElement * > minZeroDetailedMap_
Definition: SPYHistograms.h:157
SPYHistograms::nMinZero_
HistogramConfig nMinZero_
Definition: SPYHistograms.h:92
SPYHistograms::highRangeDetailed_
HistogramConfig highRangeDetailed_
Definition: SPYHistograms.h:139
SPYHistograms::highRangeDetailedMap_
std::map< unsigned int, MonitorElement * > highRangeDetailedMap_
Definition: SPYHistograms.h:156
SPYHistograms::bookFEDHistograms
void bookFEDHistograms(DQMStore::IBooker &, const unsigned int fedId, const Errors &aErr, bool doAll=false)
Definition: SPYHistograms.cc:503
sistrip::FEDCH_PER_FED
static const uint16_t FEDCH_PER_FED
Definition: ConstantsForHardwareSystems.h:30
SPYHistograms::fillGainHistograms
void fillGainHistograms(const Trends &aTrendElement, const double aTime)
Definition: SPYHistograms.cc:82
SPYHistograms::lowRangeDetailed_
HistogramConfig lowRangeDetailed_
Definition: SPYHistograms.h:138
SPYHistograms::initialise
void initialise(const edm::ParameterSet &iConfig, std::ostringstream *pDebugStream) override
Definition: SPYHistograms.cc:17
SPYHistograms::nNegativePeds_
HistogramConfig nNegativePeds_
Definition: SPYHistograms.h:100
sistrip::SpyUtilities::Frame
Definition: SiStripSpyUtilities.h:26
SPYHistograms::otherPbsDetailed_
HistogramConfig otherPbsDetailed_
Definition: SPYHistograms.h:145
SPYHistograms::apvErrorBitDetailed_
HistogramConfig apvErrorBitDetailed_
Definition: SPYHistograms.h:146
SPYHistograms::otherPbsDetailedMap_
std::map< unsigned int, MonitorElement * > otherPbsDetailedMap_
Definition: SPYHistograms.h:162
SPYHistograms::negativePeds_
HistogramConfig negativePeds_
Definition: SPYHistograms.h:129
SPYHistograms::maxSat_
HistogramConfig maxSat_
Definition: SPYHistograms.h:122
SPYHistograms::nNoDatavsTime_
HistogramConfig nNoDatavsTime_
Definition: SPYHistograms.h:103
SiStripFEDSpyBuffer.h
SPYHistograms::Errors::hasMinZero
bool hasMinZero
Definition: SPYHistograms.h:41
SPYHistograms::negativePedsDetailed_
HistogramConfig negativePedsDetailed_
Definition: SPYHistograms.h:148
SPYHistograms::nNoData_
HistogramConfig nNoData_
Definition: SPYHistograms.h:82
SPYHistograms::nApvErrorBitvsTime_
HistogramConfig nApvErrorBitvsTime_
Definition: SPYHistograms.h:112
SPYHistograms::Errors::hasOtherPbs
bool hasOtherPbs
Definition: SPYHistograms.h:46
SPYHistograms::distanceHeaderTrailerDetailedMap_
std::map< unsigned int, MonitorElement * > distanceHeaderTrailerDetailedMap_
Definition: SPYHistograms.h:169
SPYHistograms::apvErrorBit_
HistogramConfig apvErrorBit_
Definition: SPYHistograms.h:127
SPYHistograms::nLowRange_
HistogramConfig nLowRange_
Definition: SPYHistograms.h:90
SPYHistograms::noDataDetailedMap_
std::map< unsigned int, MonitorElement * > noDataDetailedMap_
Definition: SPYHistograms.h:154
FEDNumbering::MINSiStripFEDID
Definition: FEDNumbering.h:29