CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
SiPixelInformationExtractor Class Reference

#include <SiPixelInformationExtractor.h>

Public Member Functions

void bookNoisyPixels (DQMStore *bei, float noiseRate, bool Tier0Flag)
 
void computeStatus (MonitorElement *mE, double &colorValue, std::pair< double, double > &norm)
 (Documentation under construction). More...
 
void createImages (DQMStore *bei)
 
void findNoisyPixels (DQMStore *bei, bool init, float noiseRate, int noiseRateDenominator, edm::EventSetup const &eSetup)
 
int getDetId (MonitorElement *mE)
 (Documentation under construction). More...
 
void getMEList (DQMStore *bei, std::map< std::string, int > &mEHash)
 (Documentation under construction). More...
 
std::string getMEType (MonitorElement *mE)
 
void getNormalization (MonitorElement *mE, std::pair< double, double > &norm, std::string theMEType)
 (Documentation under construction). More...
 
void getNormalization2D (MonitorElement *mE, std::pair< double, double > &normX, std::pair< double, double > &normY, std::string theMEType)
 (Documentation under construction). More...
 
void readConfiguration ()
 Read Configuration File. More...
 
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 selectMEList (DQMStore *bei, std::string &name, std::vector< MonitorElement * > &mes)
 (Documentation under construction). More...
 
 SiPixelInformationExtractor (bool offlineXMLfile)
 Constructor of the SiPixelInformationExtractor class. More...
 
 ~SiPixelInformationExtractor ()
 Destructor of the SiPixelInformationExtractor class. More...
 

Private Member Functions

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

Private Attributes

SiPixelActionExecutoractionExecutor_
 
int alarmCounter_
 
MonitorElementBarrelNdigisFREQProjection
 
SiPixelConfigParserconfigParser_
 
SiPixelConfigWriterconfigWriter_
 
int count
 
MonitorElementEndcapNdigisFREQProjection
 
bool endOfModules_
 
int errcount
 
MonitorElementEventRateBarrelPixels
 
MonitorElementEventRateEndcapPixels
 
bool flagHotModule_
 
bool gotDigis
 
SiPixelHistoPlotterhistoPlotter_
 
std::map< std::string,
std::vector< std::string > > 
layoutMap
 
SiPixelLayoutParserlayoutParser_
 
std::map< std::string,
std::vector< std::string > > 
meQTestsMap
 
std::ofstream myfile_
 
int nevents_
 
std::map< uint32_t,
std::vector< std::pair
< std::pair< int, int >, float > > > 
noisyDetIds_
 
bool offlineXMLfile_
 
std::map< std::string,
std::map< std::string,
std::string > > 
qtestsMap
 
bool readMeMap_
 
bool readQTestMap_
 
bool readReference_
 
edm::ESHandle
< SiPixelFedCablingMap
theCablingMap
 

Detailed Description

Definition at line 41 of file SiPixelInformationExtractor.h.

Constructor & Destructor Documentation

SiPixelInformationExtractor::SiPixelInformationExtractor ( bool  offlineXMLfile)

Constructor of the SiPixelInformationExtractor class.

Definition at line 69 of file SiPixelInformationExtractor.cc.

References histoPlotter_, and readReference_.

69  : offlineXMLfile_(offlineXMLfile) {
70  edm::LogInfo("SiPixelInformationExtractor") <<
71  " Creating SiPixelInformationExtractor " << "\n" ;
72 
73  readReference_ = false;
74  histoPlotter_=0;
76 }
SiPixelInformationExtractor::~SiPixelInformationExtractor ( )

Destructor of the SiPixelInformationExtractor class.

Definition at line 82 of file SiPixelInformationExtractor.cc.

References histoPlotter_.

82  {
83  edm::LogInfo("SiPixelInformationExtractor") <<
84  " Deleting SiPixelInformationExtractor " << "\n" ;
85 
86  if (histoPlotter_) delete histoPlotter_;
87 }

Member Function Documentation

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

Definition at line 1350 of file SiPixelInformationExtractor.cc.

References DQMStore::book1D(), DQMStore::cd(), EventRateBarrelPixels, EventRateEndcapPixels, MonitorElement::setAxisTitle(), and DQMStore::setCurrentFolder().

1350  {
1351 //std::cout<<"BOOK NOISY PIXEL MEs!"<<std::endl;
1352  bei->cd();
1353  if(noiseRate_>=0.){
1354  bei->setCurrentFolder("Pixel/Barrel");
1355  EventRateBarrelPixels = bei->book1D("barrelEventRate","Digi event rate for all Barrel pixels",1000,0.,0.01);
1356  EventRateBarrelPixels->setAxisTitle("Event Rate",1);
1357  EventRateBarrelPixels->setAxisTitle("Number of Pixels",2);
1358  bei->cd();
1359  bei->setCurrentFolder("Pixel/Endcap");
1360  EventRateEndcapPixels = bei->book1D("endcapEventRate","Digi event rate for all Endcap pixels",1000,0.,0.01);
1361  EventRateEndcapPixels->setAxisTitle("Event Rate",1);
1362  EventRateEndcapPixels->setAxisTitle("Number of Pixels",2);
1363  }
1364 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:954
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:644
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)
Definition: DQMStore.cc:667
void SiPixelInformationExtractor::computeStatus ( MonitorElement theME,
double &  colorValue,
std::pair< double, double > &  norm 
)

(Documentation under construction).

Definition at line 916 of file SiPixelInformationExtractor.cc.

References MonitorElement::getMean(), getMEType(), getNormalization(), getNormalization2D(), mathSSE::return(), and mathSSE::sqrt().

