CMS 3D CMS Logo

SiStripFEDMonitor.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: DQM/SiStripMonitorHardware
4 // Class: SiStripFEDMonitorPlugin
5 //
10 //
11 // Original Author: Nicholas Cripps
12 // Created: 2008/09/16
13 //
14 //Modified : Anne-Marie Magnan
15 // ---- 2009/04/21 : histogram management put in separate class
16 // struct helper to simplify arguments of functions
17 // ---- 2009/04/22 : add TkHistoMap with % of bad channels per module
18 // ---- 2009/04/27 : create FEDErrors class
19 
20 #include <sstream>
21 #include <memory>
22 #include <list>
23 #include <algorithm>
24 #include <cassert>
25 
37 
44 
47 
49 
50 #include "DQM/SiStripMonitorHardware/interface/FEDHistograms.hh"
51 #include "DQM/SiStripMonitorHardware/interface/FEDErrors.hh"
52 
54 
56 
57 //
58 // Class declaration
59 //
60 
61 //class SiStripFEDMonitorPlugin : public DQMOneLumiEDAnalyzer<> {
62 
63 namespace sifedmon {
64  struct LumiErrors {
65  std::vector<unsigned int> nTotal;
66  std::vector<unsigned int> nErrors;
67  };
68 } // namespace sifedmon
69 class SiStripFEDMonitorPlugin : public DQMOneEDAnalyzer<edm::LuminosityBlockCache<sifedmon::LumiErrors> > {
70 public:
72  ~SiStripFEDMonitorPlugin() override;
73 
74 private:
75  void analyze(const edm::Event&, const edm::EventSetup&) override;
76 
77  std::shared_ptr<sifedmon::LumiErrors> globalBeginLuminosityBlock(const edm::LuminosityBlock& lumi,
78  const edm::EventSetup& iSetup) const override;
79 
80  void globalEndLuminosityBlock(const edm::LuminosityBlock& lumi, const edm::EventSetup& iSetup) override;
81 
82  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
83 
84  //update the cabling if necessary
85  void updateCabling(const edm::EventSetup& eventSetup);
86 
87  static bool pairComparison(const std::pair<unsigned int, unsigned int>& pair1,
88  const std::pair<unsigned int, unsigned int>& pair2);
89 
90  void getMajority(const std::vector<std::pair<unsigned int, unsigned int> >& aFeMajVec,
91  unsigned int& aMajorityCounter,
92  std::vector<unsigned int>& afedIds);
93 
94  //tag of FEDRawData collection
98 
99  //histogram helper class
100  FEDHistograms fedHists_;
101  //folder name for histograms in DQMStore
104  //book detailed histograms even if they will be empty (for merging)
106  //do histos vs time with time=event number. Default time = orbit number (s)
108  //print debug messages when problems are found: 1=error debug, 2=light debug, 3=full debug
109  unsigned int printDebug_;
110  //FED cabling
111  uint32_t cablingCacheId_;
113 
114  //add parameter to save computing time if TkHistoMap/Median/FeMajCheck are not enabled
118 
119  unsigned int nEvt_;
120 
121  //FED errors
122  //need class member for lumi histograms
123  FEDErrors fedErrors_;
124  unsigned int maxFedBufferSize_;
126 
129 };
130 
131 //
132 // Constructors and destructor
133 //
134 
136  : rawDataTag_(iConfig.getUntrackedParameter<edm::InputTag>("RawDataTag", edm::InputTag("source", ""))),
137  topFolderName_(iConfig.getUntrackedParameter<std::string>("TopFolderName", "SiStrip")),
138  fillAllDetailedHistograms_(iConfig.getUntrackedParameter<bool>("FillAllDetailedHistograms", false)),
139  fillWithEvtNum_(iConfig.getUntrackedParameter<bool>("FillWithEventNumber", false)),
140  printDebug_(iConfig.getUntrackedParameter<unsigned int>("PrintDebugMessages", 1)),
141  cablingCacheId_(0),
142  maxFedBufferSize_(0),
143  fullDebugMode_(iConfig.getUntrackedParameter<bool>("FullDebugMode", false)) {
144  std::string subFolderName = iConfig.getUntrackedParameter<std::string>("HistogramFolderName", "ReadoutView");
145  folderName_ = topFolderName_ + "/" + subFolderName;
146 
147  rawDataToken_ = consumes<FEDRawDataCollection>(rawDataTag_);
148  heToken_ = consumes<EventWithHistory>(edm::InputTag("consecutiveHEs"));
149 
150  if (iConfig.exists("ErrorFractionByLumiBlockHistogramConfig")) {
151  const edm::ParameterSet& ps =
152  iConfig.getUntrackedParameter<edm::ParameterSet>("ErrorFractionByLumiBlockHistogramConfig");
153  enableFEDerrLumi_ = (ps.exists("Enabled") ? ps.getUntrackedParameter<bool>("Enabled") : true);
154  }
155  //print config to debug log
156  std::ostringstream debugStream;
157  if (printDebug_ > 1) {
158  debugStream << "[SiStripFEDMonitorPlugin]Configuration for SiStripFEDMonitorPlugin: " << std::endl
159  << "[SiStripFEDMonitorPlugin]\tRawDataTag: " << rawDataTag_ << std::endl
160  << "[SiStripFEDMonitorPlugin]\tHistogramFolderName: " << folderName_ << std::endl
161  << "[SiStripFEDMonitorPlugin]\tFillAllDetailedHistograms? "
162  << (fillAllDetailedHistograms_ ? "yes" : "no") << std::endl
163  << "[SiStripFEDMonitorPlugin]\tFillWithEventNumber?" << (fillWithEvtNum_ ? "yes" : "no") << std::endl
164  << "[SiStripFEDMonitorPlugin]\tPrintDebugMessages? " << (printDebug_ ? "yes" : "no") << std::endl;
165  }
166 
167  //don;t generate debug mesages if debug is disabled
168  std::ostringstream* pDebugStream = (printDebug_ > 1 ? &debugStream : nullptr);
169 
170  fedHists_.initialise(iConfig, pDebugStream);
171 
172  doTkHistoMap_ = fedHists_.tkHistoMapEnabled();
173 
174  doMedHists_ = fedHists_.cmHistosEnabled();
175 
176  doFEMajorityCheck_ = fedHists_.feMajHistosEnabled();
177 
178  if (printDebug_) {
179  LogTrace("SiStripMonitorHardware") << debugStream.str();
180  }
181 
182  nEvt_ = 0;
183 }
184 
186 
187 //
188 // Member functions
189 //
190 
191 // ------------ method called to for each event ------------
193  //Retrieve tracker topology from geometry
194  edm::ESHandle<TrackerTopology> tTopoHandle;
195  iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
196  const TrackerTopology* const tTopo = tTopoHandle.product();
197 
198  //update cabling
199  updateCabling(iSetup);
200 
201  //get raw data
202  edm::Handle<FEDRawDataCollection> rawDataCollectionHandle;
203  iEvent.getByToken(rawDataToken_, rawDataCollectionHandle);
204  const FEDRawDataCollection& rawDataCollection = *rawDataCollectionHandle;
205 
206  fedErrors_.initialiseEvent();
207 
208  //add the deltaBX value if the product exist
209 
211  iEvent.getByToken(heToken_, he);
212 
213  //get the fedErrors object for each LS
214  auto lumiErrors = luminosityBlockCache(iEvent.getLuminosityBlock().index());
215  auto& nToterr = lumiErrors->nTotal;
216  auto& nErr = lumiErrors->nErrors;
217 
218  if (he.isValid() && !he.failedToGet()) {
219  fedErrors_.fillEventProperties(he->deltaBX());
220  }
221 
222  //initialise map of fedId/bad channel number
223  std::map<unsigned int, std::pair<unsigned short, unsigned short> > badChannelFraction;
224 
225  unsigned int lNFEDMonitoring = 0;
226  unsigned int lNFEDUnpacker = 0;
227  unsigned int lNChannelMonitoring = 0;
228  unsigned int lNChannelUnpacker = 0;
229 
230  unsigned int lNTotBadFeds = 0;
231  unsigned int lNTotBadChannels = 0;
232  unsigned int lNTotBadActiveChannels = 0;
233 
234  std::vector<std::vector<std::pair<unsigned int, unsigned int> > > lFeMajFrac;
235  const unsigned int nParts = 4;
236  if (doFEMajorityCheck_) {
237  lFeMajFrac.resize(nParts);
238  //max nFE per partition
239  lFeMajFrac[0].reserve(912);
240  lFeMajFrac[1].reserve(1080);
241  lFeMajFrac[2].reserve(768);
242  lFeMajFrac[3].reserve(760);
243  }
244 
245  maxFedBufferSize_ = 0;
246 
247  //loop over siStrip FED IDs
249  fedId++) { //loop over FED IDs
250  unsigned int lNBadChannels_perFEDID = 0;
251  const FEDRawData& fedData = rawDataCollection.FEDData(fedId);
252 
253  //create an object to fill all errors
254  fedErrors_.initialiseFED(fedId, cabling_, tTopo);
255 
256  double aLumiSection = iEvent.orbitNumber() / 262144.0;
257 
258  //Do detailed check
259  //first check if data exists
260  bool lDataExist = fedErrors_.checkDataPresent(fedData);
261  if (!lDataExist) {
262  fedHists_.fillFEDHistograms(fedErrors_, 0, fullDebugMode_, aLumiSection, lNBadChannels_perFEDID);
263  continue;
264  }
265 
266  //check for problems and fill detailed histograms
267  fedErrors_.fillFEDErrors(fedData,
269  printDebug_,
270  lNChannelMonitoring,
271  lNChannelUnpacker,
272  doMedHists_,
273  fedHists_.cmHistPointer(false),
274  fedHists_.cmHistPointer(true),
276  lFeMajFrac);
277 
278  //check filled in previous method.
279  bool lFailUnpackerFEDcheck = fedErrors_.failUnpackerFEDCheck();
280 
281  fedErrors_.incrementFEDCounters();
282  unsigned int lSize = fedData.size();
283  if (lSize > maxFedBufferSize_) {
284  maxFedBufferSize_ = lSize;
285  }
286  //std::cout << " -- " << fedId << " " << lSize << std::endl;
287 
288  //fedHists_.fillFEDHistograms(fedErrors_,lSize,fullDebugMode_);
289 
290  bool lFailMonitoringFEDcheck = fedErrors_.failMonitoringFEDCheck();
291  if (lFailMonitoringFEDcheck)
292  lNTotBadFeds++;
293 
294  //sanity check: if something changed in the unpacking code
295  //but wasn't propagated here
296  //print only the summary, and more info if printDebug>1
297  if (lFailMonitoringFEDcheck != lFailUnpackerFEDcheck) {
298  if (printDebug_ > 1) {
299  std::ostringstream debugStream;
300  debugStream << " --- WARNING: FED " << fedId << std::endl << " ------ Monitoring FED check ";
301  if (lFailMonitoringFEDcheck)
302  debugStream << "failed." << std::endl;
303  else
304  debugStream << "passed." << std::endl;
305  debugStream << " ------ Unpacker FED check ";
306  if (lFailUnpackerFEDcheck)
307  debugStream << "failed." << std::endl;
308  else
309  debugStream << "passed." << std::endl;
310  edm::LogError("SiStripMonitorHardware") << debugStream.str();
311  }
312 
313  if (lFailMonitoringFEDcheck)
314  lNFEDMonitoring++;
315  else if (lFailUnpackerFEDcheck)
316  lNFEDUnpacker++;
317  }
318 
319  //Fill TkHistoMap:
320  //add an entry for all channels (good = 0),
321  //so that tkHistoMap knows which channels should be there.
322  if (doTkHistoMap_ && !fedHists_.tkHistoMapPointer()) {
323  edm::LogWarning("SiStripMonitorHardware")
324  << " -- Fedid " << fedId << ", TkHistoMap enabled but pointer is null." << std::endl;
325  }
326 
327  fedErrors_.fillBadChannelList(doTkHistoMap_,
328  fedHists_.tkHistoMapPointer(),
329  fedHists_.getFedvsAPVpointer(),
330  lNTotBadChannels,
331  lNTotBadActiveChannels,
332  lNBadChannels_perFEDID,
333  nToterr,
334  nErr);
335  fedHists_.fillFEDHistograms(fedErrors_, lSize, fullDebugMode_, aLumiSection, lNBadChannels_perFEDID);
336  } //loop over FED IDs
337 
338  if (doFEMajorityCheck_) {
339  for (unsigned int iP(0); iP < nParts; ++iP) {
340  //std::cout << " -- Partition " << iP << std::endl;
341  //std::cout << " --- Number of elements in vec = " << lFeMajFrac[iP].size() << std::endl;
342  if (lFeMajFrac[iP].empty())
343  continue;
344  std::sort(lFeMajFrac[iP].begin(), lFeMajFrac[iP].end(), SiStripFEDMonitorPlugin::pairComparison);
345 
346  unsigned int lMajorityCounter = 0;
347  std::vector<unsigned int> lfedIds;
348 
349  getMajority(lFeMajFrac[iP], lMajorityCounter, lfedIds);
350  //std::cout << " -- Found " << lfedIds.size() << " unique elements not matching the majority." << std::endl;
351  fedHists_.fillMajorityHistograms(iP, static_cast<float>(lMajorityCounter) / lFeMajFrac[iP].size(), lfedIds);
352  }
353  }
354 
355  if ((lNTotBadFeds > 0 || lNTotBadChannels > 0) && printDebug_ > 1) {
356  std::ostringstream debugStream;
357  debugStream << "[SiStripFEDMonitorPlugin] --- Total number of bad feds = " << lNTotBadFeds << std::endl
358  << "[SiStripFEDMonitorPlugin] --- Total number of bad channels = " << lNTotBadChannels << std::endl
359  << "[SiStripFEDMonitorPlugin] --- Total number of bad active channels = " << lNTotBadActiveChannels
360  << std::endl;
361  edm::LogInfo("SiStripMonitorHardware") << debugStream.str();
362  }
363 
364  if ((lNFEDMonitoring > 0 || lNFEDUnpacker > 0 || lNChannelMonitoring > 0 || lNChannelUnpacker > 0) && printDebug_) {
365  std::ostringstream debugStream;
366  debugStream
367  << "[SiStripFEDMonitorPlugin]-------------------------------------------------------------------------"
368  << std::endl
369  << "[SiStripFEDMonitorPlugin]-------------------------------------------------------------------------"
370  << std::endl
371  << "[SiStripFEDMonitorPlugin]-- Summary of differences between unpacker and monitoring at FED level : "
372  << std::endl
373  << "[SiStripFEDMonitorPlugin] ---- Number of times monitoring fails but not unpacking = " << lNFEDMonitoring
374  << std::endl
375  << "[SiStripFEDMonitorPlugin] ---- Number of times unpacking fails but not monitoring = " << lNFEDUnpacker
376  << std::endl
377  << "[SiStripFEDMonitorPlugin]-------------------------------------------------------------------------"
378  << std::endl
379  << "[SiStripFEDMonitorPlugin]-- Summary of differences between unpacker and monitoring at Channel level : "
380  << std::endl
381  << "[SiStripFEDMonitorPlugin] ---- Number of times monitoring fails but not unpacking = " << lNChannelMonitoring
382  << std::endl
383  << "[SiStripFEDMonitorPlugin] ---- Number of times unpacking fails but not monitoring = " << lNChannelUnpacker
384  << std::endl
385  << "[SiStripFEDMonitorPlugin]-------------------------------------------------------------------------"
386  << std::endl
387  << "[SiStripFEDMonitorPlugin]-------------------------------------------------------------------------"
388  << std::endl;
389  edm::LogError("SiStripMonitorHardware") << debugStream.str();
390  }
391 
392  fedErrors_.getFEDErrorsCounters().nTotalBadChannels = lNTotBadChannels;
393  fedErrors_.getFEDErrorsCounters().nTotalBadActiveChannels = lNTotBadActiveChannels;
394 
395  //time in seconds since beginning of the run or event number
396  if (fillWithEvtNum_) {
397  // explicitely casting the event number unsigned long long to double here
398  double eventNumber = static_cast<double>(iEvent.id().event());
399  fedHists_.fillCountersHistograms(
400  fedErrors_.getFEDErrorsCounters(), fedErrors_.getChannelErrorsCounters(), maxFedBufferSize_, eventNumber);
401  } else {
402  double aTime = iEvent.orbitNumber() / 11223.;
403  fedHists_.fillCountersHistograms(
404  fedErrors_.getFEDErrorsCounters(), fedErrors_.getChannelErrorsCounters(), maxFedBufferSize_, aTime);
405  }
406 
407  nEvt_++;
408 
409 } //analyze method
410 
411 bool SiStripFEDMonitorPlugin::pairComparison(const std::pair<unsigned int, unsigned int>& pair1,
412  const std::pair<unsigned int, unsigned int>& pair2) {
413  return (pair1.second < pair2.second);
414 }
415 
416 void SiStripFEDMonitorPlugin::getMajority(const std::vector<std::pair<unsigned int, unsigned int> >& aFeMajVec,
417  unsigned int& aMajorityCounter,
418  std::vector<unsigned int>& afedIds) {
419  unsigned int lMajAddress = 0;
420  std::vector<std::pair<unsigned int, unsigned int> >::const_iterator lIter = aFeMajVec.begin();
421  unsigned int lMajAddr = (*lIter).second;
422  unsigned int lCounter = 0;
423 
424  //std::cout << " --- First element: addr = " << lMajAddr << " counter = " << lCounter << std::endl;
425  unsigned int iele = 0;
426  //bool foundMaj = false;
427  for (; lIter != aFeMajVec.end(); ++lIter, ++iele) {
428  //std::cout << " ---- Ele " << iele << " " << (*lIter).first << " " << (*lIter).second << " ref " << lMajAddr << std::endl;
429  if ((*lIter).second == lMajAddr) {
430  ++lCounter;
431  //std::cout << " ----- =ref: Counter = " << lCounter << std::endl;
432  } else {
433  //std::cout << " ----- !=ref: Counter = " << lCounter << " Majority = " << aMajorityCounter << std::endl;
434  if (lCounter > aMajorityCounter) {
435  //std::cout << " ------ >Majority: " << std::endl;
436  aMajorityCounter = lCounter;
437  // AV bug here??
438  lMajAddress = lMajAddr;
439  // lMajAddress = (*lIter).second;
440  //foundMaj=true;
441  }
442  lCounter = 0;
443  lMajAddr = (*lIter).second;
444  --lIter;
445  --iele;
446  }
447  }
448  // AV Bug here? The check has to be done regardless foundMaj == false or true
449  // if (!foundMaj) {
450  if (lCounter > aMajorityCounter) {
451  //std::cout << " ------ >Majority: " << std::endl;
452  aMajorityCounter = lCounter;
453  lMajAddress = lMajAddr;
454  }
455  // }
456  //std::cout << " -- found majority value for " << aMajorityCounter << " elements out of " << aFeMajVec.size() << "." << std::endl;
457  //get list of feds with address different from majority in partition:
458  lIter = aFeMajVec.begin();
459  afedIds.reserve(135);
460  for (; lIter != aFeMajVec.end(); ++lIter) {
461  if ((*lIter).second != lMajAddress) {
462  afedIds.push_back((*lIter).first);
463  } else {
464  lIter += aMajorityCounter - 1;
465  if (lIter >= aFeMajVec.end()) {
466  std::cout << "Here it is a bug: " << aMajorityCounter << " " << aFeMajVec.size() << " "
467  << lIter - aFeMajVec.end() << std::endl;
468  }
469  }
470  }
471  //std::cout << " -- Found " << lfedIds.size() << " elements not matching the majority." << std::endl;
472  if (!afedIds.empty()) {
473  std::sort(afedIds.begin(), afedIds.end());
474  std::vector<unsigned int>::iterator lIt = std::unique(afedIds.begin(), afedIds.end());
475  afedIds.erase(lIt, afedIds.end());
476  }
477 }
478 
480  const edm::Run& run,
481  const edm::EventSetup& eSetup) {
482  ibooker.setCurrentFolder(folderName_);
483 
484  edm::ESHandle<TkDetMap> tkDetMapHandle;
485  eSetup.get<TrackerTopologyRcd>().get(tkDetMapHandle);
486  const TkDetMap* tkDetMap = tkDetMapHandle.product();
487 
488  fedHists_.bookTopLevelHistograms(ibooker, tkDetMap);
489 
491  fedHists_.bookAllFEDHistograms(ibooker, fullDebugMode_);
492 
493  if (enableFEDerrLumi_) {
494  ibooker.cd();
495  ibooker.setCurrentFolder("SiStrip/ReadoutView/PerLumiSection");
496  {
497  auto scope = DQMStore::IBooker::UseRunScope(ibooker);
498  lumiErrfac_ =
499  ibooker.book1D("lumiErrorFraction", "Fraction of error per lumi section vs subdetector", 6, 0.5, 6.5);
500  lumiErrfac_->setAxisTitle("SubDetId", 1);
501  lumiErrfac_->setBinLabel(1, "TECB");
502  lumiErrfac_->setBinLabel(2, "TECF");
503  lumiErrfac_->setBinLabel(3, "TIB");
504  lumiErrfac_->setBinLabel(4, "TIDB");
505  lumiErrfac_->setBinLabel(5, "TIDF");
506  lumiErrfac_->setBinLabel(6, "TOB");
507  }
508  } else {
509  lumiErrfac_ = nullptr;
510  }
511 }
512 
513 std::shared_ptr<sifedmon::LumiErrors> SiStripFEDMonitorPlugin::globalBeginLuminosityBlock(
514  const edm::LuminosityBlock& lumi, const edm::EventSetup& iSetup) const {
515  auto lumiErrors = std::make_shared<sifedmon::LumiErrors>();
516  lumiErrors->nTotal.resize(6, 0);
517  lumiErrors->nErrors.resize(6, 0);
518  return lumiErrors;
519 }
520 
522  const edm::EventSetup& iSetup) {
523  auto lumiErrors = luminosityBlockCache(lumi.index());
525  for (unsigned int iD(0); iD < lumiErrors->nTotal.size(); iD++) {
526  if (lumiErrors->nTotal[iD] > 0)
527  lumiErrfac_->Fill(iD + 1, static_cast<float>(lumiErrors->nErrors[iD]) / lumiErrors->nTotal[iD]);
528  }
529  }
530 }
531 
533  uint32_t currentCacheId = eventSetup.get<SiStripFedCablingRcd>().cacheIdentifier();
534  if (cablingCacheId_ != currentCacheId) {
535  edm::ESHandle<SiStripFedCabling> cablingHandle;
536  eventSetup.get<SiStripFedCablingRcd>().get(cablingHandle);
537  cabling_ = cablingHandle.product();
538  cablingCacheId_ = currentCacheId;
539  }
540 }
541 
542 //
543 // Define as a plug-in
544 //
545 
SiStripFEDMonitorPlugin::updateCabling
void updateCabling(const edm::EventSetup &eventSetup)
Definition: SiStripFEDMonitor.cc:532
FEDNumbering.h
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
SiStripFEDMonitorPlugin::rawDataToken_
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
Definition: SiStripFEDMonitor.cc:96
SiStripFEDMonitorPlugin::fillAllDetailedHistograms_
bool fillAllDetailedHistograms_
Definition: SiStripFEDMonitor.cc:105
electrons_cff.bool
bool
Definition: electrons_cff.py:393
MessageLogger.h
funct::false
false
Definition: Factorize.h:29
SiStripFEDMonitorPlugin::cablingCacheId_
uint32_t cablingCacheId_
Definition: SiStripFEDMonitor.cc:111
ESHandle.h
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
edm::EDGetTokenT< FEDRawDataCollection >
LuminosityBlock.h
FEDRawDataCollection
Definition: FEDRawDataCollection.h:18
edm
HLT enums.
Definition: AlignableModifier.h:19
TrackerTopology
Definition: TrackerTopology.h:16
gather_cfg.cout
cout
Definition: gather_cfg.py:144
SiStripFEDMonitorPlugin::cabling_
const SiStripFedCabling * cabling_
Definition: SiStripFEDMonitor.cc:112
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:85964
SiStripFedCabling.h
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
DQMOneEDAnalyzer
Definition: DQMOneEDAnalyzer.h:20
DQMStore.h
SiStripFEDMonitorPlugin::getMajority
void getMajority(const std::vector< std::pair< unsigned int, unsigned int > > &aFeMajVec, unsigned int &aMajorityCounter, std::vector< unsigned int > &afedIds)
Definition: SiStripFEDMonitor.cc:416
SiStripFEDMonitorPlugin::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: SiStripFEDMonitor.cc:192
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
SiStripFEDMonitorPlugin::topFolderName_
std::string topFolderName_
Definition: SiStripFEDMonitor.cc:102
EventWithHistory.h
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
sifedmon
Definition: SiStripFEDMonitor.cc:63
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
SiStripFEDMonitorPlugin::maxFedBufferSize_
unsigned int maxFedBufferSize_
Definition: SiStripFEDMonitor.cc:124
SiStripFEDMonitorPlugin::printDebug_
unsigned int printDebug_
Definition: SiStripFEDMonitor.cc:109
SiStripFedCabling
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses,...
Definition: SiStripFedCabling.h:25
SiStripFEDMonitorPlugin::doFEMajorityCheck_
bool doFEMajorityCheck_
Definition: SiStripFEDMonitor.cc:117
SiStripFEDMonitorPlugin::globalBeginLuminosityBlock
std::shared_ptr< sifedmon::LumiErrors > globalBeginLuminosityBlock(const edm::LuminosityBlock &lumi, const edm::EventSetup &iSetup) const override
Definition: SiStripFEDMonitor.cc:513
FEDRawData.h
edm::Handle
Definition: AssociativeIterator.h:50
SiStripFEDMonitorPlugin::globalEndLuminosityBlock
void globalEndLuminosityBlock(const edm::LuminosityBlock &lumi, const edm::EventSetup &iSetup) override
Definition: SiStripFEDMonitor.cc:521
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
DQMOneEDAnalyzer.h
FEDRawData
Definition: FEDRawData.h:19
SiStripFEDMonitorPlugin::fedErrors_
FEDErrors fedErrors_
Definition: SiStripFEDMonitor.cc:123
SiStripFEDMonitorPlugin::fillWithEvtNum_
bool fillWithEvtNum_
Definition: SiStripFEDMonitor.cc:107
SiStripFEDMonitorPlugin
Definition: SiStripFEDMonitor.cc:69
SiStripFEDMonitorPlugin::doTkHistoMap_
bool doTkHistoMap_
Definition: SiStripFEDMonitor.cc:115
MakerMacros.h
TrackerTopology.h
SiStripFedCablingRcd
Definition: SiStripCondDataRecords.h:22
TrackerTopologyRcd.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Service.h
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
mps_fire.end
end
Definition: mps_fire.py:242
edm::ESHandle< TrackerTopology >
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
TkDetMap
Definition: TkDetMap.h:175
SiStripFEDMonitorPlugin::SiStripFEDMonitorPlugin
SiStripFEDMonitorPlugin(const edm::ParameterSet &)
Definition: SiStripFEDMonitor.cc:135
SiStripFEDMonitorPlugin::doMedHists_
bool doMedHists_
Definition: SiStripFEDMonitor.cc:116
EDGetToken.h
FEDRawDataCollection::FEDData
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
Definition: FEDRawDataCollection.cc:19
SiStripFEDMonitorPlugin::lumiErrfac_
MonitorElement * lumiErrfac_
Definition: SiStripFEDMonitor.cc:128
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
sifedmon::LumiErrors
Definition: SiStripFEDMonitor.cc:64
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:681
FEDNumbering::MAXSiStripFEDID
Definition: FEDNumbering.h:30
SiStripFEDMonitorPlugin::fedHists_
FEDHistograms fedHists_
Definition: SiStripFEDMonitor.cc:100
SiStripFedKey.h
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
FEDRawDataCollection.h
dqm::impl::MonitorElement::setBinLabel
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)
Definition: MonitorElement.cc:771
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
edm::EventSetup
Definition: EventSetup.h:57
l1tstage2_dqm_sourceclient-live_cfg.fedId
fedId
Definition: l1tstage2_dqm_sourceclient-live_cfg.py:88
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
get
#define get
FEDRawData::size
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:45
InputTag.h
std
Definition: JetResolutionObject.h:76
writedatasetfile.run
run
Definition: writedatasetfile.py:27
tier0.unique
def unique(seq, keepstr=True)
Definition: tier0.py:24
hcalSimParameters_cfi.he
he
Definition: hcalSimParameters_cfi.py:79
Frameworkfwd.h
SiStripFEDMonitorPlugin::fullDebugMode_
bool fullDebugMode_
Definition: SiStripFEDMonitor.cc:125
SiStripFEDMonitorPlugin::pairComparison
static bool pairComparison(const std::pair< unsigned int, unsigned int > &pair1, const std::pair< unsigned int, unsigned int > &pair2)
Definition: SiStripFEDMonitor.cc:411
sifedmon::LumiErrors::nErrors
std::vector< unsigned int > nErrors
Definition: SiStripFEDMonitor.cc:66
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
dqm::implementation::IBooker::UseRunScope
UseScope< MonitorElementData::Scope::RUN > UseRunScope
Definition: DQMStore.h:464
SiStripFEDMonitorPlugin::rawDataTag_
edm::InputTag rawDataTag_
Definition: SiStripFEDMonitor.cc:95
EventSetup.h
sifedmon::LumiErrors::nTotal
std::vector< unsigned int > nTotal
Definition: SiStripFEDMonitor.cc:65
Exception.h
SiStripFedCablingRcd.h
dqm::implementation::IBooker
Definition: DQMStore.h:43
SiStripFEDMonitorPlugin::heToken_
edm::EDGetTokenT< EventWithHistory > heToken_
Definition: SiStripFEDMonitor.cc:97
SiStripFEDMonitorPlugin::nEvt_
unsigned int nEvt_
Definition: SiStripFEDMonitor.cc:119
SiStripFEDMonitorPlugin::~SiStripFEDMonitorPlugin
~SiStripFEDMonitorPlugin() override
Definition: SiStripFEDMonitor.cc:185
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
ParameterSet.h
SiStripFEDMonitorPlugin::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: SiStripFEDMonitor.cc:479
edm::Event
Definition: Event.h:73
SiStripFEDMonitorPlugin::enableFEDerrLumi_
bool enableFEDerrLumi_
Definition: SiStripFEDMonitor.cc:127
lumi
Definition: LumiSectionData.h:20
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
edm::InputTag
Definition: InputTag.h:15
SiStripFEDMonitorPlugin::folderName_
std::string folderName_
Definition: SiStripFEDMonitor.cc:103
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
FEDNumbering::MINSiStripFEDID
Definition: FEDNumbering.h:29