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;
76 LogInfo (
"PixelDQM") <<
"SiPixelRawDataErrorSource::~SiPixelRawDataErrorSource: Destructor"<<endl;
81 LogInfo (
"PixelDQM") <<
" SiPixelRawDataErrorSource::beginRun - Initialisation ... " << std::endl;
111 edm::LogInfo(
"SiPixelRawDataErrorSource") <<
"inputsource is empty";
115 for(
int i = 0;
i != 40;
i++){
127 int nEventBPIXModuleErrors = 0;
int nEventFPIXModuleErrors = 0;
int nEventBPIXFEDErrors = 0;
int nEventFPIXFEDErrors = 0;
130 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter;
131 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter2;
138 nErrors = nErrors + numberOfModuleErrors;
143 int numberOfFEDErrors = (*struct_iter2).second->fillFED(*input, &
meMapFEDs_);
144 if((*struct_iter2).first <= 31) nEventBPIXFEDErrors = nEventBPIXFEDErrors + numberOfFEDErrors;
145 if((*struct_iter2).first >= 32 && (*struct_iter2).first <= 39) nEventFPIXFEDErrors = nEventFPIXFEDErrors + numberOfFEDErrors;
147 nErrors = nErrors + numberOfFEDErrors;
171 LogInfo (
"PixelDQM") <<
" SiPixelRawDataErrorSource::buildStructure" ;
183 LogVerbatim (
"PixelDQM") <<
" *** Geometry node for TrackerGeom is "<<&(*pDD)<<std::endl;
184 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->dets().size() <<
" detectors"<<std::endl;
185 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->detTypes().size() <<
" types"<<std::endl;
187 for(TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++){
191 DetId detId = (*it)->geographicalId();
192 const GeomDetUnit * geoUnit = pDD->idToDetUnit( detId );
199 LogDebug (
"PixelDQM") <<
" ---> Adding Barrel Module " << detId.
rawId() << endl;
200 uint32_t
id = detId();
202 thePixelStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
205 LogDebug (
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
206 uint32_t
id = detId();
215 char sside[80]; sprintf(sside,
"HalfCylinder_%i",side);
216 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
217 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
218 char spanel[80]; sprintf(spanel,
"Panel_%i",panel);
219 char smodule[80];sprintf(smodule,
"Module_%i",module);
222 bool mask = side_str.find(
"HalfCylinder_1")!=string::npos||
223 side_str.find(
"HalfCylinder_2")!=string::npos||
224 side_str.find(
"HalfCylinder_4")!=string::npos||
225 disk_str.find(
"Disk_2")!=string::npos;
228 if(
isPIB && mask)
continue;
230 thePixelStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
236 LogDebug (
"PixelDQM") <<
" ---> Adding Module for Additional Errors " << endl;
245 uint32_t
id =
static_cast<uint32_t
> (
fedId);
247 theFEDStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
258 char title0[80]; sprintf(title0,
"FED isPresent;FED ID;isPresent");
261 char title[80]; sprintf(title,
"By-LumiSection Error counters");
264 char title1[80]; sprintf(title1,
"Errors per LumiSection;LumiSection;NErrors");
267 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter;
268 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter2;
279 <<
"[SiPixelRawDataErrorSource::bookMEs] Creation of DQM folder failed";
285 LogDebug (
"PixelDQM") <<
"PROBLEM WITH LADDER-FOLDER\n";
291 LogDebug (
"PixelDQM") <<
"PROBLEM WITH BLADE-FOLDER\n";
299 if(!theSiPixelFolder.
setFedFolder(iBooker,(*struct_iter2).first)) {
301 <<
"[SiPixelRawDataErrorSource::bookMEs] Creation of DQM folder failed";
312 for (uint32_t
id = 0;
id < 40;
id++){
314 sprintf( temp, (
topFolderName_+
"/AdditionalPixelErrors/FED_%d").c_str(),
id);
317 hid = theHistogramId->setHistoId(
"errorType",
id);
321 hid = theHistogramId->setHistoId(
"NErrors",
id);
327 hid = theHistogramId->setHistoId(
"fullType",
id);
333 hid = theHistogramId->setHistoId(
"TBMMessage",
id);
338 hid = theHistogramId->setHistoId(
"TBMType",
id);
342 hid = theHistogramId->setHistoId(
"EvtNbr",
id);
345 hid = theHistogramId->setHistoId(
"evtSize",
id);
348 hid = theHistogramId->setHistoId(
"FedChNErr",
id);
352 hid = theHistogramId->setHistoId(
"FedChLErr",
id);
356 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]
bool isTrackerPixel(const GeomDetEnumerators::SubDetector m)
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