919 {
920  double normalizationX = 1 ;
921  double normalizationY = 1 ;
922  double meanX = 0 ;
923  double meanY = 0 ;
924 
925  colorValue = 0 ;
926 
927  pair<double,double> normX ;
928  pair<double,double> normY ;
929 
930  string theMEType = getMEType(theME) ;
931 
932 // cout << ACRed << ACReverse
933 // << "[SiPixelInformationExtractor::computeStatus()]"
934 // << ACPlain
935 // << " Computing average for "
936 // << theME->getName()
937 // << endl ;
938 
939  if( theMEType.find("TH1") != string::npos)
940  {
941  meanX = (double)theME->getMean();
942  getNormalization(theME, normX, "TH1") ;
943  normalizationX = fabs( normX.second - normX.first) ;
944  if( normalizationX == 0 ) {normalizationX=1.E-20;}
945  colorValue = meanX / normalizationX ;
946  norm.first = normX.first ;
947  norm.second = normX.second ;
948  }
949 
950  if( theMEType.find("TH2") != string::npos)
951  {
952  meanX = (double)theME->getMean(1);
953  meanY = (double)theME->getMean(2);
954  getNormalization2D(theME, normX, normY, "TH2") ;
955  normalizationX = fabs( normX.second - normX.first) ;
956  normalizationY = fabs( normY.second - normY.first) ;
957  if( normalizationX == 0 ) {normalizationX=1.E-20;}
958  if( normalizationY == 0 ) {normalizationY=1.E-20;}
959  double cVX = meanX / normalizationX ;
960  double cVY = meanY / normalizationY ;
961  colorValue = sqrt(cVX*cVX + cVY*cVY) ;
962  if( normalizationX >= normalizationY )
963  {
964  norm.first = normX.first;
965  norm.second = normX.second ;
966  } else {
967  norm.first = normY.first;
968  norm.second = normY.second ;
969  }
970 // cout << ACBlue << ACBold << ACReverse
971 // << "[SiPixelInformationExtractor::computeStatus()]"
972 // << ACPlain << " "
973 // << theME->getName()
974 // << " meanX:Y "
975 // << meanX << ":" << meanY
976 // << " normX:Y "
977 // << norm.first << ":" << norm.second
978 // << endl ;
979  }
980 
981  return ;
982 }
void getNormalization(MonitorElement *mE, std::pair< double, double > &norm, std::string theMEType)
(Documentation under construction).
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
return((rh^lh)&mask)
T sqrt(T t)
Definition: SSEVec.h:48
void getNormalization2D(MonitorElement *mE, std::pair< double, double > &normX, std::pair< double, double > &normY, std::string theMEType)
(Documentation under construction).
std::string getMEType(MonitorElement *mE)
void SiPixelInformationExtractor::createDummiesFromLayout ( )
private
void SiPixelInformationExtractor::createImages ( DQMStore bei)

Definition at line 1608 of file SiPixelInformationExtractor.cc.

References SiPixelHistoPlotter::createPlots(), and histoPlotter_.

1608  {
1609  histoPlotter_->createPlots(bei);
1610 }
void createPlots(DQMStore *bei)
void SiPixelInformationExtractor::fillModuleAndHistoList ( DQMStore bei,
std::vector< std::string > &  modules,
std::map< std::string, std::string > &  histos 
)
private

(Documentation under construction).

This method

(Documentation under construction).

This method

Definition at line 322 of file SiPixelInformationExtractor.cc.

References DQMStore::cd(), relmon_rootfiles_spy::contents, spr::find(), DQMStore::get(), DQMStore::getMEs(), MonitorElement::getRootObject(), DQMStore::getSubdirs(), DQMStore::goUp(), and DQMStore::pwd().

324  {
325 //cout<<"entering SiPixelInformationExtractor::fillModuleAndHistoList"<<endl;
326  string currDir = bei->pwd();
327  //cout<<"currDir= "<<currDir<<endl;
328  if(currDir.find("Module_") != string::npos){
329  if(histos.size() == 0){
330  vector<string> contents = bei->getMEs();
331  for (vector<string>::const_iterator it = contents.begin(); it != contents.end(); it++) {
332  string hname = (*it).substr(0, (*it).find("_siPixel"));
333  if(hname==" ") hname = (*it).substr(0, (*it).find("_generalTracks"));
334  string fullpathname = bei->pwd() + "/" + (*it);
335  // cout<<"fullpathname="<<fullpathname<<endl;
336  MonitorElement * me = bei->get(fullpathname);
337  string htype = "undefined" ;
338  if(me) htype = me->getRootObject()->IsA()->GetName() ;
339  //cout<<"hname="<<hname<<endl;
340  //if(htype=="TH1F" || htype=="TH1D"){
341  histos[hname] = htype ;
342  string mId=" ";
343  if(hname.find("ndigis") !=string::npos) mId = (*it).substr((*it).find("ndigis_siPixelDigis_")+20, 9);
344  if(mId==" " && hname.find("nclusters") !=string::npos) mId = (*it).substr((*it).find("nclusters_siPixelClusters_")+26, 9);
345  if(mId==" " && hname.find("residualX") !=string::npos) mId = (*it).substr((*it).find("residualX_ctfWithMaterialTracks_")+32, 9);
346  if(mId==" " && hname.find("NErrors") !=string::npos) mId = (*it).substr((*it).find("NErrors_siPixelDigis_")+21, 9);
347  if(mId==" " && hname.find("ClustX") !=string::npos) mId = (*it).substr((*it).find("ClustX_siPixelRecHit_")+21, 9);
348  if(mId==" " && hname.find("pixelAlive") !=string::npos) mId = (*it).substr((*it).find("pixelAlive_siPixelCalibDigis_")+29, 9);
349  if(mId==" " && hname.find("Gain1d") !=string::npos) mId = (*it).substr((*it).find("Gain1d_siPixelCalibDigis_")+25, 9);
350  if(mId!=" ") modules.push_back(mId);
351  //cout<<"mId="<<mId<<endl;
352  //}
353  }
354  }
355  } else {
356  vector<string> subdirs = bei->getSubdirs();
357  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
358  if((bei->pwd()).find("Barrel")==string::npos && (bei->pwd()).find("Endcap")==string::npos) bei->goUp();
359  bei->cd(*it);
361  bei->goUp();
362  }
363  }
364 // fillBarrelList(bei, modules, histos);
365 //cout<<"leaving SiPixelInformationExtractor::fillModuleAndHistoList"<<endl;
366 }
void fillModuleAndHistoList(DQMStore *bei, std::vector< std::string > &modules, std::map< std::string, std::string > &histos)
(Documentation under construction).
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1659
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:644
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1708
TObject * getRootObject(void) const
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1682
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:678
const std::string & pwd(void) const
Definition: DQMStore.cc:639
void SiPixelInformationExtractor::findNoisyPixels ( DQMStore bei,
bool  init,
float  noiseRate,
int  noiseRateDenominator,
edm::EventSetup const &  eSetup 
)

Definition at line 1369 of file SiPixelInformationExtractor.cc.

References DQMStore::cd(), counter, sipixelobjects::ElectronicIndex::dcol, sipixelobjects::LocalPixel::DcolPxid::dcol, cond::rpcobgas::detid, RefreshWebPage::dname, endOfModules_, EventRateBarrelPixels, EventRateEndcapPixels, NewTree::fid, MonitorElement::Fill(), fff_deleter::formatter, edm::EventSetup::get(), DQMStore::get(), getDetId(), DQMStore::getMEs(), MonitorElement::getPathname(), DQMStore::getSubdirs(), MonitorElement::getTH2F(), DQMStore::goUp(), i, sipixelobjects::PixelROC::idInDetUnit(), PixelBarrelName::isHalfModule(), j, sipixelobjects::ElectronicIndex::link, python.multivaluedict::map(), myfile_, PixelBarrelName::name(), PixelEndcapName::name(), nevents_, noisyDetIds_, cmsHarvester::path, edm::ESHandle< class >::product(), DQMStore::pwd(), sipixelobjects::ElectronicIndex::pxid, sipixelobjects::LocalPixel::DcolPxid::pxid, sipixelobjects::ElectronicIndex::roc, sipixelobjects::LocalPixel::rocCol(), sipixelobjects::LocalPixel::rocRow(), DQMStore::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, DetId::subdetId(), theCablingMap, and relativeConstraints::value.

