CMS 3D CMS Logo

SiPixelInformationExtractor Class Reference

#include <DQM/SiPixelMonitorClient/interface/SiPixelInformationExtractor.h>

List of all members.

Public Member Functions

void bookGlobalQualityFlag (DQMStore *bei, float noiseRate, bool Tier0Flag)
void computeGlobalQualityFlag (DQMStore *bei, bool init, int nFEDs, bool Tier0Flag)
void computeStatus (MonitorElement *mE, double &colorValue, std::pair< double, double > &norm)
void createImages (DQMStore *bei)
void fillGlobalQualityPlot (DQMStore *bei, bool init, edm::EventSetup const &eSetup, int nFEDs, bool Tier0Flag)
void findNoisyPixels (DQMStore *bei, bool init, float noiseRate, int noiseRateDenominator, edm::EventSetup const &eSetup)
int getDetId (MonitorElement *mE)
 (Documentation under construction).
void getHistosFromPath (DQMStore *bei, const std::multimap< std::string, std::string > &req_map, xgi::Output *out)
void getIMGCImage (std::multimap< std::string, std::string > &req_map, xgi::Output *out)
void getIMGCImage (const std::multimap< std::string, std::string > &req_map, xgi::Output *out)
void getMEList (DQMStore *bei, std::map< std::string, int > &mEHash)
std::string getMEType (MonitorElement *mE)
void getNormalization (MonitorElement *mE, std::pair< double, double > &norm, QString theMEType)
void getNormalization2D (MonitorElement *mE, std::pair< double, double > &normX, std::pair< double, double > &normY, QString theMEType)
void getSingleModuleHistos (DQMStore *bei, const std::multimap< std::string, std::string > &req_map, xgi::Output *out)
void getTrackerMapHistos (DQMStore *bei, const std::multimap< std::string, std::string > &req_map, xgi::Output *out)
void readAlarmTree (DQMStore *bei, std::string &str_name, xgi::Output *out)
bool readConfiguration (std::map< std::string, std::vector< std::string > > &layoutMap, std::map< std::string, std::map< std::string, std::string > > &qtestsMap, std::map< std::string, std::vector< std::string > > &meQTestsMap)
void readConfiguration ()
 Read Configuration File.
void readModuleAndHistoList (DQMStore *bei, xgi::Output *out)
 (Documentation under construction).
void readModuleHistoTree (DQMStore *bei, std::string &str_name, xgi::Output *out)
void readStatusMessage (DQMStore *bei, std::multimap< std::string, std::string > &req_map, xgi::Output *out)
void readSummaryHistoTree (DQMStore *bei, std::string &str_name, xgi::Output *out)
void selectMEList (DQMStore *bei, std::string &name, std::vector< MonitorElement * > &mes)
void sendTkUpdatedStatus (DQMStore *bei, xgi::Output *out, std::string &meName, std::string &theTKType)
 (Documentation under construction).
 SiPixelInformationExtractor (bool offlineXMLfile)
 Constructor of the SiPixelInformationExtractor class.
 ~SiPixelInformationExtractor ()
 Destructor of the SiPixelInformationExtractor class.

Private Member Functions

void createDummiesFromLayout ()
void fillModuleAndHistoList (DQMStore *bei, std::vector< std::string > &modules, std::map< std::string, std::string > &histos)
void getItemList (const std::multimap< std::string, std::string > &req_map, std::string item_name, std::vector< std::string > &items)
std::string getItemValue (std::multimap< std::string, std::string > &req_map, std::string item_name)
std::string getItemValue (const std::multimap< std::string, std::string > &req_map, std::string item_name)
 (Documentation under construction).
bool goToDir (DQMStore *bei, std::string &sname)
bool hasItem (std::multimap< std::string, std::string > &req_map, std::string item_name)
void printAlarmList (DQMStore *bei, std::ostringstream &str_val)
void printModuleHistoList (DQMStore *bei, std::ostringstream &str_val)
void printSummaryHistoList (DQMStore *bei, std::ostringstream &str_val)
void selectColor (std::string &col, std::vector< QReport * > &reports)
void selectColor (std::string &col, int status)
void selectImage (std::string &name, std::vector< QReport * > &reports)
void selectImage (std::string &name, int status)
void setHTMLHeader (xgi::Output *out)
void setPlainHeader (xgi::Output *out)
void setXMLHeader (xgi::Output *out)

Private Attributes

SiPixelActionExecutoractionExecutor_
int alarmCounter_
int allMods_
TH2F * allmodsEtaPhi
TH2F * allmodsMap
MonitorElementBarrelNdigisFREQProjection
float bpix_flag_
int bpix_mods_
SiPixelConfigParserconfigParser_
SiPixelConfigWriterconfigWriter_
int count
MonitorElementEndcapNdigisFREQProjection
bool endOfModules_
int err_bpix_mods_
int err_fpix_mods_
int err_hcylmI_mods_
int err_hcylmO_mods_
int err_hcylpI_mods_
int err_hcylpO_mods_
int err_shellmI_mods_
int err_shellmO_mods_
int err_shellpI_mods_
int err_shellpO_mods_
int errcount
TH2F * errmodsEtaPhi
TH2F * errmodsMap
int errorMods_
MonitorElementEventRateBarrelPixels
MonitorElementEventRateEndcapPixels
bool flagHotModule_
float fpix_flag_
int fpix_mods_
TH2F * goodmodsEtaPhi
TH2F * goodmodsMap
bool gotDigis
float hcylmI_flag_
int hcylmI_mods_
float hcylmO_flag_
int hcylmO_mods_
float hcylpI_flag_
int hcylpI_mods_
float hcylpO_flag_
int hcylpO_mods_
SiPixelHistoPlotterhistoPlotter_
std::map< std::string,
std::vector< std::string > > 
layoutMap
SiPixelLayoutParserlayoutParser_
std::map< std::string,
std::vector< std::string > > 
meQTestsMap
ofstream myfile_
int nevents_
std::map< uint32_t,
std::vector< std::pair
< std::pair< int, int >, float > > > 
noisyDetIds_
bool offlineXMLfile_
float qflag_
std::map< std::string,
std::map< std::string,
std::string > > 
qtestsMap
bool readMeMap_
bool readQTestMap_
bool readReference_
float shellmI_flag_
int shellmI_mods_
float shellmO_flag_
int shellmO_mods_
float shellpI_flag_
int shellpI_mods_
float shellpO_flag_
int shellpO_mods_
MonitorElementSummaryBarrel
MonitorElementSummaryEndcap
MonitorElementSummaryHCmI
MonitorElementSummaryHCmO
MonitorElementSummaryHCpI
MonitorElementSummaryHCpO
MonitorElementSummaryReport
MonitorElementSummaryReportMap
MonitorElementSummaryShellmI
MonitorElementSummaryShellmO
MonitorElementSummaryShellpI
MonitorElementSummaryShellpO
edm::ESHandle
< SiPixelFedCablingMap
theCablingMap


Detailed Description

Definition at line 45 of file SiPixelInformationExtractor.h.


Constructor & Destructor Documentation

SiPixelInformationExtractor::SiPixelInformationExtractor ( bool  offlineXMLfile  ) 

Constructor of the SiPixelInformationExtractor class.

Definition at line 71 of file SiPixelInformationExtractor.cc.

References allMods_, errorMods_, histoPlotter_, qflag_, and readReference_.

00071                                                                             : offlineXMLfile_(offlineXMLfile) {
00072   edm::LogInfo("SiPixelInformationExtractor") << 
00073     " Creating SiPixelInformationExtractor " << "\n" ;
00074   
00075   readReference_ = false;
00076   allMods_=0;
00077   errorMods_=0;
00078   qflag_=1.;
00079   histoPlotter_=0;
00080   histoPlotter_ = new SiPixelHistoPlotter();
00081 }

SiPixelInformationExtractor::~SiPixelInformationExtractor (  ) 

Destructor of the SiPixelInformationExtractor class.

Definition at line 87 of file SiPixelInformationExtractor.cc.

References histoPlotter_.

00087                                                           {
00088   edm::LogInfo("SiPixelInformationExtractor") << 
00089     " Deleting SiPixelInformationExtractor " << "\n" ;
00090   
00091   if (histoPlotter_) delete histoPlotter_;
00092 }


Member Function Documentation

void SiPixelInformationExtractor::bookGlobalQualityFlag ( DQMStore bei,
float  noiseRate,
bool  Tier0Flag 
)

Definition at line 1338 of file SiPixelInformationExtractor.cc.

References DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookFloat(), DQMStore::cd(), EventRateBarrelPixels, EventRateEndcapPixels, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), SummaryBarrel, SummaryEndcap, SummaryHCmI, SummaryHCmO, SummaryHCpI, SummaryHCpO, SummaryReport, SummaryReportMap, SummaryShellmI, SummaryShellmO, SummaryShellpI, and SummaryShellpO.

Referenced by SiPixelEDAClient::beginJob().

01338                                                                                                        {
01339 //std::cout<<"BOOK GLOBAL QUALITY FLAG MEs!"<<std::endl;
01340   bei->cd();
01341   bei->setCurrentFolder("Pixel/EventInfo");
01342   SummaryReport = bei->bookFloat("reportSummary");
01343   //SummaryReportMap = bei->book2D("reportSummaryMap","Pixel EtaPhi Summary Map",60,-3.,3.,64,-3.2,3.2);
01344   //SummaryReportMap = bei->book2D("reportSummaryMap","Pixel Summary Map",28,0.,28.,48,0.,48.);
01345   //SummaryReportMap->setAxisTitle("Eta",1);
01346   //SummaryReportMap->setAxisTitle("Phi",2);
01347   //SummaryReportMap->setBinLabel(1,"Endcap",1);
01348   //SummaryReportMap->setBinLabel(2,"+z Disk_2",1);
01349   //SummaryReportMap->setBinLabel(6,"Endcap",1);
01350   //SummaryReportMap->setBinLabel(7,"+z Disk_1",1);
01351   //SummaryReportMap->setBinLabel(12,"Barrel +z",1);
01352   //SummaryReportMap->setBinLabel(16,"Barrel -z",1);
01353   //SummaryReportMap->setBinLabel(20,"Endcap",1);
01354   //SummaryReportMap->setBinLabel(21,"-z Disk_1",1);
01355   //SummaryReportMap->setBinLabel(25,"Endcap",1);
01356   //SummaryReportMap->setBinLabel(26,"-z Disk_2",1);
01357   //SummaryReportMap->setBinLabel(13,"Inside",2);
01358   //SummaryReportMap->setBinLabel(12,"LHC",2);
01359   //SummaryReportMap->setBinLabel(11,"Ring",2);
01360   //SummaryReportMap->setBinLabel(37,"Outside",2);
01361   //SummaryReportMap->setBinLabel(36,"LHC",2);
01362   //SummaryReportMap->setBinLabel(35,"Ring",2);
01363   if(!Tier0Flag){
01364     SummaryReportMap = bei->book2D("reportSummaryMap","Pixel Summary Map",40,0.,40.,36,0.,36.);
01365     SummaryReportMap->setAxisTitle("FED #",1);
01366     SummaryReportMap->setAxisTitle("Link #",2);
01367   }else{
01368     SummaryReportMap = bei->book2D("reportSummaryMap","Pixel Summary Map",7,0.,7.,22,1.,23.);
01369     //SummaryReportMap->setAxisTitle("Layer(Disk)",1);
01370     SummaryReportMap->setAxisTitle("Ladder/Blade #",2);
01371     SummaryReportMap->setBinLabel(1,"Barrel_Layer_1",1);
01372     SummaryReportMap->setBinLabel(2,"Barrel_Layer_2",1);
01373     SummaryReportMap->setBinLabel(3,"Barrel_Layer_3",1);
01374     SummaryReportMap->setBinLabel(4,"Endcap_Disk_1 -z",1);
01375     SummaryReportMap->setBinLabel(5,"Endcap_Disk_2 -z",1);
01376     SummaryReportMap->setBinLabel(6,"Endcap_Disk_1 +z",1);
01377     SummaryReportMap->setBinLabel(7,"Endcap_Disk_2 +z",1);
01378   }
01379   bei->setCurrentFolder("Pixel/EventInfo/reportSummaryContents");
01380   SummaryBarrel = bei->bookFloat("Pixel_Barrel");
01381   SummaryShellmI = bei->bookFloat("Pixel_Shell_mI");
01382   SummaryShellmO = bei->bookFloat("Pixel_Shell_mO");
01383   SummaryShellpI = bei->bookFloat("Pixel_Shell_pI");
01384   SummaryShellpO = bei->bookFloat("Pixel_Shell_pO");
01385   SummaryEndcap = bei->bookFloat("Pixel_Endcap");
01386   SummaryHCmI = bei->bookFloat("Pixel_HalfCylinder_mI");
01387   SummaryHCmO = bei->bookFloat("Pixel_HalfCylinder_mO");
01388   SummaryHCpI = bei->bookFloat("Pixel_HalfCylinder_pI");
01389   SummaryHCpO = bei->bookFloat("Pixel_HalfCylinder_pO");
01390   bei->cd();  
01391   if(noiseRate_>=0.){
01392     bei->setCurrentFolder("Pixel/Barrel");
01393     EventRateBarrelPixels = bei->book1D("barrelEventRate","Digi event rate for all Barrel pixels",1000,0.,0.01);
01394     EventRateBarrelPixels->setAxisTitle("Event Rate",1);
01395     EventRateBarrelPixels->setAxisTitle("Number of Pixels",2);
01396     bei->cd();  
01397     bei->setCurrentFolder("Pixel/Endcap");
01398     EventRateEndcapPixels = bei->book1D("endcapEventRate","Digi event rate for all Endcap pixels",1000,0.,0.01);
01399     EventRateEndcapPixels->setAxisTitle("Event Rate",1);
01400     EventRateEndcapPixels->setAxisTitle("Number of Pixels",2);
01401   }
01402 }

