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 67 of file SiPixelInformationExtractor.cc.

References histoPlotter_, and readReference_.

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

Destructor of the SiPixelInformationExtractor class.

Definition at line 80 of file SiPixelInformationExtractor.cc.

References histoPlotter_.

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

Member Function Documentation

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

Definition at line 1346 of file SiPixelInformationExtractor.cc.

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

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

(Documentation under construction).

Definition at line 912 of file SiPixelInformationExtractor.cc.

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

915 {
916  double normalizationX = 1 ;
917  double normalizationY = 1 ;
918  double meanX = 0 ;
919  double meanY = 0 ;
920 
921  colorValue = 0 ;
922 
923  pair<double,double> normX ;
924  pair<double,double> normY ;
925 
926  string theMEType = getMEType(theME) ;
927 
928 // cout << ACRed << ACReverse
929 // << "[SiPixelInformationExtractor::computeStatus()]"
930 // << ACPlain
931 // << " Computing average for "
932 // << theME->getName()
933 // << endl ;
934 
935  if( theMEType.find("TH1") != string::npos)
936  {
937  meanX = (double)theME->getMean();
938  getNormalization(theME, normX, "TH1") ;
939  normalizationX = fabs( normX.second - normX.first) ;
940  if( normalizationX == 0 ) {normalizationX=1.E-20;}
941  colorValue = meanX / normalizationX ;
942  norm.first = normX.first ;
943  norm.second = normX.second ;
944  }
945 
946  if( theMEType.find("TH2") != string::npos)
947  {
948  meanX = (double)theME->getMean(1);
949  meanY = (double)theME->getMean(2);
950  getNormalization2D(theME, normX, normY, "TH2") ;
951  normalizationX = fabs( normX.second - normX.first) ;
952  normalizationY = fabs( normY.second - normY.first) ;
953  if( normalizationX == 0 ) {normalizationX=1.E-20;}
954  if( normalizationY == 0 ) {normalizationY=1.E-20;}
955  double cVX = meanX / normalizationX ;
956  double cVY = meanY / normalizationY ;
957  colorValue = sqrt(cVX*cVX + cVY*cVY) ;
958  if( normalizationX >= normalizationY )
959  {
960  norm.first = normX.first;
961  norm.second = normX.second ;
962  } else {
963  norm.first = normY.first;
964  norm.second = normY.second ;
965  }
966 // cout << ACBlue << ACBold << ACReverse
967 // << "[SiPixelInformationExtractor::computeStatus()]"
968 // << ACPlain << " "
969 // << theME->getName()
970 // << " meanX:Y "
971 // << meanX << ":" << meanY
972 // << " normX:Y "
973 // << norm.first << ":" << norm.second
974 // << endl ;
975  }
976 
977  return ;
978 }
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)
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)
return(e1-e2)*(e1-e2)+dp *dp
void SiPixelInformationExtractor::createDummiesFromLayout ( )
private
void SiPixelInformationExtractor::createImages ( DQMStore bei)

Definition at line 1604 of file SiPixelInformationExtractor.cc.

References SiPixelHistoPlotter::createPlots(), and histoPlotter_.

1604  {
1605  histoPlotter_->createPlots(bei);
1606 }
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 318 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().

320  {
321 //cout<<"entering SiPixelInformationExtractor::fillModuleAndHistoList"<<endl;
322  string currDir = bei->pwd();
323  //cout<<"currDir= "<<currDir<<endl;
324  if(currDir.find("Module_") != string::npos){
325  if(histos.size() == 0){
326  vector<string> contents = bei->getMEs();
327  for (vector<string>::const_iterator it = contents.begin(); it != contents.end(); it++) {
328  string hname = (*it).substr(0, (*it).find("_siPixel"));
329  if(hname==" ") hname = (*it).substr(0, (*it).find("_generalTracks"));
330  string fullpathname = bei->pwd() + "/" + (*it);
331  // cout<<"fullpathname="<<fullpathname<<endl;
332  MonitorElement * me = bei->get(fullpathname);
333  string htype = "undefined" ;
334  if(me) htype = me->getRootObject()->IsA()->GetName() ;
335  //cout<<"hname="<<hname<<endl;
336  //if(htype=="TH1F" || htype=="TH1D"){
337  histos[hname] = htype ;
338  string mId=" ";
339  if(hname.find("ndigis") !=string::npos) mId = (*it).substr((*it).find("ndigis_siPixelDigis_")+20, 9);
340  if(mId==" " && hname.find("nclusters") !=string::npos) mId = (*it).substr((*it).find("nclusters_siPixelClusters_")+26, 9);
341  if(mId==" " && hname.find("residualX") !=string::npos) mId = (*it).substr((*it).find("residualX_ctfWithMaterialTracks_")+32, 9);
342  if(mId==" " && hname.find("NErrors") !=string::npos) mId = (*it).substr((*it).find("NErrors_siPixelDigis_")+21, 9);
343  if(mId==" " && hname.find("ClustX") !=string::npos) mId = (*it).substr((*it).find("ClustX_siPixelRecHit_")+21, 9);
344  if(mId==" " && hname.find("pixelAlive") !=string::npos) mId = (*it).substr((*it).find("pixelAlive_siPixelCalibDigis_")+29, 9);
345  if(mId==" " && hname.find("Gain1d") !=string::npos) mId = (*it).substr((*it).find("Gain1d_siPixelCalibDigis_")+25, 9);
346  if(mId!=" ") modules.push_back(mId);
347  //cout<<"mId="<<mId<<endl;
348  //}
349  }
350  }
351  } else {
352  vector<string> subdirs = bei->getSubdirs();
353  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
354  if((bei->pwd()).find("Barrel")==string::npos && (bei->pwd()).find("Endcap")==string::npos) bei->goUp();
355  bei->cd(*it);
356  fillModuleAndHistoList(bei, modules, histos);
357  bei->goUp();
358  }
359  }
360 // fillBarrelList(bei, modules, histos);
361 //cout<<"leaving SiPixelInformationExtractor::fillModuleAndHistoList"<<endl;
362 }
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:1574
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:561
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:1623
TObject * getRootObject(void) const
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1597
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:595
const std::string & pwd(void) const
Definition: DQMStore.cc:556
void SiPixelInformationExtractor::findNoisyPixels ( DQMStore bei,
bool  init,
float  noiseRate,
int  noiseRateDenominator,
edm::EventSetup const &  eSetup 
)