1370 {
1371 //cout<<"Entering SiPixelInformationExtractor::findNoisyPixels with noiseRate set to "<<noiseRate_<<endl;
1372 
1373 
1374  if(init){
1375  endOfModules_=false;
1376  nevents_=noiseRateDenominator_;
1377  if(nevents_ == -1){
1378  bei->cd();
1379  bei->setCurrentFolder("Pixel/EventInfo");
1380  nevents_ = (bei->get("Pixel/EventInfo/processedEvents"))->getIntValue();
1381  }
1382  bei->cd();
1383  myfile_.open ("NoisyPixelList.txt", ios::app);
1384  myfile_ << "Noise summary, ran over " << nevents_ << " events, threshold was set to " << noiseRate_ << std::endl;
1385  }
1386  string currDir = bei->pwd();
1387  string dname = currDir.substr(currDir.find_last_of("/")+1);
1388 
1389 
1390  if(dname.find("Module_")!=string::npos){
1391  vector<string> meVec = bei->getMEs();
1392  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
1393  string full_path = currDir + "/" + (*it);
1394  if(full_path.find("hitmap_siPixelDigis")!=string::npos){
1395  //broken HV bond:
1396  //if(currDir.find("HalfCylinder_mI/Disk_1/Blade_01/Panel_2/Module_2")!=string::npos) continue;
1397  //?noisy?
1398  //if(currDir.find("HalfCylinder_mI/Disk_1/Blade_12/Panel_1/Module_4")!=string::npos) continue;
1399  //ROG with HV problem (short?):
1400  //if(currDir.find("HalfCylinder_mI/Disk_1/Blade_10/Panel_1/Module_3")!=string::npos) continue;
1401  //if(currDir.find("HalfCylinder_mI/Disk_1/Blade_10/Panel_1/Module_4")!=string::npos) continue;
1402  //if(currDir.find("HalfCylinder_mI/Disk_1/Blade_10/Panel_2/Module_2")!=string::npos) continue;
1403  //if(currDir.find("HalfCylinder_mI/Disk_1/Blade_10/Panel_2/Module_3")!=string::npos) continue;
1404  //if(currDir.find("HalfCylinder_mI/Disk_1/Blade_11/Panel_1/Module_3")!=string::npos) continue;
1405  //if(currDir.find("HalfCylinder_mI/Disk_1/Blade_11/Panel_1/Module_4")!=string::npos) continue;
1406  //if(currDir.find("HalfCylinder_mI/Disk_1/Blade_11/Panel_2/Module_2")!=string::npos) continue;
1407  //if(currDir.find("HalfCylinder_mI/Disk_1/Blade_11/Panel_2/Module_3")!=string::npos) continue;
1408  //if(currDir.find("HalfCylinder_mI/Disk_1/Blade_12/Panel_1/Module_3")!=string::npos) continue;
1409  //if(currDir.find("HalfCylinder_mI/Disk_1/Blade_12/Panel_1/Module_4")!=string::npos) continue;
1410  //if(currDir.find("HalfCylinder_mI/Disk_1/Blade_12/Panel_2/Module_2")!=string::npos) continue;
1411  //if(currDir.find("HalfCylinder_mI/Disk_1/Blade_12/Panel_2/Module_3")!=string::npos) continue;
1412  MonitorElement * me = bei->get(full_path);
1413  if (!me) continue;
1414  int detid=getDetId(me); int pixcol=-1; int pixrow=-1;
1415 
1416  //cout<<"detid= "<<detid<<endl;
1417  std::vector<std::pair<std::pair<int, int>, float> > noisyPixelsInModule;
1418  TH2F * hothisto = me->getTH2F();
1419  if(hothisto){
1420  for(int i=1; i!=hothisto->GetNbinsX()+1; i++){
1421  for(int j=1; j!=hothisto->GetNbinsY()+1; j++){
1422  float value = (hothisto->GetBinContent(i,j))/float(nevents_);
1423  if(me->getPathname().find("Barrel")!=string::npos){
1424  EventRateBarrelPixels = bei->get("Pixel/Barrel/barrelEventRate");
1426  }else if(me->getPathname().find("Endcap")!=string::npos){
1427  EventRateEndcapPixels = bei->get("Pixel/Endcap/endcapEventRate");
1429  }
1430  if(value > noiseRate_){
1431  pixcol = i-1;
1432  pixrow = j-1;
1433  //cout<<"pixcol= "<<pixcol<<" , pixrow= "<<pixrow<<" , value= "<<value<<endl;
1434 
1435  std::pair<int, int> address(pixcol, pixrow);
1436  std::pair<std::pair<int, int>, float> PixelStats(address, value);
1437  noisyPixelsInModule.push_back(PixelStats);
1438  }
1439  }
1440  }
1441  }
1442  noisyDetIds_[detid] = noisyPixelsInModule;
1443  //if(noisyPixelsInModule.size()>=20) cout<<"This module has 20 or more hot pixels: "<<detid<<","<<bei->pwd()<<","<<noisyPixelsInModule.size()<<endl;
1444  }
1445  }
1446  }
1447  vector<string> subDirVec = bei->getSubdirs();
1448  for (vector<string>::const_iterator ic = subDirVec.begin();
1449  ic != subDirVec.end(); ic++) {
1450  if((*ic).find("AdditionalPixelErrors")!=string::npos) continue;
1451  bei->cd(*ic);
1452  init=false;
1453  findNoisyPixels(bei,init,noiseRate_,noiseRateDenominator_,eSetup);
1454  bei->goUp();
1455  }
1456 
1457  if(bei->pwd().find("EventInfo")!=string::npos) endOfModules_ = true;
1458 
1459  if(!endOfModules_) return;
1460  // myfile_ <<"am in "<<bei->pwd()<<" now!"<<endl;
1461  if(currDir == "Pixel/EventInfo/reportSummaryContents"){
1462  eSetup.get<SiPixelFedCablingMapRcd>().get(theCablingMap);
1463  std::vector<std::pair<sipixelobjects::DetectorIndex,double> > pixelvec;
1464  std::map<uint32_t,int> myfedmap;
1465  std::map<uint32_t,std::string> mynamemap;
1466  int realfedID = -1;
1467  //int Nnoisies = noisyDetIds_.size();
1468  //cout<<"Number of noisy modules: "<<Nnoisies<<endl;
1469  int counter = 0;
1470  int n_noisyrocs_all = 0;
1471  int n_noisyrocs_barrel = 0;
1472  int n_noisyrocs_endcap = 0;
1473  int n_verynoisyrocs_all = 0;
1474  int n_verynoisyrocs_barrel = 0;
1475  int n_verynoisyrocs_endcap = 0;
1476 
1477  for(int fid = 0; fid < 40; fid++){
1478  for(std::map<uint32_t, std::vector< std::pair<std::pair<int, int>, float> > >::const_iterator it = noisyDetIds_.begin();
1479  it != noisyDetIds_.end(); it++){
1480  uint32_t detid = (*it).first;
1481  std::vector< std::pair<std::pair<int, int>, float> > noisyPixels = (*it).second;
1482  //cout<<noisyPixels.size()<<" noisy pixels in a module: "<<detid<<endl;
1483  // now convert into online conventions:
1484  for(int fedid=0; fedid<=40; ++fedid){
1485  SiPixelFrameConverter converter(theCablingMap.product(),fedid);
1486  uint32_t newDetId = detid;
1487  if(converter.hasDetUnit(newDetId)){
1488  realfedID=fedid;
1489  break;
1490  }
1491  }
1492  if(fid == realfedID){
1493  //cout<<"FED ID is = "<<realfedID<<endl;
1494  if(realfedID==-1) continue;
1495  DetId detId(detid);
1496  uint32_t detSubId = detId.subdetId();
1497  std::string outputname;
1498  bool HalfModule = false;
1499  if (detSubId == 2){ //FPIX
1500  PixelEndcapName nameworker(detid);
1501  outputname = nameworker.name();
1502  } else if(detSubId == 1){ //BPIX
1503  PixelBarrelName nameworker(detid);
1504  outputname = nameworker.name();
1505  HalfModule = nameworker.isHalfModule();
1506 
1507  } else{
1508  continue;
1509  }
1510  std::map<int,int> myrocmap;
1511  myfedmap[detid]=realfedID;
1512  mynamemap[detid]=outputname;
1513 
1514  for(std::vector< std::pair< std::pair<int,int>, float> >::const_iterator pxl = noisyPixels.begin();
1515  pxl != noisyPixels.end(); pxl++){
1516  std::pair<int,int> offlineaddress = (*pxl).first;
1517  float Noise_frac = (*pxl).second;
1518  int offlineColumn = offlineaddress.first;
1519  int offlineRow = offlineaddress.second;
1520  counter++;
1521  //cout<<"noisy pixel counter: "<<counter<<endl;
1522 
1525  sipixelobjects::DetectorIndex detector = {detid, offlineRow, offlineColumn};
1526  formatter.toCabling(cabling,detector);
1527  // cabling should now contain cabling.roc and cabling.dcol and cabling.pxid
1528  // however, the coordinates now need to be converted from dcl,pxid to the row,col coordinates used in the calibration info
1530  loc.dcol = cabling.dcol;
1531  loc.pxid = cabling.pxid;
1532 
1533 
1534  // OLD version, not 31X compatible:
1535 // const sipixelobjects::PixelFEDCabling *theFed= theCablingMap.product()->fed(realfedID);
1536 // const sipixelobjects::PixelFEDLink * link = theFed->link(cabling.link);
1537 // const sipixelobjects::PixelROC *theRoc = link->roc(cabling.roc);
1538 // sipixelobjects::LocalPixel locpixel(loc);
1539 
1540 
1541  // FIX to adhere to new cabling map. To be replaced with CalibTracker/SiPixelTools detid - > hardware id classes ASAP.
1542  // const sipixelobjects::PixelFEDCabling *theFed= theCablingMap.product()->fed(realfedID);
1543  // const sipixelobjects::PixelFEDLink * link = theFed->link(cabling.link);
1544  // const sipixelobjects::PixelROC *theRoc = link->roc(cabling.roc);
1545  sipixelobjects::LocalPixel locpixel(loc);
1546  assert(realfedID >= 0);
1547  assert(cabling.link >= 0);
1548  assert(cabling.roc >= 0);
1549  sipixelobjects::CablingPathToDetUnit path = {static_cast<unsigned int>(realfedID),
1550  static_cast<unsigned int>(cabling.link),
1551  static_cast<unsigned int>(cabling.roc)};
1552  const sipixelobjects::PixelROC *theRoc = theCablingMap->findItem(path);
1553  // END of FIX
1554 
1555  int onlineColumn = locpixel.rocCol();
1556  int onlineRow= locpixel.rocRow();
1557  myrocmap[(theRoc->idInDetUnit())]++;
1558 
1559  // ROC numbers in the barrel go from 8 to 15 instead of 0 to 7 in half modules. This is a
1560  // fix to get the roc number, and add 8 to it if:
1561  // it's a Barrel module AND on the minus side AND a Half module
1562 
1563  int rocnumber = -1;
1564 
1565  if((detSubId == 1) && (outputname.find("mO")!=string::npos || outputname.find("mI")!=string::npos) && (HalfModule)){
1566  rocnumber = theRoc->idInDetUnit() + 8;
1567  }
1568  else{
1569  rocnumber = theRoc->idInDetUnit();
1570  }
1571 
1572  //cout<<counter<<" : \t detid= "<<detid<<" , OFF col,row= "<<offlineColumn<<","<<offlineRow<<" , ON roc,col,row= "<<theRoc->idInDetUnit()<<","<<onlineColumn<<","<<onlineRow<<endl;
1573  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;
1574  }
1575  for(std::map<int, int>::const_iterator nrc = myrocmap.begin(); nrc != myrocmap.end(); nrc++){
1576  if((*nrc).second > 0){
1577  n_noisyrocs_all++;
1578  if(detSubId == 2){
1579  n_noisyrocs_endcap++;
1580  } else if(detSubId == 1){
1581  n_noisyrocs_barrel++;}
1582  }
1583  if((*nrc).second > 40){
1584  n_verynoisyrocs_all++;
1585  if(detSubId == 2){
1586  n_verynoisyrocs_endcap++;
1587  } else if(detSubId == 1){
1588  n_verynoisyrocs_barrel++;}
1589  }
1590  }
1591  }
1592 
1593  }
1594  }
1595  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;
1596  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;
1597 
1598  }
1599  myfile_.close();
1600 //cout<<"...leaving SiPixelInformationExtractor::findNoisyPixels!"<<endl;
1601  return;
1602 }
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1659
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:644
int init
Definition: HydjetWrapper.h:62
std::map< uint32_t, std::vector< std::pair< std::pair< int, int >, float > > > noisyDetIds_
identify pixel inside single ROC
Definition: LocalPixel.h:7
void Fill(long long x)
const std::string & getPathname(void) const
get pathname of parent folder
tuple path
else: Piece not in the list, fine.
unsigned int idInDetUnit() const
id of this ROC in DetUnit etermined by token path
Definition: PixelROC.h:39
int j
Definition: DBlmapReader.cc:9
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1708
double collumn and pixel ID in double collumn representation
Definition: LocalPixel.h:22
Definition: DetId.h:18
T const * product() const
Definition: ESHandle.h:62
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1682
int getDetId(MonitorElement *mE)
(Documentation under construction).
static std::atomic< unsigned int > counter
tuple formatter
Definition: fff_deleter.py:293
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:678
void findNoisyPixels(DQMStore *bei, bool init, float noiseRate, int noiseRateDenominator, edm::EventSetup const &eSetup)
TH2F * getTH2F(void) const
edm::ESHandle< SiPixelFedCablingMap > theCablingMap
list fid
Definition: NewTree.py:51
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:667
const std::string & pwd(void) const
Definition: DQMStore.cc:639
int SiPixelInformationExtractor::getDetId ( MonitorElement mE)

