57 saveFile( conf_.getUntrackedParameter<bool>(
"saveFile",
false) ),
58 isPIB( conf_.getUntrackedParameter<bool>(
"isPIB",
false) ),
59 slowDown( conf_.getUntrackedParameter<bool>(
"slowDown",
false) ),
60 reducedSet( conf_.getUntrackedParameter<bool>(
"reducedSet",
false) ),
61 modOn( conf_.getUntrackedParameter<bool>(
"modOn",
true) ),
62 ladOn( conf_.getUntrackedParameter<bool>(
"ladOn",
false) ),
63 bladeOn( conf_.getUntrackedParameter<bool>(
"bladeOn",
false) ),
64 isUpgrade( conf_.getUntrackedParameter<bool>(
"isUpgrade",
false) )
67 LogInfo (
"PixelDQM") <<
"SiPixelRawDataErrorSource::SiPixelRawDataErrorSource: Got DQM BackEnd interface"<<endl;
77 LogInfo (
"PixelDQM") <<
"SiPixelRawDataErrorSource::~SiPixelRawDataErrorSource: Destructor"<<endl;
82 LogInfo (
"PixelDQM") <<
" SiPixelRawDataErrorSource::beginRun - Initialisation ... " << std::endl;
112 edm::LogInfo(
"SiPixelRawDataErrorSource") <<
"inputsource is empty";
116 for(
int i = 0;
i != 40;
i++){
128 int nEventBPIXModuleErrors = 0;
int nEventFPIXModuleErrors = 0;
int nEventBPIXFEDErrors = 0;
int nEventFPIXFEDErrors = 0;
131 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter;
132 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter2;
139 nErrors = nErrors + numberOfModuleErrors;
144 int numberOfFEDErrors = (*struct_iter2).second->fillFED(*input, &
meMapFEDs_);
145 if((*struct_iter2).first <= 31) nEventBPIXFEDErrors = nEventBPIXFEDErrors + numberOfFEDErrors;
146 if((*struct_iter2).first >= 32 && (*struct_iter2).first <= 39) nEventFPIXFEDErrors = nEventFPIXFEDErrors + numberOfFEDErrors;
148 nErrors = nErrors + numberOfFEDErrors;
172 LogInfo (
"PixelDQM") <<
" SiPixelRawDataErrorSource::buildStructure" ;
184 LogVerbatim (
"PixelDQM") <<
" *** Geometry node for TrackerGeom is "<<&(*pDD)<<std::endl;
185 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->detsPXB().size() <<
" barrel pixel detectors"<<std::endl;
186 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->detsPXF().size() <<
" endcap pixel detectors"<<std::endl;
189 for(TrackerGeometry::DetContainer::const_iterator it = pDD->detsPXB().begin(); it != pDD->detsPXB().end(); it++){
194 LogError (
"PixelDQM") <<
"Pixel GeomDet is not a GeomDetUnit!" << std::endl;
200 DetId detId = (*it)->geographicalId();
201 LogDebug (
"PixelDQM") <<
" ---> Adding Barrel Module " << detId.
rawId() << endl;
202 uint32_t
id = detId();
204 thePixelStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
209 for(TrackerGeometry::DetContainer::const_iterator it = pDD->detsPXF().begin(); it != pDD->detsPXF().end(); it++){
214 LogError (
"PixelDQM") <<
"Pixel GeomDet is not a GeomDetUnit!" << std::endl;
219 DetId detId = (*it)->geographicalId();
220 LogDebug (
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
221 uint32_t
id = detId();
230 char sside[80]; sprintf(sside,
"HalfCylinder_%i",side);
231 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
232 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
233 char spanel[80]; sprintf(spanel,
"Panel_%i",panel);
234 char smodule[80];sprintf(smodule,
"Module_%i",module);
237 bool mask = side_str.find(
"HalfCylinder_1")!=string::npos||
238 side_str.find(
"HalfCylinder_2")!=string::npos||
239 side_str.find(
"HalfCylinder_4")!=string::npos||
240 disk_str.find(
"Disk_2")!=string::npos;
243 if(
isPIB && mask)
continue;
245 thePixelStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
249 LogDebug (
"PixelDQM") <<
" ---> Adding Module for Additional Errors " << endl;
258 uint32_t
id =
static_cast<uint32_t
> (
fedId);
260 theFEDStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
271 char title0[80]; sprintf(title0,
"FED isPresent;FED ID;isPresent");
274 char title[80]; sprintf(title,
"By-LumiSection Error counters");
277 char title1[80]; sprintf(title1,
"Errors per LumiSection;LumiSection;NErrors");
280 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter;
281 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter2;
292 <<
"[SiPixelRawDataErrorSource::bookMEs] Creation of DQM folder failed";
298 LogDebug (
"PixelDQM") <<
"PROBLEM WITH LADDER-FOLDER\n";
304 LogDebug (
"PixelDQM") <<
"PROBLEM WITH BLADE-FOLDER\n";
312 if(!theSiPixelFolder.
setFedFolder(iBooker,(*struct_iter2).first)) {
314 <<
"[SiPixelRawDataErrorSource::bookMEs] Creation of DQM folder failed";
325 for (uint32_t
id = 0;
id < 40;
id++){
327 sprintf( temp, (
topFolderName_+
"/AdditionalPixelErrors/FED_%d").c_str(),
id);
330 hid = theHistogramId->setHistoId(
"errorType",
id);
334 hid = theHistogramId->setHistoId(
"NErrors",
id);
340 hid = theHistogramId->setHistoId(
"fullType",
id);
346 hid = theHistogramId->setHistoId(
"TBMMessage",
id);
351 hid = theHistogramId->setHistoId(
"TBMType",
id);
355 hid = theHistogramId->setHistoId(
"EvtNbr",
id);
358 hid = theHistogramId->setHistoId(
"evtSize",
id);
361 hid = theHistogramId->setHistoId(
"FedChNErr",
id);
365 hid = theHistogramId->setHistoId(
"FedChLErr",
id);
369 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 &)
std::map< uint32_t, SiPixelRawDataErrorModule * > theFEDStructure
MonitorElement * meEvtNbr_[40]
MonitorElement * fedcounter
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 * meFedETypeNErr_[40]
MonitorElement * meErrorType_[40]
edm::LuminosityBlockNumber_t luminosityBlock() const
MonitorElement * meFedChNErr_[40]
virtual 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
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)
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
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]
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]
MonitorElement * meFullType_[40]
MonitorElement * meTBMMessage_[40]
void setCurrentFolder(const std::string &fullpath)
std::string topFolderName_
edm::EDGetTokenT< FEDRawDataCollection > inputSourceToken_
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
T const * product() const
MonitorElement * meFedChLErr_[40]
std::map< std::string, MonitorElement ** > meMapFEDs_
virtual void buildStructure(edm::EventSetup const &)
~SiPixelRawDataErrorSource()
int pannelName() const
pannel id
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
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
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