20 printDebug_ = parameterSet_.getUntrackedParameter<
bool>(
"printDebug",
false);
21 writeHisto_ = parameterSet_.getUntrackedParameter<
bool>(
"writeHisto",
false);
23 inputFiles_ = parameterSet_.getUntrackedParameter<
vstring>(
"inputFiles");
24 outputDir_ = parameterSet_.getUntrackedParameter<
string>(
"outputDir",
".");
34 for (vector<string>::const_iterator iFile = inputFiles_.begin(); iFile!=inputFiles_.end(); ++iFile) {
36 if (iFile->find(
"R0000",0)!=string::npos) runNumber = atoi(iFile->substr(iFile->find(
"R0000",0)+5,5).
data());
37 else if (iFile->find(
"Run",0)!=string::npos) runNumber = atoi(iFile->substr(iFile->find(
"Run",0)+3,5).
data());
38 else cout <<
"run number cannot be extracted from file name" << endl;
40 if (runNumber==run.
run()) {
44 performanceSummary->setRunNumber(runNumber);
47 fillPerformanceSummary();
51 ostringstream endRunOutputFile;
52 endRunOutputFile << outputDir_<<
"/SiPixelHistoricInfoDQMClient_"<< runNumber <<
".root";
62 ostringstream endJobOutputFile;
63 endJobOutputFile << outputDir_ <<
"/SiPixelHistoricInfoDQMClient_endJob.root";
70 mapOfdetIDtoMEs.clear();
71 bool noModules =
true, noSummary =
true;
73 vector<string> listOfMEswithFullPath;
76 for (vector<string>::const_iterator iMEstr = listOfMEswithFullPath.begin();
77 iMEstr!=listOfMEswithFullPath.end(); iMEstr++) {
78 if (printDebug_)
cout << iMEstr->data() << endl;
80 size_t pathLength = iMEstr->find(
":",0);
81 string thePath = iMEstr->substr(0, pathLength);
82 string allHists = iMEstr->substr(pathLength+1);
84 if (thePath.find(
"Pixel",0)!=string::npos) {
85 if (thePath.find(
"FED_",0)!=string::npos) {
86 size_t histnameLength;
88 histnameLength = allHists.find(
",",0);
90 if (histnameLength!=string::npos) {
91 theHist = allHists.substr(0, histnameLength);
92 allHists.erase(0, histnameLength+1);
94 else theHist = allHists;
96 string fullPathHist = thePath +
"/" + theHist;
99 uint32_t newMEdetID = histogramManager.getRawId(newME->
getName());
101 if (mapOfdetIDtoMEs.find(newMEdetID)==mapOfdetIDtoMEs.end()) {
102 vector<MonitorElement*> newMEvector;
103 newMEvector.push_back(newME);
104 mapOfdetIDtoMEs.insert(make_pair(newMEdetID, newMEvector));
106 else (mapOfdetIDtoMEs.find(newMEdetID)->second).push_back(newME);
109 while (histnameLength!=string::npos);
111 if (thePath.find(
"Module_",0)!=string::npos) {
113 size_t histnameLength;
115 histnameLength = allHists.find(
",",0);
117 if (histnameLength!=string::npos) {
118 theHist = allHists.substr(0, histnameLength);
119 allHists.erase(0, histnameLength+1);
121 else theHist = allHists;
123 string fullPathHist = thePath +
"/" + theHist;
126 uint32_t newMEdetID = histogramManager.getRawId(newME->
getName());
128 if (mapOfdetIDtoMEs.find(newMEdetID)==mapOfdetIDtoMEs.end()) {
129 vector<MonitorElement*> newMEvector;
130 newMEvector.push_back(newME);
131 mapOfdetIDtoMEs.insert(make_pair(newMEdetID, newMEvector));
133 else (mapOfdetIDtoMEs.find(newMEdetID)->second).push_back(newME);
136 while(histnameLength!=string::npos);
138 if (noModules) noModules =
false;
140 else if( (thePath.find(
"Layer_",0)!=string::npos ||
141 (thePath.find(
"Disk_",0)!=string::npos && thePath.find(
"Panel_",0)==string::npos)) ) {
143 uint32_t newMEdetID = getSummaryRegionID(thePath);
144 if (printDebug_)
cout << thePath.data() <<
" in region "<< newMEdetID << endl;
145 size_t histnameLength;
147 histnameLength = allHists.find(
",",0);
149 if (histnameLength!=string::npos) {
150 theHist = allHists.substr(0, histnameLength);
151 allHists.erase(0, histnameLength+1);
153 else theHist = allHists;
155 string fullPathHist = thePath +
"/" + theHist;
158 if (mapOfdetIDtoMEs.find(newMEdetID)==mapOfdetIDtoMEs.end()) {
159 vector<MonitorElement*> newMEvector;
160 newMEvector.push_back(newME);
161 mapOfdetIDtoMEs.insert(make_pair(newMEdetID, newMEvector));
163 else (mapOfdetIDtoMEs.find(newMEdetID)->second).push_back(newME);
166 while (histnameLength!=string::npos);
168 if (noSummary) noSummary =
false;
170 if (thePath.find(
"Track",0)!=string::npos) {
171 uint32_t newMEdetID = 77;
172 if (thePath.find(
"On", 0)!=string::npos) newMEdetID = 78;
173 if (thePath.find(
"Off",0)!=string::npos) newMEdetID = 79;
175 size_t histnameLength;
177 histnameLength = allHists.find(
",",0);
179 if (histnameLength!=string::npos) {
180 theHist = allHists.substr(0, histnameLength);
181 allHists.erase(0, histnameLength+1);
183 else theHist = allHists;
185 string fullPathHist = thePath +
"/" + theHist;
188 if (mapOfdetIDtoMEs.find(newMEdetID)==mapOfdetIDtoMEs.end()) {
189 vector<MonitorElement*> newMEvector;
190 newMEvector.push_back(newME);
191 mapOfdetIDtoMEs.insert(make_pair(newMEdetID, newMEvector));
193 else (mapOfdetIDtoMEs.find(newMEdetID)->second).push_back(newME);
196 while (histnameLength!=string::npos);
198 if (thePath.find(
"EventInfo",0)!=string::npos) {
199 size_t histnameLength;
201 histnameLength = allHists.find(
",",0);
203 if (histnameLength!=string::npos) {
204 theHist = allHists.substr(0, histnameLength);
205 allHists.erase(0, histnameLength+1);
207 else theHist = allHists;
209 if (theHist.find(
"iRun",0)!=string::npos) {
210 string fullPathHist = thePath +
"/" + theHist;
212 if (strME) performanceSummary->setRunNumber(strME->
getIntValue());
214 if (theHist.find(
"iLumiSection",0)!=string::npos) {
215 string fullPathHist = thePath +
"/" + theHist;
217 if (strME) performanceSummary->setLuminosityBlock(strME->
getIntValue());
219 if (theHist.find(
"processedEvents",0)!=string::npos) {
220 string fullPathHist = thePath +
"/" + theHist;
222 if (strME) performanceSummary->setNumberOfEvents(strME->
getIntValue());
224 if (theHist.find(
"eventTimeStamp",0)!=string::npos) {
225 string fullPathHist = thePath +
"/" + theHist;
227 if (strME) performanceSummary->setTimeStamp((
unsigned long long)strME->
getFloatValue());
230 while (histnameLength!=string::npos);
234 if ( useSummary_ && noSummary)
cout << endl <<
"use "<<
"summary MEs but NO "<<
"summary MEs in the input file" << endl << endl;
235 if (!useSummary_ && noModules)
cout << endl <<
"use "<<
"module MEs but NO "<<
"module MEs in the input file" << endl << endl;
240 uint32_t regionID = 666;
241 if (thePath.find(
"Ladder",0)==string::npos && thePath.find(
"Blade",0)==string::npos) {
243 if (thePath.find(
"Barrel",0)!=string::npos) {
245 string shell = thePath.substr(thePath.find(
"Shell",0)+6,2);
246 if (shell.compare(
"mI")==0) regionID += 0;
247 else if (shell.compare(
"mO")==0) regionID += 3;
248 else if (shell.compare(
"pI")==0) regionID += 6;
249 else if (shell.compare(
"pO")==0) regionID += 9;
250 else cout <<
"Shell_" << shell.data() <<
"?!" << endl;
251 string layer = thePath.substr(thePath.find(
"Layer",0)+6,1);
252 regionID += (atoi(layer.data())-1);
254 else if (thePath.find(
"Endcap",0)!=string::npos) {
256 string halfCylinder = thePath.substr(thePath.find(
"HalfCylinder",0)+13,2);
257 if (halfCylinder.compare(
"mI")==0) regionID += 0;
258 else if (halfCylinder.compare(
"mO")==0) regionID += 2;
259 else if (halfCylinder.compare(
"pI")==0) regionID += 4;
260 else if (halfCylinder.compare(
"pO")==0) regionID += 6;
261 else cout <<
"HalfCylinder_" << halfCylinder.data() <<
"?!" << endl;
262 string disk = thePath.substr(thePath.find(
"Disk",0)+5,1);
263 regionID += (atoi(disk.data())-1);
266 else if (thePath.find(
"Ladder",0)!=string::npos || thePath.find(
"Blade",0)!=string::npos) {
268 if (thePath.find(
"Barrel",0)!=string::npos) {
270 string shell = thePath.substr(thePath.find(
"Shell",0)+6,2);
271 if (shell.compare(
"mI")==0) regionID += 0;
272 else if (shell.compare(
"mO")==0) regionID += 48;
273 else if (shell.compare(
"pI")==0) regionID += 96;
274 else if (shell.compare(
"pO")==0) regionID += 144;
275 else cout <<
"Shell_" << shell.data() <<
"?!" << endl;
276 string layer = thePath.substr(thePath.find(
"Layer",0)+6,1);
277 if (layer.compare(
"1")==0) regionID += 0;
278 else if (layer.compare(
"2")==0) regionID += 10;
279 else if (layer.compare(
"3")==0) regionID += 26;
280 else cout <<
"Layer_" << layer.data() <<
"?!" << endl;
281 string ladder = thePath.substr(thePath.find(
"Ladder",0)+7,2);
282 regionID += (atoi(ladder.data())-1);
284 else if (thePath.find(
"Endcap",0)!=string::npos) {
286 string halfCylinder = thePath.substr(thePath.find(
"HalfCylinder",0)+13,2);
287 if (halfCylinder.compare(
"mI")==0) regionID += 0;
288 else if (halfCylinder.compare(
"mO")==0) regionID += 24;
289 else if (halfCylinder.compare(
"pI")==0) regionID += 48;
290 else if (halfCylinder.compare(
"pO")==0) regionID += 72;
291 else cout <<
"HalfCylinder_" << halfCylinder.data() <<
"?!" << endl;
292 string disk = thePath.substr(thePath.find(
"Disk",0)+5,1);
293 string blade = thePath.substr(thePath.find(
"Blade",0)+6,2);
294 regionID += (12*(atoi(disk.data())-1) + atoi(blade.data())-1);
302 float&
mean,
float& RMS,
float& emPtn)
const {
303 int nBins=0;
for (
int b=0;
b<(*iME)->getNbinsX();
b++) {
304 float binMean = (*iME)->getBinContent(
b+1);
305 float binRMS = (*iME)->getBinError(
b+1);
306 if (binMean!=0.0 || binRMS!=0.0) { nBins++; mean += binMean; RMS +=
pow(binRMS,2); }
309 mean = mean/float(nBins);
310 RMS =
sqrt(RMS/
float(nBins));
312 if ((*iME)->getNbinsX()>0) emPtn = 1.0 -
float(nBins)/float((*iME)->getNbinsX());
317 for (
map< uint32_t, vector<MonitorElement*> >::const_iterator iMEvec = mapOfdetIDtoMEs.begin();
318 iMEvec!=mapOfdetIDtoMEs.end(); iMEvec++) {
319 uint32_t theMEdetID = iMEvec->first;
320 vector<MonitorElement*> theMEvector = iMEvec->second;
323 cout << theMEdetID <<
":";
for (vector<MonitorElement*>::const_iterator iME = theMEvector.begin();
324 iME!=theMEvector.end(); iME++)
cout << (*iME)->getName() <<
",";
cout << endl;
326 for (vector<MonitorElement*>::const_iterator iME = theMEvector.begin(); iME!=theMEvector.end(); iME++) {
327 string theMEname = (*iME)->getName();
331 if (theMEname.find(
"errorType_siPixelDigis")!=string::npos) {
332 for (
int v=25;
v<40;
v++) {
333 int b = (*iME)->getTH1()->GetXaxis()->FindBin(
v);
334 performanceSummary->setRawDataErrorType(theMEdetID,
v-25, (*iME)->getBinContent(b));
339 else if (theMEdetID==77) {
340 if (theMEname.find(
"ntracks")!=string::npos && theMEname.find(
"InPixVol")==string::npos) {
341 float trkMean=0.0, trkRMS=0.0;
342 if ((*iME)->getBinContent(1)>0.0) {
343 trkMean = float((*iME)->getBinContent(3))/(*iME)->getBinContent(1);
344 trkRMS =
sqrt(trkMean*(trkMean+1.0)/(*iME)->getBinContent(1));
345 performanceSummary->setFractionOfTracks(80, trkMean, trkRMS);
347 trkMean = float((*iME)->getBinContent(4))/(*iME)->getBinContent(1);
348 trkRMS =
sqrt(trkMean*(trkMean+1.0)/(*iME)->getBinContent(1));
349 performanceSummary->setFractionOfTracks(81, trkMean, trkRMS);
353 else if (theMEdetID==78) {
354 if (theMEname.find(
"nclusters_siPixelClusters")!=string::npos) {
355 performanceSummary->setNumberOfOnTrackClusters(80, (*iME)->getBinContent(2));
356 performanceSummary->setNumberOfOnTrackClusters(81, (*iME)->getBinContent(3));
358 if (theMEname.find(
"charge_siPixelClusters_Barrel")!=string::npos) {
359 performanceSummary->setClusterChargeOnTrack(80, (*iME)->getMean(), (*iME)->getRMS());
361 if (theMEname.find(
"charge_siPixelClusters_Endcap")!=string::npos) {
362 performanceSummary->setClusterChargeOnTrack(81, (*iME)->getMean(), (*iME)->getRMS());
364 if (theMEname.find(
"size_siPixelClusters_Barrel")!=string::npos) {
365 performanceSummary->setClusterSizeOnTrack(80, (*iME)->getMean(), (*iME)->getRMS());
367 if (theMEname.find(
"size_siPixelClusters_Endcap")!=string::npos) {
368 performanceSummary->setClusterSizeOnTrack(81, (*iME)->getMean(), (*iME)->getRMS());
371 else if (theMEdetID==79) {
372 if (theMEname.find(
"nclusters_siPixelClusters")!=string::npos) {
373 performanceSummary->setNumberOfOffTrackClusters(80, (*iME)->getBinContent(2));
374 performanceSummary->setNumberOfOffTrackClusters(81, (*iME)->getBinContent(3));
376 if (theMEname.find(
"charge_siPixelClusters_Barrel")!=string::npos) {
377 performanceSummary->setClusterChargeOffTrack(80, (*iME)->getMean(), (*iME)->getRMS());
379 if (theMEname.find(
"charge_siPixelClusters_Endcap")!=string::npos) {
380 performanceSummary->setClusterChargeOffTrack(81, (*iME)->getMean(), (*iME)->getRMS());
382 if (theMEname.find(
"size_siPixelClusters_Barrel")!=string::npos) {
383 performanceSummary->setClusterSizeOffTrack(80, (*iME)->getMean(), (*iME)->getRMS());
385 if (theMEname.find(
"size_siPixelClusters_Endcap")!=string::npos) {
386 performanceSummary->setClusterSizeOffTrack(81, (*iME)->getMean(), (*iME)->getRMS());
391 if (theMEname.find(
"SUM")!=string::npos) {
393 if (theMEname.find(
"ndigis")!=string::npos && theMEname.find(
"FREQ")==string::npos) {
394 float avgMean=0.0, avgRMS=0.0, emPtn=0.0;
395 getSummaryMEmeanRMSnBins(iME, avgMean, avgRMS, emPtn);
396 performanceSummary->setNumberOfDigis(theMEdetID, avgMean, avgRMS, emPtn);
398 if (theMEname.find(
"adc")!=string::npos) {
399 float avgMean=0.0, avgRMS=0.0, emPtn=0.0;
400 getSummaryMEmeanRMSnBins(iME, avgMean, avgRMS, emPtn);
401 performanceSummary->setADC(theMEdetID, avgMean, avgRMS, emPtn);
404 if (theMEname.find(
"nclusters")!=string::npos) {
405 float avgMean=0.0, avgRMS=0.0, emPtn=0.0;
406 getSummaryMEmeanRMSnBins(iME, avgMean, avgRMS, emPtn);
407 performanceSummary->setNumberOfClusters(theMEdetID, avgMean, avgRMS, emPtn);
409 if (theMEname.find(
"charge")!=string::npos) {
410 float avgMean=0.0, avgRMS=0.0, emPtn=0.0;
411 getSummaryMEmeanRMSnBins(iME, avgMean, avgRMS, emPtn);
412 performanceSummary->setClusterCharge(theMEdetID, avgMean, avgRMS, emPtn);
414 if (theMEname.find(
"size")!=string::npos) {
415 float avgMean=0.0, avgRMS=0.0, emPtn=0.0;
416 getSummaryMEmeanRMSnBins(iME, avgMean, avgRMS, emPtn);
417 performanceSummary->setClusterSize(theMEdetID, avgMean, avgRMS, emPtn);
419 if (theMEname.find(
"sizeX")!=string::npos) {
420 float avgMean=0.0, avgRMS=0.0, emPtn=0.0;
421 getSummaryMEmeanRMSnBins(iME, avgMean, avgRMS, emPtn);
422 performanceSummary->setClusterSizeX(theMEdetID, avgMean, avgRMS, emPtn);
424 if (theMEname.find(
"sizeY")!=string::npos) {
425 float avgMean=0.0, avgRMS=0.0, emPtn=0.0;
426 getSummaryMEmeanRMSnBins(iME, avgMean, avgRMS, emPtn);
427 performanceSummary->setClusterSizeY(theMEdetID, avgMean, avgRMS, emPtn);
430 if (theMEname.find(
"nRecHits")!=string::npos) {
431 float avgMean=0.0, avgRMS=0.0, emPtn=0.0;
432 getSummaryMEmeanRMSnBins(iME, avgMean, avgRMS, emPtn);
433 performanceSummary->setNumberOfRecHits(theMEdetID, avgMean, avgRMS, emPtn);
436 if (theMEname.find(
"residualX")!=string::npos) {
437 float avgMean=0.0, avgRMS=0.0, emPtn=0.0;
438 getSummaryMEmeanRMSnBins(iME, avgMean, avgRMS, emPtn);
439 performanceSummary->setResidualX(theMEdetID, avgMean, avgRMS, emPtn);
441 if (theMEname.find(
"residualY")!=string::npos) {
442 float avgMean=0.0, avgRMS=0.0, emPtn=0.0;
443 performanceSummary->setResidualY(theMEdetID, avgMean, avgRMS, emPtn);
446 if (theMEname.find(
"OccupancyMap")!=std::string::npos) {
447 int nNoisyCells=0, nEmptyCells=0;
448 for (
int xBin=0; xBin<(*iME)->getNbinsX(); xBin++) {
450 if ((*iME)->getBinContent(xBin+1,
yBin+1)>0.01*(*iME)->getEntries()) nNoisyCells++;
451 if ((*iME)->getBinContent(xBin+1,
yBin+1)==.0 && (*iME)->getBinError(xBin+1,
yBin+1)==0.0) nEmptyCells++;
454 performanceSummary->setNumberOfNoisCells(theMEdetID,
float(nNoisyCells));
455 performanceSummary->setNumberOfDeadCells(theMEdetID,
float(nEmptyCells));
461 if (theMEname.find(
"ndigis_siPixelDigis")!=string::npos && theMEname.find(
"FREQ")==string::npos) {
462 performanceSummary->setNumberOfDigis(theMEdetID, (*iME)->getMean(), (*iME)->getRMS(), ((*iME)->getEntries()==0.0 ? 1.0:-99.9));
464 if (theMEname.find(
"adc_siPixelDigis")!=string::npos) {
465 performanceSummary->setADC(theMEdetID, (*iME)->getMean(), (*iME)->getRMS(), ((*iME)->getEntries()==0.0 ? 1.0:-99.9));
468 if (theMEname.find(
"nclusters_siPixelClusters")!=string::npos) {
469 performanceSummary->setNumberOfClusters(theMEdetID, (*iME)->getMean(), (*iME)->getRMS(), ((*iME)->getEntries()==0.0 ? 1.0:-99.9));
471 if (theMEname.find(
"charge_siPixelClusters")!=string::npos) {
472 performanceSummary->setClusterCharge(theMEdetID, (*iME)->getMean(), (*iME)->getRMS(), ((*iME)->getEntries()==0.0 ? 1.0:-99.9));
474 if (theMEname.find(
"size_siPixelClusters")!=string::npos) {
475 performanceSummary->setClusterSize(theMEdetID, (*iME)->getMean(), (*iME)->getRMS(), ((*iME)->getEntries()==0.0 ? 1.0:-99.9));
477 if (theMEname.find(
"sizeX_siPixelClusters")!=string::npos) {
478 performanceSummary->setClusterSizeX(theMEdetID, (*iME)->getMean(), (*iME)->getRMS(), ((*iME)->getEntries()==0.0 ? 1.0:-99.9));
480 if (theMEname.find(
"sizeY_siPixelClusters")!=string::npos) {
481 performanceSummary->setClusterSizeY(theMEdetID, (*iME)->getMean(), (*iME)->getRMS(), ((*iME)->getEntries()==0.0 ? 1.0:-99.9));
484 if (theMEname.find(
"nRecHits_siPixelRecHits")!=string::npos) {
485 performanceSummary->setNumberOfRecHits(theMEdetID, (*iME)->getMean(), (*iME)->getRMS(), ((*iME)->getEntries()==0.0 ? 1.0:-99.9));
488 if (theMEname.find(
"residualX_siPixelTrackResiduals")!=string::npos) {
489 performanceSummary->setResidualX(theMEdetID, (*iME)->getMean(), (*iME)->getRMS(), ((*iME)->getEntries()==0.0 ? 1.0:-99.9));
491 if (theMEname.find(
"residualY_siPixelTrackResiduals")!=string::npos) {
492 performanceSummary->setResidualY(theMEdetID, (*iME)->getMean(), (*iME)->getRMS(), ((*iME)->getEntries()==0.0 ? 1.0:-99.9));
498 if (theMEname.find(
"ndigis_siPixelDigis")!=string::npos && theMEname.find(
"FREQ")==string::npos) {
499 performanceSummary->setNumberOfDigis(theMEdetID, (*iME)->getMean(), (*iME)->getRMS(), ((*iME)->getEntries()==0.0 ? 1.0:0.0));
501 if (theMEname.find(
"adc_siPixelDigis")!=string::npos) {
502 performanceSummary->setADC(theMEdetID, (*iME)->getMean(), (*iME)->getRMS(), ((*iME)->getEntries()==0.0 ? 1.0:0.0));
505 if (theMEname.find(
"nclusters_siPixelClusters")!=string::npos) {
506 performanceSummary->setNumberOfClusters(theMEdetID, (*iME)->getMean(), (*iME)->getRMS(), ((*iME)->getEntries()==0.0 ? 1.0:0.0));
508 if (theMEname.find(
"charge_siPixelClusters")!=string::npos) {
509 performanceSummary->setClusterCharge(theMEdetID, (*iME)->getMean(), (*iME)->getRMS(), ((*iME)->getEntries()==0.0 ? 1.0:0.0));
511 if (theMEname.find(
"size_siPixelClusters")!=string::npos) {
512 performanceSummary->setClusterSize(theMEdetID, (*iME)->getMean(), (*iME)->getRMS(), ((*iME)->getEntries()==0.0 ? 1.0:0.0));
514 if (theMEname.find(
"sizeX_siPixelClusters")!=string::npos) {
515 performanceSummary->setClusterSizeX(theMEdetID, (*iME)->getMean(), (*iME)->getRMS(), ((*iME)->getEntries()==0.0 ? 1.0:0.0));
517 if (theMEname.find(
"sizeY_siPixelClusters")!=string::npos) {
518 performanceSummary->setClusterSizeY(theMEdetID, (*iME)->getMean(), (*iME)->getRMS(), ((*iME)->getEntries()==0.0 ? 1.0:0.0));
521 if (theMEname.find(
"nRecHits_siPixelRecHits")!=string::npos) {
522 performanceSummary->setNumberOfRecHits(theMEdetID, (*iME)->getMean(), (*iME)->getRMS(), ((*iME)->getEntries()==0.0 ? 1.0:0.0));
525 if (theMEname.find(
"residualX_siPixelTrackResiduals")!=string::npos) {
526 performanceSummary->setResidualX(theMEdetID, (*iME)->getMean(), (*iME)->getRMS(), ((*iME)->getEntries()==0.0 ? 1.0:0.0));
528 if (theMEname.find(
"residualY_siPixelTrackResiduals")!=string::npos) {
529 performanceSummary->setResidualY(theMEdetID, (*iME)->getMean(), (*iME)->getRMS(), ((*iME)->getEntries()==0.0 ? 1.0:0.0));
532 if (theMEname.find(
"hitmap_siPixelClusters")!=std::string::npos ||
533 theMEname.find(
"hitmap_siPixelDigis")!=std::string::npos) {
534 int nNoisyCells=0, nEmptyCells=0;
535 for (
int xBin=0; xBin<(*iME)->getNbinsX(); xBin++) {
537 if ((*iME)->getBinContent(xBin+1,
yBin+1)>0.01*(*iME)->getEntries()) nNoisyCells++;
538 if ((*iME)->getBinContent(xBin+1,
yBin+1)==.0 && (*iME)->getBinError(xBin+1,
yBin+1)==0.0) nEmptyCells++;
541 performanceSummary->setNumberOfNoisCells(theMEdetID,
float(nNoisyCells));
542 performanceSummary->setNumberOfDeadCells(theMEdetID,
float(nEmptyCells));
553 if (printDebug_) performanceSummary->printAll();
554 else performanceSummary->print();
555 cout <<
"SiPixelHistoricInfoDQMClient::writeDB()" << endl;
563 "SiPixelPerformanceSummaryRcd");
568 "SiPixelPerformanceSummaryRcd");
571 else LogError(
"writeDB") <<
"service unavailable" << endl;
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
void endRun(const edm::Run &, const edm::EventSetup &)
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=false)
void fillPerformanceSummary() const
bool isNewTagRequest(const std::string &recordName)
cond::Time_t beginOfTime() const
void getSummaryMEmeanRMSnBins(std::vector< MonitorElement * >::const_iterator, float &, float &, float &) const
std::vector< std::string > vstring
uint32_t getSummaryRegionID(std::string) const
double getFloatValue(void) const
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")
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
std::vector< MonitorElement * > getContents(const std::string &path) const
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
SiPixelHistoricInfoDQMClient(const edm::ParameterSet &)
int64_t getIntValue(void) const
cond::Time_t endOfTime() const
char data[epos_bytes_allocation]
cond::Time_t currentTime() const
bool open(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
Power< A, B >::type pow(const A &a, const B &b)
ParameterSet const & parameterSet(Provenance const &provenance)