(Documentation under construction).

(Documentation under construction).

Given a pointer to ME returns the associated detId

Definition at line 1228 of file SiPixelInformationExtractor.cc.

References MonitorElement::getName().

Referenced by findNoisyPixels().

1229 {
1230 //cout<<"In SiPixelInformationExtractor::getDetId: for ME= "<<mE->getName()<<endl;
1231  string mEName = mE->getName();
1232 
1233  int detId = 0;
1234 
1235  if( mEName.find("_3") != string::npos )
1236  {
1237  string detIdString = mEName.substr((mEName.find_last_of("_"))+1,9);
1238  //cout<<"string: "<<detIdString<<endl;
1239  std::istringstream isst;
1240  isst.str(detIdString);
1241  isst>>detId;
1242 // } else {
1243 // cout << ACYellow << ACBold
1244 // << "[SiPixelInformationExtractor::getDetId()] "
1245 // << ACPlain
1246 // << "Could not extract detId from "
1247 // << mEName
1248 // << endl ;
1249  }
1250  //cout<<"returning with: "<<detId<<endl;
1251  return detId ;
1252 
1253 }
const std::string & getName(void) const
get name of ME
void SiPixelInformationExtractor::getItemList ( const std::multimap< std::string, std::string > &  req_map,
std::string  item_name,
std::vector< std::string > &  items 
)
private

