65 LogInfo(
"PixelDQM") <<
"SiPixelRawDataErrorSource::SiPixelRawDataErrorSource:"
66 " Got DQM BackEnd interface"
77 LogInfo(
"PixelDQM") <<
"SiPixelRawDataErrorSource::~SiPixelRawDataErrorSource: Destructor" << endl;
81 LogInfo(
"PixelDQM") <<
" SiPixelRawDataErrorSource::beginRun - Initialisation ... " << std::endl;
111 if (!rawDataHandle.
isValid()) {
112 edm::LogInfo(
"SiPixelRawDataErrorSource") <<
"inputsource is empty";
115 for (
int i = 0;
i != 40;
i++) {
124 if (!
input.isValid())
127 int lumiSection = (
int)
iEvent.luminosityBlock();
129 int nEventBPIXModuleErrors = 0;
130 int nEventFPIXModuleErrors = 0;
131 int nEventBPIXFEDErrors = 0;
132 int nEventFPIXFEDErrors = 0;
135 std::map<uint32_t, SiPixelRawDataErrorModule *>::iterator struct_iter;
136 std::map<uint32_t, SiPixelRawDataErrorModule *>::iterator struct_iter2;
140 nEventBPIXModuleErrors = nEventBPIXModuleErrors + numberOfModuleErrors;
142 nEventFPIXModuleErrors = nEventFPIXModuleErrors + numberOfModuleErrors;
145 nErrors = nErrors + numberOfModuleErrors;
149 int numberOfFEDErrors = (*struct_iter2).second->fillFED(*
input, &
meMapFEDs_);
150 if ((*struct_iter2).first <= 31)
151 nEventBPIXFEDErrors = nEventBPIXFEDErrors + numberOfFEDErrors;
153 if ((*struct_iter2).first >= 32 && (*struct_iter2).first <= 39)
154 nEventFPIXFEDErrors = nEventFPIXFEDErrors + numberOfFEDErrors;
157 nErrors = nErrors + numberOfFEDErrors;
164 if (nEventBPIXModuleErrors + nEventBPIXFEDErrors > 0)
166 if (nEventFPIXModuleErrors + nEventFPIXFEDErrors > 0)
186 LogInfo(
"PixelDQM") <<
" SiPixelRawDataErrorSource::buildStructure";
193 LogVerbatim(
"PixelDQM") <<
" *** Geometry node for TrackerGeom is " << &(*pDD) << std::endl;
194 LogVerbatim(
"PixelDQM") <<
" *** I have " << pDD->
detsPXB().size() <<
" barrel pixel detectors" << std::endl;
195 LogVerbatim(
"PixelDQM") <<
" *** I have " << pDD->
detsPXF().size() <<
" endcap pixel detectors" << std::endl;
199 for (TrackerGeometry::DetContainer::const_iterator it = pDD->
detsPXB().begin(); it != pDD->
detsPXB().end(); it++) {
200 const GeomDetUnit *geoUnit = dynamic_cast<const GeomDetUnit *>(*it);
202 if (geoUnit ==
nullptr)
203 LogError(
"PixelDQM") <<
"Pixel GeomDet is not a GeomDetUnit!" << std::endl;
204 const PixelGeomDetUnit *pixDet = dynamic_cast<const PixelGeomDetUnit *>(geoUnit);
210 DetId detId = (*it)->geographicalId();
211 LogDebug(
"PixelDQM") <<
" ---> Adding Barrel Module " << detId.
rawId() << endl;
212 uint32_t
id = detId();
214 thePixelStructure.insert(pair<uint32_t, SiPixelRawDataErrorModule *>(
id, theModule));
217 for (TrackerGeometry::DetContainer::const_iterator it = pDD->
detsPXF().begin(); it != pDD->
detsPXF().end(); it++) {
218 const GeomDetUnit *geoUnit = dynamic_cast<const GeomDetUnit *>(*it);
220 if (geoUnit ==
nullptr)
221 LogError(
"PixelDQM") <<
"Pixel GeomDet is not a GeomDetUnit!" << std::endl;
222 const PixelGeomDetUnit *pixDet = dynamic_cast<const PixelGeomDetUnit *>(geoUnit);
226 DetId detId = (*it)->geographicalId();
227 LogDebug(
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
228 uint32_t
id = detId();
238 sprintf(sside,
"HalfCylinder_%i", side);
240 sprintf(sdisk,
"Disk_%i", disk);
242 sprintf(sblade,
"Blade_%02i", blade);
244 sprintf(spanel,
"Panel_%i", panel);
246 sprintf(smodule,
"Module_%i",
module);
249 bool mask = side_str.find(
"HalfCylinder_1") != string::npos || side_str.find(
"HalfCylinder_2") != string::npos ||
250 side_str.find(
"HalfCylinder_4") != string::npos || disk_str.find(
"Disk_2") != string::npos;
256 thePixelStructure.insert(pair<uint32_t, SiPixelRawDataErrorModule *>(
id, theModule));
259 LogDebug(
"PixelDQM") <<
" ---> Adding Module for Additional Errors " << endl;
267 uint32_t
id = static_cast<uint32_t>(
fedId);
269 theFEDStructure.insert(pair<uint32_t, SiPixelRawDataErrorModule *>(
id, theModule));
280 sprintf(title0,
"FED isPresent;FED ID;isPresent");
284 sprintf(
title,
"By-LumiSection Error counters");
290 sprintf(title1,
"Errors per LumiSection;LumiSection;NErrors");
293 std::map<uint32_t, SiPixelRawDataErrorModule *>::iterator struct_iter;
294 std::map<uint32_t, SiPixelRawDataErrorModule *>::iterator struct_iter2;
306 throw cms::Exception(
"LogicError") <<
"[SiPixelRawDataErrorSource::bookMEs] Creation of DQM folder "
313 LogDebug(
"PixelDQM") <<
"PROBLEM WITH LADDER-FOLDER\n";
319 LogDebug(
"PixelDQM") <<
"PROBLEM WITH BLADE-FOLDER\n";
327 if (!theSiPixelFolder.
setFedFolder(iBooker, (*struct_iter2).first)) {
328 throw cms::Exception(
"LogicError") <<
"[SiPixelRawDataErrorSource::bookMEs] Creation of DQM folder "
339 for (uint32_t
id = 0;
id < 40;
id++) {
344 hid = theHistogramId->setHistoId(
"errorType",
id);
348 hid = theHistogramId->setHistoId(
"NErrors",
id);
354 hid = theHistogramId->setHistoId(
"fullType",
id);
361 hid = theHistogramId->setHistoId(
"TBMMessage",
id);
367 hid = theHistogramId->setHistoId(
"TBMType",
id);
371 hid = theHistogramId->setHistoId(
"EvtNbr",
id);
374 hid = theHistogramId->setHistoId(
"evtSize",
id);
377 hid = theHistogramId->setHistoId(
"FedChNErr",
id);
381 hid = theHistogramId->setHistoId(
"FedChLErr",
id);
385 hid = theHistogramId->setHistoId(
"FedETypeNErr",
id);