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->dets().size() <<
" detectors"<<std::endl;
186 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->detTypes().size() <<
" types"<<std::endl;
188 for(TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++){
192 DetId detId = (*it)->geographicalId();
193 const GeomDetUnit * geoUnit = pDD->idToDetUnit( detId );
200 LogDebug (
"PixelDQM") <<
" ---> Adding Barrel Module " << detId.
rawId() << endl;
201 uint32_t
id = detId();
203 thePixelStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
206 LogDebug (
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
207 uint32_t
id = detId();
216 char sside[80]; sprintf(sside,
"HalfCylinder_%i",side);
217 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
218 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
219 char spanel[80]; sprintf(spanel,
"Panel_%i",panel);
220 char smodule[80];sprintf(smodule,
"Module_%i",module);
223 bool mask = side_str.find(
"HalfCylinder_1")!=string::npos||
224 side_str.find(
"HalfCylinder_2")!=string::npos||
225 side_str.find(
"HalfCylinder_4")!=string::npos||
226 disk_str.find(
"Disk_2")!=string::npos;
229 if(
isPIB && mask)
continue;
231 thePixelStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
237 LogDebug (
"PixelDQM") <<
" ---> Adding Module for Additional Errors " << endl;
246 uint32_t
id =
static_cast<uint32_t
> (
fedId);
248 theFEDStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
259 char title0[80]; sprintf(title0,
"FED isPresent;FED ID;isPresent");
262 char title[80]; sprintf(title,
"By-LumiSection Error counters");
265 char title1[80]; sprintf(title1,
"Errors per LumiSection;LumiSection;NErrors");
268 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter;
269 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter2;
280 <<
"[SiPixelRawDataErrorSource::bookMEs] Creation of DQM folder failed";
286 LogDebug (
"PixelDQM") <<
"PROBLEM WITH LADDER-FOLDER\n";
292 LogDebug (
"PixelDQM") <<
"PROBLEM WITH BLADE-FOLDER\n";
300 if(!theSiPixelFolder.
setFedFolder(iBooker,(*struct_iter2).first)) {
302 <<
"[SiPixelRawDataErrorSource::bookMEs] Creation of DQM folder failed";
313 for (uint32_t
id = 0;
id < 40;
id++){
315 sprintf( temp, (
topFolderName_+
"/AdditionalPixelErrors/FED_%d").c_str(),
id);
318 hid = theHistogramId->setHistoId(
"errorType",
id);
322 hid = theHistogramId->setHistoId(
"NErrors",
id);
328 hid = theHistogramId->setHistoId(
"fullType",
id);
334 hid = theHistogramId->setHistoId(
"TBMMessage",
id);
339 hid = theHistogramId->setHistoId(
"TBMType",
id);
343 hid = theHistogramId->setHistoId(
"EvtNbr",
id);
346 hid = theHistogramId->setHistoId(
"evtSize",
id);
349 hid = theHistogramId->setHistoId(
"FedChNErr",
id);
353 hid = theHistogramId->setHistoId(
"FedChLErr",
id);
357 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