(Documentation under construction).

This method

Definition at line 689 of file SiPixelInformationExtractor.cc.

691  {
692 //cout<<"entering SiPixelInformationExtractor::getItemList"<<endl;
693  items.clear();
694  for (multimap<string, string>::const_iterator it = req_map.begin();
695  it != req_map.end(); it++) {
696  if (it->first == item_name) {
697  items.push_back(it->second);
698  }
699  }
700 //cout<<"leaving SiPixelInformationExtractor::getItemList"<<endl;
701 }
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 722 of file SiPixelInformationExtractor.cc.

References AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.

723  {
724 //cout<<"entering SiPixelInformationExtractor::getItemValue for item: "<<item_name<<endl;
725  std::multimap<std::string,std::string>::const_iterator pos = req_map.find(item_name);
726  std::string value = " ";
727  if (pos != req_map.end()) {
728  value = pos->second;
729  }
730 // cout<<"value = "<<value<<endl;
731  return value;
732 //cout<<"leaving SiPixelInformationExtractor::getItemValue"<<endl;
733 }
std::string SiPixelInformationExtractor::getItemValue ( std::multimap< std::string, std::string > &  req_map,
std::string  item_name 
)
private

Definition at line 734 of file SiPixelInformationExtractor.cc.

References AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.

735  {
736 //cout<<"entering SiPixelInformationExtractor::getItemValue for item: "<<item_name<<endl;
737  std::multimap<std::string,std::string>::iterator pos = req_map.find(item_name);
738  std::string value = " ";
739  if (pos != req_map.end()) {
740 // cout<<"item found!"<<endl;
741  value = pos->second;
742  }
743 // cout<<"value = "<<value<<endl;
744  return value;
745 //cout<<"leaving SiPixelInformationExtractor::getItemValue"<<endl;
746 }
void SiPixelInformationExtractor::getMEList ( DQMStore bei,
std::map< std::string, int > &  mEHash 
)

(Documentation under construction).

Definition at line 1259 of file SiPixelInformationExtractor.cc.

References ACBold, ACPlain, ACRed, DQMStore::cd(), relmon_rootfiles_spy::contents, gather_cfg::cout, DQMStore::getMEs(), DQMStore::getSubdirs(), DQMStore::goUp(), and DQMStore::pwd().

1261 {
1262  string currDir = bei->pwd();
1263 
1264 // cout << ACRed << ACBold
1265 // << "[SiPixelInformationExtractor::getMEList()]"
1266 // << ACPlain
1267 // << " Requesting ME list in "
1268 // << currDir
1269 // << endl ;
1270 
1271  string theME ;
1272 
1273  // Get ME from Collector/FU0/Tracker/PixelEndcap/HalfCylinder_pX/Disk_X/Blade_XX/Panel_XX/Module_XX
1274  if (currDir.find("Module_") != string::npos ||
1275  currDir.find("FED_") != string::npos)
1276  {
1277  vector<string> contents = bei->getMEs();
1278 
1279  for (vector<string>::const_iterator it = contents.begin(); it != contents.end(); it++)
1280  {
1281  theME = (*it) ;
1282 // cout << ACRed << ACReverse
1283 // << "[SiPixelInformationExtractor::getMEList()]"
1284 // << ACPlain
1285 // << " ME: "
1286 // << (*it)
1287 // << endl ;
1288  if(theME.find("siPixel")==string::npos && theME.find("ctfWithMaterialTracks")==string::npos)
1289  {
1290  cout << ACRed << ACBold
1291  << "[SiPixelInformationExtractor::getMEList()]"
1292  << ACPlain
1293  << " ----> Skipping "
1294  << (*it)
1295  << endl ;
1296  continue ;
1297  } // If the ME is not a Pixel one, skip
1298  string full_path = currDir + "/" + (*it);
1299  string mEName = theME.substr(0,theME.find_first_of("_"));
1300  mEHash[mEName]++ ;
1301  }
1302 
1303  return;
1304  } else { // If not yet reached the desired level in the directory tree, recursively go down one level more
1305  vector<string> subdirs = bei->getSubdirs();
1306  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++)
1307  {
1308  bei->cd(*it);
1309  getMEList(bei, mEHash);
1310  bei->goUp();
1311  }
1312  }
1313 }
#define ACRed
Definition: ANSIColors.h:15
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1659
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:644
void getMEList(DQMStore *bei, std::map< std::string, int > &mEHash)
(Documentation under construction).
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1682
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:678
tuple cout
Definition: gather_cfg.py:121
#define ACPlain
Definition: ANSIColors.h:28
#define ACBold
Definition: ANSIColors.h:29
const std::string & pwd(void) const
Definition: DQMStore.cc:639
std::string SiPixelInformationExtractor::getMEType ( MonitorElement mE)

