44 #include "TPaveText.h"
45 #include "TImageDump.h"
47 #include "TStopwatch.h"
49 #include "TPaveLabel.h"
70 " Creating SiPixelInformationExtractor " <<
"\n" ;
83 " Deleting SiPixelInformationExtractor " <<
"\n" ;
98 const multimap<string, string>& req_map,
101 vector<string> hlist;
104 uint32_t detId = atoi(
getItemValue(req_map,
"ModId").c_str());
107 int height = atoi(
getItemValue(req_map,
"height").c_str());
115 if((bei->
pwd()).
find(
"Module_") == string::npos &&
116 (bei->
pwd()).
find(
"FED_") == string::npos){
117 cout<<
"This is not a pixel module or FED!"<<endl;
121 vector<MonitorElement*> all_mes = bei->
getContents(path);
126 for (vector<string>::const_iterator ih = hlist.begin();
127 ih != hlist.end(); ih++) {
128 for (vector<MonitorElement *>::const_iterator it = all_mes.begin();
129 it!= all_mes.end(); it++) {
134 if(theME.find(
"siPixel")!=string::npos || theME.find(
"ctfWithMaterialTracks")!=string::npos) { temp_s = theME.substr(0,theME.find_first_of(
"_")); }
136 if (temp_s == (*ih)) {
137 string full_path = path +
"/" + me->
getName();
149 const std::multimap<std::string, std::string>& req_map,
155 vector<string> hlist;
159 if(
offlineXMLfile_) localPath = string(
"DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
160 else localPath = string(
"DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
167 <<
"[SiPixelInformationExtractor::getTrackerMapHistos] "
169 <<
"getMENamesForTrackerMap return false "
170 <<
ACPlain << endl ; assert(0) ;
173 if (hlist.size() == 0)
176 <<
"[SiPixelInformationExtractor::getTrackerMapHistos] "
178 <<
"hlist.size() == 0 "
179 <<
ACPlain << endl ; assert(0) ;
184 uint32_t detId = atoi(
getItemValue(req_map,
"ModId").c_str());
187 int height = atoi(
getItemValue(req_map,
"height").c_str());
195 string currDir = bei->
pwd();
210 vector<MonitorElement*> all_mes = bei->
getContents(path);
221 *out <<
"<pathList>" << endl ;
222 for (vector<string>::iterator ih = hlist.begin();
223 ih != hlist.end(); ih++) {
225 for (vector<MonitorElement *>::const_iterator it = all_mes.begin();
226 it!= all_mes.end(); it++) {
231 <<
" [SiPixelInformationExtractor::getTrackerMapHistos()] skipping "
238 if(theME.find(
"siPixel")!=string::npos || theME.find(
"ctfWithMaterialTracks")!=string::npos) { temp_s = theME.substr(0,theME.find_first_of(
"_")); }
242 if (temp_s == (*ih)) {
243 string full_path = path +
"/" + me->
getName();
248 *out <<
" <pathElement path='" << full_path <<
"' />" << endl ;
252 *out <<
"</pathList>" << endl ;
262 if( qtype.find(
"TH1") != string::npos )
265 }
else if ( qtype.find(
"TH2") != string::npos ) {
267 }
else if ( qtype.find(
"TH3") != string::npos ) {
282 std::map<std::string,std::string> hnames;
283 std::vector<std::string> mod_names;
285 out->getHTTPResponseHeader().addHeader(
"Content-Type",
"text/xml");
286 *out <<
"<?xml version=\"1.0\" ?>" << std::endl;
287 *out <<
"<ModuleAndHistoList>" << endl;
288 *out <<
"<ModuleList>" << endl;
289 for (std::vector<std::string>::iterator im = mod_names.begin();
290 im != mod_names.end(); im++) {
291 *out <<
"<ModuleNum>" << *im <<
"</ModuleNum>" << endl;
293 *out <<
"</ModuleList>" << endl;
294 *out <<
"<HistoList>" << endl;
296 for (std::map<std::string,std::string>::iterator ih = hnames.begin();
297 ih != hnames.end(); ih++) {
298 *out <<
"<Histo type=\""
305 *out <<
"</HistoList>" << endl;
306 *out <<
"</ModuleAndHistoList>" << endl;
316 vector<string> & modules,
317 map<string,string> &
histos) {
319 string currDir = bei->
pwd();
321 if(currDir.find(
"Module_") != string::npos){
322 if(histos.size() == 0){
323 vector<string> contents = bei->
getMEs();
324 for (vector<string>::const_iterator it = contents.begin(); it != contents.end(); it++) {
325 string hname = (*it).substr(0, (*it).find(
"_siPixel"));
326 if(hname==
" ") hname = (*it).substr(0, (*it).find(
"_generalTracks"));
327 string fullpathname = bei->
pwd() +
"/" + (*it);
330 string htype =
"undefined" ;
334 histos[hname] = htype ;
336 if(hname.find(
"ndigis") !=string::npos) mId = (*it).substr((*it).find(
"ndigis_siPixelDigis_")+20, 9);
337 if(mId==
" " && hname.find(
"nclusters") !=string::npos) mId = (*it).substr((*it).find(
"nclusters_siPixelClusters_")+26, 9);
338 if(mId==
" " && hname.find(
"residualX") !=string::npos) mId = (*it).substr((*it).find(
"residualX_ctfWithMaterialTracks_")+32, 9);
339 if(mId==
" " && hname.find(
"NErrors") !=string::npos) mId = (*it).substr((*it).find(
"NErrors_siPixelDigis_")+21, 9);
340 if(mId==
" " && hname.find(
"ClustX") !=string::npos) mId = (*it).substr((*it).find(
"ClustX_siPixelRecHit_")+21, 9);
341 if(mId==
" " && hname.find(
"pixelAlive") !=string::npos) mId = (*it).substr((*it).find(
"pixelAlive_siPixelCalibDigis_")+29, 9);
342 if(mId==
" " && hname.find(
"Gain1d") !=string::npos) mId = (*it).substr((*it).find(
"Gain1d_siPixelCalibDigis_")+25, 9);
343 if(mId!=
" ") modules.push_back(mId);
350 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
351 if((bei->
pwd()).
find(
"Barrel")==string::npos && (bei->
pwd()).
find(
"Endcap")==string::npos) bei->
goUp();
370 ostringstream modtree;
372 modtree <<
"<form name=\"IMGCanvasItemsSelection\" "
373 <<
"action=\"javascript:void%200\">"
375 modtree <<
"<ul id=\"dhtmlgoodies_tree\" class=\"dhtmlgoodies_tree\">" << endl;
377 modtree <<
"</ul>" << endl;
378 modtree <<
"</form>" << endl;
380 modtree <<
"Desired Directory does not exist";
383 <<
"[SiPixelInformationExtractor::readModuleHistoTree()]"
391 out->getHTTPResponseHeader().addHeader(
"Content-Type",
"text/plain");
392 *out << modtree.str();
403 ostringstream& str_val){
405 static string indent_str =
"";
406 string currDir = bei->
pwd();
407 string dname = currDir.substr(currDir.find_last_of(
"/")+1);
409 <<
" <a href=\"#\" id=\"" << currDir <<
"\">\n "
414 vector<string> meVec = bei->
getMEs();
417 if ( meVec.size()== 0 && subDirVec.size() == 0 ) {
418 str_val <<
" </li>" << endl;
421 str_val <<
"\n <ul>" << endl;
422 for (vector<string>::const_iterator it = meVec.begin();
423 it != meVec.end(); it++) {
424 if ((*it).find(
"_siPixel")!=string::npos ||
425 (*it).find(
"_ctfWithMaterialTracks")!=string::npos) {
428 if(qit.find(
"siPixel")!=string::npos || qit.find(
"ctfWithMaterialTracks")!=string::npos) { temp_s = qit.substr(0,qit.find_first_of(
"_")); }
429 str_val <<
" <li class=\"dhtmlgoodies_sheet.gif\">\n"
430 <<
" <input id = \"selectedME\""
431 <<
" folder = \"" << currDir <<
"\""
432 <<
" type = \"checkbox\""
433 <<
" name = \"selected\""
434 <<
" class = \"smallCheckBox\""
435 <<
" value = \"" << (*it) <<
"\""
436 <<
" onclick = \"javascript:IMGC.selectedIMGCItems()\" />\n"
438 <<
" <a href=\"javascript:IMGC.plotFromPath('" << currDir <<
"')\">\n "
446 for (vector<string>::const_iterator ic = subDirVec.begin();
447 ic != subDirVec.end(); ic++) {
452 str_val <<
" </ul>" << endl;
453 str_val <<
" </li>" << endl;
466 ostringstream sumtree;
468 sumtree <<
"<ul id=\"dhtmlgoodies_tree\" class=\"dhtmlgoodies_tree\">" << endl;
470 sumtree <<
"</ul>" << endl;
472 sumtree <<
"Desired Directory does not exist";
475 <<
"[SiPixelInformationExtractor::readSummaryHistoTree()]"
483 out->getHTTPResponseHeader().addHeader(
"Content-Type",
"text/plain");
484 *out << sumtree.str();
496 ostringstream& str_val){
498 static string indent_str =
"";
499 string currDir = bei->
pwd();
500 string dname = currDir.substr(currDir.find_last_of(
"/")+1);
501 if (dname.find(
"Module_") ==0 || dname.find(
"FED_")==0)
return;
503 <<
" <a href=\"#\" id=\"" << currDir <<
"\">\n "
508 vector<string> meVec = bei->
getMEs();
511 if ( meVec.size()== 0 && subDirVec.size() == 0 ) {
512 str_val <<
" </li> "<< endl;
515 str_val <<
"\n <ul>" << endl;
516 for (vector<string>::const_iterator it = meVec.begin();
517 it != meVec.end(); it++) {
518 if ((*it).find(
"SUM") == 0) {
519 str_val <<
" <li class=\"dhtmlgoodies_sheet.gif\">\n"
520 <<
" <input id = \"selectedME\""
521 <<
" folder = \"" << currDir <<
"\""
522 <<
" type = \"checkbox\""
523 <<
" name = \"selected\""
524 <<
" class = \"smallCheckBox\""
525 <<
" value = \"" << (*it) <<
"\""
526 <<
" onclick = \"javascript:IMGC.selectedIMGCItems()\" />\n"
528 <<
" <a href=\"javascript:IMGC.plotFromPath('" << currDir <<
"')\">\n "
536 for (vector<string>::const_iterator ic = subDirVec.begin();
537 ic != subDirVec.end(); ic++) {
542 str_val <<
" </ul> "<< endl;
543 str_val <<
" </li> "<< endl;
557 ostringstream alarmtree;
559 alarmtree <<
"<ul id=\"dhtmlgoodies_tree\" class=\"dhtmlgoodies_tree\">" << endl;
562 if(
alarmCounter_==0) alarmtree <<
"<li>No problematic modules found, all ok!</li>" << endl;
563 alarmtree <<
"</ul>" << endl;
565 alarmtree <<
"Desired Directory does not exist";
568 <<
"[SiPixelInformationExtractor::readAlarmTree()]"
576 out->getHTTPResponseHeader().addHeader(
"Content-Type",
"text/plain");
577 *out << alarmtree.str();
580 <<
"[SiPixelInformationExtractor::readAlarmTree()]"
594 ostringstream& str_val){
601 static string indent_str =
"";
602 string currDir = bei->
pwd();
603 string dname = currDir.substr(currDir.find_last_of(
"/")+1);
606 if(image_name!=
"images/LI_green.gif")
608 <<
" <a href=\"#\" id=\"" << currDir <<
"\">\n "
616 vector<string> meVec = bei->
getMEs();
618 if (subDirVec.size() == 0 && meVec.size() == 0) {
619 str_val <<
"</li> "<< endl;
622 str_val <<
"<ul>" << endl;
623 for (vector<string>::const_iterator it = meVec.begin();
624 it != meVec.end(); it++) {
625 string full_path = currDir +
"/" + (*it);
631 if (my_map.size() > 0) {
634 if(image_name1!=
"images/LI_green.gif") {
636 str_val <<
" <li class=\"dhtmlgoodies_sheet.gif\">\n"
637 <<
" <input id = \"selectedME\""
638 <<
" folder = \"" << currDir <<
"\""
639 <<
" type = \"checkbox\""
640 <<
" name = \"selected\""
641 <<
" class = \"smallCheckBox\""
642 <<
" value = \"" << (*it) <<
"\""
643 <<
" onclick = \"javascript:IMGC.selectedIMGCItems()\" />\n"
645 <<
" <a href=\"javascript:IMGC.plotFromPath('" << currDir <<
"')\">\n "
656 for (vector<string>::const_iterator ic = subDirVec.begin();
657 ic != subDirVec.end(); ic++) {
662 str_val <<
"</ul> "<< endl;
663 str_val <<
"</li> "<< endl;
680 vector<string>& items) {
683 for (multimap<string, string>::const_iterator it = req_map.begin();
684 it != req_map.end(); it++) {
685 if (it->first == item_name) {
686 items.push_back(it->second);
700 multimap<string,string>::iterator
pos = req_map.find(item_name);
701 if (pos != req_map.end())
return true;
712 std::string item_name){
714 std::multimap<std::string,std::string>::const_iterator
pos = req_map.find(item_name);
715 std::string
value =
" ";
716 if (pos != req_map.end()) {
724 std::string item_name){
726 std::multimap<std::string,std::string>::iterator
pos = req_map.find(item_name);
727 std::string
value =
" ";
728 if (pos != req_map.end()) {
745 else col =
"#0000ff";
753 for (vector<QReport*>::const_iterator it = reports.begin(); it != reports.end();
755 status = (*it)->getStatus();
756 if (status > istat) istat =
status;
768 else name=
"images/LI_blue.gif";
776 for (vector<QReport*>::const_iterator it = reports.begin(); it != reports.end();
778 status = (*it)->getStatus();
779 if (status > istat) istat =
status;
793 out->getHTTPResponseHeader().addHeader(
"Content-Type",
"image/png");
794 out->getHTTPResponseHeader().addHeader(
"Pragma",
"no-cache");
795 out->getHTTPResponseHeader().addHeader(
"Cache-Control",
"no-store, no-cache, must-revalidate,max-age=0");
796 out->getHTTPResponseHeader().addHeader(
"Expires",
"Mon, 26 Jul 1997 05:00:00 GMT");
807 out->getHTTPResponseHeader().addHeader(
"Content-Type",
"image/png");
808 out->getHTTPResponseHeader().addHeader(
"Pragma",
"no-cache");
809 out->getHTTPResponseHeader().addHeader(
"Cache-Control",
"no-store, no-cache, must-revalidate,max-age=0");
810 out->getHTTPResponseHeader().addHeader(
"Expires",
"Mon, 26 Jul 1997 05:00:00 GMT");
828 if (dirName.find(sname) != string::npos)
return true;
837 std::multimap<std::string, std::string>& req_map,
843 int height = atoi(
getItemValue(req_map,
"height").c_str());
847 ostringstream test_status;
850 *out <<
"<StatusAndPath>" << endl;
851 *out <<
"<PathList>" << endl;
852 if (path.size() == 0) {
853 *out <<
"<HPath>" <<
"NONE" <<
"</HPath>" << endl;
854 test_status <<
" ME Does not exist ! " << endl;
856 vector<MonitorElement*> all_mes = bei->
getContents(path);
857 *out <<
"<HPath>" << path <<
"</HPath>" << endl;
858 for(vector<MonitorElement*>::iterator it=all_mes.begin(); it!=all_mes.end(); it++){
864 if (q_reports.size() == 0)
continue;
865 string full_path = path +
"/" +
name;
868 if (q_reports.size() != 0) {
869 test_status <<
" QTest Status for " << name <<
" : " << endl;
870 test_status <<
" ======================================================== " << endl;
871 for (vector<QReport*>::const_iterator it = q_reports.begin(); it != q_reports.end();
873 int status = (*it)->getStatus();
878 string mess_str = (*it)->getMessage();
879 test_status <<
"<br/>";
880 mess_str = mess_str.substr(mess_str.find(
" Test")+5);
881 test_status <<
" QTest Name : " << mess_str.substr(0, mess_str.find(
")")+1) << endl;
882 test_status <<
"<br/>";
883 test_status <<
" QTest Detail : " << mess_str.substr(mess_str.find(
")")+2) << endl;
885 test_status <<
" ======================================================== " << endl;
887 *out <<
"<HPath>" << name <<
"</HPath>" << endl;
890 *out <<
"</PathList>" << endl;
891 *out <<
"<StatusList>" << endl;
892 *out <<
"<Status>" << test_status.str() <<
"</Status>" << endl;
893 *out <<
"</StatusList>" << endl;
894 *out <<
"</StatusAndPath>" << endl;
903 pair<double,double> &
norm)
905 double normalizationX = 1 ;
906 double normalizationY = 1 ;
912 pair<double,double> normX ;
913 pair<double,double> normY ;
924 if( theMEType.find(
"TH1") != string::npos)
926 meanX = (double)theME->
getMean();
928 normalizationX = fabs( normX.second - normX.first) ;
929 if( normalizationX == 0 ) {normalizationX=1.E-20;}
930 colorValue = meanX / normalizationX ;
931 norm.first = normX.first ;
932 norm.second = normX.second ;
935 if( theMEType.find(
"TH2") != string::npos)
937 meanX = (double)theME->
getMean(1);
938 meanY = (double)theME->
getMean(2);
940 normalizationX = fabs( normX.second - normX.first) ;
941 normalizationY = fabs( normY.second - normY.first) ;
942 if( normalizationX == 0 ) {normalizationX=1.E-20;}
943 if( normalizationY == 0 ) {normalizationY=1.E-20;}
944 double cVX = meanX / normalizationX ;
945 double cVY = meanY / normalizationY ;
946 colorValue =
sqrt(cVX*cVX + cVY*cVY) ;
947 if( normalizationX >= normalizationY )
949 norm.first = normX.first;
950 norm.second = normX.second ;
952 norm.first = normY.first;
953 norm.second = normY.second ;
974 pair<double,double>&
norm,
975 std::string theMEType)
978 double normHigh = 0 ;
980 if( theMEType.find(
"TH1") != string::npos)
983 norm.first = normLow ;
984 norm.second = normHigh ;
993 pair<double,double>& normX,
994 pair<double,double>& normY,
995 std::string theMEType)
998 double normHigh = 0 ;
1000 if( theMEType.find(
"TH2") != string::npos )
1003 normX.first = normLow ;
1004 normX.second = normHigh ;
1006 normY.first = normLow ;
1007 normY.second = normHigh ;
1027 vector<MonitorElement*> & mes)
1030 string currDir = bei->
pwd();
1035 if (currDir.find(
"Module_") != string::npos ||
1036 currDir.find(
"FED_") != string::npos)
1038 vector<string> contents = bei->
getMEs();
1040 for (vector<string>::const_iterator it = contents.begin(); it != contents.end(); it++)
1043 if(theME.find(
"siPixel")==string::npos && theME.find(
"ctfWithMaterialTracks")==string::npos) {continue ;}
1044 string temp_s = theME.substr(0,theME.find_first_of(
"_"));
1046 if (temp_s == theMEName)
1048 string full_path = currDir +
"/" + (*it);
1052 if (me) {mes.push_back(me);}
1058 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++)
1073 std::string & theMEName,
1074 std::string & theTKType)
1077 int rval, gval, bval;
1078 vector<string> colorMap ;
1079 vector<MonitorElement*> me_list;
1080 pair<double,double>
norm ;
1087 string detId =
"undefined";
1101 if( theTKType ==
"Entries")
1103 for(vector<MonitorElement*>::iterator it=me_list.begin(); it!=me_list.end(); it++)
1105 int entries = (int)(*it)->getEntries() ;
1106 if( entries > maxEntries ) maxEntries =
entries ;
1111 stringstream jsSnippet ;
1112 for(vector<MonitorElement*>::iterator it=me_list.begin(); it!=me_list.end(); it++)
1114 string meName = (*it)->getName();
1116 if( meName.find(
"_3") != string::npos )
1118 string detIdString = meName.substr(meName.find_last_of(
"_")+1,9);
1119 std::istringstream isst;
1120 isst.str(detIdString);
1122 entries = (int)(*it)->getEntries() ;
1123 if( theTKType ==
"Averages")
1127 }
else if( theTKType ==
"Entries") {
1130 if( entries > maxEntries ) maxEntries =
entries ;
1137 rval = 255; gval = 0; bval = 0;
1139 rval = 255; gval = 255; bval = 0;
1141 rval = 0; gval = 0; bval = 255;
1143 rval = 0; gval = 255; bval = 0;
1145 rval = 255; gval = 255; bval = 255;
1149 jsSnippet <<
" <DetInfo DetId='"
1160 colorMap.push_back(jsSnippet.str()) ;
1178 out->getHTTPResponseHeader().addHeader(
"Content-Type",
"text/xml");
1179 *out <<
"<?xml version=\"1.0\" ?>" << endl;
1180 *out <<
"<TrackerMapUpdate>" << endl;
1182 for(vector<string>::iterator it=colorMap.begin(); it!=colorMap.end(); it++)
1184 *out << *it << endl;
1187 *out <<
" <theLimits id=\"normalizationLimits\" normLow=\""
1193 *out <<
"</TrackerMapUpdate>"
1215 string mEName = mE->
getName();
1219 if( mEName.find(
"_3") != string::npos )
1221 string detIdString = mEName.substr((mEName.find_last_of(
"_"))+1,9);
1223 std::istringstream isst;
1224 isst.str(detIdString);
1244 map<string, int> & mEHash)
1246 string currDir = bei->
pwd();
1258 if (currDir.find(
"Module_") != string::npos ||
1259 currDir.find(
"FED_") != string::npos)
1261 vector<string> contents = bei->
getMEs();
1263 for (vector<string>::const_iterator it = contents.begin(); it != contents.end(); it++)
1272 if(theME.find(
"siPixel")==string::npos && theME.find(
"ctfWithMaterialTracks")==string::npos)
1275 <<
"[SiPixelInformationExtractor::getMEList()]"
1277 <<
" ----> Skipping "
1282 string full_path = currDir +
"/" + (*it);
1283 string mEName = theME.substr(0,theME.find_first_of(
"_"));
1290 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++)
1303 const std::multimap<std::string, std::string>& req_map,
1308 if (path.size() == 0)
return;
1311 int height = atoi(
getItemValue(req_map,
"height").c_str());
1316 vector<MonitorElement*> all_mes = bei->
getContents(path);
1317 *out << path <<
" " ;
1318 for(vector<MonitorElement*>::iterator it=all_mes.begin(); it!=all_mes.end(); it++){
1323 string full_path = path +
"/" +
name;
1326 *out << name <<
" ";
1363 nevents_ = (bei->
get(
"Pixel/EventInfo/processedEvents"))->getIntValue();
1366 myfile_.open (
"NoisyPixelList.txt", ios::app);
1367 myfile_ <<
"Noise summary, ran over " <<
nevents_ <<
" events, threshold was set to " << noiseRate_ << std::endl;
1369 string currDir = bei->
pwd();
1370 string dname = currDir.substr(currDir.find_last_of(
"/")+1);
1373 if(dname.find(
"Module_")!=string::npos){
1374 vector<string> meVec = bei->
getMEs();
1375 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
1376 string full_path = currDir +
"/" + (*it);
1377 if(full_path.find(
"hitmap_siPixelDigis")!=string::npos){
1400 std::vector<std::pair<std::pair<int, int>,
float> > noisyPixelsInModule;
1401 TH2F * hothisto = me->
getTH2F();
1403 for(
int i=1;
i!=hothisto->GetNbinsX()+1;
i++){
1404 for(
int j=1;
j!=hothisto->GetNbinsY()+1;
j++){
1406 if(me->
getPathname().find(
"Barrel")!=string::npos){
1409 }
else if(me->
getPathname().find(
"Endcap")!=string::npos){
1413 if(value > noiseRate_){
1418 std::pair<int, int>
address(pixcol, pixrow);
1419 std::pair<std::pair<int, int>,
float> PixelStats(address, value);
1420 noisyPixelsInModule.push_back(PixelStats);
1430 vector<string> subDirVec = bei->
getSubdirs();
1431 for (vector<string>::const_iterator ic = subDirVec.begin();
1432 ic != subDirVec.end(); ic++) {
1433 if((*ic).find(
"AdditionalPixelErrors")!=string::npos)
continue;
1444 if(currDir ==
"Pixel/EventInfo/reportSummaryContents"){
1446 std::vector<std::pair<sipixelobjects::DetectorIndex,double> > pixelvec;
1447 std::map<uint32_t,int> myfedmap;
1448 std::map<uint32_t,std::string> mynamemap;
1453 int n_noisyrocs_all = 0;
1454 int n_noisyrocs_barrel = 0;
1455 int n_noisyrocs_endcap = 0;
1456 int n_verynoisyrocs_all = 0;
1457 int n_verynoisyrocs_barrel = 0;
1458 int n_verynoisyrocs_endcap = 0;
1461 for(
std::map<uint32_t, std::vector< std::pair<std::pair<int, int>,
float> > >::const_iterator it =
noisyDetIds_.begin();
1463 uint32_t
detid = (*it).first;
1464 std::vector< std::pair<std::pair<int, int>,
float> > noisyPixels = (*it).second;
1467 for(
int fedid=0; fedid<=40; ++fedid){
1469 uint32_t newDetId =
detid;
1470 if(converter.hasDetUnit(newDetId)){
1475 if(
fid == realfedID){
1477 if(realfedID==-1)
continue;
1479 uint32_t detSubId = detId.
subdetId();
1480 std::string outputname;
1481 bool HalfModule =
false;
1484 outputname = nameworker.
name();
1485 }
else if(detSubId == 1){
1487 outputname = nameworker.
name();
1493 std::map<int,int> myrocmap;
1494 myfedmap[
detid]=realfedID;
1495 mynamemap[
detid]=outputname;
1497 for(std::vector< std::pair< std::pair<int,int>,
float> >::const_iterator pxl = noisyPixels.begin();
1498 pxl != noisyPixels.end(); pxl++){
1499 std::pair<int,int> offlineaddress = (*pxl).first;
1500 float Noise_frac = (*pxl).second;
1501 int offlineColumn = offlineaddress.first;
1502 int offlineRow = offlineaddress.second;
1509 formatter.toCabling(cabling,detector);
1533 int onlineColumn = locpixel.
rocCol();
1534 int onlineRow= locpixel.
rocRow();
1543 if((detSubId == 1) && (outputname.find(
"mO")!=string::npos || outputname.find(
"mI")!=string::npos) && (HalfModule)){
1551 myfile_ <<
"NAME: "<<outputname<<
" , DETID: "<<detid<<
" , OFFLINE: col,row: "<<offlineColumn<<
","<<offlineRow<<
" \t , ONLINE: roc,col,row: "<<rocnumber<<
","<<onlineColumn<<
","<<onlineRow<<
" \t , fed,dcol,pixid,link: "<<realfedID<<
","<<loc.
dcol<<
","<<loc.
pxid<<
","<<cabling.
link <<
", Noise fraction: " << Noise_frac << std::endl;
1553 for(std::map<int, int>::const_iterator nrc = myrocmap.begin(); nrc != myrocmap.end(); nrc++){
1554 if((*nrc).second > 0){
1557 n_noisyrocs_endcap++;
1558 }
else if(detSubId == 1){
1559 n_noisyrocs_barrel++;}
1561 if((*nrc).second > 40){
1562 n_verynoisyrocs_all++;
1564 n_verynoisyrocs_endcap++;
1565 }
else if(detSubId == 1){
1566 n_verynoisyrocs_barrel++;}
1573 myfile_ <<
"There are " << n_noisyrocs_all <<
" noisy ROCs (ROCs with at least 1 noisy pixel) in the entire detector. " << n_noisyrocs_endcap <<
" are in the FPIX and " << n_noisyrocs_barrel <<
" are in the BPIX. " << endl;
1574 myfile_ <<
"There are " << n_verynoisyrocs_all <<
" highly noisy ROCs (ROCs with at least 10% of all pixels passing the noise threshold) in the entire detector. " << n_verynoisyrocs_endcap <<
" are in the FPIX and " << n_verynoisyrocs_barrel <<
" are in the BPIX. " << endl;
1594 out->getHTTPResponseHeader().addHeader(
"Content-Type",
"text/html");
1595 out->getHTTPResponseHeader().addHeader(
"Pragma",
"no-cache");
1596 out->getHTTPResponseHeader().addHeader(
"Cache-Control",
"no-store, no-cache, must-revalidate,max-age=0");
1597 out->getHTTPResponseHeader().addHeader(
"Expires",
"Mon, 26 Jul 1997 05:00:00 GMT");
1603 out->getHTTPResponseHeader().addHeader(
"Content-Type",
"text/xml");
1604 out->getHTTPResponseHeader().addHeader(
"Pragma",
"no-cache");
1605 out->getHTTPResponseHeader().addHeader(
"Cache-Control",
"no-store, no-cache, must-revalidate,max-age=0");
1606 out->getHTTPResponseHeader().addHeader(
"Expires",
"Mon, 26 Jul 1997 05:00:00 GMT");
1607 *out <<
"<?xml version=\"1.0\" ?>" << std::endl;
1614 out->getHTTPResponseHeader().addHeader(
"Content-Type",
"text/plain");
1615 out->getHTTPResponseHeader().addHeader(
"Pragma",
"no-cache");
1616 out->getHTTPResponseHeader().addHeader(
"Cache-Control",
"no-store, no-cache, must-revalidate,max-age=0");
1617 out->getHTTPResponseHeader().addHeader(
"Expires",
"Mon, 26 Jul 1997 05:00:00 GMT");
const std::string & getName(void) const
get name of ME
int getStatus(const std::string &path="") const
std::vector< std::string > getSubdirs(void) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void getDocument(std::string configFile, bool UseDB=false)
Methor that parses the xml file configFile.
void cd(void)
go to top directory (ie. root)
const unsigned int maxEntries
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
identify pixel inside single ROC
void getNamedImageBuffer(const std::string &path, std::string &image)
int getNbinsY(void) const
get # of bins in Y-axis
static int getStatus(MonitorElement *me)
const std::string & getPathname(void) const
get pathname of parent folder
bool isHalfModule() const
full or half module
static void getStatusColor(int status, int &rval, int &gval, int &bval)
bool getMENamesForTrackerMap(std::string &tkmap_name, std::vector< std::string > &me_names)
unsigned int idInDetUnit() const
id of this ROC in DetUnit etermined by token path
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
std::vector< MonitorElement * > getContents(const std::string &path) const
double collumn and pixel ID in double collumn representation
unsigned long long int rval
void createPlots(DQMStore *bei)
void getModuleFolder(const uint32_t &rawdetid, std::string &path)
TObject * getRootObject(void) const
virtual std::string name() const
from base class
std::vector< QReport * > getQReports(void) const
get map of QReports
T const * product() const
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
virtual std::string name() const
from base class
int getNbinsX(void) const
get # of bins in X-axis
void goUp(void)
equivalent to "cd .."
static const int STATUS_OK
void setNewPlot(std::string &path, std::string &option, int width, int height)
TH2F * getTH2F(void) const
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
const std::string & pwd(void) const