CMS 3D CMS Logo

L1TMP7ZeroSupp.cc
Go to the documentation of this file.
2 
3 const unsigned int L1TMP7ZeroSupp::maxMasks_ = 16;
4 
6  : fedDataToken_(consumes<FEDRawDataCollection>(ps.getParameter<edm::InputTag>("rawData"))),
7  zsEnabled_(ps.getUntrackedParameter<bool>("zsEnabled")),
8  fedIds_(ps.getParameter<std::vector<int>>("fedIds")),
9  slinkHeaderSize_(ps.getUntrackedParameter<int>("lenSlinkHeader")),
10  slinkTrailerSize_(ps.getUntrackedParameter<int>("lenSlinkTrailer")),
11  amc13HeaderSize_(ps.getUntrackedParameter<int>("lenAMC13Header")),
12  amc13TrailerSize_(ps.getUntrackedParameter<int>("lenAMC13Trailer")),
13  amcHeaderSize_(ps.getUntrackedParameter<int>("lenAMCHeader")),
14  amcTrailerSize_(ps.getUntrackedParameter<int>("lenAMCTrailer")),
15  newZsFlagMask_(ps.getUntrackedParameter<int>("newZsFlagMask")),
16  zsFlagMask_(ps.getUntrackedParameter<int>("zsFlagMask")),
17  dataInvFlagMask_(ps.getUntrackedParameter<int>("dataInvFlagMask")),
18  maxFedReadoutSize_(ps.getUntrackedParameter<int>("maxFEDReadoutSize")),
19  monitorDir_(ps.getUntrackedParameter<std::string>("monitorDir")),
20  verbose_(ps.getUntrackedParameter<bool>("verbose"))
21 {
22  std::vector<int> zeroMask(6, 0);
23  masks_.reserve(maxMasks_);
24  for (unsigned int i = 0; i < maxMasks_; ++i) {
25  std::string maskCapIdStr{"maskCapId"+std::to_string(i)};
26  masks_.push_back(ps.getUntrackedParameter<std::vector<int>>(maskCapIdStr, zeroMask));
27  // which masks are defined?
28  if (ps.exists(maskCapIdStr)) {
29  definedMaskCapIds_.push_back(i);
30  }
31  }
32  if (verbose_) {
33  // check masks
34  std::cout << "masks" << std::endl;
35  for (unsigned int i = 0; i < maxMasks_; ++i) {
36  std::cout << "caption ID" << i << ":" << std::endl;
37  for (const auto& maskIt: masks_.at(i)) {
38  std::cout << std::hex << std::setw(8) << std::setfill('0') << maskIt << std::dec << std::endl;
39  }
40  }
41  std::cout << "----------" << std::endl;
42  }
43 }
44 
46 
49  desc.add<edm::InputTag>("rawData");
50  desc.add<std::vector<int>>("fedIds")->setComment("FED ids to analyze.");
51  desc.addUntracked<bool>("zsEnabled", true)->setComment("MP7 zero suppression is enabled.");
52  desc.addUntracked<int>("lenSlinkHeader", 8)->setComment("Number of Slink header bytes.");
53  desc.addUntracked<int>("lenSlinkTrailer", 8)->setComment("Number of Slink trailer bytes.");
54  desc.addUntracked<int>("lenAMC13Header", 8)->setComment("Number of AMC13 header bytes.");
55  desc.addUntracked<int>("lenAMC13Trailer", 8)->setComment("Number of AMC13 trailer bytes.");
56  desc.addUntracked<int>("lenAMCHeader", 8)->setComment("Number of AMC header bytes.");
57  desc.addUntracked<int>("lenAMCTrailer", 0)->setComment("Number of AMC trailer bytes.");
58  desc.addUntracked<int>("zsFlagMask", 0x1)->setComment("Zero suppression flag mask.");
59  desc.addUntracked<int>("newZsFlagMask", 0x2)->setComment("Per-BX zero suppression flag mask.");
60  desc.addUntracked<int>("dataInvFlagMask", 0x1)->setComment("Data inversion flag mask.");
61  desc.addUntracked<int>("maxFEDReadoutSize", 10000)->setComment("Maximal FED readout size histogram x-axis value.");
62  for (unsigned int i = 0; i < maxMasks_; ++i) {
63  desc.addOptionalUntracked<std::vector<int>>("maskCapId"+std::to_string(i))->setComment("ZS mask for caption id "+std::to_string(i)+".");
64  }
65  desc.addUntracked<std::string>("monitorDir", "")->setComment("Target directory in the DQM file. Will be created if not existing.");
66  desc.addUntracked<bool>("verbose", false);
67  descriptions.add("l1tMP7ZeroSupp", desc);
68 }
69 
71 
73 
75  // overall summary
78  capIds_ = ibooker.book1D("capIds", "Caption ids found in data", maxMasks_, 0, maxMasks_);
79  capIds_->setAxisTitle("caption id", 1);
80 
81  // per caption id subdirectories
82  for (const auto &id: definedMaskCapIds_) {
83  ibooker.setCurrentFolder(monitorDir_+"/CapId"+std::to_string(id));
84  bookCapIdHistograms(ibooker, id);
85  }
86 }
87 
88 void L1TMP7ZeroSupp::bookCapIdHistograms(DQMStore::IBooker& ibooker, const unsigned int& id) {
89  std::string summaryTitleText = "Zero suppression validation summary";
90  std::string sizeTitleText;
91  if (id == maxMasks_) {
92  sizeTitleText = "FED readout ";
93  } else {
94  summaryTitleText = summaryTitleText+", caption id "+std::to_string(id);
95  sizeTitleText = "cumulated caption id "+std::to_string(id)+" block ";
96  }
97 
98  zeroSuppValMap_[id] = ibooker.book1D("zeroSuppVal", summaryTitleText, NBINLABELS, 0, NBINLABELS);
99  zeroSuppValMap_[id]->setAxisTitle("ZS status", 1);
100  zeroSuppValMap_[id]->setBinLabel(EVTS+1, "events", 1);
101  zeroSuppValMap_[id]->setBinLabel(EVTSGOOD+1, "good events", 1);
102  zeroSuppValMap_[id]->setBinLabel(EVTSBAD+1, "bad events", 1);
103  zeroSuppValMap_[id]->setBinLabel(BLOCKS+1, "blocks", 1);
104  zeroSuppValMap_[id]->setBinLabel(ZSBLKSGOOD+1, "good blocks", 1);
105  zeroSuppValMap_[id]->setBinLabel(ZSBLKSBAD+1, "bad blocks", 1);
106  zeroSuppValMap_[id]->setBinLabel(ZSBLKSBADFALSEPOS+1, "false pos.", 1);
107  zeroSuppValMap_[id]->setBinLabel(ZSBLKSBADFALSENEG+1, "false neg.", 1);
108  zeroSuppValMap_[id]->setBinLabel(BXBLOCKS+1, "BX blocks", 1);
109  zeroSuppValMap_[id]->setBinLabel(ZSBXBLKSGOOD+1, "good BX blocks", 1);
110  zeroSuppValMap_[id]->setBinLabel(ZSBXBLKSBAD+1, "bad BX blocks", 1);
111  zeroSuppValMap_[id]->setBinLabel(ZSBXBLKSBADFALSEPOS+1, "BX false pos.", 1);
112  zeroSuppValMap_[id]->setBinLabel(ZSBXBLKSBADFALSENEG+1, "BX false neg.", 1);
113 
114  errorSummaryNumMap_[id] = ibooker.book1D("errorSummaryNum", summaryTitleText, RNBINLABELS, 0, RNBINLABELS);
115  errorSummaryNumMap_[id]->setBinLabel(REVTS+1, "bad events", 1);
116  errorSummaryNumMap_[id]->setBinLabel(RBLKS+1, "bad blocks", 1);
117  errorSummaryNumMap_[id]->setBinLabel(RBLKSFALSEPOS+1, "false pos.", 1);
118  errorSummaryNumMap_[id]->setBinLabel(RBLKSFALSENEG+1, "false neg.", 1);
119  errorSummaryNumMap_[id]->setBinLabel(RBXBLKS+1, "bad BX blocks", 1);
120  errorSummaryNumMap_[id]->setBinLabel(RBXBLKSFALSEPOS+1, "BX false pos.", 1);
121  errorSummaryNumMap_[id]->setBinLabel(RBXBLKSFALSENEG+1, "BX false neg.", 1);
122 
123  errorSummaryDenMap_[id] = ibooker.book1D("errorSummaryDen", "denominators", RNBINLABELS, 0, RNBINLABELS);
124  errorSummaryDenMap_[id]->setBinLabel(REVTS+1, "# events", 1);
125  errorSummaryDenMap_[id]->setBinLabel(RBLKS+1, "# blocks", 1);
126  errorSummaryDenMap_[id]->setBinLabel(RBLKSFALSEPOS+1, "# blocks", 1);
127  errorSummaryDenMap_[id]->setBinLabel(RBLKSFALSENEG+1, "# blocks", 1);
128  errorSummaryDenMap_[id]->setBinLabel(RBXBLKS+1, "# BX blocks", 1);
129  errorSummaryDenMap_[id]->setBinLabel(RBXBLKSFALSEPOS+1, "# BX blocks", 1);
130  errorSummaryDenMap_[id]->setBinLabel(RBXBLKSFALSENEG+1, "# BX blocks", 1);
131 
132  readoutSizeNoZSMap_[id] = ibooker.book1D("readoutSize", sizeTitleText + "size", 100, 0, maxFedReadoutSize_);
133  readoutSizeNoZSMap_[id]->setAxisTitle("size (byte)", 1);
134  readoutSizeZSMap_[id] = ibooker.book1D("readoutSizeZS", sizeTitleText + "size with zero suppression", 100, 0, maxFedReadoutSize_);
135  readoutSizeZSMap_[id]->setAxisTitle("size (byte)", 1);
136  readoutSizeZSExpectedMap_[id] = ibooker.book1D("readoutSizeZSExpected", "Expected " + sizeTitleText + "size with zero suppression", 100, 0, maxFedReadoutSize_);
137  readoutSizeZSExpectedMap_[id]->setAxisTitle("size (byte)", 1);
138 }
139 
141 
142  if (verbose_) edm::LogInfo("L1TDQM") << "L1TMP7ZeroSupp: analyze..." << std::endl;
143 
145  e.getByToken(fedDataToken_, feds);
146 
147  if (!feds.isValid()) {
148  edm::LogError("L1TDQM") << "Cannot analyse: no FEDRawDataCollection found";
149  return;
150  }
151 
154  for (const auto &id: definedMaskCapIds_) {
155  zeroSuppValMap_[id]->Fill(EVTS);
156  errorSummaryDenMap_[id]->Fill(REVTS);
157  }
158 
159  std::map<unsigned int, bool> evtGood;
160  evtGood[maxMasks_] = true;
161  for (const auto &id: definedMaskCapIds_) {
162  evtGood[id] = true;
163  }
164  unsigned valid_count = 0;
165  for (const auto& fedId: fedIds_) {
166  const FEDRawData& l1tRcd = feds->FEDData(fedId);
167 
168  unsigned int fedDataSize = l1tRcd.size();
169  std::map<unsigned int, unsigned int> readoutSizeNoZSMap;
170  std::map<unsigned int, unsigned int> readoutSizeZSMap;
171  std::map<unsigned int, unsigned int> readoutSizeZSExpectedMap;
172  readoutSizeNoZSMap[maxMasks_] = 0;
173  readoutSizeZSMap[maxMasks_] = 0;
174  readoutSizeZSExpectedMap[maxMasks_] = 0;
175  for (const auto &id: definedMaskCapIds_) {
176  readoutSizeNoZSMap[id] = 0;
177  readoutSizeZSMap[id] = 0;
178  readoutSizeZSExpectedMap[id] = 0;
179  }
180 
181  edm::LogInfo("L1TDQM") << "Found FEDRawDataCollection with ID " << fedId << " and size " << l1tRcd.size();
182 
184  if (l1tRcd.size() > 0) {
185  edm::LogError("L1TDQM") << "Cannot analyse: invalid L1T raw data (size = " << l1tRcd.size() << ") for ID " << fedId << ".";
186  }
187  continue;
188  } else {
189  valid_count++;
190  }
191 
192  const unsigned char *data = l1tRcd.data();
193  FEDHeader header(data);
194 
195  if (header.check()) {
196  edm::LogInfo("L1TDQM") << "Found SLink header:" << " Trigger type " << header.triggerType() << " L1 event ID " << header.lvl1ID() << " BX Number " << header.bxID() << " FED source " << header.sourceID() << " FED version " << header.version();
197  } else {
198  edm::LogWarning("L1TDQM") << "Did not find a SLink header!";
199  }
200 
201  FEDTrailer trailer(data + (l1tRcd.size() - slinkTrailerSize_));
202 
203  if (trailer.check()) {
204  edm::LogInfo("L1TDQM") << "Found SLink trailer:" << " Length " << trailer.lenght() << " CRC " << trailer.crc() << " Status " << trailer.evtStatus() << " Throttling bits " << trailer.ttsBits();
205  } else {
206  edm::LogWarning("L1TDQM") << "Did not find a SLink trailer!";
207  }
208 
209  amc13::Packet packet;
210  if (!packet.parse(
211  (const uint64_t*) data,
212  (const uint64_t*) (data + slinkHeaderSize_),
213  (l1tRcd.size() - slinkHeaderSize_ - slinkTrailerSize_) / 8,
214  header.lvl1ID(),
215  header.bxID())) {
216  edm::LogError("L1TDQM") << "Could not extract AMC13 Packet.";
217  return;
218  }
219 
220  for (auto& amc: packet.payload()) {
221  if (amc.size() == 0)
222  continue;
223 
224  auto payload64 = amc.data();
225  auto start = (const uint32_t*) payload64.get();
226  // Want to have payload size in 32 bit words, but AMC measures
227  // it in 64 bit words -> factor 2.
228  const uint32_t * end = start + (amc.size() * 2);
229 
230  auto payload = std::make_unique<l1t::MP7Payload>(start, end, false);
231 
232  // getBlock() returns a non-null unique_ptr on success
233  std::unique_ptr<l1t::Block> block;
234  while ((block = payload->getBlock()) != nullptr) {
235  if (verbose_) {
236  std::cout << ">>> check zero suppression for block <<<" << std::endl
237  << "hdr: " << std::hex << std::setw(8) << std::setfill('0') << block->header().raw() << std::dec
238  << " (ID " << block->header().getID() << ", size " << block->header().getSize()
239  << ", CapID 0x" << std::hex << std::setw(2) << std::setfill('0') << block->header().getCapID()
240  << ", flags 0x" << std::hex << std::setw(2) << std::setfill('0') << block->header().getFlags()
241  << ")" << std::dec << std::endl;
242  for (const auto& word: block->payload()) {
243  std::cout << "data: " << std::hex << std::setw(8) << std::setfill('0') << word << std::dec << std::endl;
244  }
245  }
246 
247  unsigned int blockCapId = block->header().getCapID();
248  unsigned int blockSize = block->header().getSize() * 4; // times 4 to get the size in byte
249  unsigned int blockHeaderSize = sizeof(block->header().raw());
250  unsigned int blockHeaderFlags = block->header().getFlags();
251  bool newZsFlagSet = ((blockHeaderFlags & newZsFlagMask_) != 0); // use the per-BX ZS
252  bool blockZsFlagSet = newZsFlagSet ? true : ((blockHeaderFlags & zsFlagMask_) != 0); // ZS validation flag for whole block
253  bool dataInvertFlagSet = newZsFlagSet && ((blockHeaderFlags & dataInvFlagMask_) != 0); // invert the data before applying the mask
254 
255  capIds_->Fill(blockCapId);
256 
257  // fill the denominator histograms
258  bool capIdDefined = false;
263  if (zeroSuppValMap_.find(blockCapId) != zeroSuppValMap_.end()) {
264  capIdDefined = true;
265  zeroSuppValMap_[blockCapId]->Fill(BLOCKS);
266  errorSummaryDenMap_[blockCapId]->Fill(RBLKS);
267  errorSummaryDenMap_[blockCapId]->Fill(RBLKSFALSEPOS);
268  errorSummaryDenMap_[blockCapId]->Fill(RBLKSFALSENEG);
269  }
270 
271  auto totalBlockSize = blockHeaderSize;
272  if (!newZsFlagSet) {
273  totalBlockSize += blockSize;
274  }
275 
276  auto bxBlocks = block->getBxBlocks(6, newZsFlagSet); // 6 32 bit MP7 payload words per BX
277 
278  // check all BX blocks
279  bool allToSuppress = true;
280  for (const auto& bxBlock: bxBlocks) {
281  bool toSuppress = false;
282  bool bxZsFlagSet = ((bxBlock.header().getFlags() & zsFlagMask_) != 0); // ZS validation flag
283 
284  // check if this bxblock should be suppressed
285  unsigned int wordcounter = 0;
286  unsigned int wordsum = 0;
287  for (const auto& word: bxBlock.payload()) {
288  if (dataInvertFlagSet) {
289  wordsum += masks_[blockCapId].at(wordcounter%6) & (~word);
290  } else {
291  wordsum += masks_[blockCapId].at(wordcounter%6) & word;
292  }
293  if (verbose_) {
294  std::cout << "word: " << std::hex << std::setw(8) << std::setfill('0') << word << std::dec
295  << ", maskword" << wordcounter%6 << ": " << std::hex << std::setw(8) << std::setfill('0')
296  << masks_[blockCapId].at(wordcounter%6) << std::dec << ", wordsum: " << wordsum << std::endl;
297  }
298  if (wordsum > 0) {
299  break;
300  }
301  ++wordcounter;
302  }
303  // the sum of payload words must be 0 for correct ZS
304  if (wordsum == 0 && zsEnabled_) {
305  toSuppress = true;
306  if (verbose_) {
307  std::cout << "wordsum == 0: this BX block should be zero suppressed" << std::endl;
308  }
309  }
310  // update the overall block status
311  allToSuppress = allToSuppress && toSuppress;
312 
313  // only fill the BX related things for the per-BX ZS
314  if (newZsFlagSet) {
315  // the ZS flag of the block is the AND of all BX block ZS flags
316  blockZsFlagSet = blockZsFlagSet && bxZsFlagSet;
317 
318  // fill the BX related bins of the denominator histogram
323  if (capIdDefined) {
324  zeroSuppValMap_[blockCapId]->Fill(BXBLOCKS);
325  errorSummaryDenMap_[blockCapId]->Fill(RBXBLKS);
326  errorSummaryDenMap_[blockCapId]->Fill(RBXBLKSFALSEPOS);
327  errorSummaryDenMap_[blockCapId]->Fill(RBXBLKSFALSENEG);
328  }
329 
330  unsigned int totalBxBlockSize = bxBlock.getSize() * 4 + sizeof(bxBlock.header().raw()); // times 4 to get the size in byte
331  // check if zero suppression flag agrees for the BX block
332  if (toSuppress && bxZsFlagSet) {
333  if (verbose_) std::cout << "GOOD BX block with ZS flag true" << std::endl;
335  if (capIdDefined) {
336  zeroSuppValMap_[blockCapId]->Fill(ZSBXBLKSGOOD);
337  }
338  } else if (!toSuppress && !bxZsFlagSet) {
339  if (verbose_) std::cout << "GOOD BX block with ZS flag false" << std::endl;
341  if (capIdDefined) {
342  zeroSuppValMap_[blockCapId]->Fill(ZSBXBLKSGOOD);
343  }
344  } else if (!toSuppress && bxZsFlagSet) {
345  if (verbose_) std::cout << "BAD BX block with ZS flag true" << std::endl;
346  totalBlockSize += totalBxBlockSize;
351  evtGood[maxMasks_] = false;
352  if (capIdDefined) {
353  zeroSuppValMap_[blockCapId]->Fill(ZSBXBLKSBAD);
354  zeroSuppValMap_[blockCapId]->Fill(ZSBXBLKSBADFALSEPOS);
355  errorSummaryNumMap_[blockCapId]->Fill(RBXBLKS);
356  errorSummaryNumMap_[blockCapId]->Fill(RBXBLKSFALSEPOS);
357  evtGood[blockCapId] = false;
358  }
359  } else {
360  if (verbose_) std::cout << "BAD BX block with ZS flag false" << std::endl;
361  totalBlockSize += totalBxBlockSize;
366  evtGood[maxMasks_] = false;
367  if (capIdDefined) {
368  zeroSuppValMap_[blockCapId]->Fill(ZSBXBLKSBAD);
369  zeroSuppValMap_[blockCapId]->Fill(ZSBXBLKSBADFALSENEG);
370  errorSummaryNumMap_[blockCapId]->Fill(RBXBLKS);
371  errorSummaryNumMap_[blockCapId]->Fill(RBXBLKSFALSENEG);
372  evtGood[blockCapId] = false;
373  }
374  }
375  }
376  }
377 
378  readoutSizeNoZSMap[maxMasks_] += totalBlockSize;
379  if (capIdDefined) {
380  readoutSizeNoZSMap[blockCapId] += totalBlockSize;
381  }
382 
383  // check if zero suppression flag agrees for the whole block
384  if (allToSuppress && blockZsFlagSet) {
385  if (verbose_) std::cout << "GOOD block with ZS flag true" << std::endl;
387  if (capIdDefined) {
388  zeroSuppValMap_[blockCapId]->Fill(ZSBLKSGOOD);
389  }
390  } else if (!allToSuppress && !blockZsFlagSet) {
391  if (verbose_) std::cout << "GOOD block with ZS flag false" << std::endl;
393  readoutSizeZSMap[maxMasks_] += totalBlockSize;
394  readoutSizeZSExpectedMap[maxMasks_] += totalBlockSize;
395  if (capIdDefined) {
396  zeroSuppValMap_[blockCapId]->Fill(ZSBLKSGOOD);
397  readoutSizeZSMap[blockCapId] += totalBlockSize;
398  readoutSizeZSExpectedMap[blockCapId] += totalBlockSize;
399  }
400  } else if (!allToSuppress && blockZsFlagSet) {
401  if (verbose_) std::cout << "BAD block with ZS flag true" << std::endl;
406  readoutSizeZSExpectedMap[maxMasks_] += totalBlockSize;
407  evtGood[maxMasks_] = false;
408  if (capIdDefined) {
409  zeroSuppValMap_[blockCapId]->Fill(ZSBLKSBAD);
410  zeroSuppValMap_[blockCapId]->Fill(ZSBLKSBADFALSEPOS);
411  errorSummaryNumMap_[blockCapId]->Fill(RBLKS);
412  errorSummaryNumMap_[blockCapId]->Fill(RBLKSFALSEPOS);
413  readoutSizeZSExpectedMap[blockCapId] += totalBlockSize;
414  evtGood[blockCapId] = false;
415  }
416  } else {
417  if (verbose_) std::cout << "BAD block with ZS flag false" << std::endl;
422  readoutSizeZSMap[maxMasks_] += totalBlockSize;
423  evtGood[maxMasks_] = false;
424  if (capIdDefined) {
425  zeroSuppValMap_[blockCapId]->Fill(ZSBLKSBAD);
426  zeroSuppValMap_[blockCapId]->Fill(ZSBLKSBADFALSENEG);
427  errorSummaryNumMap_[blockCapId]->Fill(RBLKS);
428  errorSummaryNumMap_[blockCapId]->Fill(RBLKSFALSENEG);
429  readoutSizeZSMap[blockCapId] += totalBlockSize;
430  evtGood[blockCapId] = false;
431  }
432  }
433  }
434  }
435  readoutSizeNoZSMap_[maxMasks_]->Fill(fedDataSize);
436  readoutSizeZSMap_[maxMasks_]->Fill(readoutSizeZSMap[maxMasks_] + fedDataSize - readoutSizeNoZSMap[maxMasks_]);
437  readoutSizeZSExpectedMap_[maxMasks_]->Fill(readoutSizeZSExpectedMap[maxMasks_] + fedDataSize - readoutSizeNoZSMap[maxMasks_]);
438  for (const auto &id: definedMaskCapIds_) {
439  readoutSizeNoZSMap_[id]->Fill(readoutSizeNoZSMap[id]);
440  readoutSizeZSMap_[id]->Fill(readoutSizeZSMap[id]);
441  readoutSizeZSExpectedMap_[id]->Fill(readoutSizeZSExpectedMap[id]);
442  }
443  }
444 
445  if (evtGood[maxMasks_]) {
447  } else {
450  }
451  for (const auto &id: definedMaskCapIds_) {
452  if (evtGood[id]) {
453  zeroSuppValMap_[id]->Fill(EVTSGOOD);
454  } else {
455  zeroSuppValMap_[id]->Fill(EVTSBAD);
456  errorSummaryNumMap_[id]->Fill(REVTS);
457  }
458  }
459 }
460 
Definition: start.py:1
std::vector< amc::Packet > payload() const
Definition: AMC13Spec.h:80
std::map< unsigned int, MonitorElement * > readoutSizeZSExpectedMap_
T getUntrackedParameter(std::string const &, T const &) const
bool check()
Definition: FEDTrailer.cc:64
std::map< unsigned int, MonitorElement * > zeroSuppValMap_
int version()
Version identifier of the FED data format.
Definition: FEDHeader.cc:32
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
edm::EDGetTokenT< FEDRawDataCollection > fedDataToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:508
std::map< unsigned int, MonitorElement * > readoutSizeNoZSMap_
int evtStatus()
Event fragment status information.
Definition: FEDTrailer.cc:27
L1TMP7ZeroSupp(const edm::ParameterSet &ps)
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::string monitorDir_
void analyze(const edm::Event &e, const edm::EventSetup &c) override
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
void Fill(long long x)
void bookCapIdHistograms(DQMStore::IBooker &ibooker, const unsigned int &id)
std::map< unsigned int, MonitorElement * > errorSummaryNumMap_
std::vector< unsigned int > definedMaskCapIds_
int sourceID()
Identifier of the FED.
Definition: FEDHeader.cc:28
MonitorElement * capIds_
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
std::map< unsigned int, MonitorElement * > errorSummaryDenMap_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
std::vector< std::vector< int > > masks_
#define end
Definition: vmac.h:37
static const unsigned int maxMasks_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool isValid() const
Definition: HandleBase.h:74
int ttsBits()
Current value of the Trigger Throttling System bitsAQ).
Definition: FEDTrailer.cc:32
bool check()
Check that the header is OK.
Definition: FEDHeader.cc:64
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
unsigned long long uint64_t
Definition: Time.h:15
int lenght()
The length of the event fragment counted in 64-bit words including header and trailer.
Definition: FEDTrailer.cc:17
bool parse(const uint64_t *start, const uint64_t *data, unsigned int size, unsigned int lv1, unsigned int bx, bool legacy_mc=false, bool mtf7_mode=false)
Definition: AMC13Spec.cc:70
int bxID()
The bunch crossing number.
Definition: FEDHeader.cc:24
void add(std::string const &label, ParameterSetDescription const &psetDescription)
~L1TMP7ZeroSupp() override
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
HLT enums.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:28
int crc()
Cyclic Redundancy Code of the event fragment including header and trailer.
Definition: FEDTrailer.cc:22
std::vector< int > fedIds_
ParameterDescriptionBase * addOptionalUntracked(U const &iLabel, T const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void bookHistograms(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &) override
int lvl1ID()
Level-1 event number generated by the TTC system.
Definition: FEDHeader.cc:20
Definition: AMCSpec.h:8
void dqmBeginRun(const edm::Run &r, const edm::EventSetup &c) override
std::map< unsigned int, MonitorElement * > readoutSizeZSMap_
int triggerType()
Event Trigger type identifier.
Definition: FEDHeader.cc:16
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: Run.h:43