Definition at line 264 of file SiPixelInformationExtractor.cc.

References MonitorElement::getRootObject().

Referenced by computeStatus().

265 {
266  string qtype = theMe->getRootObject()->IsA()->GetName() ;
267  if( qtype.find("TH1") != string::npos )
268  {
269  return "TH1" ;
270  } else if ( qtype.find("TH2") != string::npos ) {
271  return "TH2" ;
272  } else if ( qtype.find("TH3") != string::npos ) {
273  return "TH3" ;
274  }
275  return "TH1" ;
276 }
void SiPixelInformationExtractor::getNormalization ( MonitorElement theME,
std::pair< double, double > &  norm,
std::string  theMEType 
)

(Documentation under construction).

Definition at line 988 of file SiPixelInformationExtractor.cc.

References MonitorElement::getNbinsX().

Referenced by computeStatus().

991 {
992  double normLow = 0 ;
993  double normHigh = 0 ;
994 
995  if( theMEType.find("TH1") != string::npos)
996  {
997  normHigh = (double)theME->getNbinsX() ;
998  norm.first = normLow ;
999  norm.second = normHigh ;
1000  }
1001 }
int getNbinsX(void) const
get # of bins in X-axis
void SiPixelInformationExtractor::getNormalization2D ( MonitorElement theME,
std::pair< double, double > &  normX,
std::pair< double, double > &  normY,
std::string  theMEType 
)

(Documentation under construction).

Definition at line 1007 of file SiPixelInformationExtractor.cc.

References MonitorElement::getNbinsX(), and MonitorElement::getNbinsY().

Referenced by computeStatus().

1011 {
1012  double normLow = 0 ;
1013  double normHigh = 0 ;
1014 
1015  if( theMEType.find("TH2") != string::npos )
1016  {
1017  normHigh = (double)theME->getNbinsX() ;
1018  normX.first = normLow ;
1019  normX.second = normHigh ;
1020  normHigh = (double)theME->getNbinsY() ;
1021  normY.first = normLow ;
1022  normY.second = normHigh ;
1023 // cout << ACCyan << ACBold << ACReverse
1024 // << "[SiPixelInformationExtractor::getNormalization2D()]"
1025 // << ACPlain << " "
1026 // << theME->getName()
1027 // << " normX: "
1028 // << normX.first << ":" << normX.second
1029 // << " normY: "
1030 // << normY.first << ":" << normY.second
1031 // << endl ;
1032  }
1033 }
int getNbinsY(void) const
get # of bins in Y-axis
int getNbinsX(void) const
get # of bins in X-axis
bool SiPixelInformationExtractor::goToDir ( DQMStore bei,
std::string &  sname 
)
private

(Documentation under construction).

This method

Definition at line 834 of file SiPixelInformationExtractor.cc.

References DQMStore::cd(), TrackerOfflineValidation_Dqm_cff::dirName, and DQMStore::pwd().

835  {
836 //cout<<"entering SiPixelInformationExtractor::goToDir"<<endl;
837  bei->cd();
838  //if(flg) bei->cd("Collector/Collated");
839  bei->cd(sname);
840  string dirName = bei->pwd();
841  if (dirName.find(sname) != string::npos) return true;
842  else return false;
843 //cout<<"leaving SiPixelInformationExtractor::goToDir"<<endl;
844 }
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:644
const std::string & pwd(void) const
Definition: DQMStore.cc:639
bool SiPixelInformationExtractor::hasItem ( std::multimap< std::string, std::string > &  req_map,
std::string  item_name 
)
private

(Documentation under construction).

This method

Definition at line 708 of file SiPixelInformationExtractor.cc.

709  {
710 //cout<<"entering SiPixelInformationExtractor::hasItem"<<endl;
711  multimap<string,string>::iterator pos = req_map.find(item_name);
712  if (pos != req_map.end()) return true;
713  return false;
714 //cout<<"leaving SiPixelInformationExtractor::hasItem"<<endl;
715 }
void SiPixelInformationExtractor::printAlarmList ( DQMStore bei,
std::ostringstream &  str_val 
)
private

(Documentation under construction).

This method

(Documentation under construction).

Returns a stringstream containing an HTML-formatted list of alarms for the current directory. This is a recursive method.

Definition at line 605 of file SiPixelInformationExtractor.cc.

References alarmCounter_, DQMStore::cd(), RefreshWebPage::dname, DQMStore::get(), DQMStore::getMEs(), MonitorElement::getQReports(), DQMStore::getStatus(), DQMStore::getSubdirs(), DQMStore::goUp(), DQMStore::pwd(), and selectImage().

606  {
607 //cout<<"entering SiPixelInformationExtractor::printAlarmList"<<endl;
608 // cout << ACRed << ACBold
609 // << "[SiPixelInformationExtractor::printAlarmList()]"
610 // << ACPlain
611 // << " Enter"
612 // << endl ;
613  string currDir = bei->pwd();
614  string dname = currDir.substr(currDir.find_last_of("/")+1);
615  string image_name;
616  selectImage(image_name,bei->getStatus(currDir));
617  if(image_name!="images/LI_green.gif")
618  str_val << " <li>\n"
619  << " <a href=\"#\" id=\"" << currDir << "\">\n "
620  << dname
621  << " </a>\n"
622  << " <img src=\""
623  << image_name
624  << "\">" << endl;
625  vector<string> subDirVec = bei->getSubdirs();
626 
627  vector<string> meVec = bei->getMEs();
628 
629  if (subDirVec.size() == 0 && meVec.size() == 0) {
630  str_val << "</li> "<< endl;
631  return;
632  }
633  str_val << "<ul>" << endl;
634  for (vector<string>::const_iterator it = meVec.begin();
635  it != meVec.end(); it++) {
636  string full_path = currDir + "/" + (*it);
637 
638  MonitorElement * me = bei->get(full_path);
639 
640  if (!me) continue;
641  std::vector<QReport *> my_map = me->getQReports();
642  if (my_map.size() > 0) {
643  string image_name1;
644  selectImage(image_name1,my_map);
645  if(image_name1!="images/LI_green.gif") {
646  alarmCounter_++;
647  str_val << " <li class=\"dhtmlgoodies_sheet.gif\">\n"
648  << " <input id = \"selectedME\""
649  << " folder = \"" << currDir << "\""
650  << " type = \"checkbox\""
651  << " name = \"selected\""
652  << " class = \"smallCheckBox\""
653  << " value = \"" << (*it) << "\""
654  << " onclick = \"javascript:IMGC.selectedIMGCItems()\" />\n"
655 // << " <a href=\"javascript:IMGC.updateIMGC('" << currDir << "')\">\n "
656  << " <a href=\"javascript:IMGC.plotFromPath('" << currDir << "')\">\n "
657  << (*it) << "\n"
658  << " </a>\n"
659  << " <img src=\""
660  << image_name1
661  << "\">"
662  << " </li>"
663  << endl;
664  }
665  }
666  }
667  for (vector<string>::const_iterator ic = subDirVec.begin();
668  ic != subDirVec.end(); ic++) {
669  bei->cd(*ic);
670  printAlarmList(bei, str_val);
671  bei->goUp();
672  }
673  str_val << "</ul> "<< endl;
674  str_val << "</li> "<< endl;
675 // cout << ACGreen << ACBold
676 // << "[SiPixelInformationExtractor::printAlarmList()]"
677 // << ACPlain
678 // << " Done"
679 // << endl ;
680 //cout<<"leaving SiPixelInformationExtractor::printAlarmList"<<endl;
681 }
int getStatus(const std::string &path="") const
Definition: DQMStore.cc:3274
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1659
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:644
void printAlarmList(DQMStore *bei, std::ostringstream &str_val)
(Documentation under construction).
void selectImage(std::string &name, int status)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1708
std::vector< QReport * > getQReports(void) const
get map of QReports
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1682
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:678
const std::string & pwd(void) const
Definition: DQMStore.cc:639
void SiPixelInformationExtractor::printModuleHistoList ( DQMStore bei,
std::ostringstream &  str_val 
)
private

