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) )
66 LogInfo (
"PixelDQM") <<
"SiPixelRawDataErrorSource::SiPixelRawDataErrorSource: Got DQM BackEnd interface"<<endl;
74 LogInfo (
"PixelDQM") <<
"SiPixelRawDataErrorSource::~SiPixelRawDataErrorSource: Destructor"<<endl;
79 LogInfo (
"PixelDQM") <<
" SiPixelRawDataErrorSource::beginRun - Initialisation ... " << std::endl;
111 int nEventBPIXModuleErrors = 0;
int nEventFPIXModuleErrors = 0;
int nEventBPIXFEDErrors = 0;
int nEventFPIXFEDErrors = 0;
114 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter;
115 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter2;
122 nErrors = nErrors + numberOfModuleErrors;
127 int numberOfFEDErrors = (*struct_iter2).second->fillFED(*input, &
meMapFEDs_);
128 if((*struct_iter2).first <= 31) nEventBPIXFEDErrors = nEventBPIXFEDErrors + numberOfFEDErrors;
129 if((*struct_iter2).first >= 32 && (*struct_iter2).first <= 39) nEventFPIXFEDErrors = nEventFPIXFEDErrors + numberOfFEDErrors;
131 nErrors = nErrors + numberOfFEDErrors;
155 LogInfo (
"PixelDQM") <<
" SiPixelRawDataErrorSource::buildStructure" ;
159 LogVerbatim (
"PixelDQM") <<
" *** Geometry node for TrackerGeom is "<<&(*pDD)<<std::endl;
160 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->dets().size() <<
" detectors"<<std::endl;
161 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->detTypes().size() <<
" types"<<std::endl;
163 for(TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++){
166 DetId detId = (*it)->geographicalId();
167 const GeomDetUnit * geoUnit = pDD->idToDetUnit( detId );
174 LogDebug (
"PixelDQM") <<
" ---> Adding Barrel Module " << detId.
rawId() << endl;
175 uint32_t
id = detId();
177 thePixelStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
180 LogDebug (
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
181 uint32_t
id = detId();
190 char sside[80]; sprintf(sside,
"HalfCylinder_%i",side);
191 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
192 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
193 char spanel[80]; sprintf(spanel,
"Panel_%i",panel);
194 char smodule[80];sprintf(smodule,
"Module_%i",module);
197 bool mask = side_str.find(
"HalfCylinder_1")!=string::npos||
198 side_str.find(
"HalfCylinder_2")!=string::npos||
199 side_str.find(
"HalfCylinder_4")!=string::npos||
200 disk_str.find(
"Disk_2")!=string::npos;
203 if(
isPIB && mask)
continue;
205 thePixelStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
207 LogDebug (
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
208 uint32_t
id = detId();
217 char sside[80]; sprintf(sside,
"HalfCylinder_%i",side);
218 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
219 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
220 char spanel[80]; sprintf(spanel,
"Panel_%i",panel);
221 char smodule[80];sprintf(smodule,
"Module_%i",module);
224 bool mask = side_str.find(
"HalfCylinder_1")!=string::npos||
225 side_str.find(
"HalfCylinder_2")!=string::npos||
226 side_str.find(
"HalfCylinder_4")!=string::npos||
227 disk_str.find(
"Disk_2")!=string::npos;
230 if(
isPIB && mask)
continue;
232 thePixelStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
236 LogDebug (
"PixelDQM") <<
" ---> Adding Module for Additional Errors " << endl;
240 for (
int fedId = fedIds.first; fedId <= fedIds.second; fedId++) {
242 uint32_t
id =
static_cast<uint32_t
> (fedId);
244 theFEDStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
255 char title[80]; sprintf(title,
"By-LumiSection Error counters");
258 char title1[80]; sprintf(title1,
"Errors per LumiSection;LumiSection;NErrors");
261 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter;
262 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter2;
273 <<
"[SiPixelRawDataErrorSource::bookMEs] Creation of DQM folder failed";
279 LogDebug (
"PixelDQM") <<
"PROBLEM WITH LADDER-FOLDER\n";
285 LogDebug (
"PixelDQM") <<
"PROBLEM WITH BLADE-FOLDER\n";
293 if(!theSiPixelFolder.
setFedFolder((*struct_iter2).first)) {
295 <<
"[SiPixelRawDataErrorSource::bookMEs] Creation of DQM folder failed";
306 for (uint32_t
id = 0;
id < 40;
id++){
308 sprintf( temp,
"Pixel/AdditionalPixelErrors/FED_%d",
id);
311 hid = theHistogramId->setHistoId(
"errorType",
id);
315 hid = theHistogramId->setHistoId(
"NErrors",
id);
321 hid = theHistogramId->setHistoId(
"fullType",
id);
327 hid = theHistogramId->setHistoId(
"TBMMessage",
id);
332 hid = theHistogramId->setHistoId(
"TBMType",
id);
336 hid = theHistogramId->setHistoId(
"EvtNbr",
id);
339 hid = theHistogramId->setHistoId(
"evtSize",
id);
341 for(
int j=0;
j!=37;
j++){
342 std::stringstream
temp; temp <<
j;
343 hid =
"FedChNErrArray_" + temp.str();
345 hid =
"FedChLErrArray_" + temp.str();
347 hid =
"FedETypeNErrArray_" + temp.str();
int plaquetteName() const
plaquetteId (in pannel)
T getParameter(std::string const &) const
void setBinContent(int binx, double content)
set content of bin (1-D)
virtual void bookMEs(DQMStore::IBooker &)
std::map< uint32_t, SiPixelRawDataErrorModule * > theFEDStructure
MonitorElement * meEvtNbr_[40]
edm::EDGetTokenT< edm::DetSetVector< SiPixelRawDataError > > src_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
#define DEFINE_FWK_MODULE(type)
MonitorElement * byLumiErrors
MonitorElement * meErrorType_[40]
MonitorElement * bookInt(Args &&...args)
edm::LuminosityBlockNumber_t luminosityBlock() const
int plaquetteName() const
plaquetteId (in pannel)
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
static std::string const input
uint32_t rawId() const
get the raw id
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)
bool setModuleFolder(const uint32_t &rawdetid=0, int type=0, bool isUpgrade=false)
Set folder name for a module or plaquette.
std::map< uint32_t, SiPixelRawDataErrorModule * > thePixelStructure
MonitorElement * book1D(Args &&...args)
MonitorElement * meTBMType_[40]
int bladeName() const
blade id
SiPixelRawDataErrorSource(const edm::ParameterSet &conf)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
MonitorElement * meNErrors_[40]
int diskName() const
disk id
MonitorElement * meFullType_[40]
MonitorElement * meTBMMessage_[40]
void setCurrentFolder(const std::string &fullpath)
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
std::map< std::string, MonitorElement ** > meMapFEDs_
virtual void buildStructure(edm::EventSetup const &)
MonitorElement * meFedETypeNErrArray_[840]
MonitorElement * meFedChNErrArray_[1480]
~SiPixelRawDataErrorSource()
int pannelName() const
pannel id
int diskName() const
disk id
volatile std::atomic< bool > shutdown_flag false
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
HalfCylinder halfCylinder() const
HalfCylinder halfCylinder() const
int pannelName() const
pannel id
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Pixel error – collection of errors and error information.
virtual void dqmBeginRun(const edm::Run &, edm::EventSetup const &)
MonitorElement * errorRate
MonitorElement * meFedChLErrArray_[1480]