CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GEMDAQStatusSource.cc
Go to the documentation of this file.
2 
3 using namespace std;
4 using namespace edm;
5 
7  tagVFAT_ = consumes<GEMVFATStatusCollection>(cfg.getParameter<edm::InputTag>("VFATInputLabel"));
8  tagOH_ = consumes<GEMOHStatusCollection>(cfg.getParameter<edm::InputTag>("OHInputLabel"));
9  tagAMC_ = consumes<GEMAMCStatusCollection>(cfg.getParameter<edm::InputTag>("AMCInputLabel"));
10  tagAMC13_ = consumes<GEMAMC13StatusCollection>(cfg.getParameter<edm::InputTag>("AMC13InputLabel"));
11 
12  nAMCSlots_ = cfg.getParameter<Int_t>("AMCSlots");
13  gemEMapToken_ = esConsumes<GEMeMap, GEMeMapRcd, edm::Transition::BeginRun>();
14 }
15 
18  desc.add<edm::InputTag>("VFATInputLabel", edm::InputTag("muonGEMDigis", "VFATStatus"));
19  desc.add<edm::InputTag>("OHInputLabel", edm::InputTag("muonGEMDigis", "OHStatus"));
20  desc.add<edm::InputTag>("AMCInputLabel", edm::InputTag("muonGEMDigis", "AMCStatus"));
21  desc.add<edm::InputTag>("AMC13InputLabel", edm::InputTag("muonGEMDigis", "AMC13Status"));
22 
23  desc.add<Int_t>("AMCSlots", 13);
24  desc.addUntracked<std::string>("runType", "online");
25  desc.addUntracked<std::string>("logCategory", "GEMDAQStatusSource");
26 
27  descriptions.add("GEMDAQStatusSource", desc);
28 }
29 
31  auto gemROMap = std::make_shared<GEMROMapping>();
32  //if (useDBEMap_)
33  if (true) {
34  const auto &eMap = iSetup.getData(gemEMapToken_);
35  auto gemEMap = std::make_unique<GEMeMap>(eMap);
36  gemEMap->convert(*gemROMap);
37 
38  for (auto imap : gemEMap->theChamberMap_) {
39  int nNumChamber = (int)imap.fedId.size();
40  for (int i = 0; i < nNumChamber; i++) {
41  unsigned int fedId = imap.fedId[i];
42  uint8_t amcNum = imap.amcNum[i];
43  uint8_t gebId = imap.gebId[i];
44  GEMROMapping::chamEC geb_ec{fedId, amcNum, gebId};
45  GEMROMapping::chamDC geb_dc = gemROMap->chamberPos(geb_ec);
46  GEMDetId gemChId = geb_dc.detId;
47 
48  mapFEDIdToRe_[fedId] = gemChId.region();
49  mapAMC13ToListChamber_[fedId].push_back(gemChId);
50  mapAMCToListChamber_[{fedId, amcNum}].push_back(gemChId);
51  }
52  }
53 
54  gemEMap.reset();
55  } else {
56  // no EMap in DB, using dummy
57  // FIXME: How to add mapFEDIdToRe_ and mapDetIdToAMC_??
58  auto gemEMap = std::make_unique<GEMeMap>();
59  gemEMap->convertDummy(*gemROMap);
60  gemEMap.reset();
61  }
62 }
63 
65  if (h2Status == nullptr) {
66  return;
67  }
68 
69  unsigned int unBinPos = 1;
70  h2Status->setBinLabel(unBinPos++, "Good", 2);
71  h2Status->setBinLabel(unBinPos++, "Invalid AMC", 2);
72  h2Status->setBinLabel(unBinPos++, "Invalid size", 2);
73  h2Status->setBinLabel(unBinPos++, "Fail trailer check", 2);
74  h2Status->setBinLabel(unBinPos++, "Fail fragment length", 2);
75  h2Status->setBinLabel(unBinPos++, "Fail trailer match", 2);
76  h2Status->setBinLabel(unBinPos++, "More trailer", 2);
77  h2Status->setBinLabel(unBinPos++, "CRC modified", 2);
78  h2Status->setBinLabel(unBinPos++, "S-link error", 2);
79  h2Status->setBinLabel(unBinPos++, "Wrong FED ID", 2);
80 
81  h2Status->setBinLabel(1, "GE11-M", 1);
82  h2Status->setBinLabel(2, "GE11-P", 1);
83 }
84 
86  if (h2Status == nullptr) {
87  return;
88  }
89 
90  unsigned int unBinPos = 1;
91  h2Status->setBinLabel(unBinPos++, "Good", 2);
92  h2Status->setBinLabel(unBinPos++, "Invalid OH", 2);
93  h2Status->setBinLabel(unBinPos++, "Back pressure", 2);
94  h2Status->setBinLabel(unBinPos++, "Bad EC", 2);
95  h2Status->setBinLabel(unBinPos++, "Bad BC", 2);
96  h2Status->setBinLabel(unBinPos++, "Bad OC", 2);
97  h2Status->setBinLabel(unBinPos++, "Bad run type", 2);
98  h2Status->setBinLabel(unBinPos++, "Bad CRC", 2);
99  h2Status->setBinLabel(unBinPos++, "MMCM locked", 2);
100  h2Status->setBinLabel(unBinPos++, "DAQ clock locked", 2);
101  h2Status->setBinLabel(unBinPos++, "DAQ not ready", 2);
102  h2Status->setBinLabel(unBinPos++, "BC0 not locked", 2);
103 }
104 
106  if (h2Status == nullptr) {
107  return;
108  }
109 
110  unsigned int unBinPos = 1;
111  h2Status->setBinLabel(unBinPos++, "Good", 2);
112  h2Status->setBinLabel(unBinPos++, "Event FIFO near full", 2);
113  h2Status->setBinLabel(unBinPos++, "Input FIFO near full", 2);
114  h2Status->setBinLabel(unBinPos++, "L1A FIFO near full", 2);
115  h2Status->setBinLabel(unBinPos++, "Event size warn", 2);
116  h2Status->setBinLabel(unBinPos++, "Invalid VFAT", 2);
117  h2Status->setBinLabel(unBinPos++, "Event FIFO full", 2);
118  h2Status->setBinLabel(unBinPos++, "Input FIFO full", 2);
119  h2Status->setBinLabel(unBinPos++, "L1A FIFO full", 2);
120  h2Status->setBinLabel(unBinPos++, "Event size overflow", 2);
121  h2Status->setBinLabel(unBinPos++, "Invalid event", 2);
122  h2Status->setBinLabel(unBinPos++, "Out of Sync AMC vs VFAT", 2);
123  h2Status->setBinLabel(unBinPos++, "Out of Sync VFAT vs VFAT", 2);
124  h2Status->setBinLabel(unBinPos++, "BX mismatch AMC vs VFAT", 2);
125  h2Status->setBinLabel(unBinPos++, "BX mismatch VFAT vs VFAT", 2);
126  h2Status->setBinLabel(unBinPos++, "Input FIFO underflow", 2);
127  h2Status->setBinLabel(unBinPos++, "Bad VFAT count", 2);
128 }
129 
131  if (h2Status == nullptr) {
132  return;
133  }
134 
135  unsigned int unBinPos = 1;
136  h2Status->setBinLabel(unBinPos++, "Good", 2);
137  h2Status->setBinLabel(unBinPos++, "Basic overflow", 2);
138  h2Status->setBinLabel(unBinPos++, "Zero-sup overflow", 2);
139  h2Status->setBinLabel(unBinPos++, "VFAT CRC error", 2);
140  h2Status->setBinLabel(unBinPos++, "Invalid header", 2);
141  h2Status->setBinLabel(unBinPos++, "AMC EC mismatch", 2);
142  h2Status->setBinLabel(unBinPos++, "AMC BC mismatch", 2);
143 }
144 
146  LoadROMap(iSetup);
147  if (mapAMC13ToListChamber_.empty() || mapAMCToListChamber_.empty())
148  return;
149  initGeometry(iSetup);
150  if (GEMGeometry_ == nullptr)
151  return;
152  loadChambers();
153 
154  strFolderMain_ = "GEM/DAQStatus";
155 
156  nBXMin_ = -10;
157  nBXMax_ = 10;
158 
159  mapFEDIdToRe_[1467] = -1; // FIXME: Need more systematic way
160  mapFEDIdToRe_[1468] = 1;
161 
162  ibooker.cd();
164 
165  h2AMC13Status_ = nullptr;
166  h2AMCStatusNeg_ = nullptr;
167  h2AMCStatusPos_ = nullptr;
168 
171  ibooker.book2D("amc13_status", "AMC13 Status;AMC13;", 2, 0.5, 2.5, nBitAMC13_, 0.5, nBitAMC13_ + 0.5);
172  h2AMCStatusNeg_ = ibooker.book2D("amc_status_GE11-M",
173  "AMC Status GE11-M;AMC slot;",
174  nAMCSlots_,
175  -0.5,
176  nAMCSlots_ - 0.5,
177  nBitAMC_,
178  0.5,
179  nBitAMC_ + 0.5);
180  h2AMCStatusPos_ = ibooker.book2D("amc_status_GE11-P",
181  "AMC Status GE11-P;AMC slot;",
182  nAMCSlots_,
183  -0.5,
184  nAMCSlots_ - 0.5,
185  nBitAMC_,
186  0.5,
187  nBitAMC_ + 0.5);
188  }
189 
193 
194  mapStatusOH_ =
195  MEMap3Inf(this, "oh_status", "OptoHybrid Status", 36, 0.5, 36.5, nBitOH_, 0.5, nBitOH_ + 0.5, "Chamber");
196 
198  this, "vfat_statusWarnSum", "VFAT reporting warnings", 36, 0.5, 36.5, 24, -0.5, 24 - 0.5, "Chamber", "VFAT");
200  this, "vfat_statusErrSum", "VFAT reporting errors", 36, 0.5, 36.5, 24, -0.5, 24 - 0.5, "Chamber", "VFAT");
202  MEMap4Inf(this, "vfat_status", "VFAT Status", 24, -0.5, 24 - 0.5, nBitVFAT_, 0.5, nBitVFAT_ + 0.5, "VFAT");
203 
206  }
207 
213  }
214 
215  GenerateMEPerChamber(ibooker);
216 
218  h2SummaryStatusAll = CreateSummaryHist(ibooker, "chamberAllStatus");
219  h2SummaryStatusWarning = CreateSummaryHist(ibooker, "chamberWarnings");
220  h2SummaryStatusError = CreateSummaryHist(ibooker, "chamberErrors");
221  h2SummaryStatusVFATWarning = CreateSummaryHist(ibooker, "chamberVFATWarnings");
222  h2SummaryStatusVFATError = CreateSummaryHist(ibooker, "chamberVFATErrors");
223  h2SummaryStatusOHWarning = CreateSummaryHist(ibooker, "chamberOHWarnings");
224  h2SummaryStatusOHError = CreateSummaryHist(ibooker, "chamberOHErrors");
225  h2SummaryStatusAMCWarning = CreateSummaryHist(ibooker, "chamberAMCWarnings");
226  h2SummaryStatusAMCError = CreateSummaryHist(ibooker, "chamberAMCErrors");
227  h2SummaryStatusAMC13Error = CreateSummaryHist(ibooker, "chamberAMC13Errors");
228 
229  h2SummaryStatusAll->setTitle("Summary of all number of OH or VFAT status of each chambers");
230  h2SummaryStatusWarning->setTitle("Summary of all warnings of each chambers");
231  h2SummaryStatusError->setTitle("Summary of all errors of each chambers");
232  h2SummaryStatusVFATWarning->setTitle("Summary of VFAT warnings of each chambers");
233  h2SummaryStatusVFATError->setTitle("Summary of VFAT errors of each chambers");
234  h2SummaryStatusOHWarning->setTitle("Summary of OH warnings of each chambers");
235  h2SummaryStatusOHError->setTitle("Summary of OH errors of each chambers");
236  h2SummaryStatusAMCWarning->setTitle("Summary of AMC warnings of each chambers");
237  h2SummaryStatusAMCError->setTitle("Summary of AMC errors of each chambers");
238  h2SummaryStatusAMC13Error->setTitle("Summary of AMC13 errors of each chambers");
239  }
240 }
241 
243  MEStationInfo &stationInfo = mapStationInfo_[key];
244 
246  mapStatusOH_.bookND(bh, key);
248 
249  if (mapStatusOH_.isOperating()) {
251  }
252 
258 
264 
265  return 0;
266 }
267 
269  ME3IdsKey key3 = key4Tokey3(key);
270  MEStationInfo &stationInfo = mapStationInfo_[key3];
271 
272  bh.getBooker()->setCurrentFolder(strFolderMain_ + "/VFATStatus_" + getNameDirLayer(key3));
273 
274  mapStatusVFATPerCh_.SetBinConfX(stationInfo.nMaxVFAT_, -0.5);
275  mapStatusVFATPerCh_.bookND(bh, key);
279  }
280 
282 
283  return 0;
284 }
285 
291 
292  event.getByToken(tagVFAT_, gemVFAT);
293  event.getByToken(tagOH_, gemOH);
294  event.getByToken(tagAMC_, gemAMC);
295  event.getByToken(tagAMC13_, gemAMC13);
296 
297  std::map<ME4IdsKey, bool> mapChamberAll;
298  std::map<ME4IdsKey, bool> mapChamberWarning;
299  std::map<ME4IdsKey, bool> mapChamberError;
300  std::map<ME4IdsKey, bool> mapChamberVFATWarning;
301  std::map<ME4IdsKey, bool> mapChamberVFATError;
302  std::map<ME4IdsKey, bool> mapChamberOHWarning;
303  std::map<ME4IdsKey, bool> mapChamberOHError;
304  std::map<ME4IdsKey, bool> mapChamberAMCWarning;
305  std::map<ME4IdsKey, bool> mapChamberAMCError;
306  std::map<ME4IdsKey, bool> mapChamberAMC13Error;
307 
308  for (auto amc13It = gemAMC13->begin(); amc13It != gemAMC13->end(); ++amc13It) {
309  int fedId = (*amc13It).first;
310  if (mapFEDIdToRe_.find(fedId) == mapFEDIdToRe_.end())
311  continue;
312  int nXBin = 0;
313  if (mapFEDIdToRe_[fedId] < 0) {
314  nXBin = 1;
315  } else if (mapFEDIdToRe_[fedId] > 0) {
316  nXBin = 2;
317  } else {
318  edm::LogError(log_category_) << "+++ Error : Unknown FED Id +++\n" << std::endl;
319  continue;
320  }
321 
322  const auto &range = (*amc13It).second;
323  for (auto amc13 = range.first; amc13 != range.second; ++amc13) {
324  Bool_t bWarn = false;
325  Bool_t bErr = false;
326 
327  GEMAMC13Status::Warnings warnings{amc13->warnings()};
329  if (warnings.InValidAMC)
330  FillWithRiseErr(h2AMC13Status_, nXBin, 2, bWarn);
331  }
332 
333  GEMAMC13Status::Errors errors{amc13->errors()};
335  if (errors.InValidSize)
336  FillWithRiseErr(h2AMC13Status_, nXBin, 3, bErr);
337  if (errors.failTrailerCheck)
338  FillWithRiseErr(h2AMC13Status_, nXBin, 4, bErr);
339  if (errors.failFragmentLength)
340  FillWithRiseErr(h2AMC13Status_, nXBin, 5, bErr);
341  if (errors.failTrailerMatch)
342  FillWithRiseErr(h2AMC13Status_, nXBin, 6, bErr);
343  if (errors.moreTrailers)
344  FillWithRiseErr(h2AMC13Status_, nXBin, 7, bErr);
345  if (errors.crcModified)
346  FillWithRiseErr(h2AMC13Status_, nXBin, 8, bErr);
347  if (errors.slinkError)
348  FillWithRiseErr(h2AMC13Status_, nXBin, 9, bErr);
349  if (errors.wrongFedId)
350  FillWithRiseErr(h2AMC13Status_, nXBin, 10, bErr);
351  }
352 
353  if (!bWarn && !bErr) {
355  h2AMC13Status_->Fill(nXBin, 1);
356  }
357  } else {
358  auto &listChamber = mapAMC13ToListChamber_[fedId];
359  for (auto gid : listChamber) {
360  ME4IdsKey key4Ch{gid.region(), gid.station(), gid.layer(), gid.chamber()};
361  if (bErr)
362  mapChamberAMC13Error[key4Ch] = false;
363  }
364  }
365  }
366  }
367 
368  MonitorElement *h2AMCStatus = nullptr;
369 
370  for (auto amcIt = gemAMC->begin(); amcIt != gemAMC->end(); ++amcIt) {
371  int fedId = (*amcIt).first;
372  if (mapFEDIdToRe_.find(fedId) == mapFEDIdToRe_.end())
373  continue;
374  if (mapFEDIdToRe_[fedId] < 0) {
375  h2AMCStatus = h2AMCStatusNeg_;
376  } else if (mapFEDIdToRe_[fedId] > 0) {
377  h2AMCStatus = h2AMCStatusPos_;
378  } else {
379  edm::LogError(log_category_) << "+++ Error : Unknown FED Id +++\n" << std::endl;
380  continue;
381  }
382 
383  const GEMAMCStatusCollection::Range &range = (*amcIt).second;
384  for (auto amc = range.first; amc != range.second; ++amc) {
385  Bool_t bWarn = false;
386  Bool_t bErr = false;
387 
388  Int_t nAMCNum = amc->amcNumber();
389 
390  GEMAMCStatus::Warnings warnings{amc->warnings()};
392  if (warnings.InValidOH)
393  FillWithRiseErr(h2AMCStatus, nAMCNum, 2, bWarn);
394  if (warnings.backPressure)
395  FillWithRiseErr(h2AMCStatus, nAMCNum, 3, bWarn);
396  }
397 
398  GEMAMCStatus::Errors errors{amc->errors()};
400  if (errors.badEC)
401  FillWithRiseErr(h2AMCStatus, nAMCNum, 4, bErr);
402  if (errors.badBC)
403  FillWithRiseErr(h2AMCStatus, nAMCNum, 5, bErr);
404  if (errors.badOC)
405  FillWithRiseErr(h2AMCStatus, nAMCNum, 6, bErr);
406  if (errors.badRunType)
407  FillWithRiseErr(h2AMCStatus, nAMCNum, 7, bErr);
408  if (errors.badCRC)
409  FillWithRiseErr(h2AMCStatus, nAMCNum, 8, bErr);
410  if (errors.MMCMlocked)
411  FillWithRiseErr(h2AMCStatus, nAMCNum, 9, bErr);
412  if (errors.DAQclocklocked)
413  FillWithRiseErr(h2AMCStatus, nAMCNum, 10, bErr);
414  if (errors.DAQnotReday)
415  FillWithRiseErr(h2AMCStatus, nAMCNum, 11, bErr);
416  if (errors.BC0locked)
417  FillWithRiseErr(h2AMCStatus, nAMCNum, 12, bErr);
418  }
419 
420  if (!bWarn && !bErr) {
422  h2AMCStatus->Fill(nAMCNum, 1);
423  }
424  } else {
425  auto &listChamber = mapAMCToListChamber_[{fedId, nAMCNum}];
426  for (auto gid : listChamber) {
427  ME4IdsKey key4Ch{gid.region(), gid.station(), gid.layer(), gid.chamber()};
428  if (bErr)
429  mapChamberAMCError[key4Ch] = false;
430  if (bWarn)
431  mapChamberAMCWarning[key4Ch] = false;
432  }
433  }
434  }
435  }
436 
437  for (auto ohIt = gemOH->begin(); ohIt != gemOH->end(); ++ohIt) {
438  GEMDetId gid = (*ohIt).first;
439  ME3IdsKey key3{gid.region(), gid.station(), gid.layer()};
440  ME4IdsKey key4{gid.region(), gid.station(), gid.layer(), gid.chamber()}; // WARNING: Chamber, not iEta
441 
442  const GEMOHStatusCollection::Range &range = (*ohIt).second;
443  for (auto OHStatus = range.first; OHStatus != range.second; ++OHStatus) {
444  GEMOHStatus::Warnings warnings{OHStatus->warnings()};
445  if (warnings.EvtNF)
446  mapStatusOH_.Fill(key3, gid.chamber(), 2);
447  if (warnings.InNF)
448  mapStatusOH_.Fill(key3, gid.chamber(), 3);
449  if (warnings.L1aNF)
450  mapStatusOH_.Fill(key3, gid.chamber(), 4);
451  if (warnings.EvtSzW)
452  mapStatusOH_.Fill(key3, gid.chamber(), 5);
453  if (warnings.InValidVFAT)
454  mapStatusOH_.Fill(key3, gid.chamber(), 6);
455 
456  GEMOHStatus::Errors errors{OHStatus->errors()};
457  if (errors.EvtF)
458  mapStatusOH_.Fill(key3, gid.chamber(), 7);
459  if (errors.InF)
460  mapStatusOH_.Fill(key3, gid.chamber(), 8);
461  if (errors.L1aF)
462  mapStatusOH_.Fill(key3, gid.chamber(), 9);
463  if (errors.EvtSzOFW)
464  mapStatusOH_.Fill(key3, gid.chamber(), 10);
465  if (errors.Inv)
466  mapStatusOH_.Fill(key3, gid.chamber(), 11);
467  if (errors.OOScAvV)
468  mapStatusOH_.Fill(key3, gid.chamber(), 12);
469  if (errors.OOScVvV)
470  mapStatusOH_.Fill(key3, gid.chamber(), 13);
471  if (errors.BxmAvV)
472  mapStatusOH_.Fill(key3, gid.chamber(), 14);
473  if (errors.BxmVvV)
474  mapStatusOH_.Fill(key3, gid.chamber(), 15);
475  if (errors.InUfw)
476  mapStatusOH_.Fill(key3, gid.chamber(), 16);
477  if (errors.badVFatCount)
478  mapStatusOH_.Fill(key3, gid.chamber(), 17);
479 
480  Bool_t bWarn = warnings.wcodes != 0;
481  Bool_t bErr = errors.codes != 0;
482  if (!bWarn && !bErr)
483  mapStatusOH_.Fill(key3, gid.chamber(), 1);
484  if (bWarn)
485  mapChamberOHWarning[key4] = false;
486  if (bErr)
487  mapChamberOHError[key4] = false;
488  mapChamberAll[key4] = true;
489  }
490  }
491 
492  for (auto vfatIt = gemVFAT->begin(); vfatIt != gemVFAT->end(); ++vfatIt) {
493  GEMDetId gid = (*vfatIt).first;
494  ME3IdsKey key3{gid.region(), gid.station(), gid.layer()};
495  ME4IdsKey key4Ch{gid.region(), gid.station(), gid.layer(), gid.chamber()}; // WARNING: Chamber, not iEta
496  const GEMVFATStatusCollection::Range &range = (*vfatIt).second;
497 
498  for (auto vfatStat = range.first; vfatStat != range.second; ++vfatStat) {
499  Int_t nIdxVFAT = getVFATNumber(gid.station(), gid.ieta(), vfatStat->vfatPosition());
500 
501  GEMVFATStatus::Warnings warnings{vfatStat->warnings()};
502  if (warnings.basicOFW)
503  mapStatusVFATPerCh_.Fill(key4Ch, nIdxVFAT, 2);
504  if (warnings.zeroSupOFW)
505  mapStatusVFATPerCh_.Fill(key4Ch, nIdxVFAT, 3);
506 
507  GEMVFATStatus::Errors errors{(uint8_t)vfatStat->errors()};
508  mapStatusVFATPerCh_.Fill(key4Ch, nIdxVFAT, 4);
509  if (errors.InValidHeader)
510  mapStatusVFATPerCh_.Fill(key4Ch, nIdxVFAT, 5);
511  if (errors.EC)
512  mapStatusVFATPerCh_.Fill(key4Ch, nIdxVFAT, 6);
513  if (errors.BC)
514  mapStatusVFATPerCh_.Fill(key4Ch, nIdxVFAT, 7);
515 
516  Bool_t bWarn = warnings.wcodes != 0;
517  Bool_t bErr = errors.codes != 0;
518  if (!bWarn && !bErr)
519  mapStatusVFATPerCh_.Fill(key4Ch, nIdxVFAT, 1);
520  if (bWarn)
521  mapChamberVFATWarning[key4Ch] = false;
522  if (bErr)
523  mapChamberVFATError[key4Ch] = false;
524  if (bWarn)
525  mapStatusWarnVFATPerLayer_.Fill(key3, gid.chamber(), nIdxVFAT);
526  if (bErr)
527  mapStatusErrVFATPerLayer_.Fill(key3, gid.chamber(), nIdxVFAT);
528  mapChamberAll[key4Ch] = true;
529  }
530  }
531 
533  // Summarizing all presence of status of each chamber
534  for (auto const &[key4, bErr] : mapChamberAll) {
535  ME3IdsKey key3 = key4Tokey3(key4);
536  Int_t nChamber = keyToChamber(key4);
537  h2SummaryStatusAll->Fill(nChamber, mapStationToIdx_[key3]);
538  }
539 
540  // Summarizing all presence of status of each chamber
542  // Summarizing all the error and warning occupancy
543  FillStatusSummaryPlot(mapChamberVFATWarning, h2SummaryStatusVFATWarning, &mapChamberWarning);
544  FillStatusSummaryPlot(mapChamberVFATError, h2SummaryStatusVFATError, &mapChamberError);
545  FillStatusSummaryPlot(mapChamberOHWarning, h2SummaryStatusOHWarning, &mapChamberWarning);
546  FillStatusSummaryPlot(mapChamberOHError, h2SummaryStatusOHError, &mapChamberError);
547  FillStatusSummaryPlot(mapChamberAMCWarning, h2SummaryStatusAMCWarning, &mapChamberWarning);
548  FillStatusSummaryPlot(mapChamberAMCError, h2SummaryStatusAMCError, &mapChamberError);
549  FillStatusSummaryPlot(mapChamberAMC13Error, h2SummaryStatusAMC13Error, &mapChamberError);
550 
551  FillStatusSummaryPlot(mapChamberWarning, h2SummaryStatusWarning);
553  }
554 }
555 
virtual void setTitle(const std::string &title)
set (ie. change) histogram/profile title
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MEMapInfT< MEMap4Ids, ME4IdsKey > MEMap4Inf
Definition: GEMDQMBase.h:460
dqm::impl::MonitorElement * CreateSummaryHist(DQMStore::IBooker &ibooker, TString strName)
Definition: GEMDQMBase.cc:142
int ProcessWithMEMap3WithChamber(BookingHelper &bh, ME4IdsKey key) override
GEMDAQStatusSource(const edm::ParameterSet &cfg)
tuple cfg
Definition: looper.py:296
Int_t nRunType_
Definition: GEMDQMBase.h:516
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void FillWithRiseErr(MonitorElement *h, Int_t nX, Int_t nY, Bool_t &bErr)
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
edm::EDGetToken tagAMC13_
int getVFATNumber(const int, const int, const int)
Definition: GEMDQMBase.h:612
MonitorElement * h2SummaryStatusAMCWarning
MonitorElement * h2AMCStatusNeg_
MEMapInfT< MEMap3Ids, ME3IdsKey > MEMap3Inf
Definition: GEMDQMBase.h:459
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
MonitorElement * h2AMC13Status_
int SetLabelForChambers(K key, Int_t nAxis, Int_t nNumBin=-1)
Definition: GEMDQMBase.h:337
MonitorElement * h2SummaryStatusAMCError
int initGeometry(edm::EventSetup const &iSetup)
Definition: GEMDQMBase.cc:31
std::tuple< Int_t, Int_t, Int_t, Int_t > ME4IdsKey
edm::ESGetToken< GEMeMap, GEMeMapRcd > gemEMapToken_
std::map< UInt_t, int > mapFEDIdToRe_
int SetLabelForVFATs(K key, Int_t nNumEtaPartitions, Int_t nAxis, Int_t nNumBin=-1)
Definition: GEMDQMBase.h:359
std::map< ME3IdsKey, MEStationInfo > mapStationInfo_
Definition: GEMDQMBase.h:585
std::map< std::tuple< int, int >, std::vector< GEMDetId > > mapAMCToListChamber_
int loadChambers()
Definition: GEMDQMBase.cc:62
std::map< ME3IdsKey, int > mapStationToIdx_
Definition: GEMDQMBase.h:584
Log< level::Error, false > LogError
int Fill(K key, Double_t x)
Definition: GEMDQMBase.h:380
std::string log_category_
Definition: GEMDQMBase.h:518
constexpr int ieta() const
Definition: GEMDetId.h:199
edm::EDGetToken tagVFAT_
MonitorElement * h2SummaryStatusVFATError
const uint16_t range(const Frame &aFrame)
void Fill(long long x)
bool getData(T &iHolder) const
Definition: EventSetup.h:122
MEMap3Inf mapStatusWarnVFATPerLayer_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
edm::EDGetToken tagOH_
MonitorElement * h2SummaryStatusError
double amc
Definition: hdecay.h:20
MEMap3Inf mapStatusErrVFATPerLayer_
int GenerateMEPerChamber(DQMStore::IBooker &ibooker)
Definition: GEMDQMBase.cc:174
void SetLabelAMCStatus(MonitorElement *h2Status)
void LoadROMap(edm::EventSetup const &iSetup)
constexpr int region() const
Definition: GEMDetId.h:171
tuple key
prepare the HTCondor submission files and eventually submit them
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
void SetLabelAMC13Status(MonitorElement *h2Status)
std::map< int, std::vector< GEMDetId > > mapAMC13ToListChamber_
MonitorElement * h2SummaryStatusVFATWarning
MonitorElement * h2SummaryStatusAll
const GEMGeometry * GEMGeometry_
Definition: GEMDQMBase.h:571
void SetLabelVFATStatus(MonitorElement *h2Status)
constexpr int chamber() const
Definition: GEMDetId.h:183
constexpr int layer() const
Definition: GEMDetId.h:190
std::pair< const_iterator, const_iterator > Range
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
constexpr int station() const
Definition: GEMDetId.h:179
void add(std::string const &label, ParameterSetDescription const &psetDescription)
DQMStore::IBooker * getBooker()
Definition: GEMDQMBase.h:94
int keyToChamber(ME4IdsKey key)
Definition: GEMDQMBase.h:540
void SetLabelOHStatus(MonitorElement *h2Status)
std::string getNameDirLayer(ME3IdsKey key3)
Definition: GEMDQMBase.h:645
int bookND(BookingHelper &bh, K key)
Definition: GEMDQMBase.h:307
MonitorElement * h2SummaryStatusOHWarning
ME3IdsKey key4Tokey3(ME4IdsKey key)
Definition: GEMDQMBase.h:549
MonitorElement * h2SummaryStatusAMC13Error
int ProcessWithMEMap3(BookingHelper &bh, ME3IdsKey key) override
std::tuple< Int_t, Int_t, Int_t > ME3IdsKey
void SetBinConfX(Int_t nBins, Double_t dL=0.5, Double_t dH=-1048576.0)
Definition: GEMDQMBase.h:281
MonitorElement * h2SummaryStatusWarning
void FillStatusSummaryPlot(std::map< ME4IdsKey, bool > &mapChamber, MonitorElement *h2Plot, std::map< ME4IdsKey, bool > *pmapSummary=nullptr)
MonitorElement * h2SummaryStatusOHError
void SetBinConfY(Int_t nBins, Double_t dL=0.5, Double_t dH=-1048576.0)
Definition: GEMDQMBase.h:289
dqm::impl::MonitorElement * FindHist(K key)
Definition: GEMDQMBase.h:328
Definition: Run.h:45
MonitorElement * h2AMCStatusPos_
edm::EDGetToken tagAMC_