Definition at line 1365 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(), 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_, getHLTPrescaleColumns::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.

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

(Documentation under construction).

(Documentation under construction).

Given a pointer to ME returns the associated detId

Definition at line 1224 of file SiPixelInformationExtractor.cc.

References MonitorElement::getName().

Referenced by findNoisyPixels().

1225 {
1226 //cout<<"In SiPixelInformationExtractor::getDetId: for ME= "<<mE->getName()<<endl;
1227  string mEName = mE->getName();
1228 
1229  int detId = 0;
1230 
1231  if( mEName.find("_3") != string::npos )
1232  {
1233  string detIdString = mEName.substr((mEName.find_last_of("_"))+1,9);
1234  //cout<<"string: "<<detIdString<<endl;
1235  std::istringstream isst;
1236  isst.str(detIdString);
1237  isst>>detId;
1238 // } else {
1239 // cout << ACYellow << ACBold
1240 // << "[SiPixelInformationExtractor::getDetId()] "
1241 // << ACPlain
1242 // << "Could not extract detId from "
1243 // << mEName
1244 // << endl ;
1245  }
1246  //cout<<"returning with: "<<detId<<endl;
1247  return detId ;
1248 
1249 }
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 685 of file SiPixelInformationExtractor.cc.

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

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

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

Definition at line 730 of file SiPixelInformationExtractor.cc.

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

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

(Documentation under construction).

Definition at line 1255 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().

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

Definition at line 260 of file SiPixelInformationExtractor.cc.

References MonitorElement::getRootObject().

Referenced by computeStatus().

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

(Documentation under construction).

Definition at line 984 of file SiPixelInformationExtractor.cc.

References MonitorElement::getNbinsX().

Referenced by computeStatus().

987 {
988  double normLow = 0 ;
989  double normHigh = 0 ;
990 
991  if( theMEType.find("TH1") != string::npos)
992  {
993  normHigh = (double)theME->getNbinsX() ;
994  norm.first = normLow ;
995  norm.second = normHigh ;
996  }
997 }
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 1003 of file SiPixelInformationExtractor.cc.

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

Referenced by computeStatus().

1007 {
1008  double normLow = 0 ;
1009  double normHigh = 0 ;
1010 
1011  if( theMEType.find("TH2") != string::npos )
1012  {
1013  normHigh = (double)theME->getNbinsX() ;
1014  normX.first = normLow ;
1015  normX.second = normHigh ;
1016  normHigh = (double)theME->getNbinsY() ;
1017  normY.first = normLow ;
1018  normY.second = normHigh ;
1019 // cout << ACCyan << ACBold << ACReverse
1020 // << "[SiPixelInformationExtractor::getNormalization2D()]"
1021 // << ACPlain << " "
1022 // << theME->getName()
1023 // << " normX: "
1024 // << normX.first << ":" << normX.second
1025 // << " normY: "
1026 // << normY.first << ":" << normY.second
1027 // << endl ;
1028  }
1029 }
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 830 of file SiPixelInformationExtractor.cc.

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

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

(Documentation under construction).

This method

Definition at line 704 of file SiPixelInformationExtractor.cc.

705  {
706 //cout<<"entering SiPixelInformationExtractor::hasItem"<<endl;
707  multimap<string,string>::iterator pos = req_map.find(item_name);
708  if (pos != req_map.end()) return true;
709  return false;
710 //cout<<"leaving SiPixelInformationExtractor::hasItem"<<endl;
711 }
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 601 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().

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

(Documentation under construction).

This method

(Documentation under construction).

This method

Definition at line 407 of file SiPixelInformationExtractor.cc.

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

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

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

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

Read Configuration File.

Definition at line 91 of file SiPixelInformationExtractor.cc.

91 { }
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 1036 of file SiPixelInformationExtractor.cc.

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

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

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().