void SiPixelInformationExtractor::computeGlobalQualityFlag ( DQMStore bei,
bool  init,
int  nFEDs,
bool  Tier0Flag 
)

Definition at line 1404 of file SiPixelInformationExtractor.cc.

References allMods_, bpix_flag_, bpix_mods_, DQMStore::cd(), err_bpix_mods_, err_fpix_mods_, err_hcylmI_mods_, err_hcylmO_mods_, err_hcylpI_mods_, err_hcylpO_mods_, err_shellmI_mods_, err_shellmO_mods_, err_shellpI_mods_, err_shellpO_mods_, errorMods_, MonitorElement::Fill(), fpix_flag_, fpix_mods_, DQMStore::get(), MonitorElement::getBinContent(), MonitorElement::getEntries(), DQMStore::getMEs(), DQMStore::getSubdirs(), DQMStore::goUp(), hcylmI_flag_, hcylmI_mods_, hcylmO_flag_, hcylmO_mods_, hcylpI_flag_, hcylpI_mods_, hcylpO_flag_, hcylpO_mods_, kk, DQMStore::pwd(), qflag_, reset(), shellmI_flag_, shellmI_mods_, shellmO_flag_, shellmO_mods_, shellpI_flag_, shellpI_mods_, shellpO_flag_, shellpO_mods_, SummaryBarrel, SummaryEndcap, SummaryHCmI, SummaryHCmO, SummaryHCpI, SummaryHCpO, SummaryReport, SummaryShellmI, SummaryShellmO, SummaryShellpI, and SummaryShellpO.

Referenced by SiPixelEDAClient::endLuminosityBlock(), and SiPixelEDAClient::endRun().

01408 {
01409 //cout<<"entering SiPixelInformationExtractor::ComputeGlobalQualityFlag"<<endl;
01410 //   cout << ACRed << ACBold
01411 //        << "[SiPixelInformationExtractor::ComputeGlobalQualityFlag]"
01412 //        << ACPlain
01413 //        << " Enter" 
01414 //        << endl ;
01415   if(init){
01416     allMods_=0; errorMods_=0; qflag_=0.; 
01417     bpix_mods_=0; err_bpix_mods_=0; bpix_flag_=0.;
01418     shellmI_mods_=0; err_shellmI_mods_=0; shellmI_flag_=0.;
01419     shellmO_mods_=0; err_shellmO_mods_=0; shellmO_flag_=0.;
01420     shellpI_mods_=0; err_shellpI_mods_=0; shellpI_flag_=0.;
01421     shellpO_mods_=0; err_shellpO_mods_=0; shellpO_flag_=0.;
01422     fpix_mods_=0; err_fpix_mods_=0; fpix_flag_=0.;
01423     hcylmI_mods_=0; err_hcylmI_mods_=0; hcylmI_flag_=0.;
01424     hcylmO_mods_=0; err_hcylmO_mods_=0; hcylmO_flag_=0.;
01425     hcylpI_mods_=0; err_hcylpI_mods_=0; hcylpI_flag_=0.;
01426     hcylpO_mods_=0; err_hcylpO_mods_=0; hcylpO_flag_=0.;
01427     if(nFEDs==0){
01428       SummaryReport = bei->get("Pixel/EventInfo/reportSummary");
01429       if(SummaryReport) SummaryReport->Fill(-1.);
01430       SummaryBarrel = bei->get("Pixel/EventInfo/reportSummaryContents/Pixel_Barrel");
01431       if(SummaryBarrel) SummaryBarrel->Fill(-1.);
01432       SummaryShellmI = bei->get("Pixel/EventInfo/reportSummaryContents/Pixel_Shell_mI");
01433       if(SummaryShellmI) SummaryShellmI->Fill(-1.);
01434       SummaryShellmO = bei->get("Pixel/EventInfo/reportSummaryContents/Pixel_Shell_mO");
01435       if(SummaryShellmO)   SummaryShellmO->Fill(-1.);
01436       SummaryShellpI = bei->get("Pixel/EventInfo/reportSummaryContents/Pixel_Shell_pI");
01437       if(SummaryShellpI)   SummaryShellpI->Fill(-1.);
01438       SummaryShellpO = bei->get("Pixel/EventInfo/reportSummaryContents/Pixel_Shell_pO");
01439       if(SummaryShellpO)   SummaryShellpO->Fill(-1.);
01440       SummaryEndcap = bei->get("Pixel/EventInfo/reportSummaryContents/Pixel_Endcap");
01441       if(SummaryEndcap)   SummaryEndcap->Fill(-1.);
01442       SummaryHCmI = bei->get("Pixel/EventInfo/reportSummaryContents/Pixel_HalfCylinder_mI");
01443       if(SummaryHCmI)   SummaryHCmI->Fill(-1.);
01444       SummaryHCmO = bei->get("Pixel/EventInfo/reportSummaryContents/Pixel_HalfCylinder_mO");
01445       if(SummaryHCmO)   SummaryHCmO->Fill(-1.);
01446       SummaryHCpI = bei->get("Pixel/EventInfo/reportSummaryContents/Pixel_HalfCylinder_pI");
01447       if(SummaryHCpI)   SummaryHCpI->Fill(-1.);
01448       SummaryHCpO = bei->get("Pixel/EventInfo/reportSummaryContents/Pixel_HalfCylinder_pO");
01449       if(SummaryHCpO)   SummaryHCpO->Fill(-1.);
01450     }
01451     init=false;
01452   }
01453   if(nFEDs==0) return;  
01454   
01455   string currDir = bei->pwd();
01456   string dname = currDir.substr(currDir.find_last_of("/")+1);
01457   
01458   QRegExp rx, rxb, rxe;
01459   if(!Tier0Flag) rx = QRegExp("Module_");
01460   else { rxb = QRegExp("Ladder_"); rxe = QRegExp("Blade_"); }
01461  
01462   if(rx.search(dname)!=-1 || rxb.search(dname)!=-1 || rxe.search(dname)!=-1){
01463     if(currDir.find("Pixel")!=string::npos) allMods_++;
01464     if(currDir.find("Barrel")!=string::npos) bpix_mods_++;
01465     if(currDir.find("Shell_mI")!=string::npos) shellmI_mods_++;
01466     if(currDir.find("Shell_mO")!=string::npos) shellmO_mods_++;
01467     if(currDir.find("Shell_pI")!=string::npos) shellpI_mods_++;
01468     if(currDir.find("Shell_pO")!=string::npos) shellpO_mods_++;
01469     if(currDir.find("Endcap")!=string::npos) fpix_mods_++;
01470     if(currDir.find("HalfCylinder_mI")!=string::npos) hcylmI_mods_++;
01471     if(currDir.find("HalfCylinder_mO")!=string::npos) hcylmO_mods_++;
01472     if(currDir.find("HalfCylinder_pI")!=string::npos) hcylpI_mods_++;
01473     if(currDir.find("HalfCylinder_pO")!=string::npos) hcylpO_mods_++;
01474       
01475     vector<string> meVec = bei->getMEs();
01476     
01477     //checking for FED errors only:
01478     for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
01479       string full_path = currDir + "/" + (*it);
01480       if(full_path.find("NErrors")!=string::npos){
01481         MonitorElement * me = bei->get(full_path);
01482         if (!me) continue;
01483         
01484         //if(me->getEntries()>0) cout<<"I am here: "<<currDir<<" and have the NErrors-ME. It has this many entries: "<<me->getEntries()<<endl;
01485         
01486         if(me->getEntries()>0){
01487         
01488           full_path = full_path.replace(full_path.find("NErrors"),9,"errorType");
01489           me = bei->get(full_path);
01490           if(!me) continue;
01491           bool type30=false; bool othererror=false; bool reset=false;
01492           for(int jj=1; jj<16; jj++){
01493             if(me->getBinContent(jj)>0.){
01494               if(jj!=6) othererror=true;
01495               else type30=true;
01496             }
01497           }
01498           if(type30){
01499             full_path = full_path.replace(full_path.find("errorType"),10,"TBMMessage");
01500             me = bei->get(full_path);
01501             if(!me) continue;
01502             for(int kk=1; kk<9; kk++){
01503               if(me->getBinContent(kk)>0.){
01504                 if(kk!=6 && kk!=7) othererror=true;
01505                 else reset=true;
01506               }
01507             }
01508           }
01509           
01510     //if you want to check for QTest results instead:
01511     //vector<string> meVec = bei->getMEs();
01512     //bool gotcha = false;
01513     //for (vector<string>::const_iterator it = meVec.begin();
01514     //   it != meVec.end(); it++) {
01515     //  string full_path = currDir + "/" + (*it);
01516     // MonitorElement * me = bei->get(full_path);
01517     // if (!me) continue;
01518     // std::vector<QReport *> my_map = me->getQReports();
01519     // if (my_map.size() > 0) {
01520        // string image_name;
01521        // selectImage(image_name,my_map);
01522        // if(image_name!="images/LI_green.gif") {
01523        
01524        //   if(!gotcha){
01525           if(othererror || (type30 && !reset)){
01526             if(currDir.find("Pixel")!=string::npos) errorMods_++;
01527             if(currDir.find("Barrel")!=string::npos) err_bpix_mods_++;
01528             if(currDir.find("Shell_mI")!=string::npos) err_shellmI_mods_++;
01529             if(currDir.find("Shell_mO")!=string::npos) err_shellmO_mods_++;
01530             if(currDir.find("Shell_pI")!=string::npos) err_shellpI_mods_++;
01531             if(currDir.find("Shell_pO")!=string::npos) err_shellpO_mods_++;
01532             if(currDir.find("Endcap")!=string::npos) err_fpix_mods_++;
01533             if(currDir.find("HalfCylinder_mI")!=string::npos) err_hcylmI_mods_++;
01534             if(currDir.find("HalfCylinder_mO")!=string::npos) err_hcylmO_mods_++;
01535             if(currDir.find("HalfCylinder_pI")!=string::npos) err_hcylpI_mods_++;
01536             if(currDir.find("HalfCylinder_pO")!=string::npos) err_hcylpO_mods_++;
01537           }
01538         //  gotcha = true;
01539         }       
01540       }
01541     }
01542   }
01543   if(allMods_>0) qflag_ = (float(allMods_)-float(errorMods_))/float(allMods_);
01544   if(bpix_mods_>0) bpix_flag_ = (float(bpix_mods_)-float(err_bpix_mods_))/float(bpix_mods_);
01545   if(shellmI_mods_>0) shellmI_flag_ = (float(shellmI_mods_)-float(err_shellmI_mods_))/float(shellmI_mods_);
01546   if(shellmO_mods_>0) shellmO_flag_ = (float(shellmO_mods_)-float(err_shellmO_mods_))/float(shellmO_mods_);
01547   if(shellpI_mods_>0) shellpI_flag_ = (float(shellpI_mods_)-float(err_shellpI_mods_))/float(shellpI_mods_);
01548   if(shellpO_mods_>0) shellpO_flag_ = (float(shellpO_mods_)-float(err_shellpO_mods_))/float(shellpO_mods_);
01549   if(fpix_mods_>0) fpix_flag_ = (float(fpix_mods_)-float(err_fpix_mods_))/float(fpix_mods_);
01550   if(hcylmI_mods_>0) hcylmI_flag_ = (float(hcylmI_mods_)-float(err_hcylmI_mods_))/float(hcylmI_mods_);
01551   if(hcylmO_mods_>0) hcylmO_flag_ = (float(hcylmO_mods_)-float(err_hcylmO_mods_))/float(hcylmO_mods_);
01552   if(hcylpI_mods_>0) hcylpI_flag_ = (float(hcylpI_mods_)-float(err_hcylpI_mods_))/float(hcylpI_mods_);
01553   if(hcylpO_mods_>0) hcylpO_flag_ = (float(hcylpO_mods_)-float(err_hcylpO_mods_))/float(hcylpO_mods_);
01554   
01555   vector<string> subDirVec = bei->getSubdirs();  
01556   for (vector<string>::const_iterator ic = subDirVec.begin();
01557        ic != subDirVec.end(); ic++) {
01558     bei->cd(*ic);
01559     init=false;
01560     computeGlobalQualityFlag(bei,init,nFEDs,Tier0Flag);
01561     bei->goUp();
01562   }
01563   SummaryReport = bei->get("Pixel/EventInfo/reportSummary");
01564   if(SummaryReport) SummaryReport->Fill(qflag_);
01565   SummaryBarrel = bei->get("Pixel/EventInfo/reportSummaryContents/Pixel_Barrel");
01566   if(SummaryBarrel) SummaryBarrel->Fill(bpix_flag_);
01567   SummaryShellmI = bei->get("Pixel/EventInfo/reportSummaryContents/Pixel_Shell_mI");
01568   if(SummaryShellmI) SummaryShellmI->Fill(shellmI_flag_);
01569   SummaryShellmO = bei->get("Pixel/EventInfo/reportSummaryContents/Pixel_Shell_mO");
01570   if(SummaryShellmO)   SummaryShellmO->Fill(shellmO_flag_);
01571   SummaryShellpI = bei->get("Pixel/EventInfo/reportSummaryContents/Pixel_Shell_pI");
01572   if(SummaryShellpI)   SummaryShellpI->Fill(shellpI_flag_);
01573   SummaryShellpO = bei->get("Pixel/EventInfo/reportSummaryContents/Pixel_Shell_pO");
01574   if(SummaryShellpO)   SummaryShellpO->Fill(shellpO_flag_);
01575   SummaryEndcap = bei->get("Pixel/EventInfo/reportSummaryContents/Pixel_Endcap");
01576   if(SummaryEndcap)   SummaryEndcap->Fill(fpix_flag_);
01577   SummaryHCmI = bei->get("Pixel/EventInfo/reportSummaryContents/Pixel_HalfCylinder_mI");
01578   if(SummaryHCmI)   SummaryHCmI->Fill(hcylmI_flag_);
01579   SummaryHCmO = bei->get("Pixel/EventInfo/reportSummaryContents/Pixel_HalfCylinder_mO");
01580   if(SummaryHCmO)   SummaryHCmO->Fill(hcylmO_flag_);
01581   SummaryHCpI = bei->get("Pixel/EventInfo/reportSummaryContents/Pixel_HalfCylinder_pI");
01582   if(SummaryHCpI)   SummaryHCpI->Fill(hcylpI_flag_);
01583   SummaryHCpO = bei->get("Pixel/EventInfo/reportSummaryContents/Pixel_HalfCylinder_pO");
01584   if(SummaryHCpO)   SummaryHCpO->Fill(hcylpO_flag_);
01585 
01586 }

