58 saveFile(conf_.getUntrackedParameter<
bool>(
"saveFile",
false)),
59 isPIB(conf_.getUntrackedParameter<
bool>(
"isPIB",
false)),
60 slowDown(conf_.getUntrackedParameter<
bool>(
"slowDown",
false)),
61 reducedSet(conf_.getUntrackedParameter<
bool>(
"reducedSet",
false)),
62 modOn(conf_.getUntrackedParameter<
bool>(
"modOn",
true)),
63 ladOn(conf_.getUntrackedParameter<
bool>(
"ladOn",
false)),
64 bladeOn(conf_.getUntrackedParameter<
bool>(
"bladeOn",
false)),
65 isUpgrade(conf_.getUntrackedParameter<
bool>(
"isUpgrade",
false)) {
67 LogInfo(
"PixelDQM") <<
"SiPixelRawDataErrorSource::SiPixelRawDataErrorSource:" 68 " 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";
196 LogVerbatim(
"PixelDQM") <<
" *** Geometry node for TrackerGeom is " << &(*pDD) << std::endl;
197 LogVerbatim(
"PixelDQM") <<
" *** I have " << pDD->
detsPXB().size() <<
" barrel pixel detectors" << std::endl;
198 LogVerbatim(
"PixelDQM") <<
" *** I have " << pDD->
detsPXF().size() <<
" endcap pixel detectors" << std::endl;
202 for (TrackerGeometry::DetContainer::const_iterator it = pDD->
detsPXB().begin(); it != pDD->
detsPXB().end(); it++) {
205 if (geoUnit ==
nullptr)
206 LogError(
"PixelDQM") <<
"Pixel GeomDet is not a GeomDetUnit!" << std::endl;
213 DetId detId = (*it)->geographicalId();
214 LogDebug(
"PixelDQM") <<
" ---> Adding Barrel Module " << detId.
rawId() << endl;
215 uint32_t
id = detId();
217 thePixelStructure.insert(pair<uint32_t, SiPixelRawDataErrorModule *>(
id, theModule));
220 for (TrackerGeometry::DetContainer::const_iterator it = pDD->
detsPXF().begin(); it != pDD->
detsPXF().end(); it++) {
223 if (geoUnit ==
nullptr)
224 LogError(
"PixelDQM") <<
"Pixel GeomDet is not a GeomDetUnit!" << std::endl;
229 DetId detId = (*it)->geographicalId();
230 LogDebug(
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
231 uint32_t
id = detId();
241 sprintf(sside,
"HalfCylinder_%i", side);
243 sprintf(sdisk,
"Disk_%i", disk);
245 sprintf(sblade,
"Blade_%02i", blade);
247 sprintf(spanel,
"Panel_%i", panel);
249 sprintf(smodule,
"Module_%i", module);
252 bool mask = side_str.find(
"HalfCylinder_1") != string::npos || side_str.find(
"HalfCylinder_2") != string::npos ||
253 side_str.find(
"HalfCylinder_4") != string::npos || disk_str.find(
"Disk_2") != string::npos;
259 thePixelStructure.insert(pair<uint32_t, SiPixelRawDataErrorModule *>(
id, theModule));
262 LogDebug(
"PixelDQM") <<
" ---> Adding Module for Additional Errors " << endl;
270 uint32_t
id =
static_cast<uint32_t
>(
fedId);
272 theFEDStructure.insert(pair<uint32_t, SiPixelRawDataErrorModule *>(
id, theModule));
283 sprintf(title0,
"FED isPresent;FED ID;isPresent");
287 sprintf(title,
"By-LumiSection Error counters");
291 sprintf(title1,
"Errors per LumiSection;LumiSection;NErrors");
294 std::map<uint32_t, SiPixelRawDataErrorModule *>::iterator struct_iter;
295 std::map<uint32_t, SiPixelRawDataErrorModule *>::iterator struct_iter2;
307 throw cms::Exception(
"LogicError") <<
"[SiPixelRawDataErrorSource::bookMEs] Creation of DQM folder " 314 LogDebug(
"PixelDQM") <<
"PROBLEM WITH LADDER-FOLDER\n";
320 LogDebug(
"PixelDQM") <<
"PROBLEM WITH BLADE-FOLDER\n";
328 if (!theSiPixelFolder.
setFedFolder(iBooker, (*struct_iter2).first)) {
329 throw cms::Exception(
"LogicError") <<
"[SiPixelRawDataErrorSource::bookMEs] Creation of DQM folder " 340 for (uint32_t
id = 0;
id < 40;
id++) {
342 sprintf(temp, (
topFolderName_ +
"/AdditionalPixelErrors/FED_%d").c_str(),
id);
345 hid = theHistogramId->setHistoId(
"errorType",
id);
349 hid = theHistogramId->setHistoId(
"NErrors",
id);
355 hid = theHistogramId->setHistoId(
"fullType",
id);
362 hid = theHistogramId->setHistoId(
"TBMMessage",
id);
368 hid = theHistogramId->setHistoId(
"TBMType",
id);
372 hid = theHistogramId->setHistoId(
"EvtNbr",
id);
375 hid = theHistogramId->setHistoId(
"evtSize",
id);
378 hid = theHistogramId->setHistoId(
"FedChNErr",
id);
382 hid = theHistogramId->setHistoId(
"FedChLErr",
id);
386 hid = theHistogramId->setHistoId(
"FedETypeNErr",
id);
int plaquetteName() const
plaquetteId (in pannel)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void setBinContent(int binx, double content)
set content of bin (1-D)
virtual void bookMEs(DQMStore::IBooker &)
MonitorElement * meEvtNbr_[40]
MonitorElement * fedcounter
edm::EDGetTokenT< edm::DetSetVector< SiPixelRawDataError > > src_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * byLumiErrors
MonitorElement * meFedETypeNErr_[40]
MonitorElement * meErrorType_[40]
constexpr uint32_t rawId() const
get the raw id
edm::LuminosityBlockNumber_t luminosityBlock() const
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)
#define DEFINE_FWK_MODULE(type)
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
void setLumiFlag()
this ME is meant to be stored for each luminosity section
void setCurrentFolder(std::string const &fullpath)
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.
const DetContainer & detsPXB() const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
MonitorElement * book1D(Args &&...args)
MonitorElement * meTBMType_[40]
void dqmBeginRun(const edm::Run &, edm::EventSetup const &) override
SiPixelRawDataErrorSource(const edm::ParameterSet &conf)
MonitorElement * meNErrors_[40]
MonitorElement * meFullType_[40]
~SiPixelRawDataErrorSource() override
MonitorElement * meTBMMessage_[40]
std::map< uint32_t, SiPixelRawDataErrorModule * > thePixelStructure
std::string topFolderName_
edm::EDGetTokenT< FEDRawDataCollection > inputSourceToken_
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
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
const DetContainer & detsPXF() const
std::map< std::string, MonitorElement ** > meMapFEDs_
int diskName() const
disk id
HalfCylinder halfCylinder() const
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
T const * product() const
Pixel error – collection of errors and error information.
MonitorElement * errorRate