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){
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 string currDir = bei->
pwd();
406 string dname = currDir.substr(currDir.find_last_of(
"/")+1);
408 <<
" <a href=\"#\" id=\"" << currDir <<
"\">\n "
413 vector<string> meVec = bei->
getMEs();
416 if ( meVec.size()== 0 && subDirVec.size() == 0 ) {
417 str_val <<
" </li>" << endl;
420 str_val <<
"\n <ul>" << endl;
421 for (vector<string>::const_iterator it = meVec.begin();
422 it != meVec.end(); it++) {
423 if ((*it).find(
"_siPixel")!=string::npos ||
424 (*it).find(
"_ctfWithMaterialTracks")!=string::npos) {
427 if(qit.find(
"siPixel")!=string::npos || qit.find(
"ctfWithMaterialTracks")!=string::npos) { temp_s = qit.substr(0,qit.find_first_of(
"_")); }
428 str_val <<
" <li class=\"dhtmlgoodies_sheet.gif\">\n"
429 <<
" <input id = \"selectedME\""
430 <<
" folder = \"" << currDir <<
"\""
431 <<
" type = \"checkbox\""
432 <<
" name = \"selected\""
433 <<
" class = \"smallCheckBox\""
434 <<
" value = \"" << (*it) <<
"\""
435 <<
" onclick = \"javascript:IMGC.selectedIMGCItems()\" />\n"
437 <<
" <a href=\"javascript:IMGC.plotFromPath('" << currDir <<
"')\">\n "
445 for (vector<string>::const_iterator ic = subDirVec.begin();
446 ic != subDirVec.end(); ic++) {
451 str_val <<
" </ul>" << endl;
452 str_val <<
" </li>" << endl;
465 ostringstream sumtree;
467 sumtree <<
"<ul id=\"dhtmlgoodies_tree\" class=\"dhtmlgoodies_tree\">" << endl;
469 sumtree <<
"</ul>" << endl;
471 sumtree <<
"Desired Directory does not exist";
474 <<
"[SiPixelInformationExtractor::readSummaryHistoTree()]"
482 out->getHTTPResponseHeader().addHeader(
"Content-Type",
"text/plain");
483 *out << sumtree.str();
495 ostringstream& str_val){
497 string currDir = bei->
pwd();
498 string dname = currDir.substr(currDir.find_last_of(
"/")+1);
499 if (dname.find(
"Module_") ==0 || dname.find(
"FED_")==0)
return;
501 <<
" <a href=\"#\" id=\"" << currDir <<
"\">\n "
506 vector<string> meVec = bei->
getMEs();
509 if ( meVec.size()== 0 && subDirVec.size() == 0 ) {
510 str_val <<
" </li> "<< endl;
513 str_val <<
"\n <ul>" << endl;
514 for (vector<string>::const_iterator it = meVec.begin();
515 it != meVec.end(); it++) {
516 if ((*it).find(
"SUM") == 0) {
517 str_val <<
" <li class=\"dhtmlgoodies_sheet.gif\">\n"
518 <<
" <input id = \"selectedME\""
519 <<
" folder = \"" << currDir <<
"\""
520 <<
" type = \"checkbox\""
521 <<
" name = \"selected\""
522 <<
" class = \"smallCheckBox\""
523 <<
" value = \"" << (*it) <<
"\""
524 <<
" onclick = \"javascript:IMGC.selectedIMGCItems()\" />\n"
526 <<
" <a href=\"javascript:IMGC.plotFromPath('" << currDir <<
"')\">\n "
534 for (vector<string>::const_iterator ic = subDirVec.begin();
535 ic != subDirVec.end(); ic++) {
540 str_val <<
" </ul> "<< endl;
541 str_val <<
" </li> "<< endl;
555 ostringstream alarmtree;
557 alarmtree <<
"<ul id=\"dhtmlgoodies_tree\" class=\"dhtmlgoodies_tree\">" << endl;
560 if(
alarmCounter_==0) alarmtree <<
"<li>No problematic modules found, all ok!</li>" << endl;
561 alarmtree <<
"</ul>" << endl;
563 alarmtree <<
"Desired Directory does not exist";
566 <<
"[SiPixelInformationExtractor::readAlarmTree()]"
574 out->getHTTPResponseHeader().addHeader(
"Content-Type",
"text/plain");
575 *out << alarmtree.str();
578 <<
"[SiPixelInformationExtractor::readAlarmTree()]"
592 ostringstream& str_val){
599 string currDir = bei->
pwd();
600 string dname = currDir.substr(currDir.find_last_of(
"/")+1);
603 if(image_name!=
"images/LI_green.gif")
605 <<
" <a href=\"#\" id=\"" << currDir <<
"\">\n "
613 vector<string> meVec = bei->
getMEs();
615 if (subDirVec.size() == 0 && meVec.size() == 0) {
616 str_val <<
"</li> "<< endl;
619 str_val <<
"<ul>" << endl;
620 for (vector<string>::const_iterator it = meVec.begin();
621 it != meVec.end(); it++) {
622 string full_path = currDir +
"/" + (*it);
628 if (my_map.size() > 0) {
631 if(image_name1!=
"images/LI_green.gif") {
633 str_val <<
" <li class=\"dhtmlgoodies_sheet.gif\">\n"
634 <<
" <input id = \"selectedME\""
635 <<
" folder = \"" << currDir <<
"\""
636 <<
" type = \"checkbox\""
637 <<
" name = \"selected\""
638 <<
" class = \"smallCheckBox\""
639 <<
" value = \"" << (*it) <<
"\""
640 <<
" onclick = \"javascript:IMGC.selectedIMGCItems()\" />\n"
642 <<
" <a href=\"javascript:IMGC.plotFromPath('" << currDir <<
"')\">\n "
653 for (vector<string>::const_iterator ic = subDirVec.begin();
654 ic != subDirVec.end(); ic++) {
659 str_val <<
"</ul> "<< endl;
660 str_val <<
"</li> "<< endl;
677 vector<string>& items) {
680 for (multimap<string, string>::const_iterator it = req_map.begin();
681 it != req_map.end(); it++) {
682 if (it->first == item_name) {
683 items.push_back(it->second);
697 multimap<string,string>::iterator
pos = req_map.find(item_name);
698 if (pos != req_map.end())
return true;
709 std::string item_name){
711 std::multimap<std::string,std::string>::const_iterator
pos = req_map.find(item_name);
712 std::string
value =
" ";
713 if (pos != req_map.end()) {
721 std::string item_name){
723 std::multimap<std::string,std::string>::iterator
pos = req_map.find(item_name);
724 std::string
value =
" ";
725 if (pos != req_map.end()) {
742 else col =
"#0000ff";
750 for (vector<QReport*>::const_iterator it = reports.begin(); it != reports.end();
752 status = (*it)->getStatus();
753 if (status > istat) istat =
status;
765 else name=
"images/LI_blue.gif";
773 for (vector<QReport*>::const_iterator it = reports.begin(); it != reports.end();
775 status = (*it)->getStatus();
776 if (status > istat) istat =
status;
790 out->getHTTPResponseHeader().addHeader(
"Content-Type",
"image/png");
791 out->getHTTPResponseHeader().addHeader(
"Pragma",
"no-cache");
792 out->getHTTPResponseHeader().addHeader(
"Cache-Control",
"no-store, no-cache, must-revalidate,max-age=0");
793 out->getHTTPResponseHeader().addHeader(
"Expires",
"Mon, 26 Jul 1997 05:00:00 GMT");
804 out->getHTTPResponseHeader().addHeader(
"Content-Type",
"image/png");
805 out->getHTTPResponseHeader().addHeader(
"Pragma",
"no-cache");
806 out->getHTTPResponseHeader().addHeader(
"Cache-Control",
"no-store, no-cache, must-revalidate,max-age=0");
807 out->getHTTPResponseHeader().addHeader(
"Expires",
"Mon, 26 Jul 1997 05:00:00 GMT");
825 if (dirName.find(sname) != string::npos)
return true;
834 std::multimap<std::string, std::string>& req_map,
840 int height = atoi(
getItemValue(req_map,
"height").c_str());
844 ostringstream test_status;
847 *out <<
"<StatusAndPath>" << endl;
848 *out <<
"<PathList>" << endl;
849 if (path.size() == 0) {
850 *out <<
"<HPath>" <<
"NONE" <<
"</HPath>" << endl;
851 test_status <<
" ME Does not exist ! " << endl;
853 vector<MonitorElement*> all_mes = bei->
getContents(path);
854 *out <<
"<HPath>" << path <<
"</HPath>" << endl;
855 for(vector<MonitorElement*>::iterator it=all_mes.begin(); it!=all_mes.end(); it++){
861 if (q_reports.size() == 0)
continue;
862 string full_path = path +
"/" +
name;
865 if (q_reports.size() != 0) {
866 test_status <<
" QTest Status for " << name <<
" : " << endl;
867 test_status <<
" ======================================================== " << endl;
868 for (vector<QReport*>::const_iterator it = q_reports.begin(); it != q_reports.end();
870 int status = (*it)->getStatus();
875 string mess_str = (*it)->getMessage();
876 test_status <<
"<br/>";
877 mess_str = mess_str.substr(mess_str.find(
" Test")+5);
878 test_status <<
" QTest Name : " << mess_str.substr(0, mess_str.find(
")")+1) << endl;
879 test_status <<
"<br/>";
880 test_status <<
" QTest Detail : " << mess_str.substr(mess_str.find(
")")+2) << endl;
882 test_status <<
" ======================================================== " << endl;
884 *out <<
"<HPath>" << name <<
"</HPath>" << endl;
887 *out <<
"</PathList>" << endl;
888 *out <<
"<StatusList>" << endl;
889 *out <<
"<Status>" << test_status.str() <<
"</Status>" << endl;
890 *out <<
"</StatusList>" << endl;
891 *out <<
"</StatusAndPath>" << endl;
900 pair<double,double> & norm)
902 double normalizationX = 1 ;
903 double normalizationY = 1 ;
909 pair<double,double> normX ;
910 pair<double,double> normY ;
921 if( theMEType.find(
"TH1") != string::npos)
923 meanX = (double)theME->
getMean();
925 normalizationX = fabs( normX.second - normX.first) ;
926 if( normalizationX == 0 ) {normalizationX=1.E-20;}
927 colorValue = meanX / normalizationX ;
928 norm.first = normX.first ;
929 norm.second = normX.second ;
932 if( theMEType.find(
"TH2") != string::npos)
934 meanX = (double)theME->
getMean(1);
935 meanY = (double)theME->
getMean(2);
937 normalizationX = fabs( normX.second - normX.first) ;
938 normalizationY = fabs( normY.second - normY.first) ;
939 if( normalizationX == 0 ) {normalizationX=1.E-20;}
940 if( normalizationY == 0 ) {normalizationY=1.E-20;}
941 double cVX = meanX / normalizationX ;
942 double cVY = meanY / normalizationY ;
943 colorValue =
sqrt(cVX*cVX + cVY*cVY) ;
944 if( normalizationX >= normalizationY )
946 norm.first = normX.first;
947 norm.second = normX.second ;
949 norm.first = normY.first;
950 norm.second = normY.second ;
971 pair<double,double>& norm,
972 std::string theMEType)
975 double normHigh = 0 ;
977 if( theMEType.find(
"TH1") != string::npos)
980 norm.first = normLow ;
981 norm.second = normHigh ;
990 pair<double,double>& normX,
991 pair<double,double>& normY,
992 std::string theMEType)
995 double normHigh = 0 ;
997 if( theMEType.find(
"TH2") != string::npos )
1000 normX.first = normLow ;
1001 normX.second = normHigh ;
1003 normY.first = normLow ;
1004 normY.second = normHigh ;
1024 vector<MonitorElement*> & mes)
1027 string currDir = bei->
pwd();
1032 if (currDir.find(
"Module_") != string::npos ||
1033 currDir.find(
"FED_") != string::npos)
1037 for (vector<string>::const_iterator it = contents.begin(); it != contents.end(); it++)
1040 if(theME.find(
"siPixel")==string::npos && theME.find(
"ctfWithMaterialTracks")==string::npos) {continue ;}
1041 string temp_s = theME.substr(0,theME.find_first_of(
"_"));
1043 if (temp_s == theMEName)
1045 string full_path = currDir +
"/" + (*it);
1049 if (me) {mes.push_back(me);}
1055 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++)
1070 std::string & theMEName,
1071 std::string & theTKType)
1074 int rval, gval, bval;
1075 vector<string> colorMap ;
1076 vector<MonitorElement*> me_list;
1077 pair<double,double> norm ;
1084 string detId =
"undefined";
1098 if( theTKType ==
"Entries")
1100 for(vector<MonitorElement*>::iterator it=me_list.begin(); it!=me_list.end(); it++)
1102 int entries = (int)(*it)->getEntries() ;
1103 if( entries > maxEntries ) maxEntries =
entries ;
1108 stringstream jsSnippet ;
1109 for(vector<MonitorElement*>::iterator it=me_list.begin(); it!=me_list.end(); it++)
1111 string meName = (*it)->getName();
1113 if( meName.find(
"_3") != string::npos )
1115 string detIdString = meName.substr(meName.find_last_of(
"_")+1,9);
1116 std::istringstream isst;
1117 isst.str(detIdString);
1119 entries = (int)(*it)->getEntries() ;
1120 if( theTKType ==
"Averages")
1124 }
else if( theTKType ==
"Entries") {
1127 if( entries > maxEntries ) maxEntries =
entries ;
1134 rval = 255; gval = 0; bval = 0;
1136 rval = 255; gval = 255; bval = 0;
1138 rval = 0; gval = 0; bval = 255;
1140 rval = 0; gval = 255; bval = 0;
1142 rval = 255; gval = 255; bval = 255;
1146 jsSnippet <<
" <DetInfo DetId='"
1157 colorMap.push_back(jsSnippet.str()) ;
1175 out->getHTTPResponseHeader().addHeader(
"Content-Type",
"text/xml");
1176 *out <<
"<?xml version=\"1.0\" ?>" << endl;
1177 *out <<
"<TrackerMapUpdate>" << endl;
1179 for(vector<string>::iterator it=colorMap.begin(); it!=colorMap.end(); it++)
1181 *out << *it << endl;
1184 *out <<
" <theLimits id=\"normalizationLimits\" normLow=\""
1190 *out <<
"</TrackerMapUpdate>"
1212 string mEName = mE->
getName();
1216 if( mEName.find(
"_3") != string::npos )
1218 string detIdString = mEName.substr((mEName.find_last_of(
"_"))+1,9);
1220 std::istringstream isst;
1221 isst.str(detIdString);
1241 map<string, int> & mEHash)
1243 string currDir = bei->
pwd();
1255 if (currDir.find(
"Module_") != string::npos ||
1256 currDir.find(
"FED_") != string::npos)
1260 for (vector<string>::const_iterator it = contents.begin(); it != contents.end(); it++)
1269 if(theME.find(
"siPixel")==string::npos && theME.find(
"ctfWithMaterialTracks")==string::npos)
1272 <<
"[SiPixelInformationExtractor::getMEList()]"
1274 <<
" ----> Skipping "
1279 string full_path = currDir +
"/" + (*it);
1280 string mEName = theME.substr(0,theME.find_first_of(
"_"));
1287 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++)
1300 const std::multimap<std::string, std::string>& req_map,
1305 if (path.size() == 0)
return;
1308 int height = atoi(
getItemValue(req_map,
"height").c_str());
1313 vector<MonitorElement*> all_mes = bei->
getContents(path);
1314 *out << path <<
" " ;
1315 for(vector<MonitorElement*>::iterator it=all_mes.begin(); it!=all_mes.end(); it++){
1320 string full_path = path +
"/" +
name;
1323 *out << name <<
" ";
1360 nevents_ = (bei->
get(
"Pixel/EventInfo/processedEvents"))->getIntValue();
1363 myfile_.open (
"NoisyPixelList.txt", ios::app);
1364 myfile_ <<
"Noise summary, ran over " <<
nevents_ <<
" events, threshold was set to " << noiseRate_ << std::endl;
1366 string currDir = bei->
pwd();
1367 string dname = currDir.substr(currDir.find_last_of(
"/")+1);
1370 if(dname.find(
"Module_")!=string::npos){
1371 vector<string> meVec = bei->
getMEs();
1372 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
1373 string full_path = currDir +
"/" + (*it);
1374 if(full_path.find(
"hitmap_siPixelDigis")!=string::npos){
1397 std::vector<std::pair<std::pair<int, int>,
float> > noisyPixelsInModule;
1398 TH2F * hothisto = me->
getTH2F();
1400 for(
int i=1;
i!=hothisto->GetNbinsX()+1;
i++){
1401 for(
int j=1;
j!=hothisto->GetNbinsY()+1;
j++){
1403 if(me->
getPathname().find(
"Barrel")!=string::npos){
1406 }
else if(me->
getPathname().find(
"Endcap")!=string::npos){
1410 if(value > noiseRate_){
1415 std::pair<int, int>
address(pixcol, pixrow);
1416 std::pair<std::pair<int, int>,
float> PixelStats(address, value);
1417 noisyPixelsInModule.push_back(PixelStats);
1427 vector<string> subDirVec = bei->
getSubdirs();
1428 for (vector<string>::const_iterator ic = subDirVec.begin();
1429 ic != subDirVec.end(); ic++) {
1430 if((*ic).find(
"AdditionalPixelErrors")!=string::npos)
continue;
1441 if(currDir ==
"Pixel/EventInfo/reportSummaryContents"){
1443 std::vector<std::pair<sipixelobjects::DetectorIndex,double> > pixelvec;
1444 std::map<uint32_t,int> myfedmap;
1445 std::map<uint32_t,std::string> mynamemap;
1450 int n_noisyrocs_all = 0;
1451 int n_noisyrocs_barrel = 0;
1452 int n_noisyrocs_endcap = 0;
1453 int n_verynoisyrocs_all = 0;
1454 int n_verynoisyrocs_barrel = 0;
1455 int n_verynoisyrocs_endcap = 0;
1458 for(
std::map<uint32_t, std::vector< std::pair<std::pair<int, int>,
float> > >::const_iterator it =
noisyDetIds_.begin();
1460 uint32_t
detid = (*it).first;
1461 std::vector< std::pair<std::pair<int, int>,
float> > noisyPixels = (*it).second;
1464 for(
int fedid=0; fedid<=40; ++fedid){
1466 uint32_t newDetId =
detid;
1467 if(converter.hasDetUnit(newDetId)){
1472 if(
fid == realfedID){
1474 if(realfedID==-1)
continue;
1476 uint32_t detSubId = detId.
subdetId();
1477 std::string outputname;
1478 bool HalfModule =
false;
1481 outputname = nameworker.
name();
1482 }
else if(detSubId == 1){
1484 outputname = nameworker.
name();
1490 std::map<int,int> myrocmap;
1491 myfedmap[
detid]=realfedID;
1492 mynamemap[
detid]=outputname;
1494 for(std::vector< std::pair< std::pair<int,int>,
float> >::const_iterator pxl = noisyPixels.begin();
1495 pxl != noisyPixels.end(); pxl++){
1496 std::pair<int,int> offlineaddress = (*pxl).first;
1497 float Noise_frac = (*pxl).second;
1498 int offlineColumn = offlineaddress.first;
1499 int offlineRow = offlineaddress.second;
1506 formatter.toCabling(cabling,detector);
1526 assert(realfedID >= 0);
1527 assert(cabling.
link >= 0);
1528 assert(cabling.
roc >= 0);
1530 static_cast<unsigned int>(cabling.
link),
1531 static_cast<unsigned int>(cabling.
roc)};
1535 int onlineColumn = locpixel.
rocCol();
1536 int onlineRow= locpixel.
rocRow();
1545 if((detSubId == 1) && (outputname.find(
"mO")!=string::npos || outputname.find(
"mI")!=string::npos) && (HalfModule)){
1553 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;
1555 for(std::map<int, int>::const_iterator nrc = myrocmap.begin(); nrc != myrocmap.end(); nrc++){
1556 if((*nrc).second > 0){
1559 n_noisyrocs_endcap++;
1560 }
else if(detSubId == 1){
1561 n_noisyrocs_barrel++;}
1563 if((*nrc).second > 40){
1564 n_verynoisyrocs_all++;
1566 n_verynoisyrocs_endcap++;
1567 }
else if(detSubId == 1){
1568 n_verynoisyrocs_barrel++;}
1575 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;
1576 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;
1596 out->getHTTPResponseHeader().addHeader(
"Content-Type",
"text/html");
1597 out->getHTTPResponseHeader().addHeader(
"Pragma",
"no-cache");
1598 out->getHTTPResponseHeader().addHeader(
"Cache-Control",
"no-store, no-cache, must-revalidate,max-age=0");
1599 out->getHTTPResponseHeader().addHeader(
"Expires",
"Mon, 26 Jul 1997 05:00:00 GMT");
1605 out->getHTTPResponseHeader().addHeader(
"Content-Type",
"text/xml");
1606 out->getHTTPResponseHeader().addHeader(
"Pragma",
"no-cache");
1607 out->getHTTPResponseHeader().addHeader(
"Cache-Control",
"no-store, no-cache, must-revalidate,max-age=0");
1608 out->getHTTPResponseHeader().addHeader(
"Expires",
"Mon, 26 Jul 1997 05:00:00 GMT");
1609 *out <<
"<?xml version=\"1.0\" ?>" << std::endl;
1616 out->getHTTPResponseHeader().addHeader(
"Content-Type",
"text/plain");
1617 out->getHTTPResponseHeader().addHeader(
"Pragma",
"no-cache");
1618 out->getHTTPResponseHeader().addHeader(
"Cache-Control",
"no-store, no-cache, must-revalidate,max-age=0");
1619 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