void SiPixelInformationExtractor::computeStatus ( MonitorElement mE,
double &  colorValue,
std::pair< double, double > &  norm 
)

Referenced by sendTkUpdatedStatus().

void SiPixelInformationExtractor::createDummiesFromLayout (  )  [private]

void SiPixelInformationExtractor::createImages ( DQMStore bei  ) 

Definition at line 2017 of file SiPixelInformationExtractor.cc.

References SiPixelHistoPlotter::createPlots(), and histoPlotter_.

Referenced by SiPixelWebInterface::performAction().

02017                                                            {
02018   histoPlotter_->createPlots(bei);
02019 }

void SiPixelInformationExtractor::fillGlobalQualityPlot ( DQMStore bei,
bool  init,
edm::EventSetup const &  eSetup,
int  nFEDs,
bool  Tier0Flag 
)

Definition at line 1588 of file SiPixelInformationExtractor.cc.

References allmodsMap, DQMStore::cd(), count, errcount, errmodsMap, first, edm::EventSetup::get(), DQMStore::get(), MonitorElement::getBinContent(), getDetId(), MonitorElement::getMean(), DQMStore::getMEs(), DQMStore::getSubdirs(), goodmodsMap, DQMStore::goUp(), i, j, kk, sipixelobjects::ElectronicIndex::link, edm::ESHandle< T >::product(), DQMStore::pwd(), MonitorElement::setBinContent(), SummaryReportMap, and theCablingMap.

Referenced by SiPixelEDAClient::endLuminosityBlock(), and SiPixelEDAClient::endRun().