(Documentation under construction).

This method

(Documentation under construction).

This method

Definition at line 411 of file SiPixelInformationExtractor.cc.

References DQMStore::cd(), RefreshWebPage::dname, DQMStore::getMEs(), DQMStore::getSubdirs(), DQMStore::goUp(), and DQMStore::pwd().

412  {
413 //cout<<"entering SiPixelInformationExtractor::printModuleHistoList"<<endl;
414  string currDir = bei->pwd();
415  string dname = currDir.substr(currDir.find_last_of("/")+1);
416  str_val << " <li>\n"
417  << " <a href=\"#\" id=\"" << currDir << "\">\n "
418  << dname << "\n"
419  << " </a>\n"
420  << endl << endl;
421 
422  vector<string> meVec = bei->getMEs();
423 
424  vector<string> subDirVec = bei->getSubdirs();
425  if ( meVec.size()== 0 && subDirVec.size() == 0 ) {
426  str_val << " </li>" << endl;
427  return;
428  }
429  str_val << "\n <ul>" << endl;
430  for (vector<string>::const_iterator it = meVec.begin();
431  it != meVec.end(); it++) {
432  if ((*it).find("_siPixel")!=string::npos ||
433  (*it).find("_ctfWithMaterialTracks")!=string::npos) {
434  string qit = (*it) ;
435  string temp_s;
436  if(qit.find("siPixel")!=string::npos || qit.find("ctfWithMaterialTracks")!=string::npos) { temp_s = qit.substr(0,qit.find_first_of("_")); }
437  str_val << " <li class=\"dhtmlgoodies_sheet.gif\">\n"
438  << " <input id = \"selectedME\""
439  << " folder = \"" << currDir << "\""
440  << " type = \"checkbox\""
441  << " name = \"selected\""
442  << " class = \"smallCheckBox\""
443  << " value = \"" << (*it) << "\""
444  << " onclick = \"javascript:IMGC.selectedIMGCItems()\" />\n"
445 // << " <a href=\"javascript:IMGC.updateIMGC('" << currDir << "')\">\n "
446  << " <a href=\"javascript:IMGC.plotFromPath('" << currDir << "')\">\n "
447 // << temp_s << "\n"
448  << (*it) << "\n"
449  << " </a>\n"
450  << " </li>"
451  << endl;
452  }
453  }
454  for (vector<string>::const_iterator ic = subDirVec.begin();
455  ic != subDirVec.end(); ic++) {
456  bei->cd(*ic);
457  printModuleHistoList(bei, str_val);
458  bei->goUp();
459  }
460  str_val << " </ul>" << endl;
461  str_val << " </li>" << endl;
462 //cout<<"leaving SiPixelInformationExtractor::printModuleHistoList"<<endl;
463 }
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1659
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:644
void printModuleHistoList(DQMStore *bei, std::ostringstream &str_val)
(Documentation under construction).
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1682
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:678
const std::string & pwd(void) const
Definition: DQMStore.cc:639
void SiPixelInformationExtractor::printSummaryHistoList ( DQMStore bei,
std::ostringstream &  str_val 
)
private

(Documentation under construction).

This method

(Documentation under construction).

Returns a stringstream containing an HTML-formatted list of ME in the current directory. This is a recursive method.

Definition at line 506 of file SiPixelInformationExtractor.cc.

References DQMStore::cd(), RefreshWebPage::dname, DQMStore::getMEs(), DQMStore::getSubdirs(), DQMStore::goUp(), and DQMStore::pwd().

507  {
508 //cout<<"entering SiPixelInformationExtractor::printSummaryHistoList"<<endl;
509  string currDir = bei->pwd();
510  string dname = currDir.substr(currDir.find_last_of("/")+1);
511  if (dname.find("Module_") ==0 || dname.find("FED_")==0) return;
512  str_val << " <li>\n"
513  << " <a href=\"#\" id=\"" << currDir << "\">\n "
514  << dname
515  << " </a>"
516  << endl;
517 
518  vector<string> meVec = bei->getMEs();
519 
520  vector<string> subDirVec = bei->getSubdirs();
521  if ( meVec.size()== 0 && subDirVec.size() == 0 ) {
522  str_val << " </li> "<< endl;
523  return;
524  }
525  str_val << "\n <ul>" << endl;
526  for (vector<string>::const_iterator it = meVec.begin();
527  it != meVec.end(); it++) {
528  if ((*it).find("SUM") == 0) {
529  str_val << " <li class=\"dhtmlgoodies_sheet.gif\">\n"
530  << " <input id = \"selectedME\""
531  << " folder = \"" << currDir << "\""
532  << " type = \"checkbox\""
533  << " name = \"selected\""
534  << " class = \"smallCheckBox\""
535  << " value = \"" << (*it) << "\""
536  << " onclick = \"javascript:IMGC.selectedIMGCItems()\" />\n"
537 // << " <a href=\"javascript:IMGC.updateIMGC('" << currDir << "')\">\n "
538  << " <a href=\"javascript:IMGC.plotFromPath('" << currDir << "')\">\n "
539  << (*it) << "\n"
540  << " </a>\n"
541  << " </li>"
542  << endl;
543  }
544  }
545 
546  for (vector<string>::const_iterator ic = subDirVec.begin();
547  ic != subDirVec.end(); ic++) {
548  bei->cd(*ic);
549  printSummaryHistoList(bei, str_val);
550  bei->goUp();
551  }
552  str_val << " </ul> "<< endl;
553  str_val << " </li> "<< endl;
554 //cout<<"leaving SiPixelInformationExtractor::printSummaryHistoList"<<endl;
555 }
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1659
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:644
void printSummaryHistoList(DQMStore *bei, std::ostringstream &str_val)
(Documentation under construction).
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1682
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:678
const std::string & pwd(void) const
Definition: DQMStore.cc:639
void SiPixelInformationExtractor::readConfiguration ( )

