56 saveFile(conf_.getUntrackedParameter<bool>(
"saveFile",
false)),
57 isPIB(conf_.getUntrackedParameter<bool>(
"isPIB",
false)),
58 slowDown(conf_.getUntrackedParameter<bool>(
"slowDown",
false)),
59 reducedSet(conf_.getUntrackedParameter<bool>(
"reducedSet",
false)),
60 modOn(conf_.getUntrackedParameter<bool>(
"modOn",
true)),
61 ladOn(conf_.getUntrackedParameter<bool>(
"ladOn",
false)),
62 bladeOn(conf_.getUntrackedParameter<bool>(
"bladeOn",
false)),
63 isUpgrade(conf_.getUntrackedParameter<bool>(
"isUpgrade",
false)) {
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++) {
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;
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++) {
220 if (geoUnit ==
nullptr)
221 LogError(
"PixelDQM") <<
"Pixel GeomDet is not a GeomDetUnit!" << std::endl;
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++) {
341 sprintf(temp, (
topFolderName_ +
"/AdditionalPixelErrors/FED_%d").c_str(),
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);
int plaquetteName() const
plaquetteId (in pannel)
Log< level::Info, true > LogVerbatim
T getUntrackedParameter(std::string const &, T const &) const
virtual void bookMEs(DQMStore::IBooker &)
MonitorElement * meEvtNbr_[40]
MonitorElement * fedcounter
uint16_t *__restrict__ id
edm::EDGetTokenT< edm::DetSetVector< SiPixelRawDataError > > src_
virtual void setCurrentFolder(std::string const &fullpath)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
MonitorElement * byLumiErrors
MonitorElement * meFedETypeNErr_[40]
MonitorElement * meErrorType_[40]
constexpr uint32_t rawId() const
get the raw id
edm::LuminosityBlockNumber_t luminosityBlock() const
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeomTokenBeginRun_
Log< level::Error, false > LogError
MonitorElement * meFedChNErr_[40]
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
size_t size() const
Lenght of the data buffer in bytes.
static std::string const input
MonitorElement * meEvtSize_[40]
int bladeName() const
blade id
bool setFedFolder(const uint32_t FedId)
Set folder name for a FED (used in the case of errors without detId)
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
std::map< uint32_t, SiPixelRawDataErrorModule * > theFEDStructure
bool setModuleFolder(const uint32_t &rawdetid=0, int type=0, bool isUpgrade=false)
Set folder name for a module or plaquette.
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
MonitorElement * meTBMType_[40]
void dqmBeginRun(const edm::Run &, edm::EventSetup const &) override
UseScope< MonitorElementData::Scope::LUMI > UseLumiScope
SiPixelRawDataErrorSource(const edm::ParameterSet &conf)
MonitorElement * meNErrors_[40]
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_
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
T const * product() const
T getParameter(std::string const &) const
MonitorElement * meFedChLErr_[40]
virtual void buildStructure(edm::EventSetup const &)
int pannelName() const
pannel id
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
void analyze(const edm::Event &, const edm::EventSetup &) override
std::map< std::string, MonitorElement ** > meMapFEDs_
int diskName() const
disk id
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
HalfCylinder halfCylinder() const
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopoTokenBeginRun_
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)