01589 {
01590   //calculate eta and phi of the modules and fill a 2D plot:
01591   if(init){
01592     if(!Tier0Flag){
01593       allmodsMap = new TH2F("allmodsMap","allmodsMap",40,0.,40.,36,0.,36.);
01594       errmodsMap = new TH2F("errmodsMap","errmodsMap",40,0.,40.,36,0.,36.);
01595       goodmodsMap = new TH2F("goodmodsMap","goodmodsMap",40,0.,40.,36,0.,36.);
01596     }else{
01597       allmodsMap = new TH2F("allmodsMap","allmodsMap",7,0.,7.,22,1.,23.);
01598       errmodsMap = new TH2F("errmodsMap","errmodsMap",7,0.,7.,22,1.,23.);
01599       goodmodsMap = new TH2F("goodmodsMap","goodmodsMap",7,0.,7.,22,1.,23.);
01600     }
01601     count=0; errcount=0;
01602     //cout<<"Number of FEDs in the readout: "<<nFEDs<<endl;
01603     if(nFEDs==0){
01604       SummaryReportMap = bei->get("Pixel/EventInfo/reportSummaryMap");
01605       if(SummaryReportMap) for(int i=1; i!=41; i++) for(int j=1; j!=37; j++) SummaryReportMap->setBinContent(i,j,0.);
01606     }
01607     init=false;
01608   }
01609   if(nFEDs==0) return;
01610   eSetup.get<SiPixelFedCablingMapRcd>().get(theCablingMap);
01611   
01612   string currDir = bei->pwd();
01613   string dname = currDir.substr(currDir.find_last_of("/")+1);
01614   
01615   QRegExp rx, rxb, rxe;
01616   if(!Tier0Flag) rx = QRegExp("Module_");
01617   else { rxb = QRegExp("Ladder_"); rxe = QRegExp("Blade_"); }
01618   
01619   if(rx.search(dname)!=-1 || rxb.search(dname)!=-1 || rxe.search(dname)!=-1){
01620     vector<string> meVec = bei->getMEs();
01621     bool first=true; bool once=true;
01622     int detId=-1; int fedId=-1; int linkId=-1;
01623     for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
01624       //checking for any digis or FED errors to decide if this module is in DAQ:  
01625       string full_path = currDir + "/" + (*it);
01626       if(!Tier0Flag && detId==-1 && full_path.find("SUMOFF")==string::npos &&
01627          ((full_path.find("ndigis")!=string::npos && full_path.find("SUMDIG")==string::npos) || 
01628           (full_path.find("NErrors")!=string::npos && full_path.find("SUMRAW")==string::npos && (getDetId(bei->get(full_path)) > 100)))){
01629         MonitorElement * me = bei->get(full_path);
01630         if (!me) continue;
01631         if((full_path.find("ndigis")!=string::npos && me->getMean()>0.) ||
01632            (full_path.find("NErrors")!=string::npos && me->getMean()>0.)){ 
01633           detId = getDetId(me);
01634           
01635           //cout<<"got a module with digis or errors and the detid is: "<<detId<<endl;
01636           for(int fedid=0; fedid<=40; ++fedid){
01637             SiPixelFrameConverter converter(theCablingMap.product(),fedid);
01638             uint32_t newDetId = detId;
01639             if(converter.hasDetUnit(newDetId)){
01640               fedId=fedid;
01641               break;   
01642             }
01643           }
01644           
01645           if(fedId==-1) continue; 
01646           sipixelobjects::ElectronicIndex cabling; 
01647           SiPixelFrameConverter formatter(theCablingMap.product(),fedId);
01648           sipixelobjects::DetectorIndex detector = {detId, 1, 1};      
01649           formatter.toCabling(cabling,detector);
01650           linkId = cabling.link;
01651           allmodsMap->Fill(fedId,linkId);
01652           //cout<<"this is a module that has digis and/or errors: "<<detId<<","<<fedId<<","<<linkId<<endl;
01653           
01654           //use presence of any FED error as error flag (except for TBM or ROC resets):
01655           bool anyerr=false; bool type30=false; bool othererr=false;
01656           if(full_path.find("ndigis")!=string::npos) full_path = full_path.replace(full_path.find("ndigis"),7,"NErrors");
01657           me = bei->get(full_path);
01658           if(me) anyerr=true;
01659           //if(anyerr) cout<<"here is an error: "<<detId<<","<<me->getMean()<<endl;
01660           if(full_path.find("NErrors")!=string::npos) full_path = full_path.replace(full_path.find("NErrors"),9,"errorType");
01661           me = bei->get(full_path);
01662           if(me){
01663             for(int jj=1; jj<16; jj++){
01664               if(me->getBinContent(jj)>0.){
01665                 if(jj!=6) othererr=true;
01666                 else type30=true;
01667               }
01668             }
01669             if(type30){
01670               full_path = full_path.replace(full_path.find("errorType"),10,"TBMMessage");
01671               me = bei->get(full_path);
01672               if(me){
01673                 for(int kk=1; kk<9; kk++){
01674                   if(me->getBinContent(kk)>0.){
01675                     if(kk!=6 && kk!=7) othererr=true;
01676                   }
01677                 }
01678               }
01679             }
01680           }
01681           if(anyerr && othererr){
01682             errmodsMap->Fill(fedId,linkId);
01683             //cout<<"this is a module that has errors: "<<detId<<","<<fedId<<","<<linkId<<endl;
01684           }
01685         }
01686       }else if(Tier0Flag && detId==-1 && full_path.find("SUMOFF")==string::npos && 
01687                ((full_path.find("ndigis")!=string::npos && full_path.find("SUMDIG")==string::npos) || 
01688                 (full_path.find("NErrors")!=string::npos && full_path.find("SUMRAW")==string::npos && (getDetId(bei->get(full_path)) > 100)))){
01689         MonitorElement * me = bei->get(full_path);
01690         if (!me) continue;
01691         if((full_path.find("ndigis")!=string::npos && me->getMean()>0.) ||
01692            (full_path.find("NErrors")!=string::npos && me->getMean()>0.)){ 
01693           detId = 0;
01694           int structId = -1; int subStructId = -1;
01695           if(full_path.find("Layer_1")!=string::npos) structId = 0;
01696           else if(full_path.find("Layer_2")!=string::npos) structId = 1;
01697           else if(full_path.find("Layer_3")!=string::npos) structId = 2;
01698           else if((full_path.find("HalfCylinder_mI")!=string::npos && full_path.find("Disk_1")!=string::npos) ||
01699                   (full_path.find("HalfCylinder_mO")!=string::npos && full_path.find("Disk_1")!=string::npos)) structId = 3;
01700           else if((full_path.find("HalfCylinder_mI")!=string::npos && full_path.find("Disk_2")!=string::npos) ||
01701                   (full_path.find("HalfCylinder_mO")!=string::npos && full_path.find("Disk_2")!=string::npos)) structId = 4;
01702           else if((full_path.find("HalfCylinder_pI")!=string::npos && full_path.find("Disk_1")!=string::npos) ||
01703                   (full_path.find("HalfCylinder_pO")!=string::npos && full_path.find("Disk_1")!=string::npos)) structId = 5;
01704           else if((full_path.find("HalfCylinder_pI")!=string::npos && full_path.find("Disk_2")!=string::npos) ||
01705                   (full_path.find("HalfCylinder_pO")!=string::npos && full_path.find("Disk_2")!=string::npos)) structId = 6;
01706           if(full_path.find("_01")!=string::npos) subStructId = 1;
01707           else if(full_path.find("_02")!=string::npos) subStructId = 2;
01708           else if(full_path.find("_03")!=string::npos) subStructId = 3;
01709           else if(full_path.find("_04")!=string::npos) subStructId = 4;
01710           else if(full_path.find("_05")!=string::npos) subStructId = 5;
01711           else if(full_path.find("_06")!=string::npos) subStructId = 6;
01712           else if(full_path.find("_07")!=string::npos) subStructId = 7;
01713           else if(full_path.find("_08")!=string::npos) subStructId = 8;
01714           else if(full_path.find("_09")!=string::npos) subStructId = 9;
01715           else if(full_path.find("_10")!=string::npos) subStructId = 10;
01716           else if(full_path.find("_11")!=string::npos) subStructId = 11;
01717           else if(full_path.find("_12")!=string::npos) subStructId = 12;
01718           else if(full_path.find("_13")!=string::npos) subStructId = 13;
01719           else if(full_path.find("_14")!=string::npos) subStructId = 14;
01720           else if(full_path.find("_15")!=string::npos) subStructId = 15;
01721           else if(full_path.find("_16")!=string::npos) subStructId = 16;
01722           else if(full_path.find("_17")!=string::npos) subStructId = 17;
01723           else if(full_path.find("_18")!=string::npos) subStructId = 18;
01724           else if(full_path.find("_19")!=string::npos) subStructId = 19;
01725           else if(full_path.find("_20")!=string::npos) subStructId = 20;
01726           else if(full_path.find("_21")!=string::npos) subStructId = 21;
01727           else if(full_path.find("_22")!=string::npos) subStructId = 22;
01728           allmodsMap->Fill(structId,subStructId);
01729           
01730           //use presence of any FED error as error flag (except for TBM or ROC resets):
01731           bool anyerr=false; bool type30=false; bool othererr=false;
01732           if(full_path.find("ndigis")!=string::npos) full_path = full_path.replace(full_path.find("ndigis"),7,"NErrors");
01733           me = bei->get(full_path);
01734           if(me) anyerr=true;
01735           //if(anyerr) cout<<"here is an error: "<<detId<<","<<me->getMean()<<endl;
01736           if(full_path.find("NErrors")!=string::npos) full_path = full_path.replace(full_path.find("NErrors"),9,"errorType");
01737           me = bei->get(full_path);
01738           if(me){
01739             for(int jj=1; jj<16; jj++){
01740               if(me->getBinContent(jj)>0.){
01741                 if(jj!=6) othererr=true;
01742                 else type30=true;
01743               }
01744             }
01745             if(type30){
01746               full_path = full_path.replace(full_path.find("errorType"),10,"TBMMessage");
01747               me = bei->get(full_path);
01748               if(me){
01749                 for(int kk=1; kk<9; kk++){
01750                   if(me->getBinContent(kk)>0.){
01751                     if(kk!=6 && kk!=7) othererr=true;
01752                   }
01753                 }
01754               }
01755             }
01756           }
01757           if(anyerr && othererr){
01758             errmodsMap->Fill(structId,subStructId);
01759           }
01760         }
01761       }
01762     }
01763   }
01764 
01765   vector<string> subDirVec = bei->getSubdirs();  
01766   for (vector<string>::const_iterator ic = subDirVec.begin();
01767        ic != subDirVec.end(); ic++) {
01768     bei->cd(*ic);
01769     init=false;
01770     fillGlobalQualityPlot(bei,init,eSetup,nFEDs,Tier0Flag);
01771     bei->goUp();
01772   }
01773   
01774   if(bei->pwd() == "Pixel/EventInfo/reportSummaryContents"){
01775     SummaryReportMap = bei->get("Pixel/EventInfo/reportSummaryMap");
01776     if(SummaryReportMap){ 
01777       float contents=0.;
01778       if(!Tier0Flag){
01779         for(int i=1; i!=41; i++)for(int j=1; j!=37; j++){
01780           //cout<<"bin: "<<i<<","<<j<<endl;
01781           contents = (allmodsMap->GetBinContent(i,j))-(errmodsMap->GetBinContent(i,j));
01782           goodmodsMap->SetBinContent(i,j,contents);
01783           //cout<<"\t the map: "<<allmodsMap->GetBinContent(i,j)<<","<<errmodsMap->GetBinContent(i,j)<<endl;
01784           if(allmodsMap->GetBinContent(i,j)>0){
01785             contents = (goodmodsMap->GetBinContent(i,j))/(allmodsMap->GetBinContent(i,j));
01786           }else{
01787             contents = 0.;
01788           }
01789           //cout<<"\t\t MAP: "<<i<<","<<j<<","<<contents<<endl;
01790           SummaryReportMap->setBinContent(i,j,contents);
01791         }
01792       }else{
01793         for(int i=1; i!=8; i++)for(int j=1; j!=23; j++){
01794           //cout<<"bin: "<<i<<","<<j<<endl;
01795           contents = (allmodsMap->GetBinContent(i,j))-(errmodsMap->GetBinContent(i,j));
01796           goodmodsMap->SetBinContent(i,j,contents);
01797           //cout<<"\t the map: "<<allmodsMap->GetBinContent(i,j)<<","<<errmodsMap->GetBinContent(i,j)<<endl;
01798           if(allmodsMap->GetBinContent(i,j)>0){
01799             contents = (goodmodsMap->GetBinContent(i,j))/(allmodsMap->GetBinContent(i,j));
01800           }else{
01801             contents = 0.;
01802           }
01803           //cout<<"\t\t MAP: "<<i<<","<<j<<","<<contents<<endl;
01804           SummaryReportMap->setBinContent(i,j,contents);
01805         }
01806       }
01807     }
01808   }
01809   
01810   if(allmodsMap) allmodsMap->Clear();
01811   if(goodmodsMap) goodmodsMap->Clear();
01812   if(errmodsMap) errmodsMap->Clear();
01813   //cout<<"counters: "<<count<<" , "<<errcount<<endl;
01814 }

void SiPixelInformationExtractor::fillModuleAndHistoList ( DQMStore bei,
std::vector< std::string > &  modules,
std::map< std::string, std::string > &  histos 
) [private]

Referenced by readModuleAndHistoList().

void SiPixelInformationExtractor::findNoisyPixels ( DQMStore bei,
bool  init,
float  noiseRate,
int  noiseRateDenominator,
edm::EventSetup const &  eSetup 
)

Definition at line 1818 of file SiPixelInformationExtractor.cc.

References DQMStore::cd(), counter(), sipixelobjects::ElectronicIndex::dcol, sipixelobjects::LocalPixel::DcolPxid::dcol, detId, lat::endl(), endOfModules_, EventRateBarrelPixels, EventRateEndcapPixels, SiPixelFedCablingMap::fed(), MonitorElement::Fill(), edm::EventSetup::get(), DQMStore::get(), getDetId(), MonitorElement::getEntries(), DQMStore::getMEs(), MonitorElement::getPathname(), DQMStore::getSubdirs(), MonitorElement::getTH2F(), DQMStore::goUp(), i, sipixelobjects::PixelROC::idInDetUnit(), j, link(), sipixelobjects::ElectronicIndex::link, sipixelobjects::PixelFEDCabling::link(), muonGeometry::loc, python::multivaluedict::map(), myfile_, PixelEndcapName::name(), PixelBarrelName::name(), nevents_, noisyDetIds_, edm::ESHandle< T >::product(), DQMStore::pwd(), sipixelobjects::ElectronicIndex::pxid, sipixelobjects::LocalPixel::DcolPxid::pxid, sipixelobjects::PixelFEDLink::roc(), sipixelobjects::ElectronicIndex::roc, sipixelobjects::LocalPixel::rocCol(), sipixelobjects::LocalPixel::rocRow(), DQMStore::setCurrentFolder(), DetId::subdetId(), theCablingMap, and value.

Referenced by SiPixelEDAClient::endLuminosityBlock(), and SiPixelEDAClient::endRun().

