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++) {
202 if (geoUnit ==
nullptr)
203 LogError(
"PixelDQM") <<
"Pixel GeomDet is not a GeomDetUnit!" << std::endl;
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++) {
220 if (geoUnit ==
nullptr)
221 LogError(
"PixelDQM") <<
"Pixel GeomDet is not a GeomDetUnit!" << std::endl;
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);
Log< level::Info, true > LogVerbatim
T getParameter(std::string const &) const
virtual void bookMEs(DQMStore::IBooker &)
MonitorElement * meEvtNbr_[40]
MonitorElement * fedcounter
edm::EDGetTokenT< edm::DetSetVector< SiPixelRawDataError > > src_
virtual void setCurrentFolder(std::string const &fullpath)
const DetContainer & detsPXB() const
int bladeName() const
blade id
MonitorElement * byLumiErrors
MonitorElement * meFedETypeNErr_[40]
MonitorElement * meErrorType_[40]
const DetContainer & detsPXF() const
size_t size() const
Lenght of the data buffer in bytes.
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeomTokenBeginRun_
Log< level::Error, false > LogError
MonitorElement * meFedChNErr_[40]
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
static std::string const input
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * meEvtSize_[40]
bool setFedFolder(const uint32_t FedId)
Set folder name for a FED (used in the case of errors without detId)
T const * product() const
std::map< uint32_t, SiPixelRawDataErrorModule * > theFEDStructure
int diskName() const
disk id
bool setModuleFolder(const uint32_t &rawdetid=0, int type=0, bool isUpgrade=false)
Set folder name for a module or plaquette.
HalfCylinder halfCylinder() const
MonitorElement * meTBMType_[40]
void dqmBeginRun(const edm::Run &, edm::EventSetup const &) override
#define DEFINE_FWK_MODULE(type)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
UseScope< MonitorElementData::Scope::LUMI > UseLumiScope
SiPixelRawDataErrorSource(const edm::ParameterSet &conf)
MonitorElement * meNErrors_[40]
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
MonitorElement * meFullType_[40]
Log< level::Info, false > LogInfo
~SiPixelRawDataErrorSource() override
MonitorElement * meTBMMessage_[40]
std::map< uint32_t, SiPixelRawDataErrorModule * > thePixelStructure
std::string topFolderName_
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
edm::EDGetTokenT< FEDRawDataCollection > inputSourceToken_
MonitorElement * meFedChLErr_[40]
virtual void buildStructure(edm::EventSetup const &)
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
void analyze(const edm::Event &, const edm::EventSetup &) override
std::map< std::string, MonitorElement ** > meMapFEDs_
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
modOn
online/offline RawDataErrors
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopoTokenBeginRun_
int pannelName() const
pannel id
Pixel error – collection of errors and error information.
MonitorElement * errorRate
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
int plaquetteName() const
plaquetteId (in pannel)