CMS 3D CMS Logo

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