01819 {
01820 //cout<<"Entering SiPixelInformationExtractor::findNoisyPixels with noiseRate set to "<<noiseRate_<<endl;
01821 
01822   
01823   if(init){
01824     endOfModules_=false;
01825     nevents_=noiseRateDenominator_;
01826     if(nevents_ == -1){
01827       bei->cd();
01828       bei->setCurrentFolder("Pixel/EventInfo");
01829       nevents_ = (bei->get("Pixel/EventInfo/processedEvents"))->getIntValue();
01830     }
01831     bei->cd();  
01832     myfile_.open ("NoisyPixelList.txt", ios::app);
01833     myfile_ << "Noise summary, ran over " << nevents_ << " events, threshold was set to " << noiseRate_ <<  std::endl;
01834   }
01835   string currDir = bei->pwd();
01836   string dname = currDir.substr(currDir.find_last_of("/")+1);
01837   QRegExp rx("Module_");
01838   if(rx.search(dname)!=-1){
01839     vector<string> meVec = bei->getMEs();
01840     for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
01841       string full_path = currDir + "/" + (*it);
01842       if(full_path.find("hitmap_siPixelDigis")!=string::npos){
01843         //broken HV bond:
01844         if(currDir.find("HalfCylinder_mI/Disk_1/Blade_01/Panel_2/Module_2")!=string::npos) continue;
01845         //?noisy?
01846         //if(currDir.find("HalfCylinder_mI/Disk_1/Blade_12/Panel_1/Module_4")!=string::npos) continue;
01847         //ROG with HV problem (short?):
01848         if(currDir.find("HalfCylinder_mI/Disk_1/Blade_10/Panel_1/Module_3")!=string::npos) continue;
01849         if(currDir.find("HalfCylinder_mI/Disk_1/Blade_10/Panel_1/Module_4")!=string::npos) continue;
01850         if(currDir.find("HalfCylinder_mI/Disk_1/Blade_10/Panel_2/Module_2")!=string::npos) continue;
01851         if(currDir.find("HalfCylinder_mI/Disk_1/Blade_10/Panel_2/Module_3")!=string::npos) continue;
01852         if(currDir.find("HalfCylinder_mI/Disk_1/Blade_11/Panel_1/Module_3")!=string::npos) continue;
01853         if(currDir.find("HalfCylinder_mI/Disk_1/Blade_11/Panel_1/Module_4")!=string::npos) continue;
01854         if(currDir.find("HalfCylinder_mI/Disk_1/Blade_11/Panel_2/Module_2")!=string::npos) continue;
01855         if(currDir.find("HalfCylinder_mI/Disk_1/Blade_11/Panel_2/Module_3")!=string::npos) continue;
01856         if(currDir.find("HalfCylinder_mI/Disk_1/Blade_12/Panel_1/Module_3")!=string::npos) continue;
01857         if(currDir.find("HalfCylinder_mI/Disk_1/Blade_12/Panel_1/Module_4")!=string::npos) continue;
01858         if(currDir.find("HalfCylinder_mI/Disk_1/Blade_12/Panel_2/Module_2")!=string::npos) continue;
01859         if(currDir.find("HalfCylinder_mI/Disk_1/Blade_12/Panel_2/Module_3")!=string::npos) continue;
01860         MonitorElement * me = bei->get(full_path);
01861         if (!me) continue;
01862         float noiseRate = (me->getEntries())/float(nevents_);
01863 //        if(noiseRate > noiseRate_){
01864           int detid=getDetId(me); int pixcol=-1; int pixrow=-1; 
01865           std::vector<std::pair<std::pair<int, int>, float> > noisyPixelsInModule;
01866           TH2F * hothisto = me->getTH2F();
01867           if(hothisto){
01868             for(int i=1; i!=hothisto->GetNbinsX()+1; i++){
01869               for(int j=1; j!=hothisto->GetNbinsY()+1; j++){
01870                 float value = (hothisto->GetBinContent(i,j))/float(nevents_);
01871                 if(me->getPathname().find("Barrel")!=string::npos){
01872                   EventRateBarrelPixels = bei->get("Pixel/Barrel/barrelEventRate");
01873                   if(EventRateBarrelPixels) EventRateBarrelPixels->Fill(value);
01874                 }else if(me->getPathname().find("Endcap")!=string::npos){
01875                   EventRateEndcapPixels = bei->get("Pixel/Endcap/endcapEventRate");
01876                   if(EventRateEndcapPixels) EventRateEndcapPixels->Fill(value);
01877                 }
01878                 if(value > noiseRate_){
01879                   pixcol = i-1;
01880                   pixrow = j-1;
01881                   //cout<<"pixcol= "<<pixcol<<" , pixrow= "<<pixrow<<endl;
01882  
01883                   std::pair<int, int> address(pixcol, pixrow);
01884                   std::pair<std::pair<int, int>, float>  PixelStats(address, value);
01885                   noisyPixelsInModule.push_back(PixelStats);
01886                 }
01887               }
01888             }
01889           }
01890           noisyDetIds_[detid] = noisyPixelsInModule;
01891           //if(noisyPixelsInModule.size()>=20) cout<<"This module has 20 or more hot pixels: "<<detid<<","<<bei->pwd()<<","<<noisyPixelsInModule.size()<<endl;
01892 //      }
01893       }
01894     }
01895   }
01896   vector<string> subDirVec = bei->getSubdirs();  
01897   for (vector<string>::const_iterator ic = subDirVec.begin();
01898        ic != subDirVec.end(); ic++) {
01899     if((*ic).find("AdditionalPixelErrors")!=string::npos) continue;
01900     bei->cd(*ic);
01901     init=false;
01902     findNoisyPixels(bei,init,noiseRate_,noiseRateDenominator_,eSetup);
01903     bei->goUp();
01904   }
01905 
01906   if(bei->pwd().find("EventInfo")!=string::npos) endOfModules_ = true;
01907   
01908   if(!endOfModules_) return;
01909   
01910   if(currDir == "Pixel/EventInfo/reportSummaryContents"){
01911     eSetup.get<SiPixelFedCablingMapRcd>().get(theCablingMap);
01912     std::vector<std::pair<sipixelobjects::DetectorIndex,double> > pixelvec;
01913     std::map<uint32_t,int> myfedmap;
01914     std::map<uint32_t,std::string> mynamemap;
01915     int realfedID = -1;
01916     int Nnoisies = noisyDetIds_.size();
01917     //cout<<"Number of noisy modules: "<<Nnoisies<<endl;
01918     int counter = 0;
01919     int n_noisyrocs_all = 0;
01920     int n_noisyrocs_barrel = 0;
01921     int n_noisyrocs_endcap = 0;
01922     int n_verynoisyrocs_all = 0;
01923     int n_verynoisyrocs_barrel = 0;
01924     int n_verynoisyrocs_endcap = 0;
01925     for(std::map<uint32_t, std::vector< std::pair<std::pair<int, int>, float> > >::const_iterator it = noisyDetIds_.begin(); 
01926         it != noisyDetIds_.end(); it++){
01927       uint32_t detid = (*it).first;
01928       std::vector< std::pair<std::pair<int, int>, float> > noisyPixels = (*it).second;
01929       //cout<<noisyPixels.size()<<" noisy pixels in a module "<< bei->pwd()<<endl;
01930       // now convert into online conventions:
01931       for(int fedid=0; fedid<=40; ++fedid){
01932         SiPixelFrameConverter converter(theCablingMap.product(),fedid);
01933         uint32_t newDetId = detid;
01934         if(converter.hasDetUnit(newDetId)){
01935           realfedID=fedid;
01936           break;   
01937         }
01938       }
01939       if(realfedID==-1) continue; 
01940       DetId detId(detid);
01941       uint32_t detSubId = detId.subdetId();
01942       std::string outputname;
01943       if (detSubId == 2){   //FPIX
01944         PixelEndcapName nameworker(detid);
01945         outputname = nameworker.name();
01946       } else if(detSubId == 1){   //BPIX
01947         PixelBarrelName nameworker(detid);
01948         outputname = nameworker.name();
01949 
01950       } else{
01951         continue;
01952       } 
01953       std::map<int,int> myrocmap;
01954       myfedmap[detid]=realfedID;
01955       mynamemap[detid]=outputname;
01956       
01957       for(std::vector< std::pair< std::pair<int,int>, float> >::const_iterator pxl = noisyPixels.begin(); 
01958           pxl != noisyPixels.end(); pxl++){
01959         std::pair<int,int> offlineaddress = (*pxl).first;
01960         float Noise_frac = (*pxl).second;
01961         int offlineColumn = offlineaddress.first;
01962         int offlineRow = offlineaddress.second;
01963         counter++;
01964         
01965 
01966         sipixelobjects::ElectronicIndex cabling; 
01967         SiPixelFrameConverter formatter(theCablingMap.product(),realfedID);
01968         sipixelobjects::DetectorIndex detector = {detid, offlineRow, offlineColumn};      
01969         formatter.toCabling(cabling,detector);
01970         // cabling should now contain cabling.roc and cabling.dcol  and cabling.pxid
01971         // however, the coordinates now need to be converted from dcl,pxid to the row,col coordinates used in the calibration info 
01972         sipixelobjects::LocalPixel::DcolPxid loc;
01973         loc.dcol = cabling.dcol;
01974         loc.pxid = cabling.pxid;
01975 
01976         const sipixelobjects::PixelFEDCabling *theFed= theCablingMap.product()->fed(realfedID);
01977         const sipixelobjects::PixelFEDLink * link = theFed->link(cabling.link);
01978         const sipixelobjects::PixelROC *theRoc = link->roc(cabling.roc);
01979         sipixelobjects::LocalPixel locpixel(loc);
01980         
01981         int onlineColumn = locpixel.rocCol();
01982         int onlineRow= locpixel.rocRow();
01983         myrocmap[(theRoc->idInDetUnit())]++;
01984         //cout<<counter<<" : \t detid= "<<detid<<" , OFF col,row= "<<offlineColumn<<","<<offlineRow<<" , ON roc,col,row= "<<theRoc->idInDetUnit()<<","<<onlineColumn<<","<<onlineRow<<endl;
01985         myfile_<<"NAME: "<<outputname<<" , DETID: "<<detid<<" , OFFLINE: col,row: "<<offlineColumn<<","<<offlineRow<<"  \t , ONLINE: roc,col,row: "<<theRoc->idInDetUnit()<<","<<onlineColumn<<","<<onlineRow<< "  \t , fed,dcol,pixid,link: "<<realfedID<<","<<loc.dcol<<","<<loc.pxid<<","<<cabling.link << ", Noise fraction: " << Noise_frac << std::endl;;
01986       }
01987       for(std::map<int, int>::const_iterator nrc = myrocmap.begin(); nrc != myrocmap.end(); nrc++){
01988         if((*nrc).second > 0){
01989           n_noisyrocs_all++;
01990           if(detSubId == 2){
01991             n_noisyrocs_endcap++;
01992           } else if(detSubId == 1){
01993             n_noisyrocs_barrel++;}
01994         }
01995         if((*nrc).second > 40){
01996           n_verynoisyrocs_all++;
01997           if(detSubId == 2){
01998             n_verynoisyrocs_endcap++;
01999           } else if(detSubId == 1){
02000             n_verynoisyrocs_barrel++;}
02001         }
02002       }
02003     }
02004     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;
02005     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;
02006 
02007   }
02008   myfile_.close();
02009 //cout<<"...leaving SiPixelInformationExtractor::findNoisyPixels!"<<endl;
02010   return;
02011 }

int SiPixelInformationExtractor::getDetId ( MonitorElement mE  ) 

(Documentation under construction).

Given a pointer to ME returns the associated detId

Definition at line 1220 of file SiPixelInformationExtractor.cc.

References MonitorElement::getName().

Referenced by fillGlobalQualityPlot(), and findNoisyPixels().

01221 {
01222  QRegExp rx("(\\w+)_(\\w+)_(\\d+)") ;
01223  QString mEName = mE->getName() ;
01224 
01225  int detId = 0;
01226  
01227  if( rx.search(mEName) != -1 )
01228  {
01229   detId = rx.cap(3).toInt() ;
01230 // } else {
01231 //  cout << ACYellow << ACBold
01232 //       << "[SiPixelInformationExtractor::getDetId()] "
01233 //       << ACPlain
01234 //       << "Could not extract detId from "
01235 //       << mEName
01236 //       << endl ;
01237  }
01238       
01239   return detId ;
01240   
01241 }

void SiPixelInformationExtractor::getHistosFromPath ( DQMStore bei,
const std::multimap< std::string, std::string > &  req_map,
xgi::Output *  out 
)

Definition at line 1307 of file SiPixelInformationExtractor.cc.

References DQMStore::getContents(), getItemValue(), MonitorElement::getName(), histoPlotter_, setHTMLHeader(), and SiPixelHistoPlotter::setNewPlot().

Referenced by SiPixelWebInterface::handleEDARequest().

01309                                                                     {
01310 //cout<<"Entering SiPixelInformationExtractor::getHistosFromPath: "<<endl;
01311   string path = getItemValue(req_map,"Path");
01312 //cout<<"Path is: "<<path<<endl;
01313   if (path.size() == 0) return;
01314 
01315   int width  = atoi(getItemValue(req_map, "width").c_str());
01316   int height = atoi(getItemValue(req_map, "height").c_str());
01317 
01318   string opt =" ";
01319 
01320   setHTMLHeader(out);
01321   vector<MonitorElement*> all_mes = bei->getContents(path);
01322   *out << path << " " ;
01323   for(vector<MonitorElement*>::iterator it=all_mes.begin(); it!=all_mes.end(); it++){
01324     MonitorElement* me = (*it);
01325     //cout<<"I'm in the loop now..."<<endl;
01326     if (!me) continue;
01327     string name = me->getName();
01328     string full_path = path + "/" + name;
01329 //cout<<"Calling HP::setNewPlot now for "<<full_path<<endl;
01330     histoPlotter_->setNewPlot(full_path, opt, width, height);
01331     *out << name << " ";
01332   }
01333 //  cout<<"... leaving SiPixelInformationExtractor::getHistosFromPath!"<<endl;
01334 }

void SiPixelInformationExtractor::getIMGCImage ( std::multimap< std::string, std::string > &  req_map,
xgi::Output *  out 
)

