51 src_( conf_.getParameter<edm::
InputTag>(
"src" ) ),
52 saveFile( conf_.getUntrackedParameter<bool>(
"saveFile",
false) ),
53 isPIB( conf_.getUntrackedParameter<bool>(
"isPIB",
false) ),
54 slowDown( conf_.getUntrackedParameter<bool>(
"slowDown",
false) ),
55 reducedSet( conf_.getUntrackedParameter<bool>(
"reducedSet",
false) ),
56 modOn( conf_.getUntrackedParameter<bool>(
"modOn",
true) ),
57 ladOn( conf_.getUntrackedParameter<bool>(
"ladOn",
false) ),
58 bladeOn( conf_.getUntrackedParameter<bool>(
"bladeOn",
false) )
61 LogInfo (
"PixelDQM") <<
"SiPixelRawDataErrorSource::SiPixelRawDataErrorSource: Got DQM BackEnd interface"<<endl;
69 LogInfo (
"PixelDQM") <<
"SiPixelRawDataErrorSource::~SiPixelRawDataErrorSource: Destructor"<<endl;
79 LogInfo (
"PixelDQM") <<
" SiPixelRawDataErrorSource::beginRun - Initialisation ... " << std::endl;
97 LogInfo (
"PixelDQM") <<
" SiPixelRawDataErrorSource::endJob - Saving Root File " << std::endl;
124 int nEventBPIXModuleErrors = 0;
int nEventFPIXModuleErrors = 0;
int nEventBPIXFEDErrors = 0;
int nEventFPIXFEDErrors = 0;
127 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter;
128 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter2;
131 int numberOfModuleErrors = (*struct_iter).second->fill(*input,
modOn,
ladOn,
bladeOn);
135 nErrors = nErrors + numberOfModuleErrors;
140 int numberOfFEDErrors = (*struct_iter2).second->fillFED(*input);
141 if((*struct_iter2).first <= 31) nEventBPIXFEDErrors = nEventBPIXFEDErrors + numberOfFEDErrors;
142 if((*struct_iter2).first >= 32 && (*struct_iter2).first <= 39) nEventFPIXFEDErrors = nEventFPIXFEDErrors + numberOfFEDErrors;
144 nErrors = nErrors + numberOfFEDErrors;
153 if(nEventBPIXModuleErrors+nEventBPIXFEDErrors>0) me->
Fill(0,1.);
154 if(nEventFPIXModuleErrors+nEventFPIXFEDErrors>0) me->
Fill(1,1.);
160 if(me1) me1->
Fill(lumiSection, nErrors);
172 LogInfo (
"PixelDQM") <<
" SiPixelRawDataErrorSource::buildStructure" ;
176 LogVerbatim (
"PixelDQM") <<
" *** Geometry node for TrackerGeom is "<<&(*pDD)<<std::endl;
177 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->dets().size() <<
" detectors"<<std::endl;
178 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->detTypes().size() <<
" types"<<std::endl;
180 for(TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++){
183 DetId detId = (*it)->geographicalId();
184 const GeomDetUnit * geoUnit = pDD->idToDetUnit( detId );
191 LogDebug (
"PixelDQM") <<
" ---> Adding Barrel Module " << detId.
rawId() << endl;
192 uint32_t
id = detId();
194 thePixelStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
197 LogDebug (
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
198 uint32_t
id = detId();
207 char sside[80]; sprintf(sside,
"HalfCylinder_%i",side);
208 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
209 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
210 char spanel[80]; sprintf(spanel,
"Panel_%i",panel);
211 char smodule[80];sprintf(smodule,
"Module_%i",module);
214 bool mask = side_str.find(
"HalfCylinder_1")!=string::npos||
215 side_str.find(
"HalfCylinder_2")!=string::npos||
216 side_str.find(
"HalfCylinder_4")!=string::npos||
217 disk_str.find(
"Disk_2")!=string::npos;
220 if(
isPIB && mask)
continue;
222 thePixelStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
226 LogDebug (
"PixelDQM") <<
" ---> Adding Module for Additional Errors " << endl;
230 for (
int fedId = fedIds.first; fedId <= fedIds.second; fedId++) {
232 uint32_t
id =
static_cast<uint32_t
> (fedId);
234 theFEDStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
247 char title[80]; sprintf(title,
"By-LumiSection Error counters");
250 char title1[80]; sprintf(title1,
"Errors per LumiSection;LumiSection;NErrors");
253 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter;
254 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter2;
263 (*struct_iter).second->book(
conf_, 0 );
268 <<
"[SiPixelRawDataErrorSource::bookMEs] Creation of DQM folder failed";
274 (*struct_iter).second->book(
conf_, 1 );
277 LogDebug (
"PixelDQM") <<
"PROBLEM WITH LADDER-FOLDER\n";
283 (*struct_iter).second->book(
conf_, 4 );
286 LogDebug (
"PixelDQM") <<
"PROBLEM WITH BLADE-FOLDER\n";
294 if(theSiPixelFolder.
setFedFolder((*struct_iter2).first)) {
295 (*struct_iter2).second->bookFED(
conf_ );
299 <<
"[SiPixelRawDataErrorSource::bookMEs] Creation of DQM folder failed";
int plaquetteName() const
plaquetteId (in pannel)
T getParameter(std::string const &) const
void setBinContent(int binx, double content)
set content of bin (1-D)
std::map< uint32_t, SiPixelRawDataErrorModule * > theFEDStructure
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
virtual void analyze(const edm::Event &, const edm::EventSetup &)
#define DEFINE_FWK_MODULE(type)
MonitorElement * byLumiErrors
virtual void beginRun(const edm::Run &, edm::EventSetup const &)
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
edm::LuminosityBlockNumber_t luminosityBlock() const
uint32_t rawId() const
get the raw id
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)
std::map< uint32_t, SiPixelRawDataErrorModule * > thePixelStructure
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
SiPixelRawDataErrorSource(const edm::ParameterSet &conf)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
virtual void buildStructure(edm::EventSetup const &)
~SiPixelRawDataErrorSource()
int pannelName() const
pannel id
int diskName() const
disk id
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
HalfCylinder halfCylinder() const
void setCurrentFolder(const std::string &fullpath)
bool setModuleFolder(const uint32_t &rawdetid=0, int type=0)
Set folder name for a module or plaquette.
MonitorElement * errorRate