54 saveFile( conf_.getUntrackedParameter<bool>(
"saveFile",
false) ),
55 isPIB( conf_.getUntrackedParameter<bool>(
"isPIB",
false) ),
56 slowDown( conf_.getUntrackedParameter<bool>(
"slowDown",
false) ),
57 reducedSet( conf_.getUntrackedParameter<bool>(
"reducedSet",
false) ),
58 modOn( conf_.getUntrackedParameter<bool>(
"modOn",
true) ),
59 ladOn( conf_.getUntrackedParameter<bool>(
"ladOn",
false) ),
60 bladeOn( conf_.getUntrackedParameter<bool>(
"bladeOn",
false) ),
61 isUpgrade( conf_.getUntrackedParameter<bool>(
"isUpgrade",
false) )
64 LogInfo (
"PixelDQM") <<
"SiPixelRawDataErrorSource::SiPixelRawDataErrorSource: Got DQM BackEnd interface"<<endl;
72 LogInfo (
"PixelDQM") <<
"SiPixelRawDataErrorSource::~SiPixelRawDataErrorSource: Destructor"<<endl;
82 LogInfo (
"PixelDQM") <<
" SiPixelRawDataErrorSource::beginRun - Initialisation ... " << std::endl;
100 LogInfo (
"PixelDQM") <<
" SiPixelRawDataErrorSource::endJob - Saving Root File " << std::endl;
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;
134 int numberOfModuleErrors = (*struct_iter).second->fill(*input,
modOn,
ladOn,
bladeOn);
138 nErrors = nErrors + numberOfModuleErrors;
143 int numberOfFEDErrors = (*struct_iter2).second->fillFED(*input);
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;
156 if(nEventBPIXModuleErrors+nEventBPIXFEDErrors>0) me->
Fill(0,1.);
157 if(nEventFPIXModuleErrors+nEventFPIXFEDErrors>0) me->
Fill(1,1.);
163 if(me1) me1->
Fill(lumiSection, nErrors);
175 LogInfo (
"PixelDQM") <<
" SiPixelRawDataErrorSource::buildStructure" ;
179 LogVerbatim (
"PixelDQM") <<
" *** Geometry node for TrackerGeom is "<<&(*pDD)<<std::endl;
180 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->dets().size() <<
" detectors"<<std::endl;
181 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->detTypes().size() <<
" types"<<std::endl;
183 for(TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++){
186 DetId detId = (*it)->geographicalId();
187 const GeomDetUnit * geoUnit = pDD->idToDetUnit( detId );
194 LogDebug (
"PixelDQM") <<
" ---> Adding Barrel Module " << detId.
rawId() << endl;
195 uint32_t
id = detId();
197 thePixelStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
200 LogDebug (
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
201 uint32_t
id = detId();
210 char sside[80]; sprintf(sside,
"HalfCylinder_%i",side);
211 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
212 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
213 char spanel[80]; sprintf(spanel,
"Panel_%i",panel);
214 char smodule[80];sprintf(smodule,
"Module_%i",module);
217 bool mask = side_str.find(
"HalfCylinder_1")!=string::npos||
218 side_str.find(
"HalfCylinder_2")!=string::npos||
219 side_str.find(
"HalfCylinder_4")!=string::npos||
220 disk_str.find(
"Disk_2")!=string::npos;
223 if(
isPIB && mask)
continue;
225 thePixelStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
227 LogDebug (
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
228 uint32_t
id = detId();
237 char sside[80]; sprintf(sside,
"HalfCylinder_%i",side);
238 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
239 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
240 char spanel[80]; sprintf(spanel,
"Panel_%i",panel);
241 char smodule[80];sprintf(smodule,
"Module_%i",module);
244 bool mask = side_str.find(
"HalfCylinder_1")!=string::npos||
245 side_str.find(
"HalfCylinder_2")!=string::npos||
246 side_str.find(
"HalfCylinder_4")!=string::npos||
247 disk_str.find(
"Disk_2")!=string::npos;
250 if(
isPIB && mask)
continue;
252 thePixelStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
256 LogDebug (
"PixelDQM") <<
" ---> Adding Module for Additional Errors " << endl;
260 for (
int fedId = fedIds.first; fedId <= fedIds.second; fedId++) {
262 uint32_t
id =
static_cast<uint32_t
> (fedId);
264 theFEDStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (
id,theModule));
277 char title[80]; sprintf(title,
"By-LumiSection Error counters");
280 char title1[80]; sprintf(title1,
"Errors per LumiSection;LumiSection;NErrors");
283 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter;
284 std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter2;
298 <<
"[SiPixelRawDataErrorSource::bookMEs] Creation of DQM folder failed";
307 LogDebug (
"PixelDQM") <<
"PROBLEM WITH LADDER-FOLDER\n";
316 LogDebug (
"PixelDQM") <<
"PROBLEM WITH BLADE-FOLDER\n";
324 if(theSiPixelFolder.
setFedFolder((*struct_iter2).first)) {
325 (*struct_iter2).second->bookFED(
conf_ );
329 <<
"[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.
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
virtual void beginRun(const edm::Run &, edm::EventSetup const &)
edm::LuminosityBlockNumber_t luminosityBlock() const
int plaquetteName() const
plaquetteId (in pannel)
static std::string const input
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)
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
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
int bladeName() const
blade id
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) ...
int diskName() const
disk id
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
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 setCurrentFolder(const std::string &fullpath)
Pixel error – collection of errors and error information.
MonitorElement * errorRate