void SiPixelInformationExtractor::getIMGCImage ( const std::multimap< std::string, std::string > &  req_map,
xgi::Output *  out 
)

Referenced by SiPixelWebInterface::handleEDARequest().

void SiPixelInformationExtractor::getItemList ( const std::multimap< std::string, std::string > &  req_map,
std::string  item_name,
std::vector< std::string > &  items 
) [private]

std::string SiPixelInformationExtractor::getItemValue ( std::multimap< std::string, std::string > &  req_map,
std::string  item_name 
) [private]

Definition at line 736 of file SiPixelInformationExtractor.cc.

References value.

00737                                                                      {
00738 //cout<<"entering SiPixelInformationExtractor::getItemValue for item: "<<item_name<<endl;
00739   std::multimap<std::string,std::string>::iterator pos = req_map.find(item_name);
00740   std::string value = " ";
00741   if (pos != req_map.end()) {
00742 //  cout<<"item found!"<<endl;
00743     value = pos->second;
00744   }
00745 //  cout<<"value = "<<value<<endl;
00746   return value;
00747 //cout<<"leaving SiPixelInformationExtractor::getItemValue"<<endl;
00748 }

std::string SiPixelInformationExtractor::getItemValue ( const std::multimap< std::string, std::string > &  req_map,
std::string  item_name 
) [private]

(Documentation under construction).

This method

Definition at line 724 of file SiPixelInformationExtractor.cc.

References value.

Referenced by getHistosFromPath(), getTrackerMapHistos(), and readStatusMessage().

00725                                                                      {
00726 //cout<<"entering SiPixelInformationExtractor::getItemValue for item: "<<item_name<<endl;
00727   std::multimap<std::string,std::string>::const_iterator pos = req_map.find(item_name);
00728   std::string value = " ";
00729   if (pos != req_map.end()) {
00730     value = pos->second;
00731   }
00732 //  cout<<"value = "<<value<<endl;
00733   return value;
00734 //cout<<"leaving SiPixelInformationExtractor::getItemValue"<<endl;
00735 }

void SiPixelInformationExtractor::getMEList ( DQMStore bei,
std::map< std::string, int > &  mEHash 
)

Referenced by SiPixelTrackerMapCreator::create().

std::string SiPixelInformationExtractor::getMEType ( MonitorElement mE  ) 

Definition at line 261 of file SiPixelInformationExtractor.cc.

References MonitorElement::getRootObject().

Referenced by sendTkUpdatedStatus().

00262 {
00263   QString qtype = theMe->getRootObject()->IsA()->GetName() ;
00264   if(         qtype.contains("TH1") > 0 )
00265   {
00266     return "TH1" ;
00267   } else if ( qtype.contains("TH2") > 0  ) {
00268     return "TH2" ;
00269   } else if ( qtype.contains("TH3") > 0 ) {
00270     return "TH3" ;
00271   }
00272   return "TH1" ;
00273 }

void SiPixelInformationExtractor::getNormalization ( MonitorElement mE,
std::pair< double, double > &  norm,
QString  theMEType 
)

void SiPixelInformationExtractor::getNormalization2D ( MonitorElement mE,
std::pair< double, double > &  normX,
std::pair< double, double > &  normY,
QString  theMEType 
)

void SiPixelInformationExtractor::getSingleModuleHistos ( DQMStore bei,
const std::multimap< std::string, std::string > &  req_map,
xgi::Output *  out 
)

Referenced by SiPixelWebInterface::handleEDARequest().

void SiPixelInformationExtractor::getTrackerMapHistos ( DQMStore bei,
const std::multimap< std::string, std::string > &  req_map,
xgi::Output *  out 
)

Definition at line 155 of file SiPixelInformationExtractor.cc.

References ACBold, ACPlain, ACRed, ACYellow, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), DQMStore::getContents(), DQMParserBase::getDocument(), getItemValue(), SiPixelConfigParser::getMENamesForTrackerMap(), SiPixelFolderOrganizer::getModuleFolder(), MonitorElement::getName(), histoPlotter_, it, offlineXMLfile_, SiPixelHistoPlotter::setNewPlot(), and setXMLHeader().

Referenced by SiPixelWebInterface::handleEDARequest().

