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;
75 LogInfo (
"PixelDQM") <<
"SiPixelRawDataErrorSource::~SiPixelRawDataErrorSource: Destructor"<<endl;
80 LogInfo (
"PixelDQM") <<
" SiPixelRawDataErrorSource::beginRun - Initialisation ... " << std::endl;
110 std::cout <<
"inputsource is empty" << 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" ;
175 LogVerbatim (
"PixelDQM") <<
" *** Geometry node for TrackerGeom is "<<&(*pDD)<<std::endl;
176 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->dets().size() <<
" detectors"<<std::endl;
177 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->detTypes().size() <<
" types"<<std::endl;
179 for(TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++){
182 DetId detId = (*it)->geographicalId();
183 const GeomDetUnit * geoUnit = pDD->idToDetUnit( detId );
190 LogDebug (
"PixelDQM") <<
" ---> Adding Barrel Module " << detId.
rawId() << endl;
191 uint32_t
id = detId();
193 thePixelStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
196 LogDebug (
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
197 uint32_t
id = detId();
206 char sside[80]; sprintf(sside,
"HalfCylinder_%i",side);
207 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
208 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
209 char spanel[80]; sprintf(spanel,
"Panel_%i",panel);
210 char smodule[80];sprintf(smodule,
"Module_%i",module);
213 bool mask = side_str.find(
"HalfCylinder_1")!=string::npos||
214 side_str.find(
"HalfCylinder_2")!=string::npos||
215 side_str.find(
"HalfCylinder_4")!=string::npos||
216 disk_str.find(
"Disk_2")!=string::npos;
219 if(
isPIB && mask)
continue;
221 thePixelStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
223 LogDebug (
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
224 uint32_t
id = detId();
233 char sside[80]; sprintf(sside,
"HalfCylinder_%i",side);
234 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
235 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
236 char spanel[80]; sprintf(spanel,
"Panel_%i",panel);
237 char smodule[80];sprintf(smodule,
"Module_%i",module);
240 bool mask = side_str.find(
"HalfCylinder_1")!=string::npos||
241 side_str.find(
"HalfCylinder_2")!=string::npos||
242 side_str.find(
"HalfCylinder_4")!=string::npos||
243 disk_str.find(
"Disk_2")!=string::npos;
246 if(
isPIB && mask)
continue;
248 thePixelStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
252 LogDebug (
"PixelDQM") <<
" ---> Adding Module for Additional Errors " << endl;
256 for (
int fedId = fedIds.first; fedId <= fedIds.second; fedId++) {
258 uint32_t
id =
static_cast<uint32_t
> (fedId);
260 theFEDStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
270 char title0[80]; sprintf(title0,
"FED isPresent;FED ID;isPresent");
273 char title[80]; sprintf(title,
"By-LumiSection Error counters");
276 char title1[80]; sprintf(title1,
"Errors per LumiSection;LumiSection;NErrors");
279 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter;
280 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter2;
291 <<
"[SiPixelRawDataErrorSource::bookMEs] Creation of DQM folder failed";
297 LogDebug (
"PixelDQM") <<
"PROBLEM WITH LADDER-FOLDER\n";
303 LogDebug (
"PixelDQM") <<
"PROBLEM WITH BLADE-FOLDER\n";
311 if(!theSiPixelFolder.
setFedFolder(iBooker,(*struct_iter2).first)) {
313 <<
"[SiPixelRawDataErrorSource::bookMEs] Creation of DQM folder failed";
324 for (uint32_t
id = 0;
id < 40;
id++){
326 sprintf( temp,
"Pixel/AdditionalPixelErrors/FED_%d",
id);
329 hid = theHistogramId->setHistoId(
"errorType",
id);
333 hid = theHistogramId->setHistoId(
"NErrors",
id);
339 hid = theHistogramId->setHistoId(
"fullType",
id);
345 hid = theHistogramId->setHistoId(
"TBMMessage",
id);
350 hid = theHistogramId->setHistoId(
"TBMType",
id);
354 hid = theHistogramId->setHistoId(
"EvtNbr",
id);
357 hid = theHistogramId->setHistoId(
"evtSize",
id);
360 hid = theHistogramId->setHistoId(
"FedChNErr",
id);
364 hid = theHistogramId->setHistoId(
"FedChLErr",
id);
368 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]
int plaquetteName() const
plaquetteId (in pannel)
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]
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)
edm::EDGetTokenT< FEDRawDataCollection > inputSourceToken_
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
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
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