Read Configuration File.

Definition at line 93 of file SiPixelInformationExtractor.cc.

93 { }
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::selectColor ( std::string &  col,
int  status 
)
private
void SiPixelInformationExtractor::selectColor ( std::string &  col,
std::vector< QReport * > &  reports 
)
private
void SiPixelInformationExtractor::selectImage ( std::string &  name,
int  status 
)
private

Referenced by printAlarmList().

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

(Documentation under construction).

Definition at line 1040 of file SiPixelInformationExtractor.cc.

References DQMStore::cd(), relmon_rootfiles_spy::contents, DQMStore::get(), DQMStore::getMEs(), DQMStore::getSubdirs(), DQMStore::goUp(), and DQMStore::pwd().

1043 {
1044 // cout<<"In SiPixelInformationExtractor::selectMEList: "<<endl;
1045  string currDir = bei->pwd();
1046 
1047  string theME ;
1048 
1049  // Get ME from Collector/FU0/Tracker/PixelEndcap/HalfCylinder_pX/Disk_X/Blade_XX/Panel_XX/Module_XX
1050  if (currDir.find("Module_") != string::npos ||
1051  currDir.find("FED_") != string::npos)
1052  {
1053  vector<string> contents = bei->getMEs();
1054 
1055  for (vector<string>::const_iterator it = contents.begin(); it != contents.end(); it++)
1056  {
1057  theME = (*it) ;
1058  if(theME.find("siPixel")==string::npos && theME.find("ctfWithMaterialTracks")==string::npos) {continue ;} // If the ME is not a siPixel or ctfWithMaterialTrack one, skip
1059  string temp_s = theME.substr(0,theME.find_first_of("_"));
1060  //cout<<"should be the variable name: temp_s= "<<temp_s<<endl;
1061  if (temp_s == theMEName)
1062  {
1063  string full_path = currDir + "/" + (*it);
1064 
1065  MonitorElement * me = bei->get(full_path.c_str());
1066 
1067  if (me) {mes.push_back(me);}
1068  }
1069  }
1070  return;
1071  } else { // If not yet reached the desired level in the directory tree, recursively go down one level more
1072  vector<string> subdirs = bei->getSubdirs();
1073  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++)
1074  {
1075  bei->cd(*it);
1076  selectMEList(bei, theMEName, mes);
1077  bei->goUp();
1078  }
1079  }
1080 }
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1659
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:644
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1708
void selectMEList(DQMStore *bei, std::string &name, std::vector< MonitorElement * > &mes)
(Documentation under construction).
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1682
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:678
const std::string & pwd(void) const
Definition: DQMStore.cc:639

Member Data Documentation

SiPixelActionExecutor* SiPixelInformationExtractor::actionExecutor_
private

Definition at line 159 of file SiPixelInformationExtractor.h.

int SiPixelInformationExtractor::alarmCounter_
private

Definition at line 155 of file SiPixelInformationExtractor.h.

Referenced by printAlarmList().

MonitorElement* SiPixelInformationExtractor::BarrelNdigisFREQProjection
private

Definition at line 190 of file SiPixelInformationExtractor.h.

SiPixelConfigParser* SiPixelInformationExtractor::configParser_
private

Definition at line 157 of file SiPixelInformationExtractor.h.

SiPixelConfigWriter* SiPixelInformationExtractor::configWriter_
private

Definition at line 158 of file SiPixelInformationExtractor.h.

int SiPixelInformationExtractor::count
private
MonitorElement* SiPixelInformationExtractor::EndcapNdigisFREQProjection
private

Definition at line 189 of file SiPixelInformationExtractor.h.

bool SiPixelInformationExtractor::endOfModules_
private

Definition at line 184 of file SiPixelInformationExtractor.h.

Referenced by findNoisyPixels().

int SiPixelInformationExtractor::errcount
private

Definition at line 178 of file SiPixelInformationExtractor.h.

MonitorElement* SiPixelInformationExtractor::EventRateBarrelPixels
private

Definition at line 186 of file SiPixelInformationExtractor.h.

Referenced by bookNoisyPixels(), and findNoisyPixels().

MonitorElement* SiPixelInformationExtractor::EventRateEndcapPixels
private

Definition at line 187 of file SiPixelInformationExtractor.h.

Referenced by bookNoisyPixels(), and findNoisyPixels().

bool SiPixelInformationExtractor::flagHotModule_
private

Definition at line 174 of file SiPixelInformationExtractor.h.

bool SiPixelInformationExtractor::gotDigis
private

Definition at line 179 of file SiPixelInformationExtractor.h.

SiPixelHistoPlotter* SiPixelInformationExtractor::histoPlotter_
private
std::map<std::string, std::vector< std::string> > SiPixelInformationExtractor::layoutMap
private

Definition at line 163 of file SiPixelInformationExtractor.h.

SiPixelLayoutParser* SiPixelInformationExtractor::layoutParser_
private

Definition at line 160 of file SiPixelInformationExtractor.h.

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

Definition at line 168 of file SiPixelInformationExtractor.h.

std::ofstream SiPixelInformationExtractor::myfile_
private

Definition at line 181 of file SiPixelInformationExtractor.h.

Referenced by findNoisyPixels().

int SiPixelInformationExtractor::nevents_
private

Definition at line 182 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 183 of file SiPixelInformationExtractor.h.

Referenced by findNoisyPixels().

bool SiPixelInformationExtractor::offlineXMLfile_
private

Definition at line 175 of file SiPixelInformationExtractor.h.

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

Definition at line 166 of file SiPixelInformationExtractor.h.

bool SiPixelInformationExtractor::readMeMap_
private

Definition at line 173 of file SiPixelInformationExtractor.h.

bool SiPixelInformationExtractor::readQTestMap_
private

Definition at line 172 of file SiPixelInformationExtractor.h.

bool SiPixelInformationExtractor::readReference_
private

Definition at line 171 of file SiPixelInformationExtractor.h.

Referenced by SiPixelInformationExtractor().

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

Definition at line 185 of file SiPixelInformationExtractor.h.

Referenced by findNoisyPixels().