00157                                                                        {
00158 
00159 //  cout << __LINE__ << ACYellow << ACBold 
00160 //       << "[SiPixelInformationExtractor::getTrackerMapHistos] " << ACPlain << endl ;
00161   vector<string> hlist;
00162   string tkmap_name;
00163   SiPixelConfigParser config_parser;
00164   string localPath;
00165   if(offlineXMLfile_) localPath = string("DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
00166   else localPath = string("DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
00167   config_parser.getDocument(edm::FileInPath(localPath).fullPath());
00168 //  if (!config_parser.getMENamesForTrackerMap(tkmap_name, hlist)) return;
00169 //  if (hlist.size() == 0) return;
00170   if (!config_parser.getMENamesForTrackerMap(tkmap_name, hlist)) 
00171   {
00172    cout << __LINE__ << ACYellow << ACBold 
00173         << "[SiPixelInformationExtractor::getTrackerMapHistos] " 
00174         << ACPlain << ACRed << ACPlain 
00175         << "getMENamesForTrackerMap return false " 
00176         << ACPlain << endl ; assert(0) ;
00177    return;
00178   }
00179   if (hlist.size() == 0) 
00180   {
00181    cout << __LINE__ << ACYellow << ACBold 
00182         << "[SiPixelInformationExtractor::getTrackerMapHistos] " 
00183         << ACPlain << ACRed << ACPlain 
00184         << "hlist.size() == 0 " 
00185         << ACPlain << endl ;  assert(0) ;
00186    return;
00187   }
00188 
00189 
00190   uint32_t detId = atoi(getItemValue(req_map,"ModId").c_str());
00191  
00192   int width  = atoi(getItemValue(req_map, "width").c_str());
00193   int height = atoi(getItemValue(req_map, "height").c_str());
00194 
00195   string opt =" ";
00196   
00197   SiPixelFolderOrganizer folder_organizer;
00198   string path;
00199   folder_organizer.getModuleFolder(detId,path);   
00200 /*
00201   if((bei->pwd()).find("Module_") == string::npos &&
00202      (bei->pwd()).find("FED_") == string::npos){
00203     cout<<"This is not a pixel module or FED!"<<endl;
00204    cout << __LINE__ << ACYellow << ACBold 
00205         << "[SiPixelInformationExtractor::getTrackerMapHistos] " 
00206         << ACPlain << ACRed << ACPlain 
00207         << "This is not a pixel module or FED!" 
00208         << ACPlain << endl ; assert(0) ;
00209     return;
00210   }
00211 */ 
00212   vector<MonitorElement*> all_mes = bei->getContents(path);
00213   setXMLHeader(out);
00214 
00215 //  cout << __LINE__ << ACCyan << ACBold 
00216 //       << " [SiPixelInformationExtractor::getTrackerMapHistos()] path "
00217 //       << ACPlain << path << endl ; 
00218 //  cout << __LINE__ << ACCyan << ACBold 
00219 //       << " [SiPixelInformationExtractor::getTrackerMapHistos()] all_mes.size() "
00220 //       << ACPlain << all_mes.size() << endl ; 
00221 
00222   QRegExp rx("(\\w+)_(siPixel|ctfWithMaterialTracks)") ;
00223   QString theME ;
00224 
00225   *out << "<pathList>" << endl ;
00226   for (vector<string>::iterator ih = hlist.begin();
00227        ih != hlist.end(); ih++) {
00228     for (vector<MonitorElement *>::const_iterator it = all_mes.begin();
00229          it!= all_mes.end(); it++) {
00230       MonitorElement * me = (*it);
00231       if (!me) 
00232       { 
00233 //       cout << __LINE__ << ACCyan << ACBold 
00234 //            << " [SiPixelInformationExtractor::getTrackerMapHistos()] skipping "
00235 //                     << ACPlain << *ih << endl ; 
00236        continue;
00237       }
00238       theME = me->getName();
00239       string temp_s ; 
00240       if( rx.search(theME) != -1 ) { temp_s = rx.cap(1).latin1() ; }
00241 //      cout << __LINE__ << ACCyan << ACBold 
00242 //           << " [SiPixelInformationExtractor::getTrackerMapHistos()] temp_s "
00243 //           << ACPlain << temp_s << " <--> " << *ih << " |" << theME << "|" << endl ; 
00244       if (temp_s == (*ih)) {
00245         string full_path = path + "/" + me->getName();
00246         histoPlotter_->setNewPlot(full_path, opt, width, height);
00247 //cout << __LINE__ << ACRed << ACBold 
00248 //     << " [SiPixelInformationExtractor::getTrackerMapHistos()] fullPath: "
00249 //     << ACPlain << full_path << endl ; 
00250         *out << " <pathElement path='" << full_path << "' />" << endl ;
00251       }      
00252     }
00253   }   
00254   *out << "</pathList>" << endl ;
00255 //cout << __LINE__ << " [SiPixelInformationExtractor::getTrackerMapHistos()] endlist: " << endl ;
00256 }

bool SiPixelInformationExtractor::goToDir ( DQMStore bei,
std::string &  sname 
) [private]

bool SiPixelInformationExtractor::hasItem ( std::multimap< std::string, std::string > &  req_map,
std::string  item_name 
) [private]

void SiPixelInformationExtractor::printAlarmList ( DQMStore bei,
std::ostringstream &  str_val 
) [private]

void SiPixelInformationExtractor::printModuleHistoList ( DQMStore bei,
std::ostringstream &  str_val 
) [private]

void SiPixelInformationExtractor::printSummaryHistoList ( DQMStore bei,
std::ostringstream &  str_val 
) [private]

void SiPixelInformationExtractor::readAlarmTree ( DQMStore bei,
std::string &  str_name,
xgi::Output *  out 
)

Referenced by SiPixelWebInterface::handleEDARequest().

bool SiPixelInformationExtractor::readConfiguration ( std::map< std::string, std::vector< std::string > > &  layoutMap,
std::map< std::string, std::map< std::string, std::string > > &  qtestsMap,
std::map< std::string, std::vector< std::string > > &  meQTestsMap 
)

void SiPixelInformationExtractor::readConfiguration (  ) 

Read Configuration File.

Definition at line 98 of file SiPixelInformationExtractor.cc.

00098 { }

void SiPixelInformationExtractor::readModuleAndHistoList ( DQMStore bei,
xgi::Output *  out 
)

(Documentation under construction).

This method

Definition at line 280 of file SiPixelInformationExtractor.cc.

References lat::endl(), and fillModuleAndHistoList().

Referenced by SiPixelWebInterface::handleEDARequest().

00281                                                                           {
00282 //cout<<"entering SiPixelInformationExtractor::readModuleAndHistoList"<<endl;
00283    std::map<std::string,std::string> hnames;
00284    std::vector<std::string> mod_names;
00285    fillModuleAndHistoList(bei, mod_names, hnames);
00286    out->getHTTPResponseHeader().addHeader("Content-Type", "text/xml");
00287   *out << "<?xml version=\"1.0\" ?>" << std::endl;
00288   *out << "<ModuleAndHistoList>" << endl;
00289   *out << "<ModuleList>" << endl;
00290    for (std::vector<std::string>::iterator im = mod_names.begin();
00291         im != mod_names.end(); im++) {
00292      *out << "<ModuleNum>" << *im << "</ModuleNum>" << endl;     
00293    }
00294    *out << "</ModuleList>" << endl;
00295    *out << "<HistoList>" << endl;
00296 
00297    for (std::map<std::string,std::string>::iterator ih = hnames.begin();
00298         ih != hnames.end(); ih++) {
00299      *out << "<Histo type=\"" 
00300           << ih->second
00301           << "\">" 
00302           << ih->first 
00303           << "</Histo>" 
00304           << endl;     
00305    }
00306    *out << "</HistoList>" << endl;
00307    *out << "</ModuleAndHistoList>" << endl;
00308 //cout<<"leaving SiPixelInformationExtractor::readModuleAndHistoList"<<endl;
00309 }

void SiPixelInformationExtractor::readModuleHistoTree ( DQMStore bei,
std::string &  str_name,
xgi::Output *  out 
)

Referenced by SiPixelWebInterface::handleEDARequest().

void SiPixelInformationExtractor::readStatusMessage ( DQMStore bei,
std::multimap< std::string, std::string > &  req_map,
xgi::Output *  out 
)

Definition at line 849 of file SiPixelInformationExtractor.cc.

References dqm::qstatus::ERROR, DQMStore::getContents(), getItemValue(), MonitorElement::getName(), MonitorElement::getQReports(), histoPlotter_, dqm::qstatus::OTHER, SiPixelHistoPlotter::setNewPlot(), setXMLHeader(), dqm::qstatus::STATUS_OK, and dqm::qstatus::WARNING.

Referenced by SiPixelWebInterface::handleEDARequest().

00851                                                                     {
00852 
00853   string path = getItemValue(req_map,"Path");
00854 
00855   int width  = atoi(getItemValue(req_map, "width").c_str());
00856   int height = atoi(getItemValue(req_map, "height").c_str());
00857 
00858   string opt =" ";
00859 
00860   ostringstream test_status;
00861   
00862   setXMLHeader(out);
00863   *out << "<StatusAndPath>" << endl;
00864   *out << "<PathList>" << endl;
00865   if (path.size() == 0) {
00866     *out << "<HPath>" << "NONE" << "</HPath>" << endl;     
00867     test_status << " ME Does not exist ! " << endl;
00868   } else {
00869     vector<MonitorElement*> all_mes = bei->getContents(path);
00870     *out << "<HPath>" << path << "</HPath>" << endl;     
00871     for(vector<MonitorElement*>::iterator it=all_mes.begin(); it!=all_mes.end(); it++){
00872       MonitorElement* me = (*it);
00873       if (!me) continue;
00874       string name = me->getName();  
00875 
00876       vector<QReport*> q_reports = me->getQReports();
00877       if (q_reports.size() == 0) continue;
00878       string full_path = path + "/" + name;
00879       histoPlotter_->setNewPlot(full_path, opt, width, height);
00880 
00881       if (q_reports.size() != 0) {
00882         test_status << " QTest Status for " << name << " : " << endl;
00883         test_status << " ======================================================== " << endl; 
00884         for (vector<QReport*>::const_iterator it = q_reports.begin(); it != q_reports.end();
00885              it++) {
00886           int status = (*it)->getStatus();
00887           if (status == dqm::qstatus::WARNING) test_status << " Warning ";
00888           else if (status == dqm::qstatus::ERROR) test_status << " Error  ";
00889           else if (status == dqm::qstatus::STATUS_OK) test_status << " Ok  ";
00890           else if (status == dqm::qstatus::OTHER) test_status << " Other(" << status << ") ";
00891           string mess_str = (*it)->getMessage();
00892           test_status <<  "&lt;br/&gt;";
00893           mess_str = mess_str.substr(mess_str.find(" Test")+5);
00894           test_status <<  " QTest Name  : " << mess_str.substr(0, mess_str.find(")")+1) << endl;
00895           test_status << "&lt;br/&gt;";
00896           test_status <<  " QTest Detail  : " << mess_str.substr(mess_str.find(")")+2) << endl;
00897         } 
00898         test_status << " ======================================================== " << endl;
00899       }
00900       *out << "<HPath>" << name << "</HPath>" << endl;         
00901     }    
00902   }
00903   *out << "</PathList>" << endl;
00904   *out << "<StatusList>" << endl;
00905   *out << "<Status>" << test_status.str() << "</Status>" << endl;      
00906   *out << "</StatusList>" << endl;
00907   *out << "</StatusAndPath>" << endl;
00908 }

void SiPixelInformationExtractor::readSummaryHistoTree ( DQMStore bei,
std::string &  str_name,
xgi::Output *  out 
)

Referenced by SiPixelWebInterface::handleEDARequest().

void SiPixelInformationExtractor::selectColor ( std::string &  col,
std::vector< QReport * > &  reports 
) [private]

void SiPixelInformationExtractor::selectColor ( std::string &  col,
int  status 
) [private]

void SiPixelInformationExtractor::selectImage ( std::string &  name,
std::vector< QReport * > &  reports 
) [private]

void SiPixelInformationExtractor::selectImage ( std::string &  name,
int  status 
) [private]

void SiPixelInformationExtractor::selectMEList ( DQMStore bei,
std::string &  name,
std::vector< MonitorElement * > &  mes 
)

Referenced by SiPixelTrackerMapCreator::create(), and sendTkUpdatedStatus().

void SiPixelInformationExtractor::sendTkUpdatedStatus ( DQMStore bei,
xgi::Output *  out,
std::string &  meName,
std::string &  theTKType 
)

(Documentation under construction).

Definition at line 1082 of file SiPixelInformationExtractor.cc.

References DQMStore::cd(), computeStatus(), python::tagInventory::entries, dqm::qstatus::ERROR, getMEType(), SiPixelUtility::getStatus(), SiPixelUtility::getStatusColor(), int, dqm::qstatus::OTHER, selectMEList(), dqm::qstatus::STATUS_OK, and dqm::qstatus::WARNING.

Referenced by SiPixelWebInterface::periodicTkMapUpdate().

01086 {
01087   int rval, gval, bval;
01088   vector<string>          colorMap ;
01089   vector<MonitorElement*> me_list;
01090   pair<double,double>     norm ;
01091   double sts ;
01092     
01093   bei->cd();
01094   selectMEList(bei, theMEName, me_list) ;
01095   bei->cd();
01096 
01097   string detId = "undefined";
01098 
01099   QRegExp rx("\\w+_\\w+_(\\d+)");
01100   
01101 //   cout << ACYellow << ACBold
01102 //        << "[SiPixelInformationExtractor::sendTkUpdatedStatus()] "
01103 //        << ACPlain
01104 //        << "Preparing color map update for " 
01105 //        << theMEName
01106 //        << " type "
01107 //        << theTKType
01108 //        << " - List size: "
01109 //        << me_list.size() 
01110 //        << endl ;
01111   
01112   int maxEntries = 0 ;
01113   if( theTKType == "Entries") // In this case find the ME with the highest number of entries
01114   {                           // first and use that as a vertical scale normalization
01115    for(vector<MonitorElement*>::iterator it=me_list.begin(); it!=me_list.end(); it++)
01116    {
01117     int entries = (int)(*it)->getEntries() ;
01118     if( entries > maxEntries ) maxEntries = entries ;
01119    }
01120   }
01121   
01122   int entries = 0 ;
01123   stringstream jsSnippet ;
01124   for(vector<MonitorElement*>::iterator it=me_list.begin(); it!=me_list.end(); it++)
01125   {
01126     QString meName    = (*it)->getName() ;
01127     QString theMEType = getMEType(*it) ;
01128     if( rx.search(meName) != -1 ) 
01129     {
01130      detId = rx.cap(1).latin1() ;
01131      entries = (int)(*it)->getEntries() ;
01132      if( theTKType == "Averages") 
01133      {
01134       computeStatus(*it, sts, norm) ;
01135       SiPixelUtility::getStatusColor(sts, rval, gval, bval);
01136      } else if( theTKType == "Entries") {
01137       sts = (double)entries / (double)maxEntries ;
01138       SiPixelUtility::getStatusColor(sts, rval, gval, bval);
01139       if( entries > maxEntries ) maxEntries = entries ;
01140       norm.first  = 0 ;
01141       norm.second = maxEntries ;
01142      } else {
01143       int status  =  SiPixelUtility::getStatus((*it));
01144       if(        status == dqm::qstatus::ERROR ) 
01145       {
01146        rval = 255; gval =   0; bval =   0;
01147       } else if (status == dqm::qstatus::WARNING )  {
01148        rval = 255; gval = 255; bval =   0; 
01149       } else if (status == dqm::qstatus::OTHER)     {
01150        rval =   0; gval =   0; bval = 255;
01151       } else if (status == dqm::qstatus::STATUS_OK) {
01152        rval =   0; gval = 255; bval =   0;
01153       } else {  
01154        rval = 255; gval = 255; bval = 255;
01155       }
01156      }
01157      jsSnippet.str("") ;
01158      jsSnippet << " <DetInfo DetId='"
01159                << detId
01160                << "' red='"
01161                << rval
01162                << "' green='"
01163                << gval
01164                << "' blue='"
01165                << bval
01166                << "' entries='"
01167                << entries
01168                << "'/>" ;
01169      colorMap.push_back(jsSnippet.str()) ;
01170 //      if( it == me_list.begin()) // The first should be equal to all others...
01171 //      {
01172 //       getNormalization((*it), norm, theMEType.latin1()) ;
01173 //      }
01174     }
01175   }
01176 
01177 //  delete random ;
01178   
01179 //   cout << ACYellow << ACBold
01180 //        << "[SiPixelInformationExtractor::sendTkUpdatedStatus()] "
01181 //        << ACPlain
01182 //        << "Color map consists of "
01183 //        << colorMap.size()
01184 //        << " snippets: start shipping back"
01185 //        << endl ;
01186 
01187   out->getHTTPResponseHeader().addHeader("Content-Type", "text/xml");
01188   *out << "<?xml version=\"1.0\" ?>" << endl;
01189   *out << "<TrackerMapUpdate>"       << endl;
01190 
01191   for(vector<string>::iterator it=colorMap.begin(); it!=colorMap.end(); it++)
01192   {
01193    *out << *it << endl;
01194   }
01195  
01196   *out << " <theLimits id=\"normalizationLimits\" normLow=\"" 
01197        << norm.first 
01198        << "\" normHigh=\""
01199        << norm.second 
01200        << "\" />"
01201        << endl;
01202   *out << "</TrackerMapUpdate>"              
01203        << endl;
01204 
01205 //   cout << ACYellow << ACBold
01206 //        << "[SiPixelInformationExtractor::sendTkUpdatedStatus()] "
01207 //        << ACPlain
01208 //        << "Color map updated within range " 
01209 //        << norm.first
01210 //        << "-"
01211 //        << norm.second
01212 //        << endl ;
01213 }

void SiPixelInformationExtractor::setHTMLHeader ( xgi::Output *  out  )  [private]

Definition at line 2024 of file SiPixelInformationExtractor.cc.

Referenced by getHistosFromPath().

02024                                                                {
02025   out->getHTTPResponseHeader().addHeader("Content-Type", "text/html");
02026   out->getHTTPResponseHeader().addHeader("Pragma", "no-cache");   
02027   out->getHTTPResponseHeader().addHeader("Cache-Control", "no-store, no-cache, must-revalidate,max-age=0");
02028   out->getHTTPResponseHeader().addHeader("Expires","Mon, 26 Jul 1997 05:00:00 GMT");
02029 }

void SiPixelInformationExtractor::setPlainHeader ( xgi::Output *  out  )  [private]

Definition at line 2044 of file SiPixelInformationExtractor.cc.

02044                                                                 {
02045   out->getHTTPResponseHeader().addHeader("Content-Type", "text/plain");
02046   out->getHTTPResponseHeader().addHeader("Pragma", "no-cache");   
02047   out->getHTTPResponseHeader().addHeader("Cache-Control", "no-store, no-cache, must-revalidate,max-age=0");
02048   out->getHTTPResponseHeader().addHeader("Expires","Mon, 26 Jul 1997 05:00:00 GMT");
02049 
02050 }

void SiPixelInformationExtractor::setXMLHeader ( xgi::Output *  out  )  [private]

Definition at line 2033 of file SiPixelInformationExtractor.cc.

References lat::endl().

Referenced by getTrackerMapHistos(), and readStatusMessage().

02033                                                               {
02034   out->getHTTPResponseHeader().addHeader("Content-Type", "text/xml");
02035   out->getHTTPResponseHeader().addHeader("Pragma", "no-cache");   
02036   out->getHTTPResponseHeader().addHeader("Cache-Control", "no-store, no-cache, must-revalidate,max-age=0");
02037   out->getHTTPResponseHeader().addHeader("Expires","Mon, 26 Jul 1997 05:00:00 GMT");
02038   *out << "<?xml version=\"1.0\" ?>" << std::endl;
02039 
02040 }


Member Data Documentation

SiPixelActionExecutor* SiPixelInformationExtractor::actionExecutor_ [private]

Definition at line 171 of file SiPixelInformationExtractor.h.

int SiPixelInformationExtractor::alarmCounter_ [private]

Definition at line 167 of file SiPixelInformationExtractor.h.

int SiPixelInformationExtractor::allMods_ [private]

Definition at line 192 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag(), and SiPixelInformationExtractor().

TH2F* SiPixelInformationExtractor::allmodsEtaPhi [private]

Definition at line 199 of file SiPixelInformationExtractor.h.

TH2F* SiPixelInformationExtractor::allmodsMap [private]

Definition at line 202 of file SiPixelInformationExtractor.h.

Referenced by fillGlobalQualityPlot().

MonitorElement* SiPixelInformationExtractor::BarrelNdigisFREQProjection [private]

Definition at line 231 of file SiPixelInformationExtractor.h.

float SiPixelInformationExtractor::bpix_flag_ [private]

Definition at line 189 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

int SiPixelInformationExtractor::bpix_mods_ [private]

Definition at line 192 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

SiPixelConfigParser* SiPixelInformationExtractor::configParser_ [private]

Definition at line 169 of file SiPixelInformationExtractor.h.

SiPixelConfigWriter* SiPixelInformationExtractor::configWriter_ [private]

Definition at line 170 of file SiPixelInformationExtractor.h.

int SiPixelInformationExtractor::count [private]

Definition at line 205 of file SiPixelInformationExtractor.h.

Referenced by fillGlobalQualityPlot().

MonitorElement* SiPixelInformationExtractor::EndcapNdigisFREQProjection [private]

Definition at line 230 of file SiPixelInformationExtractor.h.

bool SiPixelInformationExtractor::endOfModules_ [private]

Definition at line 212 of file SiPixelInformationExtractor.h.

Referenced by findNoisyPixels().

int SiPixelInformationExtractor::err_bpix_mods_ [private]

Definition at line 195 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

int SiPixelInformationExtractor::err_fpix_mods_ [private]

Definition at line 196 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

int SiPixelInformationExtractor::err_hcylmI_mods_ [private]

Definition at line 196 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

int SiPixelInformationExtractor::err_hcylmO_mods_ [private]

Definition at line 197 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

int SiPixelInformationExtractor::err_hcylpI_mods_ [private]

Definition at line 197 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

int SiPixelInformationExtractor::err_hcylpO_mods_ [private]

Definition at line 197 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

int SiPixelInformationExtractor::err_shellmI_mods_ [private]

Definition at line 195 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

int SiPixelInformationExtractor::err_shellmO_mods_ [private]

Definition at line 195 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

int SiPixelInformationExtractor::err_shellpI_mods_ [private]

Definition at line 196 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

int SiPixelInformationExtractor::err_shellpO_mods_ [private]

Definition at line 196 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

int SiPixelInformationExtractor::errcount [private]

Definition at line 206 of file SiPixelInformationExtractor.h.

Referenced by fillGlobalQualityPlot().

TH2F* SiPixelInformationExtractor::errmodsEtaPhi [private]

Definition at line 200 of file SiPixelInformationExtractor.h.

TH2F* SiPixelInformationExtractor::errmodsMap [private]

Definition at line 203 of file SiPixelInformationExtractor.h.

Referenced by fillGlobalQualityPlot().

int SiPixelInformationExtractor::errorMods_ [private]

Definition at line 195 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag(), and SiPixelInformationExtractor().

MonitorElement* SiPixelInformationExtractor::EventRateBarrelPixels [private]

Definition at line 214 of file SiPixelInformationExtractor.h.

Referenced by bookGlobalQualityFlag(), and findNoisyPixels().

MonitorElement* SiPixelInformationExtractor::EventRateEndcapPixels [private]

Definition at line 215 of file SiPixelInformationExtractor.h.

Referenced by bookGlobalQualityFlag(), and findNoisyPixels().

bool SiPixelInformationExtractor::flagHotModule_ [private]

Definition at line 186 of file SiPixelInformationExtractor.h.

float SiPixelInformationExtractor::fpix_flag_ [private]

Definition at line 190 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

int SiPixelInformationExtractor::fpix_mods_ [private]

Definition at line 193 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

TH2F* SiPixelInformationExtractor::goodmodsEtaPhi [private]

Definition at line 201 of file SiPixelInformationExtractor.h.

TH2F* SiPixelInformationExtractor::goodmodsMap [private]

Definition at line 204 of file SiPixelInformationExtractor.h.

Referenced by fillGlobalQualityPlot().

bool SiPixelInformationExtractor::gotDigis [private]

Definition at line 207 of file SiPixelInformationExtractor.h.

float SiPixelInformationExtractor::hcylmI_flag_ [private]

Definition at line 190 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

int SiPixelInformationExtractor::hcylmI_mods_ [private]

Definition at line 193 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

float SiPixelInformationExtractor::hcylmO_flag_ [private]

Definition at line 190 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

int SiPixelInformationExtractor::hcylmO_mods_ [private]

Definition at line 193 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

float SiPixelInformationExtractor::hcylpI_flag_ [private]

Definition at line 191 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

int SiPixelInformationExtractor::hcylpI_mods_ [private]

Definition at line 194 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

float SiPixelInformationExtractor::hcylpO_flag_ [private]

Definition at line 191 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

int SiPixelInformationExtractor::hcylpO_mods_ [private]

Definition at line 194 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

SiPixelHistoPlotter* SiPixelInformationExtractor::histoPlotter_ [private]

Definition at line 234 of file SiPixelInformationExtractor.h.

Referenced by createImages(), getHistosFromPath(), getTrackerMapHistos(), readStatusMessage(), SiPixelInformationExtractor(), and ~SiPixelInformationExtractor().

std::map<std::string, std::vector< std::string> > SiPixelInformationExtractor::layoutMap [private]

Definition at line 175 of file SiPixelInformationExtractor.h.

SiPixelLayoutParser* SiPixelInformationExtractor::layoutParser_ [private]

Definition at line 172 of file SiPixelInformationExtractor.h.

std::map<std::string, std::vector<std::string> > SiPixelInformationExtractor::meQTestsMap [private]

Definition at line 180 of file SiPixelInformationExtractor.h.

ofstream SiPixelInformationExtractor::myfile_ [private]

Definition at line 209 of file SiPixelInformationExtractor.h.

Referenced by findNoisyPixels().

int SiPixelInformationExtractor::nevents_ [private]

Definition at line 210 of file SiPixelInformationExtractor.h.

Referenced by findNoisyPixels().

std::map< uint32_t , std::vector< std::pair< std::pair<int,int> , float > > > SiPixelInformationExtractor::noisyDetIds_ [private]

Definition at line 211 of file SiPixelInformationExtractor.h.

Referenced by findNoisyPixels().

bool SiPixelInformationExtractor::offlineXMLfile_ [private]

Definition at line 187 of file SiPixelInformationExtractor.h.

Referenced by getTrackerMapHistos().

float SiPixelInformationExtractor::qflag_ [private]

Definition at line 189 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag(), and SiPixelInformationExtractor().

std::map<std::string, std::map<std::string, std::string> > SiPixelInformationExtractor::qtestsMap [private]

Definition at line 178 of file SiPixelInformationExtractor.h.

bool SiPixelInformationExtractor::readMeMap_ [private]

Definition at line 185 of file SiPixelInformationExtractor.h.

bool SiPixelInformationExtractor::readQTestMap_ [private]

Definition at line 184 of file SiPixelInformationExtractor.h.

bool SiPixelInformationExtractor::readReference_ [private]

Definition at line 183 of file SiPixelInformationExtractor.h.

Referenced by SiPixelInformationExtractor().

float SiPixelInformationExtractor::shellmI_flag_ [private]

Definition at line 189 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

int SiPixelInformationExtractor::shellmI_mods_ [private]

Definition at line 192 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

float SiPixelInformationExtractor::shellmO_flag_ [private]

Definition at line 189 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

int SiPixelInformationExtractor::shellmO_mods_ [private]

Definition at line 192 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

float SiPixelInformationExtractor::shellpI_flag_ [private]

Definition at line 189 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

int SiPixelInformationExtractor::shellpI_mods_ [private]

Definition at line 192 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

float SiPixelInformationExtractor::shellpO_flag_ [private]

Definition at line 190 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

int SiPixelInformationExtractor::shellpO_mods_ [private]

Definition at line 193 of file SiPixelInformationExtractor.h.

Referenced by computeGlobalQualityFlag().

MonitorElement* SiPixelInformationExtractor::SummaryBarrel [private]

Definition at line 219 of file SiPixelInformationExtractor.h.

Referenced by bookGlobalQualityFlag(), and computeGlobalQualityFlag().

MonitorElement* SiPixelInformationExtractor::SummaryEndcap [private]

Definition at line 224 of file SiPixelInformationExtractor.h.

Referenced by bookGlobalQualityFlag(), and computeGlobalQualityFlag().

MonitorElement* SiPixelInformationExtractor::SummaryHCmI [private]

Definition at line 225 of file SiPixelInformationExtractor.h.

Referenced by bookGlobalQualityFlag(), and computeGlobalQualityFlag().

MonitorElement* SiPixelInformationExtractor::SummaryHCmO [private]

Definition at line 226 of file SiPixelInformationExtractor.h.

Referenced by bookGlobalQualityFlag(), and computeGlobalQualityFlag().

MonitorElement* SiPixelInformationExtractor::SummaryHCpI [private]

Definition at line 227 of file SiPixelInformationExtractor.h.

Referenced by bookGlobalQualityFlag(), and computeGlobalQualityFlag().

MonitorElement* SiPixelInformationExtractor::SummaryHCpO [private]

Definition at line 228 of file SiPixelInformationExtractor.h.

Referenced by bookGlobalQualityFlag(), and computeGlobalQualityFlag().

MonitorElement* SiPixelInformationExtractor::SummaryReport [private]

Definition at line 217 of file SiPixelInformationExtractor.h.

Referenced by bookGlobalQualityFlag(), and computeGlobalQualityFlag().

MonitorElement* SiPixelInformationExtractor::SummaryReportMap [private]

Definition at line 218 of file SiPixelInformationExtractor.h.

Referenced by bookGlobalQualityFlag(), and fillGlobalQualityPlot().

MonitorElement* SiPixelInformationExtractor::SummaryShellmI [private]

Definition at line 220 of file SiPixelInformationExtractor.h.

Referenced by bookGlobalQualityFlag(), and computeGlobalQualityFlag().

MonitorElement* SiPixelInformationExtractor::SummaryShellmO [private]

Definition at line 221 of file SiPixelInformationExtractor.h.

Referenced by bookGlobalQualityFlag(), and computeGlobalQualityFlag().

MonitorElement* SiPixelInformationExtractor::SummaryShellpI [private]

Definition at line 222 of file SiPixelInformationExtractor.h.

Referenced by bookGlobalQualityFlag(), and computeGlobalQualityFlag().

MonitorElement* SiPixelInformationExtractor::SummaryShellpO [private]

Definition at line 223 of file SiPixelInformationExtractor.h.

Referenced by bookGlobalQualityFlag(), and computeGlobalQualityFlag().

edm::ESHandle<SiPixelFedCablingMap> SiPixelInformationExtractor::theCablingMap [private]

Definition at line 213 of file SiPixelInformationExtractor.h.

Referenced by fillGlobalQualityPlot(), and findNoisyPixels().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:32:00 2009 for CMSSW by  doxygen 1.5.4