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
SiPixelActionExecutor Class Reference

#include <SiPixelActionExecutor.h>

Public Member Functions

void bookDeviations (DQMStore *bei, bool isUpgrade)
 
void bookEfficiency (DQMStore *bei, bool isUpgrade)
 
void bookOccupancyPlots (DQMStore *bei, bool hiRes, bool isbarrel)
 
void bookOccupancyPlots (DQMStore *bei, bool hiRes)
 
void bookTrackerMaps (DQMStore *bei, std::string name)
 
void checkQTestResults (DQMStore *bei)
 
void createEfficiency (DQMStore *bei, bool isUpgrade)
 
void createLayout (DQMStore *bei)
 
void createMaps (DQMStore *bei, std::string type, std::string name, funcType ff)
 
void createOccupancy (DQMStore *bei)
 
void createSummary (DQMStore *bei, bool isUpgrade)
 
void createTkMap (DQMStore *bei, std::string mEName, std::string theTKType)
 
void dumpBarrelModIds (DQMStore *bei, edm::EventSetup const &eSetup)
 
void dumpBarrelRefValues (DQMStore *bei, edm::EventSetup const &eSetup)
 
void dumpEndcapModIds (DQMStore *bei, edm::EventSetup const &eSetup)
 
void dumpEndcapRefValues (DQMStore *bei, edm::EventSetup const &eSetup)
 
void dumpModIds (DQMStore *bei, edm::EventSetup const &eSetup)
 
void dumpRefValues (DQMStore *bei, edm::EventSetup const &eSetup)
 
void fillEfficiency (DQMStore *bei, bool isbarrel, bool isUpgrade)
 
void fillLayout (DQMStore *bei)
 
int getTkMapMENames (std::vector< std::string > &names)
 
bool readConfiguration (int &tkmap_freq, int &sum_barrel_freq, int &sum_endcap_freq, int &sum_grandbarrel_freq, int &sum_grandendcap_freq, int &message_limit, int &source_type, int &calib_type)
 
bool readConfiguration (int &tkmap_freq, int &summary_freq)
 
void readConfiguration ()
 
void setupQTests (DQMStore *bei)
 
 SiPixelActionExecutor (bool offlineXMLfile, bool Tier0Flag)
 
 ~SiPixelActionExecutor ()
 

Private Member Functions

int createMap (Double_t map[][NLev2][NLev3][NLev4], std::string type, DQMStore *bei, funcType ff, bool isBarrel)
 
void fillDeviations (DQMStore *bei)
 
void fillFEDErrorSummary (DQMStore *bei, std::string dir_name, std::vector< std::string > &me_names)
 
void fillGrandBarrelSummaryHistos (DQMStore *bei, std::vector< std::string > &me_names, bool isUpgrade)
 
void fillGrandEndcapSummaryHistos (DQMStore *bei, std::vector< std::string > &me_names, bool isUpgrade)
 
void fillOccupancy (DQMStore *bei, bool isbarrel)
 
void fillSummary (DQMStore *bei, std::string dir_name, std::vector< std::string > &me_names, bool isbarrel, bool isUpgrade)
 
void GetBladeSubdirs (DQMStore *bei, std::vector< std::string > &blade_subdirs)
 
void getData (Double_t map[][NLev2][NLev3][NLev4], std::string type, DQMStore *bei, funcType ff, Int_t i, Int_t j, Int_t k, Int_t l)
 
MonitorElementgetFEDSummaryME (DQMStore *bei, std::string me_name)
 
void getGrandSummaryME (DQMStore *bei, int nbin, std::string &me_name, std::vector< MonitorElement * > &mes)
 
MonitorElementgetSummaryME (DQMStore *bei, std::string me_name, bool isUpgrade)
 
Double_t mapMax (const Double_t map[][NLev2][NLev3][NLev4], bool isBarrel)
 
Double_t mapMin (const Double_t map[][NLev2][NLev3][NLev4], bool isBarrel)
 
void prephistosB (MonitorElement *me[NCyl], DQMStore *bei, const Double_t map[][NLev2][NLev3][NLev4], std::string name, Double_t min, Double_t max)
 
void prephistosE (MonitorElement *me[NCyl], DQMStore *bei, const Double_t map[][NLev2][NLev3][NLev4], std::string name, Double_t min, Double_t max)
 

Private Attributes

int calib_type_
 
SiPixelConfigParserconfigParser_
 
SiPixelConfigWriterconfigWriter_
 
MonitorElementDEV_adc_Barrel
 
MonitorElementDEV_adc_Endcap
 
MonitorElementDEV_charge_Barrel
 
MonitorElementDEV_charge_Endcap
 
MonitorElementDEV_nclusters_Barrel
 
MonitorElementDEV_nclusters_Endcap
 
MonitorElementDEV_ndigis_Barrel
 
MonitorElementDEV_ndigis_Endcap
 
MonitorElementDEV_size_Barrel
 
MonitorElementDEV_size_Endcap
 
MonitorElementHitEfficiency_Dm1
 
MonitorElementHitEfficiency_Dm2
 
MonitorElementHitEfficiency_Dm3
 
MonitorElementHitEfficiency_Dp1
 
MonitorElementHitEfficiency_Dp2
 
MonitorElementHitEfficiency_Dp3
 
MonitorElementHitEfficiency_L1
 
MonitorElementHitEfficiency_L2
 
MonitorElementHitEfficiency_L3
 
MonitorElementHitEfficiency_L4
 
int message_limit_
 
int ndet_
 
MonitorElementOccupancyMap
 
bool offlineXMLfile_
 
MonitorElementPixelOccupancyMap
 
QTestHandleqtHandler_
 
int source_type_
 
std::vector< std::string > summaryMENames
 
TH2F * temp_1x2
 
TH2F * temp_1x5
 
TH2F * temp_2x3
 
TH2F * temp_2x4
 
TH2F * temp_2x5
 
TH2F * temp_H
 
edm::ESHandle
< SiPixelFedCablingMap
theCablingMap
 
bool Tier0Flag_
 
std::vector< std::string > tkMapMENames
 

Detailed Description

Definition at line 47 of file SiPixelActionExecutor.h.

Constructor & Destructor Documentation

SiPixelActionExecutor::SiPixelActionExecutor ( bool  offlineXMLfile,
bool  Tier0Flag 
)

Definition at line 37 of file SiPixelActionExecutor.cc.

References configParser_, configWriter_, ndet_, and qtHandler_.

38  :
39  offlineXMLfile_(offlineXMLfile),
40  Tier0Flag_(Tier0Flag) {
41  edm::LogInfo("SiPixelActionExecutor") <<
42  " Creating SiPixelActionExecutor " << "\n" ;
43  configParser_ = 0;
44  configWriter_ = 0;
45  qtHandler_ = 0;
46  ndet_ = 0;
47  //collationDone = false;
48 }
SiPixelConfigParser * configParser_
SiPixelConfigWriter * configWriter_
SiPixelActionExecutor::~SiPixelActionExecutor ( )

Definition at line 53 of file SiPixelActionExecutor.cc.

References configParser_, configWriter_, and qtHandler_.

53  {
54  edm::LogInfo("SiPixelActionExecutor") <<
55  " Deleting SiPixelActionExecutor " << "\n" ;
56  if (configParser_) delete configParser_;
57  if (configWriter_) delete configWriter_;
58  if (qtHandler_) delete qtHandler_;
59 }
SiPixelConfigParser * configParser_
SiPixelConfigWriter * configWriter_

Member Function Documentation

void SiPixelActionExecutor::bookDeviations ( DQMStore bei,
bool  isUpgrade 
)

Definition at line 234 of file SiPixelActionExecutor.cc.

References DEV_adc_Barrel, DEV_adc_Endcap, DEV_charge_Barrel, DEV_charge_Endcap, DEV_nclusters_Barrel, DEV_nclusters_Endcap, DEV_ndigis_Barrel, DEV_ndigis_Endcap, DEV_size_Barrel, and DEV_size_Endcap.

234  {
235  int nBPixModules;
236  if (isUpgrade) {nBPixModules=1184;} else {nBPixModules=768;}
237 
238  bei->cd();
239  bei->setCurrentFolder("Pixel/Barrel");
240  DEV_adc_Barrel = bei->book1D("DEV_adc_Barrel","Deviation from reference;Module;<adc_ref>-<adc>",nBPixModules,0.,nBPixModules);
241  DEV_ndigis_Barrel = bei->book1D("DEV_ndigis_Barrel","Deviation from reference;Module;<ndigis_ref>-<ndigis>",nBPixModules,0.,nBPixModules);
242  DEV_charge_Barrel = bei->book1D("DEV_charge_Barrel","Deviation from reference;Module;<charge_ref>-<charge>",nBPixModules,0.,nBPixModules);
243  DEV_nclusters_Barrel = bei->book1D("DEV_nclusters_Barrel","Deviation from reference;Module;<nclusters_ref>-<nclusters>",nBPixModules,0.,nBPixModules);
244  DEV_size_Barrel = bei->book1D("DEV_size_Barrel","Deviation from reference;Module;<size_ref>-<size>",nBPixModules,0.,nBPixModules);
245  bei->cd();
246  bei->setCurrentFolder("Pixel/Endcap");
247  DEV_adc_Endcap = bei->book1D("DEV_adc_Endcap","Deviation from reference;Module;<adc_ref>-<adc>",672,0.,672.);
248  DEV_ndigis_Endcap = bei->book1D("DEV_ndigis_Endcap","Deviation from reference;Module;<ndigis_ref>-<ndigis>",672,0.,672.);
249  DEV_charge_Endcap = bei->book1D("DEV_charge_Endcap","Deviation from reference;Module;<charge_ref>-<charge>",672,0.,672.);
250  DEV_nclusters_Endcap = bei->book1D("DEV_nclusters_Endcap","Deviation from reference;Module;<nclusters_ref>-<nclusters>",672,0.,672.);
251  DEV_size_Endcap = bei->book1D("DEV_size_Endcap","Deviation from reference;Module;<size_ref>-<size>",672,0.,672.);
252  bei->cd();
253 }
MonitorElement * DEV_size_Barrel
MonitorElement * DEV_nclusters_Barrel
MonitorElement * DEV_adc_Endcap
MonitorElement * DEV_charge_Endcap
MonitorElement * DEV_charge_Barrel
MonitorElement * DEV_nclusters_Endcap
MonitorElement * DEV_size_Endcap
MonitorElement * DEV_ndigis_Endcap
MonitorElement * DEV_ndigis_Barrel
MonitorElement * DEV_adc_Barrel
void SiPixelActionExecutor::bookEfficiency ( DQMStore bei,
bool  isUpgrade 
)

Definition at line 2387 of file SiPixelActionExecutor.cc.

References HitEfficiency_Dm1, HitEfficiency_Dm2, HitEfficiency_Dm3, HitEfficiency_Dp1, HitEfficiency_Dp2, HitEfficiency_Dp3, HitEfficiency_L1, HitEfficiency_L2, HitEfficiency_L3, HitEfficiency_L4, and Tier0Flag_.

2387  {
2388  // Barrel
2389  bei->cd();
2390  bei->setCurrentFolder("Pixel/Barrel");
2391  if (!isUpgrade) {
2392  if(Tier0Flag_){
2393  HitEfficiency_L1 = bei->book2D("HitEfficiency_L1","Hit Efficiency in Barrel_Layer1;Module;Ladder",8,-4,4,20,-10.,10.);
2394  HitEfficiency_L2 = bei->book2D("HitEfficiency_L2","Hit Efficiency in Barrel_Layer2;Module;Ladder",8,-4,4,32,-16.,16.);
2395  HitEfficiency_L3 = bei->book2D("HitEfficiency_L3","Hit Efficiency in Barrel_Layer3;Module;Ladder",8,-4,4,44,-22.,22.);
2396  }else{
2397  HitEfficiency_L1 = bei->book2D("HitEfficiency_L1","Hit Efficiency in Barrel_Layer1;Module;Ladder",8,-4.,4.,20,-10.,10.);
2398  HitEfficiency_L2 = bei->book2D("HitEfficiency_L2","Hit Efficiency in Barrel_Layer2;Module;Ladder",8,-4.,4.,32,-16.,16.);
2399  HitEfficiency_L3 = bei->book2D("HitEfficiency_L3","Hit Efficiency in Barrel_Layer3;Module;Ladder",8,-4.,4.,44,-22.,22.);
2400  }
2401  }//endifNOTUpgrade
2402  else if (isUpgrade) {
2403  if(Tier0Flag_){
2404  HitEfficiency_L1 = bei->book2D("HitEfficiency_L1","Hit Efficiency in Barrel_Layer1;z-side;Ladder",2,-1.,1.,12,-6.,6.);
2405  HitEfficiency_L2 = bei->book2D("HitEfficiency_L2","Hit Efficiency in Barrel_Layer2;z-side;Ladder",2,-1.,1.,28,-14.,14.);
2406  HitEfficiency_L3 = bei->book2D("HitEfficiency_L3","Hit Efficiency in Barrel_Layer3;z-side;Ladder",2,-1.,1.,44,-22.,22.);
2407  HitEfficiency_L4 = bei->book2D("HitEfficiency_L4","Hit Efficiency in Barrel_Layer4;z-side;Ladder",2,-1.,1.,64,-32.,32.);
2408  }else{
2409  HitEfficiency_L1 = bei->book2D("HitEfficiency_L1","Hit Efficiency in Barrel_Layer1;Module;Ladder",8,-4.,4.,12,-6.,6.);
2410  HitEfficiency_L2 = bei->book2D("HitEfficiency_L2","Hit Efficiency in Barrel_Layer2;Module;Ladder",8,-4.,4.,28,-14.,14.);
2411  HitEfficiency_L3 = bei->book2D("HitEfficiency_L3","Hit Efficiency in Barrel_Layer3;Module;Ladder",8,-4.,4.,44,-22.,22.);
2412  HitEfficiency_L4 = bei->book2D("HitEfficiency_L4","Hit Efficiency in Barrel_Layer4;Module;Ladder",8,-4.,4.,64,-32.,32.);
2413  }
2414  }//endifUpgrade
2415  // Endcap
2416  bei->cd();
2417  bei->setCurrentFolder("Pixel/Endcap");
2418  if (!isUpgrade) {
2419  if(Tier0Flag_){
2420  HitEfficiency_Dp1 = bei->book2D("HitEfficiency_Dp1","Hit Efficiency in Endcap_Disk_p1;Blades;",24,-12.,12.,1,0.,1.);
2421  HitEfficiency_Dp2 = bei->book2D("HitEfficiency_Dp2","Hit Efficiency in Endcap_Disk_p2;Blades;",24,-12.,12.,1,0.,1.);
2422  HitEfficiency_Dm1 = bei->book2D("HitEfficiency_Dm1","Hit Efficiency in Endcap_Disk_m1;Blades;",24,-12.,12.,1,0.,1.);
2423  HitEfficiency_Dm2 = bei->book2D("HitEfficiency_Dm2","Hit Efficiency in Endcap_Disk_m2;Blades;",24,-12.,12.,1,0.,1.);
2424  }else{
2425  HitEfficiency_Dp1 = bei->book2D("HitEfficiency_Dp1","Hit Efficiency in Endcap_Disk_p1;Blades;Modules",24,-12.,12.,7,1.,8.);
2426  HitEfficiency_Dp2 = bei->book2D("HitEfficiency_Dp2","Hit Efficiency in Endcap_Disk_p2;Blades;Modules",24,-12.,12.,7,1.,8.);
2427  HitEfficiency_Dm1 = bei->book2D("HitEfficiency_Dm1","Hit Efficiency in Endcap_Disk_m1;Blades;Modules",24,-12.,12.,7,1.,8.);
2428  HitEfficiency_Dm2 = bei->book2D("HitEfficiency_Dm2","Hit Efficiency in Endcap_Disk_m2;Blades;Modules",24,-12.,12.,7,1.,8.);
2429  }
2430  } else if (isUpgrade) {
2431  if(Tier0Flag_){
2432  HitEfficiency_Dp1 = bei->book2D("HitEfficiency_Dp1","Hit Efficiency in Endcap_Disk_p1;Blades;",28,-17.,11.,1,0.,1.);
2433  HitEfficiency_Dp2 = bei->book2D("HitEfficiency_Dp2","Hit Efficiency in Endcap_Disk_p2;Blades;",28,-17.,11.,1,0.,1.);
2434  HitEfficiency_Dp3 = bei->book2D("HitEfficiency_Dp3","Hit Efficiency in Endcap_Disk_p3;Blades;",28,-17.,11.,1,0.,1.);
2435  HitEfficiency_Dm1 = bei->book2D("HitEfficiency_Dm1","Hit Efficiency in Endcap_Disk_m1;Blades;",28,-17.,11.,1,0.,1.);
2436  HitEfficiency_Dm2 = bei->book2D("HitEfficiency_Dm2","Hit Efficiency in Endcap_Disk_m2;Blades;",28,-17.,11.,1,0.,1.);
2437  HitEfficiency_Dm3 = bei->book2D("HitEfficiency_Dm3","Hit Efficiency in Endcap_Disk_m3;Blades;",28,-17.,11.,1,0.,1.);
2438  }else{
2439  HitEfficiency_Dp1 = bei->book2D("HitEfficiency_Dp1","Hit Efficiency in Endcap_Disk_p1;Blades;Modules",28,-17.,11.,2,1.,3.);
2440  HitEfficiency_Dp2 = bei->book2D("HitEfficiency_Dp2","Hit Efficiency in Endcap_Disk_p2;Blades;Modules",28,-17.,11.,2,1.,3.);
2441  HitEfficiency_Dp3 = bei->book2D("HitEfficiency_Dp3","Hit Efficiency in Endcap_Disk_p3;Blades;Modules",28,-17.,11.,2,1.,3.);
2442  HitEfficiency_Dm1 = bei->book2D("HitEfficiency_Dm1","Hit Efficiency in Endcap_Disk_m1;Blades;Modules",28,-17.,11.,2,1.,3.);
2443  HitEfficiency_Dm2 = bei->book2D("HitEfficiency_Dm2","Hit Efficiency in Endcap_Disk_m2;Blades;Modules",28,-17.,11.,2,1.,3.);
2444  HitEfficiency_Dm3 = bei->book2D("HitEfficiency_Dm3","Hit Efficiency in Endcap_Disk_m3;Blades;Modules",28,-17.,11.,2,1.,3.);
2445  }
2446  }//endif(isUpgrade)
2447 }
MonitorElement * HitEfficiency_Dp3
MonitorElement * HitEfficiency_L4
MonitorElement * HitEfficiency_L3
MonitorElement * HitEfficiency_Dm2
MonitorElement * HitEfficiency_L2
MonitorElement * HitEfficiency_Dm3
MonitorElement * HitEfficiency_L1
MonitorElement * HitEfficiency_Dp1
MonitorElement * HitEfficiency_Dp2
MonitorElement * HitEfficiency_Dm1
void SiPixelActionExecutor::bookOccupancyPlots ( DQMStore bei,
bool  hiRes,
bool  isbarrel 
)

Definition at line 1594 of file SiPixelActionExecutor.cc.

References OccupancyMap, MonitorElement::setAxisTitle(), and Tier0Flag_.

Referenced by bookOccupancyPlots().

1595 {
1596  if(Tier0Flag_) return;
1597  vector<string> subdirs = bei->getSubdirs();
1598  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++)
1599  {
1600  if(isbarrel && (*it).find("Barrel")==string::npos) continue;
1601  if(!isbarrel && (*it).find("Endcap")==string::npos) continue;
1602 
1603  if((*it).find("Module_")!=string::npos) continue;
1604  if((*it).find("Panel_")!=string::npos) continue;
1605  if((*it).find("Ladder_")!=string::npos) continue;
1606  if((*it).find("Blade_")!=string::npos) continue;
1607  if((*it).find("Layer_")!=string::npos) continue;
1608  if((*it).find("Disk_")!=string::npos) continue;
1609  bei->cd(*it);
1610  bookOccupancyPlots(bei, hiRes, isbarrel);
1611  if(!hiRes){
1612  //occupancyprinting cout<<"booking low res barrel occ plot now!"<<endl;
1613  OccupancyMap = bei->book2D((isbarrel?"barrelOccupancyMap":"endcapOccupancyMap"),"Barrel Digi Occupancy Map (4 pix per bin)",isbarrel?208:130,0.,isbarrel?416.:260.,80,0.,160.);
1614  }else{
1615  //occupancyprinting cout<<"booking high res barrel occ plot now!"<<endl;
1616  OccupancyMap = bei->book2D((isbarrel?"barrelOccupancyMap":"endcapOccupancyMap"),"Barrel Digi Occupancy Map (1 pix per bin)",isbarrel?416:260,0.,isbarrel?416.:260.,160,0.,160.);
1617  }
1618  OccupancyMap->setAxisTitle("Columns",1);
1619  OccupancyMap->setAxisTitle("Rows",2);
1620 
1621  bei->goUp();
1622 
1623  }
1624 
1625 
1626 
1627 }
void bookOccupancyPlots(DQMStore *bei, bool hiRes, bool isbarrel)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void SiPixelActionExecutor::bookOccupancyPlots ( DQMStore bei,
bool  hiRes 
)

Definition at line 1629 of file SiPixelActionExecutor.cc.

References bookOccupancyPlots(), and Tier0Flag_.

1629  {
1630 
1631  if(Tier0Flag_) return;
1632  // Barrel
1633  bei->cd();
1634  bei->setCurrentFolder("Pixel");
1635  this->bookOccupancyPlots(bei, hiRes, true);
1636 
1637  // Endcap
1638  bei->cd();
1639  bei->setCurrentFolder("Pixel");
1640  this->bookOccupancyPlots(bei, hiRes, false);
1641 
1642 }
void bookOccupancyPlots(DQMStore *bei, bool hiRes, bool isbarrel)
void SiPixelActionExecutor::bookTrackerMaps ( DQMStore bei,
std::string  name 
)

Definition at line 1715 of file SiPixelActionExecutor.cc.

References NCyl, AlCaHLTBitMon_ParallelJobs::p, and AlCaHLTBitMon_QueryRunRegistry::string.

1716 {
1717  bei->setCurrentFolder("Pixel/Barrel");
1718  std::string partB[] = { "Layer_1", "Layer_2", "Layer_3"};
1719  bei->book2D("TRKMAP_" + name + "_" + partB[0], "TRKMAP_" + name + "_" + partB[0], 20, 1., 21., 8, 1., 9.);
1720  bei->book2D("TRKMAP_" + name + "_" + partB[1], "TRKMAP_" + name + "_" + partB[1], 32, 1., 33., 8, 1., 9.);
1721  bei->book2D("TRKMAP_" + name + "_" + partB[2], "TRKMAP_" + name + "_" + partB[2], 44, 1., 45., 8, 1., 9.);
1722 
1723  bei->setCurrentFolder("Pixel/Endcap");
1724  std::string partE[] = { "Disc_1_M", "Disc_2_M", "Disc_1_P", "Disc_2_P" };
1725  for(Int_t p = 0 ; p < NCyl ; p++)
1726  bei->book2D("TRKMAP_" + name + "_" + partE[p], "TRKMAP_" + name + "_" + partE[p], 24, 1., 25., 7, 1., 8.);
1727 }
#define NCyl
void SiPixelActionExecutor::checkQTestResults ( DQMStore bei)

Definition at line 2023 of file SiPixelActionExecutor.cc.

References calib_type_, configParser_, relmon_rootfiles_spy::contents, benchmark_cfg::errors, SiPixelConfigParser::getCalibType(), MonitorElement::getMean(), SiPixelUtility::getMEList(), SiPixelConfigParser::getMessageLimitForQTests(), MonitorElement::getName(), MonitorElement::getQErrors(), MonitorElement::getQWarnings(), MonitorElement::getRMS(), MonitorElement::hasWarning(), LogDebug, message_limit_, MonitorElement::runQTests(), AlCaHLTBitMon_QueryRunRegistry::string, and benchmark_cfg::warnings.

2023  {
2024  //printing cout<<"Entering SiPixelActionExecutor::checkQTestResults..."<<endl;
2025 
2026  int messageCounter=0;
2027  string currDir = bei->pwd();
2028  vector<string> contentVec;
2029  bei->getContents(contentVec);
2031  // cout << calib_type_ << endl;
2033  for (vector<string>::iterator it = contentVec.begin();
2034  it != contentVec.end(); it++) {
2035  vector<string> contents;
2036  int nval = SiPixelUtility::getMEList((*it), contents);
2037  if (nval == 0) continue;
2038  for (vector<string>::const_iterator im = contents.begin();
2039  im != contents.end(); im++) {
2040 
2041  MonitorElement * me = bei->get((*im));
2042  if (me) {
2043  me->runQTests();
2044  // get all warnings associated with me
2045  vector<QReport*> warnings = me->getQWarnings();
2046  for(vector<QReport *>::const_iterator wi = warnings.begin();
2047  wi != warnings.end(); ++wi) {
2048  messageCounter++;
2049  if(messageCounter<message_limit_) {
2050  //edm::LogWarning("SiPixelQualityTester::checkTestResults") <<
2051  // " *** Warning for " << me->getName() <<
2052  // "," << (*wi)->getMessage() << "\n";
2053 
2054  edm::LogWarning("SiPixelActionExecutor::checkQTestResults") << " *** Warning for " << me->getName() << ","
2055  << (*wi)->getMessage() << " " << me->getMean()
2056  << " " << me->getRMS() << me->hasWarning()
2057  << endl;
2058  }
2059  }
2060  warnings=vector<QReport*>();
2061  // get all errors associated with me
2062  vector<QReport *> errors = me->getQErrors();
2063  for(vector<QReport *>::const_iterator ei = errors.begin();
2064  ei != errors.end(); ++ei) {
2065 
2066  float empty_mean = me->getMean();
2067  float empty_rms = me->getRMS();
2068  if((empty_mean != 0 && empty_rms != 0) || (calib_type_ == 0)){
2069  messageCounter++;
2070  if(messageCounter<=message_limit_) {
2071  //edm::LogError("SiPixelQualityTester::checkTestResults") <<
2072  // " *** Error for " << me->getName() <<
2073  // "," << (*ei)->getMessage() << "\n";
2074 
2075  edm::LogWarning("SiPixelActionExecutor::checkQTestResults") << " *** Error for " << me->getName() << ","
2076  << (*ei)->getMessage() << " " << me->getMean()
2077  << " " << me->getRMS()
2078  << endl;
2079  }
2080  }
2081  }
2082  errors=vector<QReport*>();
2083  }
2084  me=0;
2085  }
2086  nval=int(); contents=vector<string>();
2087  }
2088  LogDebug("SiPixelActionExecutor::checkQTestResults") <<"messageCounter: "<<messageCounter<<" , message_limit: "<<message_limit_<<endl;
2089  // if (messageCounter>=message_limit_)
2090  // edm::LogWarning("SiPixelActionExecutor::checkQTestResults") << "WARNING: too many QTest failures! Giving up after "<<message_limit_<<" messages."<<endl;
2091  contentVec=vector<string>(); currDir=string(); messageCounter=int();
2092  //printing cout<<"...leaving SiPixelActionExecutor::checkQTestResults!"<<endl;
2093 }
#define LogDebug(id)
const std::string & getName(void) const
get name of ME
static int getMEList(std::string name, std::vector< std::string > &values)
SiPixelConfigParser * configParser_
void runQTests(void)
run all quality tests
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
bool getCalibType(int &u_freq)
std::vector< QReport * > getQErrors(void) const
get errors from last set of quality tests
bool hasWarning(void) const
true if at least of one of the quality tests returned a warning
bool getMessageLimitForQTests(int &u_freq)
double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
std::vector< QReport * > getQWarnings(void) const
get warnings from last set of quality tests
void SiPixelActionExecutor::createEfficiency ( DQMStore bei,
bool  isUpgrade 
)

Definition at line 2451 of file SiPixelActionExecutor.cc.

References fillEfficiency().

2451  {
2452  //std::cout<<"entering SiPixelActionExecutor::createEfficiency..."<<std::endl;
2453  bei->cd();
2454  fillEfficiency(bei, true, isUpgrade); // Barrel
2455  bei->cd();
2456  fillEfficiency(bei, false, isUpgrade); // Endcap
2457  bei->cd();
2458  //std::cout<<"leaving SiPixelActionExecutor::createEfficiency..."<<std::endl;
2459 }
void fillEfficiency(DQMStore *bei, bool isbarrel, bool isUpgrade)
void SiPixelActionExecutor::createLayout ( DQMStore bei)

Definition at line 2096 of file SiPixelActionExecutor.cc.

References configWriter_, SiPixelConfigWriter::createLayout(), SiPixelConfigWriter::createRow(), fillLayout(), SiPixelConfigWriter::init(), and mergeVDriftHistosByStation::name.

2096  {
2097  if (configWriter_ == 0) {
2099  if (!configWriter_->init()) return;
2100  }
2101  string currDir = bei->pwd();
2102  if (currDir.find("Layer") != string::npos) {
2103  string name = "Default";
2104  configWriter_->createLayout(name);
2106  fillLayout(bei);
2107  } else {
2108  vector<string> subdirs = bei->getSubdirs();
2109  for (vector<string>::const_iterator it = subdirs.begin();
2110  it != subdirs.end(); it++) {
2111  bei->cd(*it);
2112  createLayout(bei);
2113  bei->goUp();
2114  }
2115  }
2116 }
bool init()
Write XML file.
void fillLayout(DQMStore *bei)
SiPixelConfigWriter * configWriter_
void createLayout(DQMStore *bei)
void createLayout(std::string &name)
int SiPixelActionExecutor::createMap ( Double_t  map[][NLev2][NLev3][NLev4],
std::string  type,
DQMStore bei,
funcType  ff,
bool  isBarrel 
)
private

Definition at line 1770 of file SiPixelActionExecutor.cc.

References getData(), i, j, gen::k, ConfigFiles::l, python.multivaluedict::map(), NLev4, and Tier0Flag_.

Referenced by createMaps().

1771 {
1772  // cout << "Starting with SiPixelActionExecutor::createMap" << endl;
1773  //int createMap(Double_t map[][NLev2][NLev3][NLev4], TString type, TDirectoryFile* dirMain, funcType ff){
1774  vector<string> dirLev1 = bei->getSubdirs();
1775  Int_t i = 0;
1776  for (vector<string>::const_iterator it = dirLev1.begin(); it != dirLev1.end(); it++) // goes over HalfCylinders in Endcap and over Shells in Barrel
1777  {
1778  //cout << "Current Directory: " << *it << endl;
1779  bei->cd(*it);
1780  vector<string> dirLev2 = bei->getSubdirs();
1781  Int_t j = 0;
1782  for (vector<string>::const_iterator it2 = dirLev2.begin(); it2 != dirLev2.end(); it2++) // goes over Disks in Endcap and over Layers in Barrel
1783  {
1784  //cout << "Current Directory: " << *it2 << endl;
1785  bei->cd(*it2);
1786  Int_t k = 0;
1787  vector<string> dirLev3 = bei->getSubdirs();
1788  for (vector<string>::const_iterator it3 = dirLev3.begin(); it3 != dirLev3.end(); it3++) // goes over Blades in Endcap and over Ladders in Barrel
1789  {
1790  //cout << "Current Directory: " << *it3 << endl;
1791  bei->cd(*it3);
1792  if(Tier0Flag_)
1793  for (Int_t l = 0; l < NLev4; l++)
1794  getData(map, type, bei, ff, i, j, k, l);
1795  else
1796  {
1797  Int_t l = 0;
1798  vector<string> dirLev4 = bei->getSubdirs();
1799  for (vector<string>::const_iterator it4 = dirLev4.begin(); it4 != dirLev4.end(); it4++)
1800  {
1801  // cout << "Current Directory: " << *it4 << endl;
1802  bei->cd(*it4);
1803  if (isBarrel)
1804  getData(map, type, bei, ff, i, j, k, l++);
1805  else
1806  {
1807  vector<string> dirLev5 = bei->getSubdirs();
1808  for (vector<string>::const_iterator it5 = dirLev5.begin(); it5 != dirLev5.end(); it5++)
1809  {
1810  // cout << "Current Directory: " << *it5 << endl;
1811  bei->cd(*it5);
1812  getData(map, type, bei, ff, i, j, k, l++);
1813  }
1814  }
1815  }
1816  }
1817  k++;
1818  }
1819  j++;
1820  }
1821  i++;
1822  }
1823 
1824  // cout << "Done with SiPixelActionExecutor::createMap" << endl;
1825  return 0;
1826 }
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
int k[5][pyjets_maxn]
void getData(Double_t map[][NLev2][NLev3][NLev4], std::string type, DQMStore *bei, funcType ff, Int_t i, Int_t j, Int_t k, Int_t l)
#define NLev4
void SiPixelActionExecutor::createMaps ( DQMStore bei,
std::string  type,
std::string  name,
funcType  ff 
)

Definition at line 1730 of file SiPixelActionExecutor.cc.

References createMap(), mapMax(), mapMin(), max(), bookConverter::min, NCyl, NLayer, NLev1, NLev2, NLev3, NLev4, prephistosB(), and prephistosE().

1731 {
1732 // cout << "Starting with SiPixelActionExecutor::createMaps" << endl;
1733 
1734  Double_t mapB[NLev1][NLev2][NLev3][NLev4];
1735  bei->setCurrentFolder("Pixel/Barrel/");
1736  createMap(mapB, type, bei, ff, true);
1737  Double_t minB = mapMin(mapB, true);
1738  Double_t maxB = mapMax(mapB, true);
1739 
1740 
1741  Double_t mapE[NLev1][NLev2][NLev3][NLev4];
1742  bei->setCurrentFolder("Pixel/Endcap/");
1743  createMap(mapE, type, bei, ff, false);
1744  Double_t minE = mapMin(mapE, false);
1745  Double_t maxE = mapMax(mapE, false);
1746 
1747  Double_t min = minE<=minB?minE:minB;
1748  Double_t max = maxE>=maxB?maxE:maxB;
1749  if(!min)
1750  min = -0.01;
1751 
1752  // prephistosB(histB, mapB, type, min, max);
1753  // prephistosE(histE, mapE, type, min, max);
1754 
1755 
1756  MonitorElement* meB[NLayer];
1757  // TH2F* histB[NLayer];
1758  MonitorElement* meE[NCyl];
1759  // TH2F* histE[NCyl];
1760  bei->setCurrentFolder("Pixel/Barrel");
1761  prephistosB(meB, bei, mapB, name, min, max);
1762  bei->setCurrentFolder("Pixel/Endcap");
1763  prephistosE(meE, bei, mapE, name, min, max);
1764 
1765 // cout << "Done with SiPixelActionExecutor::createMaps" << endl;
1766 }
type
Definition: HCALResponse.h:21
#define NLev1
#define NCyl
void prephistosE(MonitorElement *me[NCyl], DQMStore *bei, const Double_t map[][NLev2][NLev3][NLev4], std::string name, Double_t min, Double_t max)
const T & max(const T &a, const T &b)
Double_t mapMin(const Double_t map[][NLev2][NLev3][NLev4], bool isBarrel)
int createMap(Double_t map[][NLev2][NLev3][NLev4], std::string type, DQMStore *bei, funcType ff, bool isBarrel)
#define NLev3
#define NLev2
Double_t mapMax(const Double_t map[][NLev2][NLev3][NLev4], bool isBarrel)
#define NLayer
void prephistosB(MonitorElement *me[NCyl], DQMStore *bei, const Double_t map[][NLev2][NLev3][NLev4], std::string name, Double_t min, Double_t max)
#define NLev4
void SiPixelActionExecutor::createOccupancy ( DQMStore bei)

Definition at line 1644 of file SiPixelActionExecutor.cc.

References fillOccupancy(), and Tier0Flag_.

1644  {
1645  //std::cout<<"entering SiPixelActionExecutor::createOccupancy..."<<std::endl;
1646  if(Tier0Flag_) return;
1647  bei->cd();
1648  fillOccupancy(bei, true);
1649  bei->cd();
1650  fillOccupancy(bei, false);
1651  bei->cd();
1652  //std::cout<<"leaving SiPixelActionExecutor::createOccupancy..."<<std::endl;
1653 }
void fillOccupancy(DQMStore *bei, bool isbarrel)
void SiPixelActionExecutor::createSummary ( DQMStore bei,
bool  isUpgrade 
)

Definition at line 173 of file SiPixelActionExecutor.cc.

References configParser_, configWriter_, gather_cfg::cout, fillFEDErrorSummary(), fillSummary(), contentValuesFiles::fullPath, DQMParserBase::getDocument(), SiPixelConfigParser::getMENamesForBarrelSummary(), SiPixelConfigParser::getMENamesForEndcapSummary(), SiPixelConfigParser::getMENamesForFEDErrorSummary(), SiPixelConfigParser::getSourceType(), offlineXMLfile_, source_type_, and AlCaHLTBitMon_QueryRunRegistry::string.

173  {
174  //cout<<"entering SiPixelActionExecutor::createSummary..."<<endl;
175  string barrel_structure_name;
176  vector<string> barrel_me_names;
177  string localPath;
178  if(offlineXMLfile_) localPath = string("DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
179  else localPath = string("DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
180 // cout<<"*********************ATTENTION! LOCALPATH= "<<localPath<<endl;
181  if (configParser_ == 0) {
184  }
185  if (!configParser_->getMENamesForBarrelSummary(barrel_structure_name, barrel_me_names)){
186  cout << "SiPixelActionExecutor::createSummary: Failed to read Barrel Summary configuration parameters!! ";
187  return;
188  }
190 // cout<<"++++++++++++++++++++++++++SOURCE TYPE= "<<source_type_<<endl;
191  bei->setCurrentFolder("Pixel/");
192  //bei->cd();
193  fillSummary(bei, barrel_structure_name, barrel_me_names, true, isUpgrade); // Barrel
194  bei->setCurrentFolder("Pixel/");
195  //bei->cd();
196  string endcap_structure_name;
197  vector<string> endcap_me_names;
198  if (!configParser_->getMENamesForEndcapSummary(endcap_structure_name, endcap_me_names)){
199  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Endcap Summary configuration parameters!! " << "\n" ;
200  return;
201  }
202 
203 // cout << "--- Processing endcap" << endl;
204 
205  bei->setCurrentFolder("Pixel/");
206  //bei->cd();
207  fillSummary(bei, endcap_structure_name, endcap_me_names, false, isUpgrade); // Endcap
208  bei->setCurrentFolder("Pixel/");
209  //if(!Tier0Flag_) fillDeviations(bei);
210  bei->setCurrentFolder("Pixel/");
211  //bei->cd();
212  if(source_type_==0||source_type_==5 || source_type_ == 20){//do this only if RawData source is present
213  string federror_structure_name;
214  vector<string> federror_me_names;
215  if (!configParser_->getMENamesForFEDErrorSummary(federror_structure_name, federror_me_names)){
216  cout << "SiPixelActionExecutor::createSummary: Failed to read FED Error Summary configuration parameters!! ";
217  return;
218  }
219  bei->setCurrentFolder("Pixel/");
220  //bei->cd();
221  fillFEDErrorSummary(bei, federror_structure_name, federror_me_names);
222  bei->setCurrentFolder("Pixel/");
223  //bei->cd();
224  }
225  //createLayout(bei);
226  //string fname = "test.xml";
227  // configWriter_->write(fname);
228  if (configWriter_) delete configWriter_;
229  configWriter_ = 0;
230 // cout<<"leaving SiPixelActionExecutor::createSummary..."<<endl;
231 }
void getDocument(std::string configFile, bool UseDB=false)
Methor that parses the xml file configFile.
SiPixelConfigParser * configParser_
bool getMENamesForEndcapSummary(std::string &structure_name, std::vector< std::string > &me_names)
void fillSummary(DQMStore *bei, std::string dir_name, std::vector< std::string > &me_names, bool isbarrel, bool isUpgrade)
SiPixelConfigWriter * configWriter_
bool getMENamesForFEDErrorSummary(std::string &structure_name, std::vector< std::string > &me_names)
bool getMENamesForBarrelSummary(std::string &structure_name, std::vector< std::string > &me_names)
bool getSourceType(int &u_freq)
tuple cout
Definition: gather_cfg.py:121
void fillFEDErrorSummary(DQMStore *bei, std::string dir_name, std::vector< std::string > &me_names)
void SiPixelActionExecutor::createTkMap ( DQMStore bei,
std::string  mEName,
std::string  theTKType 
)

Definition at line 154 of file SiPixelActionExecutor.cc.

References SiPixelTrackerMapCreator::create(), and offlineXMLfile_.

157 {
158 
159  SiPixelTrackerMapCreator tkmap_creator(mEName,theTKType,offlineXMLfile_);
160  tkmap_creator.create(bei);
161 
162 /* cout << ACYellow << ACBold
163  << "[SiPixelActionExecutor::createTkMap()]"
164  << ACPlain
165  << " Tracker map created (type:"
166  << theTKType
167  << ")"
168  << endl;
169 */
170 }
void SiPixelActionExecutor::dumpBarrelModIds ( DQMStore bei,
edm::EventSetup const &  eSetup 
)

Definition at line 2179 of file SiPixelActionExecutor.cc.

References relmon_rootfiles_spy::contents, gather_cfg::cout, compare_using_db::dir_name, fff_deleter::formatter, edm::EventSetup::get(), sipixelobjects::ElectronicIndex::link, ndet_, edm::ESHandle< class >::product(), and theCablingMap.

Referenced by dumpModIds().

2179  {
2180  string currDir = bei->pwd();
2181  string dir_name = "Ladder_";
2182  eSetup.get<SiPixelFedCablingMapRcd>().get(theCablingMap);
2183  int fedId=-1; int linkId=-1;
2184  if (currDir.find(dir_name) != string::npos) {
2185  vector<string> subdirs = bei->getSubdirs();
2186  for (vector<string>::const_iterator it = subdirs.begin();
2187  it != subdirs.end(); it++) {
2188  if ( (*it).find("Module_") == string::npos) continue;
2189  bei->cd(*it);
2190  ndet_++;
2191  // long version:
2192  //cout<<"Ndet: "<<ndet_<<" , Module: "<<bei->pwd();
2193  // short version:
2194  cout<<bei->pwd();
2195  vector<string> contents = bei->getMEs();
2196  bool first_me = false;
2197  int detId = -999;
2198  for (vector<string>::const_iterator im = contents.begin();
2199  im != contents.end(); im++) {
2200  if(first_me) break;
2201  string mEName = (*im);
2202  string detIdString = mEName.substr((mEName.find_last_of("_"))+1,9);
2203  std::istringstream isst;
2204  isst.str(detIdString);
2205  if(mEName.find("_3")!=string::npos) isst>>detId;
2206  }
2207  bei->goUp();
2208  // long version:
2209  //cout<<" , detector ID: "<<detId;
2210  // short version:
2211  cout<<" "<<detId;
2212  for(int fedid=0; fedid<=40; ++fedid){
2213  SiPixelFrameConverter converter(theCablingMap.product(),fedid);
2214  uint32_t newDetId = detId;
2215  if(converter.hasDetUnit(newDetId)){
2216  fedId=fedid;
2217  break;
2218  }
2219  }
2220  if(fedId==-1) continue;
2223  assert(detId >= 0);
2224  sipixelobjects::DetectorIndex detector = {static_cast<unsigned int>(detId), 1, 1};
2225  formatter.toCabling(cabling,detector);
2226  linkId = cabling.link;
2227  // long version:
2228  //cout<<" , FED ID: "<<fedId<<" , Link ID: "<<linkId<<endl;
2229  // short version:
2230  cout<<" "<<fedId<<" "<<linkId<<endl;
2231  }
2232  } else {
2233  vector<string> subdirs = bei->getSubdirs();
2234  for (vector<string>::const_iterator it = subdirs.begin();
2235  it != subdirs.end(); it++) {
2236  if((*it).find("Endcap")!=string::npos) continue;
2237  bei->cd(*it);
2238  dumpBarrelModIds(bei,eSetup);
2239  bei->goUp();
2240  }
2241  }
2242 }
void dumpBarrelModIds(DQMStore *bei, edm::EventSetup const &eSetup)
edm::ESHandle< SiPixelFedCablingMap > theCablingMap
T const * product() const
Definition: ESHandle.h:86
tuple formatter
Definition: fff_deleter.py:293
tuple cout
Definition: gather_cfg.py:121
void SiPixelActionExecutor::dumpBarrelRefValues ( DQMStore bei,
edm::EventSetup const &  eSetup 
)

Definition at line 2326 of file SiPixelActionExecutor.cc.

References gather_cfg::cout, MonitorElement::getBinContent(), and i.

Referenced by dumpRefValues().

2326  {
2327  MonitorElement* me;
2328  me = bei->get("Pixel/Barrel/SUMDIG_adc_Barrel");
2329  if(me){
2330  std::cout<<"SUMDIG_adc_Barrel: "<<std::endl;
2331  for(int i=1; i!=769; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2332  }
2333  me = bei->get("Pixel/Barrel/SUMDIG_ndigis_Barrel");
2334  if(me){
2335  std::cout<<"SUMDIG_ndigis_Barrel: "<<std::endl;
2336  for(int i=1; i!=769; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2337  }
2338  me = bei->get("Pixel/Barrel/SUMCLU_charge_Barrel");
2339  if(me){
2340  std::cout<<"SUMCLU_charge_Barrel: "<<std::endl;
2341  for(int i=1; i!=769; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2342  }
2343  me = bei->get("Pixel/Barrel/SUMCLU_nclusters_Barrel");
2344  if(me){
2345  std::cout<<"SUMCLU_nclusters_Barrel: "<<std::endl;
2346  for(int i=1; i!=769; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2347  }
2348  me = bei->get("Pixel/Barrel/SUMCLU_size_Barrel");
2349  if(me){
2350  std::cout<<"SUMCLU_size_Barrel: "<<std::endl;
2351  for(int i=1; i!=769; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2352  }
2353 }
int i
Definition: DBlmapReader.cc:9
double getBinContent(int binx) const
get content of bin (1-D)
tuple cout
Definition: gather_cfg.py:121
void SiPixelActionExecutor::dumpEndcapModIds ( DQMStore bei,
edm::EventSetup const &  eSetup 
)

Definition at line 2245 of file SiPixelActionExecutor.cc.

References relmon_rootfiles_spy::contents, gather_cfg::cout, spr::find(), fff_deleter::formatter, edm::EventSetup::get(), sipixelobjects::ElectronicIndex::link, ndet_, edm::ESHandle< class >::product(), and theCablingMap.

Referenced by dumpModIds().

2245  {
2246  string currDir = bei->pwd();
2247  string dir_name = "Panel_";
2248  eSetup.get<SiPixelFedCablingMapRcd>().get(theCablingMap);
2249  int fedId=-1; int linkId=-1;
2250  if (currDir.find(dir_name) != string::npos) {
2251  vector<string> subdirs = bei->getSubdirs();
2252  for (vector<string>::const_iterator it = subdirs.begin();
2253  it != subdirs.end(); it++) {
2254  if ( (*it).find("Module_") == string::npos) continue;
2255  bei->cd(*it);
2256  ndet_++;
2257  // long version:
2258  //cout<<"Ndet: "<<ndet_<<" , Module: "<<bei->pwd();
2259  // short version:
2260  cout<<bei->pwd();
2261  vector<string> contents = bei->getMEs();
2262  bool first_me = false;
2263  int detId = -999;
2264  for (vector<string>::const_iterator im = contents.begin();
2265  im != contents.end(); im++) {
2266  if(first_me) break;
2267  string mEName = (*im);
2268  string detIdString = mEName.substr((mEName.find_last_of("_"))+1,9);
2269  std::istringstream isst;
2270  isst.str(detIdString);
2271  if(mEName.find("_3")!=string::npos) isst>>detId;
2272  }
2273  bei->goUp();
2274  // long version:
2275  //cout<<" , detector ID: "<<detId;
2276  // short version:
2277  cout<<" "<<detId;
2278  for(int fedid=0; fedid<=40; ++fedid){
2279  SiPixelFrameConverter converter(theCablingMap.product(),fedid);
2280  uint32_t newDetId = detId;
2281  if(converter.hasDetUnit(newDetId)){
2282  fedId=fedid;
2283  break;
2284  }
2285  }
2286  if(fedId==-1) continue;
2289  assert(detId >= 0);
2290  sipixelobjects::DetectorIndex detector = {static_cast<unsigned int>(detId), 1, 1};
2291  formatter.toCabling(cabling,detector);
2292  linkId = cabling.link;
2293  // long version:
2294  //cout<<" , FED ID: "<<fedId<<" , Link ID: "<<linkId<<endl;
2295  // short version:
2296  cout<<" "<<fedId<<" "<<linkId<<endl;
2297  }
2298  } else {
2299  vector<string> subdirs = bei->getSubdirs();
2300  for (vector<string>::const_iterator it = subdirs.begin();
2301  it != subdirs.end(); it++) {
2302  if((bei->pwd()).find("Barrel")!=string::npos) bei->goUp();
2303  bei->cd((*it));
2304  if((*it).find("Barrel")!=string::npos) continue;
2305  dumpEndcapModIds(bei,eSetup);
2306  bei->goUp();
2307  }
2308  }
2309 
2310 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
edm::ESHandle< SiPixelFedCablingMap > theCablingMap
void dumpEndcapModIds(DQMStore *bei, edm::EventSetup const &eSetup)
T const * product() const
Definition: ESHandle.h:86
tuple formatter
Definition: fff_deleter.py:293
tuple cout
Definition: gather_cfg.py:121
void SiPixelActionExecutor::dumpEndcapRefValues ( DQMStore bei,
edm::EventSetup const &  eSetup 
)

Definition at line 2356 of file SiPixelActionExecutor.cc.

References gather_cfg::cout, MonitorElement::getBinContent(), and i.

Referenced by dumpRefValues().

2356  {
2357  MonitorElement* me;
2358  me = bei->get("Pixel/Endcap/SUMDIG_adc_Endcap");
2359  if(me){
2360  std::cout<<"SUMDIG_adc_Endcap: "<<std::endl;
2361  for(int i=1; i!=673; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2362  }
2363  me = bei->get("Pixel/Endcap/SUMDIG_ndigis_Endcap");
2364  if(me){
2365  std::cout<<"SUMDIG_ndigis_Endcap: "<<std::endl;
2366  for(int i=1; i!=673; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2367  }
2368  me = bei->get("Pixel/Endcap/SUMCLU_charge_Endcap");
2369  if(me){
2370  std::cout<<"SUMCLU_charge_Endcap: "<<std::endl;
2371  for(int i=1; i!=673; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2372  }
2373  me = bei->get("Pixel/Endcap/SUMCLU_nclusters_Endcap");
2374  if(me){
2375  std::cout<<"SUMCLU_nclusters_Endcap: "<<std::endl;
2376  for(int i=1; i!=673; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2377  }
2378  me = bei->get("Pixel/Endcap/SUMCLU_size_Endcap");
2379  if(me){
2380  std::cout<<"SUMCLU_size_Endcap: "<<std::endl;
2381  for(int i=1; i!=673; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2382  }
2383 }
int i
Definition: DBlmapReader.cc:9
double getBinContent(int binx) const
get content of bin (1-D)
tuple cout
Definition: gather_cfg.py:121
void SiPixelActionExecutor::dumpModIds ( DQMStore bei,
edm::EventSetup const &  eSetup 
)

Definition at line 2167 of file SiPixelActionExecutor.cc.

References dumpBarrelModIds(), and dumpEndcapModIds().

2167  {
2168  //printing cout<<"Going to dump module IDs now!"<<endl;
2169  bei->cd();
2170  dumpBarrelModIds(bei,eSetup);
2171  bei->cd();
2172  dumpEndcapModIds(bei,eSetup);
2173  bei->cd();
2174  //printing cout<<"Done dumping module IDs!"<<endl;
2175 }
void dumpBarrelModIds(DQMStore *bei, edm::EventSetup const &eSetup)
void dumpEndcapModIds(DQMStore *bei, edm::EventSetup const &eSetup)
void SiPixelActionExecutor::dumpRefValues ( DQMStore bei,
edm::EventSetup const &  eSetup 
)

Definition at line 2314 of file SiPixelActionExecutor.cc.

References dumpBarrelRefValues(), and dumpEndcapRefValues().

2314  {
2315  //printing cout<<"Going to dump module IDs now!"<<endl;
2316  bei->cd();
2317  dumpBarrelRefValues(bei,eSetup);
2318  bei->cd();
2319  dumpEndcapRefValues(bei,eSetup);
2320  bei->cd();
2321  //printing cout<<"Done dumping module IDs!"<<endl;
2322 }
void dumpBarrelRefValues(DQMStore *bei, edm::EventSetup const &eSetup)
void dumpEndcapRefValues(DQMStore *bei, edm::EventSetup const &eSetup)
void SiPixelActionExecutor::fillDeviations ( DQMStore bei)
private

Definition at line 256 of file SiPixelActionExecutor.cc.

References MonitorElement::getBinContent(), MonitorElement::getRefTH1(), i, n, and MonitorElement::setBinContent().

256  {
257  int n = 768;
258  MonitorElement* me1; MonitorElement* me2;
259  MonitorElement* me3; MonitorElement* me4;
260  MonitorElement* me5;
261  TH1* ref1; TH1* ref2;
262  TH1* ref3; TH1* ref4;
263  TH1* ref5;
264  MonitorElement* dev1; MonitorElement* dev2;
265  MonitorElement* dev3; MonitorElement* dev4;
266  MonitorElement* dev5;
267  me1 = bei->get("Pixel/Barrel/SUMDIG_adc_Barrel");
268  ref1 = me1->getRefTH1();
269  dev1 = bei->get("Pixel/Barrel/DEV_adc_Barrel");
270  me2 = bei->get("Pixel/Barrel/SUMDIG_ndigis_Barrel");
271  ref2 = me2->getRefTH1();
272  dev2 = bei->get("Pixel/Barrel/DEV_ndigis_Barrel");
273  me3 = bei->get("Pixel/Barrel/SUMCLU_charge_Barrel");
274  ref3 = me3->getRefTH1();
275  dev3 = bei->get("Pixel/Barrel/DEV_charge_Barrel");
276  me4 = bei->get("Pixel/Barrel/SUMCLU_nclusters_Barrel");
277  ref4 = me4->getRefTH1();
278  dev4 = bei->get("Pixel/Barrel/DEV_nclusters_Barrel");
279  me5 = bei->get("Pixel/Barrel/SUMCLU_size_Barrel");
280  ref5 = me5->getRefTH1();
281  dev5 = bei->get("Pixel/Barrel/DEV_size_Barrel");
282  for(int i=1; i!=n+1; i++){
283  float ref_value; float new_value;
284  // Barrel adc:
285  if(me1)if(ref1)if(dev1){
286  new_value = me1->getBinContent(i);
287  ref_value = ref1->GetBinContent(i);
288  dev1->setBinContent(i,ref_value-new_value);
289  }
290  //Barrel ndigis:
291  if(me2)if(ref2)if(dev2){
292  new_value = me2->getBinContent(i);
293  ref_value = ref2->GetBinContent(i);
294  dev2->setBinContent(i,ref_value-new_value);
295  }
296  // Barrel cluster charge:
297  if(me3)if(ref3)if(dev3){
298  new_value = me3->getBinContent(i);
299  ref_value = ref3->GetBinContent(i);
300  dev3->setBinContent(i,ref_value-new_value);
301  }
302  // Barrel nclusters:
303  if(me4)if(ref4)if(dev4){
304  new_value = me4->getBinContent(i);
305  ref_value = ref4->GetBinContent(i);
306  dev4->setBinContent(i,ref_value-new_value);
307  }
308  // Barrel cluster size:
309  if(me5)if(ref5)if(dev5){
310  new_value = me5->getBinContent(i);
311  ref_value = ref5->GetBinContent(i);
312  dev5->setBinContent(i,ref_value-new_value);
313  }
314  }
315 
316  int nn = 672;
317  MonitorElement* me11; MonitorElement* me12;
318  MonitorElement* me13; MonitorElement* me14;
319  MonitorElement* me15;
320  TH1* ref11; TH1* ref12;
321  TH1* ref13; TH1* ref14;
322  TH1* ref15;
323  MonitorElement* dev11; MonitorElement* dev12;
324  MonitorElement* dev13; MonitorElement* dev14;
325  MonitorElement* dev15;
326  me11 = bei->get("Pixel/Endcap/SUMDIG_adc_Endcap");
327  ref11 = me11->getRefTH1();
328  dev11 = bei->get("Pixel/Endcap/DEV_adc_Endcap");
329  me12 = bei->get("Pixel/Endcap/SUMDIG_ndigis_Endcap");
330  ref12 = me12->getRefTH1();
331  dev12 = bei->get("Pixel/Endcap/DEV_ndigis_Endcap");
332  me13 = bei->get("Pixel/Endcap/SUMCLU_charge_Endcap");
333  ref13 = me13->getRefTH1();
334  dev13 = bei->get("Pixel/Endcap/DEV_charge_Endcap");
335  me14 = bei->get("Pixel/Endcap/SUMCLU_nclusters_Endcap");
336  ref14 = me14->getRefTH1();
337  dev14 = bei->get("Pixel/Endcap/DEV_nclusters_Endcap");
338  me15 = bei->get("Pixel/Endcap/SUMCLU_size_Endcap");
339  ref15 = me15->getRefTH1();
340  dev15 = bei->get("Pixel/Endcap/DEV_size_Endcap");
341  for(int i=1; i!=nn+1; i++){
342  float ref_value; float new_value;
343  // Endcap adc:
344  if(me11)if(ref11)if(dev11){
345  new_value = me11->getBinContent(i);
346  ref_value = ref11->GetBinContent(i);
347  dev11->setBinContent(i,ref_value-new_value);
348  }
349  //Endcap ndigis:
350  if(me12)if(ref12)if(dev12){
351  new_value = me12->getBinContent(i);
352  ref_value = ref12->GetBinContent(i);
353  dev12->setBinContent(i,ref_value-new_value);
354  }
355  // Endcap cluster charge:
356  if(me13)if(ref13)if(dev13){
357  new_value = me13->getBinContent(i);
358  ref_value = ref13->GetBinContent(i);
359  dev13->setBinContent(i,ref_value-new_value);
360  }
361  // Endcap nclusters:
362  if(me14)if(ref14)if(dev14){
363  new_value = me14->getBinContent(i);
364  ref_value = ref14->GetBinContent(i);
365  dev14->setBinContent(i,ref_value-new_value);
366  }
367  // Endcap cluster size:
368  if(me15)if(ref15)if(dev15){
369  new_value = me15->getBinContent(i);
370  ref_value = ref15->GetBinContent(i);
371  dev15->setBinContent(i,ref_value-new_value);
372  }
373  }
374 }
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
TH1 * getRefTH1(void) const
double getBinContent(int binx) const
get content of bin (1-D)
void SiPixelActionExecutor::fillEfficiency ( DQMStore bei,
bool  isbarrel,
bool  isUpgrade 
)

Definition at line 2463 of file SiPixelActionExecutor.cc.

References RefreshWebPage::dname, MonitorElement::getBinContent(), MonitorElement::getEntries(), HitEfficiency_Dm1, HitEfficiency_Dm2, HitEfficiency_Dm3, HitEfficiency_Dp1, HitEfficiency_Dp2, HitEfficiency_Dp3, HitEfficiency_L1, HitEfficiency_L2, HitEfficiency_L3, HitEfficiency_L4, i, combine::missing, MonitorElement::setBinContent(), dqm_diff::start, Tier0Flag_, and TrackValidation_HighPurity_cff::valid.

Referenced by createEfficiency().

2463  {
2464  //cout<<"entering SiPixelActionExecutor::fillEfficiency..."<<std::endl;
2465  string currDir = bei->pwd();
2466  string dname = currDir.substr(currDir.find_last_of("/")+1);
2467  //cout<<"currDir= "<<currDir<< " , dname= "<<dname<<std::endl;
2468 
2469  if(Tier0Flag_){ // Offline
2470  if(isbarrel && dname.find("Ladder_")!=string::npos){
2471  if (!isUpgrade) {
2472  vector<string> meVec = bei->getMEs();
2473  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2474  string full_path = currDir + "/" + (*it);
2475 
2476  if(full_path.find("missingMod_")!=string::npos){ // If we have missing hits ME
2477 
2478  //Get the MEs that contain missing and valid hits
2479  MonitorElement * missing = bei->get(full_path);
2480  if (!missing) continue;
2481  string new_path = full_path.replace(full_path.find("missing"),7,"valid");
2482  MonitorElement * valid = bei->get(new_path);
2483  if (!valid) continue;
2484  //int binx = 0;
2485  int biny = 0;
2486  //get the ladder number
2487 
2488  if(dname.find("01")!=string::npos){ biny = 1;}else if(dname.find("02")!=string::npos){ biny = 2;}
2489  else if(dname.find("03")!=string::npos){ biny = 3;}else if(dname.find("04")!=string::npos){ biny = 4;}
2490  else if(dname.find("05")!=string::npos){ biny = 5;}else if(dname.find("06")!=string::npos){ biny = 6;}
2491  else if(dname.find("07")!=string::npos){ biny = 7;}else if(dname.find("08")!=string::npos){ biny = 8;}
2492  else if(dname.find("09")!=string::npos){ biny = 9;}else if(dname.find("10")!=string::npos){ biny = 10;}
2493  else if(dname.find("11")!=string::npos){ biny = 11;}else if(dname.find("12")!=string::npos){ biny = 12;}
2494  else if(dname.find("13")!=string::npos){ biny = 13;}else if(dname.find("14")!=string::npos){ biny = 14;}
2495  else if(dname.find("15")!=string::npos){ biny = 15;}else if(dname.find("16")!=string::npos){ biny = 16;}
2496  else if(dname.find("17")!=string::npos){ biny = 17;}else if(dname.find("18")!=string::npos){ biny = 18;}
2497  else if(dname.find("19")!=string::npos){ biny = 19;}else if(dname.find("20")!=string::npos){ biny = 20;}
2498  else if(dname.find("21")!=string::npos){ biny = 21;}else if(dname.find("22")!=string::npos){ biny = 22;}
2499 
2500  if(currDir.find("Shell_mO")!=string::npos || currDir.find("Shell_pO")!=string::npos){
2501  if(currDir.find("Layer_1")!=string::npos){ biny = biny + 10;}
2502  else if(currDir.find("Layer_2")!=string::npos){ biny = biny + 16;}
2503 
2504  else if(currDir.find("Layer_3")!=string::npos){ biny = biny + 22;}
2505 
2506  }
2507 
2508 
2509 
2510  int start=1;
2511  //define start depending on p or m
2512 
2513  if(currDir.find("Shell_m")!=string::npos){ start = 1;}else{ start = 5;}
2514  for(int i=start; i<start+5;i++){
2515  float hitEfficiency = -1.0;
2516  float missingHits=0;
2517  float validHits=0;
2518  missingHits=missing->getBinContent(i);
2519  validHits=valid->getBinContent(i);
2520  if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2521  if(currDir.find("Layer_1")!=string::npos){
2522  HitEfficiency_L1 = bei->get("Pixel/Barrel/HitEfficiency_L1");
2523  if(HitEfficiency_L1) HitEfficiency_L1->setBinContent(i, biny,(float)hitEfficiency);
2524  }
2525  else if(currDir.find("Layer_2")!=string::npos){
2526  HitEfficiency_L2 = bei->get("Pixel/Barrel/HitEfficiency_L2");
2527  if(HitEfficiency_L2) HitEfficiency_L2->setBinContent(i, biny,(float)hitEfficiency);
2528  }
2529  else if(currDir.find("Layer_3")!=string::npos){
2530  HitEfficiency_L3 = bei->get("Pixel/Barrel/HitEfficiency_L3");
2531  if(HitEfficiency_L3) HitEfficiency_L3->setBinContent(i, biny,(float)hitEfficiency);
2532  }
2533 
2534  }
2535 
2536  }
2537  }
2538  }//endifNOTUpgradeInBPix
2539  else if (isUpgrade) {
2540  vector<string> meVec = bei->getMEs();
2541  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2542  string full_path = currDir + "/" + (*it);
2543  if(full_path.find("missing_")!=string::npos){ // If we have missing hits ME
2544  MonitorElement * me = bei->get(full_path);
2545  if (!me) continue;
2546  float missingHits = me->getEntries();
2547  //if(currDir.find("Barrel/Shell_mI/Layer_1/Ladder_09F")!=string::npos) cout<<"missingHits= "<<missingHits<<endl;
2548  string new_path = full_path.replace(full_path.find("missing"),7,"valid");
2549  me = bei->get(new_path);
2550  if (!me) continue;
2551  float validHits = me->getEntries();
2552  //if(currDir.find("Barrel/Shell_mI/Layer_1/Ladder_09F")!=string::npos) cout<<"validHits= "<<validHits<<endl;
2553  float hitEfficiency = -1.;
2554  if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2555  //if(currDir.find("Barrel/Shell_mI/Layer_1/Ladder_09F")!=string::npos) cout<<"hitEfficiency= "<<hitEfficiency<<endl;
2556  int binx = 0; int biny = 0;
2557  if(currDir.find("Shell_m")!=string::npos){ binx = 1;}else{ binx = 2;}
2558  if(dname.find("01")!=string::npos){ biny = 1;}else if(dname.find("02")!=string::npos){ biny = 2;}
2559  else if(dname.find("03")!=string::npos){ biny = 3;}else if(dname.find("04")!=string::npos){ biny = 4;}
2560  else if(dname.find("05")!=string::npos){ biny = 5;}else if(dname.find("06")!=string::npos){ biny = 6;}
2561  else if(dname.find("07")!=string::npos){ biny = 7;}else if(dname.find("08")!=string::npos){ biny = 8;}
2562  else if(dname.find("09")!=string::npos){ biny = 9;}else if(dname.find("10")!=string::npos){ biny = 10;}
2563  else if(dname.find("11")!=string::npos){ biny = 11;}else if(dname.find("12")!=string::npos){ biny = 12;}
2564  else if(dname.find("13")!=string::npos){ biny = 13;}else if(dname.find("14")!=string::npos){ biny = 14;}
2565  else if(dname.find("15")!=string::npos){ biny = 15;}else if(dname.find("16")!=string::npos){ biny = 16;}
2566  else if(dname.find("17")!=string::npos){ biny = 17;}else if(dname.find("18")!=string::npos){ biny = 18;}
2567  else if(dname.find("19")!=string::npos){ biny = 19;}else if(dname.find("20")!=string::npos){ biny = 20;}
2568  else if(dname.find("21")!=string::npos){ biny = 21;}else if(dname.find("22")!=string::npos){ biny = 22;}
2569  else if(dname.find("23")!=string::npos){ biny = 23;}else if(dname.find("24")!=string::npos){ biny = 24;}
2570  else if(dname.find("25")!=string::npos){ biny = 25;}else if(dname.find("25")!=string::npos){ biny = 25;}
2571  else if(dname.find("26")!=string::npos){ biny = 26;}else if(dname.find("27")!=string::npos){ biny = 27;}
2572  else if(dname.find("28")!=string::npos){ biny = 28;}else if(dname.find("29")!=string::npos){ biny = 29;}
2573  else if(dname.find("30")!=string::npos){ biny = 30;}else if(dname.find("31")!=string::npos){ biny = 31;}
2574  else if(dname.find("32")!=string::npos){ biny = 32;}
2575  if(currDir.find("Shell_mO")!=string::npos || currDir.find("Shell_pO")!=string::npos){
2576  if(currDir.find("Layer_1")!=string::npos){ biny = biny + 6;}
2577  else if(currDir.find("Layer_2")!=string::npos){ biny = biny + 14;}
2578  else if(currDir.find("Layer_3")!=string::npos){ biny = biny + 22;}
2579  else if(currDir.find("Layer_4")!=string::npos){ biny = biny + 32;}
2580  }
2581  if(currDir.find("Layer_1")!=string::npos){
2582  HitEfficiency_L1 = bei->get("Pixel/Barrel/HitEfficiency_L1");
2583  if(HitEfficiency_L1) HitEfficiency_L1->setBinContent(binx, biny,(float)hitEfficiency);
2584  //if(currDir.find("Barrel/Shell_mI/Layer_1/Ladder_09F")!=string::npos) cout<<"setting bin ("<<binx<<","<<biny<<") with "<<(float)hitEfficiency<<endl;
2585  }else if(currDir.find("Layer_2")!=string::npos){
2586  HitEfficiency_L2 = bei->get("Pixel/Barrel/HitEfficiency_L2");
2587  if(HitEfficiency_L2) HitEfficiency_L2->setBinContent(binx, biny,(float)hitEfficiency);
2588  }else if(currDir.find("Layer_3")!=string::npos){
2589  HitEfficiency_L3 = bei->get("Pixel/Barrel/HitEfficiency_L3");
2590  if(HitEfficiency_L3) HitEfficiency_L3->setBinContent(binx, biny,(float)hitEfficiency);
2591  }else if(currDir.find("Layer_4")!=string::npos){
2592  HitEfficiency_L4 = bei->get("Pixel/Barrel/HitEfficiency_L4");
2593  if(HitEfficiency_L4) HitEfficiency_L4->setBinContent(binx, biny,(float)hitEfficiency);
2594  }
2595  }
2596  }
2597  }//endifUpgradeInBPix
2598  }else if(!isbarrel && dname.find("Blade_")!=string::npos && !isUpgrade){
2599  vector<string> meVec = bei->getMEs();
2600  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2601  string full_path = currDir + "/" + (*it);
2602  if(full_path.find("missing_")!=string::npos){ // If we have missing hits ME
2603  MonitorElement * me = bei->get(full_path);
2604  if (!me) continue;
2605  float missingHits = me->getEntries();
2606  string new_path = full_path.replace(full_path.find("missing"),7,"valid");
2607  me = bei->get(new_path);
2608  if (!me) continue;
2609  float validHits = me->getEntries();
2610  float hitEfficiency = -1.;
2611  if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2612  int binx = 0; int biny = 1;
2613  if(currDir.find("01")!=string::npos){ binx = 1;}else if(currDir.find("02")!=string::npos){ binx = 2;}
2614  else if(currDir.find("03")!=string::npos){ binx = 3;}else if(currDir.find("04")!=string::npos){ binx = 4;}
2615  else if(currDir.find("05")!=string::npos){ binx = 5;}else if(currDir.find("06")!=string::npos){ binx = 6;}
2616  else if(currDir.find("07")!=string::npos){ binx = 7;}else if(currDir.find("08")!=string::npos){ binx = 8;}
2617  else if(currDir.find("09")!=string::npos){ binx = 9;}else if(currDir.find("10")!=string::npos){ binx = 10;}
2618  else if(currDir.find("11")!=string::npos){ binx = 11;}else if(currDir.find("12")!=string::npos){ binx = 12;}
2619  if(currDir.find("HalfCylinder_mI")!=string::npos || currDir.find("HalfCylinder_pI")!=string::npos){ binx = binx + 12;}
2620  else{
2621  if(binx==1) binx = 12;
2622  else if(binx==2) binx = 11;
2623  else if(binx==3) binx = 10;
2624  else if(binx==4) binx = 9;
2625  else if(binx==5) binx = 8;
2626  else if(binx==6) binx = 7;
2627  else if(binx==7) binx = 6;
2628  else if(binx==8) binx = 5;
2629  else if(binx==9) binx = 4;
2630  else if(binx==10) binx = 3;
2631  else if(binx==11) binx = 2;
2632  else if(binx==12) binx = 1;
2633  }
2634  if(currDir.find("Disk_1")!=string::npos && currDir.find("HalfCylinder_m")!=string::npos){
2635  HitEfficiency_Dm1 = bei->get("Pixel/Endcap/HitEfficiency_Dm1");
2636  if(HitEfficiency_Dm1) HitEfficiency_Dm1->setBinContent(binx, biny, (float)hitEfficiency);
2637  }else if(currDir.find("Disk_2")!=string::npos && currDir.find("HalfCylinder_m")!=string::npos){
2638  HitEfficiency_Dm2 = bei->get("Pixel/Endcap/HitEfficiency_Dm2");
2639  if(HitEfficiency_Dm2) HitEfficiency_Dm2->setBinContent(binx, biny, (float)hitEfficiency);
2640  }else if(currDir.find("Disk_1")!=string::npos && currDir.find("HalfCylinder_p")!=string::npos){
2641  HitEfficiency_Dp1 = bei->get("Pixel/Endcap/HitEfficiency_Dp1");
2642  if(HitEfficiency_Dp1) HitEfficiency_Dp1->setBinContent(binx, biny, (float)hitEfficiency);
2643  }else if(currDir.find("Disk_2")!=string::npos && currDir.find("HalfCylinder_p")!=string::npos){
2644  HitEfficiency_Dp2 = bei->get("Pixel/Endcap/HitEfficiency_Dp2");
2645  if(HitEfficiency_Dp2) HitEfficiency_Dp2->setBinContent(binx, biny, (float)hitEfficiency);
2646  }
2647  //std::cout<<"EFFI: "<<currDir<<" , x: "<<binx<<" , y: "<<biny<<std::endl;
2648  }
2649  }
2650  }else if(!isbarrel && dname.find("Blade_")!=string::npos && isUpgrade){
2651  vector<string> meVec = bei->getMEs();
2652  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2653  string full_path = currDir + "/" + (*it);
2654  if(full_path.find("missing_")!=string::npos){ // If we have missing hits ME
2655  MonitorElement * me = bei->get(full_path);
2656  if (!me) continue;
2657  float missingHits = me->getEntries();
2658  string new_path = full_path.replace(full_path.find("missing"),7,"valid");
2659  me = bei->get(new_path);
2660  if (!me) continue;
2661  float validHits = me->getEntries();
2662  float hitEfficiency = -1.;
2663  if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2664  int binx = 0; int biny = 1;
2665  if(currDir.find("01")!=string::npos){ binx = 1;}else if(currDir.find("02")!=string::npos){ binx = 2;}
2666  else if(currDir.find("03")!=string::npos){ binx = 3;}else if(currDir.find("04")!=string::npos){ binx = 4;}
2667  else if(currDir.find("05")!=string::npos){ binx = 5;}else if(currDir.find("06")!=string::npos){ binx = 6;}
2668  else if(currDir.find("07")!=string::npos){ binx = 7;}else if(currDir.find("08")!=string::npos){ binx = 8;}
2669  else if(currDir.find("09")!=string::npos){ binx = 9;}else if(currDir.find("10")!=string::npos){ binx = 10;}
2670  else if(currDir.find("11")!=string::npos){ binx = 11;}else if(currDir.find("12")!=string::npos){ binx = 12;}
2671  else if(currDir.find("13")!=string::npos){ binx = 13;}else if(currDir.find("14")!=string::npos){ binx = 14;}
2672  else if(currDir.find("15")!=string::npos){ binx = 15;}else if(currDir.find("16")!=string::npos){ binx = 16;}
2673  else if(currDir.find("17")!=string::npos){ binx = 17;}
2674  if(currDir.find("HalfCylinder_mI")!=string::npos || currDir.find("HalfCylinder_pI")!=string::npos){ binx = binx + 12;}
2675  else{
2676  if(binx==1) binx = 17;
2677  else if(binx==2) binx = 16;
2678  else if(binx==3) binx = 15;
2679  else if(binx==4) binx = 14;
2680  else if(binx==5) binx = 13;
2681  else if(binx==6) binx = 12;
2682  else if(binx==7) binx = 11;
2683  else if(binx==8) binx = 10;
2684  else if(binx==9) binx = 9;
2685  else if(binx==10) binx = 8;
2686  else if(binx==11) binx = 7;
2687  else if(binx==12) binx = 6;
2688  else if(binx==13) binx = 5;
2689  else if(binx==14) binx = 4;
2690  else if(binx==15) binx = 3;
2691  else if(binx==16) binx = 2;
2692  else if(binx==17) binx = 1;
2693  }
2694  if(currDir.find("Disk_1")!=string::npos && currDir.find("HalfCylinder_m")!=string::npos){
2695  HitEfficiency_Dm1 = bei->get("Pixel/Endcap/HitEfficiency_Dm1");
2696  if(HitEfficiency_Dm1) HitEfficiency_Dm1->setBinContent(binx, biny, (float)hitEfficiency);
2697  }else if(currDir.find("Disk_2")!=string::npos && currDir.find("HalfCylinder_m")!=string::npos){
2698  HitEfficiency_Dm2 = bei->get("Pixel/Endcap/HitEfficiency_Dm2");
2699  if(HitEfficiency_Dm2) HitEfficiency_Dm2->setBinContent(binx, biny, (float)hitEfficiency);
2700  }else if(currDir.find("Disk_3")!=string::npos && currDir.find("HalfCylinder_m")!=string::npos){
2701  HitEfficiency_Dm3 = bei->get("Pixel/Endcap/HitEfficiency_Dm3");
2702  if(HitEfficiency_Dm3) HitEfficiency_Dm3->setBinContent(binx, biny, (float)hitEfficiency);
2703  }else if(currDir.find("Disk_1")!=string::npos && currDir.find("HalfCylinder_p")!=string::npos){
2704  HitEfficiency_Dp1 = bei->get("Pixel/Endcap/HitEfficiency_Dp1");
2705  if(HitEfficiency_Dp1) HitEfficiency_Dp1->setBinContent(binx, biny, (float)hitEfficiency);
2706  }else if(currDir.find("Disk_2")!=string::npos && currDir.find("HalfCylinder_p")!=string::npos){
2707  HitEfficiency_Dp2 = bei->get("Pixel/Endcap/HitEfficiency_Dp2");
2708  if(HitEfficiency_Dp2) HitEfficiency_Dp2->setBinContent(binx, biny, (float)hitEfficiency);
2709  }else if(currDir.find("Disk_3")!=string::npos && currDir.find("HalfCylinder_p")!=string::npos){
2710  HitEfficiency_Dp3 = bei->get("Pixel/Endcap/HitEfficiency_Dp3");
2711  if(HitEfficiency_Dp3) HitEfficiency_Dp3->setBinContent(binx, biny, (float)hitEfficiency);
2712  }
2713  //std::cout<<"EFFI: "<<currDir<<" , x: "<<binx<<" , y: "<<biny<<std::endl;
2714  }
2715  }
2716  }else{
2717  //cout<<"finding subdirs now"<<std::endl;
2718  vector<string> subdirs = bei->getSubdirs();
2719  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
2720  bei->cd(*it);
2721  //cout<<"now I am in "<<bei->pwd()<<std::endl;
2722  if(*it != "Pixel" && ((isbarrel && (*it).find("Barrel")==string::npos) || (!isbarrel && (*it).find("Endcap")==string::npos))) continue;
2723  //cout<<"calling myself again "<<std::endl;
2724  fillEfficiency(bei, isbarrel, isUpgrade);
2725  bei->goUp();
2726  }
2727  }
2728  }else{ // Online
2729  if(dname.find("Module_")!=string::npos){
2730  vector<string> meVec = bei->getMEs();
2731  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2732  string full_path = currDir + "/" + (*it);
2733  if(full_path.find("missing_")!=string::npos){ // If we have missing hits ME
2734  MonitorElement * me = bei->get(full_path);
2735  if (!me) continue;
2736  float missingHits = me->getEntries();
2737  string new_path = full_path.replace(full_path.find("missing"),7,"valid");
2738  me = bei->get(new_path);
2739  if (!me) continue;
2740  float validHits = me->getEntries();
2741  float hitEfficiency = -1.;
2742  if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2743  int binx = 0; int biny = 0;
2744  if(isbarrel){
2745  if(currDir.find("Shell_m")!=string::npos){
2746  if(currDir.find("Module_4")!=string::npos){ binx = 1;}else if(currDir.find("Module_3")!=string::npos){ binx = 2;}
2747  if(currDir.find("Module_2")!=string::npos){ binx = 3;}else if(currDir.find("Module_1")!=string::npos){ binx = 4;}
2748  }else if(currDir.find("Shell_p")!=string::npos){
2749  if(currDir.find("Module_1")!=string::npos){ binx = 5;}else if(currDir.find("Module_2")!=string::npos){ binx = 6;}
2750  if(currDir.find("Module_3")!=string::npos){ binx = 7;}else if(currDir.find("Module_4")!=string::npos){ binx = 8;}
2751  }
2752  if (!isUpgrade) {
2753  if(currDir.find("01")!=string::npos){ biny = 1;}else if(currDir.find("02")!=string::npos){ biny = 2;}
2754  else if(currDir.find("03")!=string::npos){ biny = 3;}else if(currDir.find("04")!=string::npos){ biny = 4;}
2755  else if(currDir.find("05")!=string::npos){ biny = 5;}else if(currDir.find("06")!=string::npos){ biny = 6;}
2756  else if(currDir.find("07")!=string::npos){ biny = 7;}else if(currDir.find("08")!=string::npos){ biny = 8;}
2757  else if(currDir.find("09")!=string::npos){ biny = 9;}else if(currDir.find("10")!=string::npos){ biny = 10;}
2758  else if(currDir.find("11")!=string::npos){ biny = 11;}else if(currDir.find("12")!=string::npos){ biny = 12;}
2759  else if(currDir.find("13")!=string::npos){ biny = 13;}else if(currDir.find("14")!=string::npos){ biny = 14;}
2760  else if(currDir.find("15")!=string::npos){ biny = 15;}else if(currDir.find("16")!=string::npos){ biny = 16;}
2761  else if(currDir.find("17")!=string::npos){ biny = 17;}else if(currDir.find("18")!=string::npos){ biny = 18;}
2762  else if(currDir.find("19")!=string::npos){ biny = 19;}else if(currDir.find("20")!=string::npos){ biny = 20;}
2763  else if(currDir.find("21")!=string::npos){ biny = 21;}else if(currDir.find("22")!=string::npos){ biny = 22;}
2764  if(currDir.find("Shell_mO")!=string::npos || currDir.find("Shell_pO")!=string::npos){
2765  if(currDir.find("Layer_1")!=string::npos){ biny = biny + 10;}
2766  else if(currDir.find("Layer_2")!=string::npos){ biny = biny + 16;}
2767  else if(currDir.find("Layer_3")!=string::npos){ biny = biny + 22;}
2768  }
2769  }
2770  else if (isUpgrade) {
2771  if(currDir.find("01")!=string::npos){ biny = 1;}else if(currDir.find("02")!=string::npos){ biny = 2;}
2772  else if(currDir.find("03")!=string::npos){ biny = 3;}else if(currDir.find("04")!=string::npos){ biny = 4;}
2773  else if(currDir.find("05")!=string::npos){ biny = 5;}else if(currDir.find("06")!=string::npos){ biny = 6;}
2774  else if(currDir.find("07")!=string::npos){ biny = 7;}else if(currDir.find("08")!=string::npos){ biny = 8;}
2775  else if(currDir.find("09")!=string::npos){ biny = 9;}else if(currDir.find("10")!=string::npos){ biny = 10;}
2776  else if(currDir.find("11")!=string::npos){ biny = 11;}else if(currDir.find("12")!=string::npos){ biny = 12;}
2777  else if(currDir.find("13")!=string::npos){ biny = 13;}else if(currDir.find("14")!=string::npos){ biny = 14;}
2778  else if(currDir.find("15")!=string::npos){ biny = 15;}else if(currDir.find("16")!=string::npos){ biny = 16;}
2779  else if(currDir.find("17")!=string::npos){ biny = 17;}else if(currDir.find("18")!=string::npos){ biny = 18;}
2780  else if(currDir.find("19")!=string::npos){ biny = 19;}else if(currDir.find("20")!=string::npos){ biny = 20;}
2781  else if(currDir.find("21")!=string::npos){ biny = 21;}else if(currDir.find("22")!=string::npos){ biny = 22;}
2782  else if(currDir.find("23")!=string::npos){ biny = 23;}else if(currDir.find("24")!=string::npos){ biny = 24;}
2783  else if(currDir.find("25")!=string::npos){ biny = 25;}else if(currDir.find("25")!=string::npos){ biny = 25;}
2784  else if(currDir.find("26")!=string::npos){ biny = 26;}else if(currDir.find("27")!=string::npos){ biny = 27;}
2785  else if(currDir.find("28")!=string::npos){ biny = 28;}else if(currDir.find("29")!=string::npos){ biny = 29;}
2786  else if(currDir.find("30")!=string::npos){ biny = 30;}else if(currDir.find("31")!=string::npos){ biny = 31;}
2787  else if(currDir.find("32")!=string::npos){ biny = 32;}
2788  if(currDir.find("Shell_mO")!=string::npos || currDir.find("Shell_pO")!=string::npos){
2789  if(currDir.find("Layer_1")!=string::npos){ biny = biny + 6;}
2790  else if(currDir.find("Layer_2")!=string::npos){ biny = biny + 14;}
2791  else if(currDir.find("Layer_3")!=string::npos){ biny = biny + 22;}
2792  else if(currDir.find("Layer_4")!=string::npos){ biny = biny + 32;}
2793  }
2794  }
2795  }else{ //endcap
2796  if (!isUpgrade) {
2797  if(currDir.find("01")!=string::npos){ binx = 1;}else if(currDir.find("02")!=string::npos){ binx = 2;}
2798  else if(currDir.find("03")!=string::npos){ binx = 3;}else if(currDir.find("04")!=string::npos){ binx = 4;}
2799  else if(currDir.find("05")!=string::npos){ binx = 5;}else if(currDir.find("06")!=string::npos){ binx = 6;}
2800  else if(currDir.find("07")!=string::npos){ binx = 7;}else if(currDir.find("08")!=string::npos){ binx = 8;}
2801  else if(currDir.find("09")!=string::npos){ binx = 9;}else if(currDir.find("10")!=string::npos){ binx = 10;}
2802  else if(currDir.find("11")!=string::npos){ binx = 11;}else if(currDir.find("12")!=string::npos){ binx = 12;}
2803  if(currDir.find("HalfCylinder_mO")!=string::npos || currDir.find("HalfCylinder_pO")!=string::npos){ binx = binx + 12;}
2804  if(currDir.find("Panel_1/Module_1")!=string::npos){ biny = 1;}else if(currDir.find("Panel_2/Module_1")!=string::npos){ biny = 2;}
2805  else if(currDir.find("Panel_1/Module_2")!=string::npos){ biny = 3;}else if(currDir.find("Panel_2/Module_2")!=string::npos){ biny = 4;}
2806  else if(currDir.find("Panel_1/Module_3")!=string::npos){ biny = 5;}else if(currDir.find("Panel_2/Module_3")!=string::npos){ biny = 6;}
2807  else if(currDir.find("Panel_1/Module_4")!=string::npos){ biny = 7;}
2808  } else if (isUpgrade) {
2809  if(currDir.find("01")!=string::npos){ binx = 1;}else if(currDir.find("02")!=string::npos){ binx = 2;}
2810  else if(currDir.find("03")!=string::npos){ binx = 3;}else if(currDir.find("04")!=string::npos){ binx = 4;}
2811  else if(currDir.find("05")!=string::npos){ binx = 5;}else if(currDir.find("06")!=string::npos){ binx = 6;}
2812  else if(currDir.find("07")!=string::npos){ binx = 7;}else if(currDir.find("08")!=string::npos){ binx = 8;}
2813  else if(currDir.find("09")!=string::npos){ binx = 9;}else if(currDir.find("10")!=string::npos){ binx = 10;}
2814  else if(currDir.find("11")!=string::npos){ binx = 11;}else if(currDir.find("12")!=string::npos){ binx = 12;}
2815  else if(currDir.find("13")!=string::npos){ binx = 13;}else if(currDir.find("14")!=string::npos){ binx = 14;}
2816  else if(currDir.find("15")!=string::npos){ binx = 15;}else if(currDir.find("16")!=string::npos){ binx = 16;}
2817  else if(currDir.find("17")!=string::npos){ binx = 17;}
2818  if(currDir.find("HalfCylinder_mO")!=string::npos || currDir.find("HalfCylinder_pO")!=string::npos){ binx = binx + 17;}
2819  if(currDir.find("Panel_1/Module_1")!=string::npos){ biny = 1;}else if(currDir.find("Panel_2/Module_1")!=string::npos){ biny = 2;}
2820  }//endif(isUpgrade)
2821  }
2822 
2823  if(currDir.find("Layer_1")!=string::npos){
2824  HitEfficiency_L1 = bei->get("Pixel/Barrel/HitEfficiency_L1");
2825  if(HitEfficiency_L1) HitEfficiency_L1->setBinContent(binx, biny,(float)hitEfficiency);
2826  }else if(currDir.find("Layer_2")!=string::npos){
2827  HitEfficiency_L2 = bei->get("Pixel/Barrel/HitEfficiency_L2");
2828  if(HitEfficiency_L2) HitEfficiency_L2->setBinContent(binx, biny,(float)hitEfficiency);
2829  }else if(currDir.find("Layer_3")!=string::npos){
2830  HitEfficiency_L3 = bei->get("Pixel/Barrel/HitEfficiency_L3");
2831  if(HitEfficiency_L3) HitEfficiency_L3->setBinContent(binx, biny,(float)hitEfficiency);
2832  }else if( isUpgrade && (currDir.find("Layer_4")!=string::npos) ){
2833  HitEfficiency_L4 = bei->get("Pixel/Barrel/HitEfficiency_L4");
2834  if(HitEfficiency_L4) HitEfficiency_L4->setBinContent(binx, biny,(float)hitEfficiency);
2835  }else if(currDir.find("Disk_1")!=string::npos && currDir.find("HalfCylinder_m")!=string::npos){
2836  HitEfficiency_Dm1 = bei->get("Pixel/Endcap/HitEfficiency_Dm1");
2837  if(HitEfficiency_Dm1) HitEfficiency_Dm1->setBinContent(binx, biny,(float)hitEfficiency);
2838  }else if(currDir.find("Disk_2")!=string::npos && currDir.find("HalfCylinder_m")!=string::npos){
2839  HitEfficiency_Dm2 = bei->get("Pixel/Endcap/HitEfficiency_Dm2");
2840  if(HitEfficiency_Dm2) HitEfficiency_Dm2->setBinContent(binx, biny,(float)hitEfficiency);
2841  }else if(currDir.find("Disk_3")!=string::npos && currDir.find("HalfCylinder_m")!=string::npos){
2842  HitEfficiency_Dm3 = bei->get("Pixel/Endcap/HitEfficiency_Dm3");
2843  if(HitEfficiency_Dm3) HitEfficiency_Dm3->setBinContent(binx, biny,(float)hitEfficiency);
2844  }else if(currDir.find("Disk_1")!=string::npos && currDir.find("HalfCylinder_p")!=string::npos){
2845  HitEfficiency_Dp1 = bei->get("Pixel/Endcap/HitEfficiency_Dp1");
2846  if(HitEfficiency_Dp1) HitEfficiency_Dp1->setBinContent(binx, biny,(float)hitEfficiency);
2847  }else if(currDir.find("Disk_2")!=string::npos && currDir.find("HalfCylinder_p")!=string::npos){
2848  HitEfficiency_Dp2 = bei->get("Pixel/Endcap/HitEfficiency_Dp2");
2849  if(HitEfficiency_Dp2) HitEfficiency_Dp2->setBinContent(binx, biny,(float)hitEfficiency);
2850  }else if(currDir.find("Disk_3")!=string::npos && currDir.find("HalfCylinder_p")!=string::npos){
2851  HitEfficiency_Dp3 = bei->get("Pixel/Endcap/HitEfficiency_Dp3");
2852  if(HitEfficiency_Dp3) HitEfficiency_Dp3->setBinContent(binx, biny,(float)hitEfficiency);
2853  }
2854  }
2855  }
2856  }else{
2857  //cout<<"finding subdirs now"<<std::endl;
2858  vector<string> subdirs = bei->getSubdirs();
2859  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
2860  bei->cd(*it);
2861  //cout<<"now I am in "<<bei->pwd()<<std::endl;
2862  if(*it != "Pixel" && ((isbarrel && (*it).find("Barrel")==string::npos) || (!isbarrel && (*it).find("Endcap")==string::npos))) continue;
2863  //cout<<"calling myself again "<<std::endl;
2864  fillEfficiency(bei, isbarrel, isUpgrade);
2865  bei->goUp();
2866  }
2867  }
2868  } // end online/offline
2869 
2870  //cout<<"leaving SiPixelActionExecutor::fillEfficiency..."<<std::endl;
2871 
2872 }
dictionary missing
Definition: combine.py:4
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
tuple start
Check for commandline option errors.
Definition: dqm_diff.py:58
MonitorElement * HitEfficiency_Dp3
MonitorElement * HitEfficiency_L4
MonitorElement * HitEfficiency_L3
MonitorElement * HitEfficiency_Dm2
double getEntries(void) const
get # of entries
MonitorElement * HitEfficiency_L2
void fillEfficiency(DQMStore *bei, bool isbarrel, bool isUpgrade)
MonitorElement * HitEfficiency_Dm3
MonitorElement * HitEfficiency_L1
MonitorElement * HitEfficiency_Dp1
double getBinContent(int binx) const
get content of bin (1-D)
MonitorElement * HitEfficiency_Dp2
MonitorElement * HitEfficiency_Dm1
void SiPixelActionExecutor::fillFEDErrorSummary ( DQMStore bei,
std::string  dir_name,
std::vector< std::string > &  me_names 
)
private

Definition at line 744 of file SiPixelActionExecutor.cc.

References relmon_rootfiles_spy::contents, MonitorElement::Fill(), spr::find(), MonitorElement::getBinContent(), MonitorElement::getEntries(), getFEDSummaryME(), MonitorElement::getMean(), i, isum, findQualityFiles::jj, prof2calltree::prefix, MonitorElement::Reset(), MonitorElement::setBinContent(), MonitorElement::setBinLabel(), lumiContext::sname, source_type_, GlobalPosition_Frontier_DevDB_cff::tag, groupFilesInBlocks::temp, and indexGen::title.

Referenced by createSummary().

746  {
747  //printing cout<<"entering SiPixelActionExecutor::fillFEDErrorSummary..."<<endl;
748  string currDir = bei->pwd();
749  string prefix;
750  if(source_type_==0) prefix="SUMRAW";
751  else if(source_type_==20) prefix="SUMOFF";
752 
753  if (currDir.find(dir_name) != string::npos) {
754  vector<MonitorElement*> sum_mes;
755  for (vector<string>::const_iterator iv = me_names.begin();
756  iv != me_names.end(); iv++) {
757  bool isBooked = false;
758  vector<string> contents = bei->getMEs();
759  for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++)
760  if ((*im).find(*iv) != string::npos) isBooked = true;
761  if(source_type_==5||source_type_==6){
762  if((*iv)=="errorType"||(*iv)=="NErrors"||(*iv)=="fullType"||(*iv)=="chanNmbr"||
763  (*iv)=="TBMType"||(*iv)=="EvtNbr"||(*iv)=="evtSize"||(*iv)=="linkId"||
764  (*iv)=="ROCId"||(*iv)=="DCOLId"||(*iv)=="PXId"||(*iv)=="ROCNmbr"||
765  (*iv)=="TBMMessage"||(*iv)=="Type36Hitmap"||
766  (*iv)=="FedChLErr"||(*iv)=="FedChNErr"||(*iv)=="FedETypeNErr")
767  prefix="SUMRAW";
768  }
769  if((*iv)=="errorType"||(*iv)=="NErrors"||(*iv)=="fullType"||(*iv)=="chanNmbr"||
770  (*iv)=="TBMType"||(*iv)=="EvtNbr"||(*iv)=="evtSize"||(*iv)=="linkId"||
771  (*iv)=="ROCId"||(*iv)=="DCOLId"||(*iv)=="PXId"||(*iv)=="ROCNmbr"||
772  (*iv)=="TBMMessage"||(*iv)=="Type36Hitmap"){
773  string tag = prefix + "_" + (*iv) + "_FEDErrors";
774  MonitorElement* temp = getFEDSummaryME(bei, tag);
775  sum_mes.push_back(temp);
776  }else if((*iv)=="FedChLErr"||(*iv)=="FedChNErr"||(*iv)=="FedETypeNErr"){
777  string tag = prefix + "_" + (*iv);
779  if((*iv)=="FedChLErr") {if (!isBooked) temp = bei->book2D("FedChLErr","Type of last error",40,-0.5,39.5,37,0.,37.);
780  else{
781  string fullpathname = bei->pwd() + "/" + (*iv);
782  temp = bei->get(fullpathname);
783  temp->Reset();}} //If I don't reset this one, then I instead start adding error codes..
784  if((*iv)=="FedChNErr") {if (!isBooked) temp = bei->book2D("FedChNErr","Total number of errors",40,-0.5,39.5,37,0.,37.);
785  else{
786  string fullpathname = bei->pwd() + "/" + (*iv);
787  temp = bei->get(fullpathname);
788  temp->Reset();}} //If I don't reset this one, then I instead start adding error codes..
789  if((*iv)=="FedETypeNErr"){
790  if(!isBooked){
791  temp = bei->book2D("FedETypeNErr","Number of each error type",40,-0.5,39.5,21,0.,21.);
792  temp->setBinLabel(1,"ROC of 25",2);
793  temp->setBinLabel(2,"Gap word",2);
794  temp->setBinLabel(3,"Dummy word",2);
795  temp->setBinLabel(4,"FIFO full",2);
796  temp->setBinLabel(5,"Timeout",2);
797  temp->setBinLabel(6,"Stack full",2);
798  temp->setBinLabel(7,"Pre-cal issued",2);
799  temp->setBinLabel(8,"Trigger clear or sync",2);
800  temp->setBinLabel(9,"No token bit",2);
801  temp->setBinLabel(10,"Overflow",2);
802  temp->setBinLabel(11,"FSM error",2);
803  temp->setBinLabel(12,"Invalid #ROCs",2);
804  temp->setBinLabel(13,"Event number",2);
805  temp->setBinLabel(14,"Slink header",2);
806  temp->setBinLabel(15,"Slink trailer",2);
807  temp->setBinLabel(16,"Event size",2);
808  temp->setBinLabel(17,"Invalid channel#",2);
809  temp->setBinLabel(18,"ROC value",2);
810  temp->setBinLabel(19,"Dcol or pixel value",2);
811  temp->setBinLabel(20,"Readout order",2);
812  temp->setBinLabel(21,"CRC error",2);
813  }
814  else{
815  string fullpathname = bei->pwd() + "/" + (*iv);
816  temp = bei->get(fullpathname);
817  temp->Reset();} //If I don't reset this one, then I instead start adding error codes..
818  }
819  sum_mes.push_back(temp);
820  }
821  }
822  if (sum_mes.size() == 0) {
823  edm::LogInfo("SiPixelActionExecutor") << " Summary MEs can not be created" << "\n" ;
824  return;
825  }
826  vector<string> subdirs = bei->getSubdirs();
827  int ndet = 0;
828  for (vector<string>::const_iterator it = subdirs.begin();
829  it != subdirs.end(); it++) {
830  if ( (*it).find("FED_") == string::npos) continue;
831  bei->cd(*it);
832  string fedid = (*it).substr((*it).find("_")+1);
833  std::istringstream isst;
834  isst.str(fedid);
835  isst>>ndet; ndet++;
836  vector<string> contents = bei->getMEs();
837 
838  for (vector<MonitorElement*>::const_iterator isum = sum_mes.begin();
839  isum != sum_mes.end(); isum++) {
840  for (vector<string>::const_iterator im = contents.begin();
841  im != contents.end(); im++) {
842  if(((*im).find("FedChNErr")!=std::string::npos && (*isum)->getName().find("FedChNErr")!=std::string::npos) ||
843  ((*im).find("FedChLErr")!=std::string::npos && (*isum)->getName().find("FedChLErr")!=std::string::npos) ||
844  ((*im).find("FedETypeNErr")!=std::string::npos && (*isum)->getName().find("FedETypeNErr")!=std::string::npos)){
845  string fullpathname = bei->pwd() + "/" + (*im);
846  MonitorElement * me = bei->get(fullpathname);
847  if(me){
848  for(int i=0; i!=37; i++){
849  if((*im).find("FedETypeNErr")!=std::string::npos && i<21) (*isum)->Fill(ndet-1,i,me->getBinContent(i+1));
850  else (*isum)->Fill(ndet-1,i,me->getBinContent(i+1));
851  }
852  }
853  }
854  string sname = ((*isum)->getName());
855  string tname = " ";
856  tname = sname.substr(7,(sname.find("_",7)-6));
857  if (((*im)).find(tname) == 0) {
858  string fullpathname = bei->pwd() + "/" + (*im);
859  MonitorElement * me = bei->get(fullpathname);
860 
861  if (me){
862  if(me->getMean()>0.){
863  if (sname.find("_NErrors_")!=string::npos){
864  string path1 = fullpathname;
865  path1 = path1.replace(path1.find("NErrors"),7,"errorType");
866  MonitorElement * me1 = bei->get(path1);
867  bool notReset=true;
868  if(me1){
869  for(int jj=1; jj<16; jj++){
870  if(me1->getBinContent(jj)>0.){
871  if(jj==6){ //errorType=30 (reset)
872  string path2 = path1;
873  path2 = path2.replace(path2.find("errorType"),9,"TBMMessage");
874  MonitorElement * me2 = bei->get(path2);
875  if(me2) if(me2->getBinContent(6)>0. || me2->getBinContent(7)>0.) notReset=false;
876  }
877  }
878  }
879  }
880  if(notReset) (*isum)->setBinContent(ndet, (*isum)->getBinContent(ndet) + me1->getEntries());
881  }else (*isum)->setBinContent(ndet, (*isum)->getBinContent(ndet) + me->getEntries());
882  }
883  (*isum)->setAxisTitle("FED #",1);
884  string title = " ";
885  title = sname.substr(7,(sname.find("_",7)-7)) + " per FED";
886  (*isum)->setAxisTitle(title,2);
887  }
888  break;
889  }
890  }
891  }
892  bei->goUp();
893  }
894  } else {
895  vector<string> subdirs = bei->getSubdirs();
896  for (vector<string>::const_iterator it = subdirs.begin();
897  it != subdirs.end(); it++) {
898  if((*it).find("Endcap")!=string::npos ||
899  (*it).find("Barrel")!=string::npos) continue;
900  bei->cd(*it);
901  fillFEDErrorSummary(bei, dir_name, me_names);
902  bei->goUp();
903  }
904  }
905  //printing cout<<"...leaving SiPixelActionExecutor::fillFEDErrorSummary!"<<endl;
906 }
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
double isum
double getEntries(void) const
get # of entries
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
void Fill(long long x)
double getBinContent(int binx) const
get content of bin (1-D)
MonitorElement * getFEDSummaryME(DQMStore *bei, std::string me_name)
void Reset(void)
reset ME (ie. contents, errors, etc)
void fillFEDErrorSummary(DQMStore *bei, std::string dir_name, std::vector< std::string > &me_names)
void SiPixelActionExecutor::fillGrandBarrelSummaryHistos ( DQMStore bei,
std::vector< std::string > &  me_names,
bool  isUpgrade 
)
private

Definition at line 910 of file SiPixelActionExecutor.cc.

References relmon_rootfiles_spy::contents, compare_using_db::dir_name, MonitorElement::getBinContent(), getGrandSummaryME(), MonitorElement::getName(), MonitorElement::getTH1F(), gen::k, create_public_lumi_plots::path_name, prof2calltree::prefix, source_type_, and indexGen::title.

Referenced by fillSummary().

912  {
913 // cout<<"Entering SiPixelActionExecutor::fillGrandBarrelSummaryHistos...:"<<me_names.size()<<endl;
914  vector<MonitorElement*> gsum_mes;
915  string currDir = bei->pwd();
916  string path_name = bei->pwd();
917  string dir_name = path_name.substr(path_name.find_last_of("/")+1);
918 // cout<<"I am in "<<path_name<<" now."<<endl;
919  if ((dir_name.find("DQMData") == 0) ||
920  (dir_name.find("Pixel") == 0) ||
921  (dir_name.find("AdditionalPixelErrors") == 0) ||
922  (dir_name.find("Endcap") == 0) ||
923  (dir_name.find("HalfCylinder") == 0) ||
924  (dir_name.find("Disk") == 0) ||
925  (dir_name.find("Blade") == 0) ||
926  (dir_name.find("Panel") == 0) ) return;
927  vector<string> subdirs = bei->getSubdirs();
928  int nDirs = subdirs.size();
929  int iDir =0;
930  int nbin = 0;
931  int nbin_i = 0;
932  int nbin_subdir = 0;
933  int cnt=0;
934  bool first_subdir = true;
935  for (vector<string>::const_iterator it = subdirs.begin();
936  it != subdirs.end(); it++) {
937  cnt++;
938  bei->cd(*it);
939 // cout << "--- " << cnt << "\t" << bei->pwd() << endl;
940  vector<string> contents = bei->getMEs();
941 
942  bei->goUp();
943 
944  string prefix;
945  if(source_type_==0) prefix="SUMRAW";
946  else if (source_type_==1) prefix="SUMDIG";
947  else if (source_type_==2) prefix="SUMCLU";
948  else if (source_type_==3) prefix="SUMTRK";
949  else if (source_type_==4) prefix="SUMHIT";
950  else if (source_type_>=7 && source_type_<20) prefix="SUMCAL";
951  else if (source_type_==20) prefix="SUMOFF";
952 
953 
954  for (vector<string>::const_iterator im = contents.begin();
955  im != contents.end(); im++) {
956 // cout<<"A: iterating over "<<(*im)<<" now:"<<endl;
957  for (vector<string>::const_iterator iv = me_names.begin();
958  iv != me_names.end(); iv++) {
959  string var = "_" + (*iv) + "_";
960 // cout<<"\t B: iterating over "<<(*iv)<<" now, var is set to: "<<var<<endl;
961  if ((*im).find(var) != string::npos) {
962  if((var=="_charge_" || var=="_nclusters_" || var=="_size_" || var=="_sizeX_" || var=="_sizeY_") &&
963  (*im).find("Track_")!=string::npos) continue;
964 // cout << "Looking into " << (*iv) << endl;
965  string full_path = (*it) + "/" +(*im);
966  MonitorElement * me = bei->get(full_path.c_str());
967  if (!me) continue;
968  if(source_type_==5||source_type_==6){
969  if((*iv)=="errorType"||(*iv)=="NErrors"||(*iv)=="fullType"||(*iv)=="chanNmbr"||
970  (*iv)=="TBMType"||(*iv)=="EvtNbr"||(*iv)=="evtSize"||(*iv)=="linkId"||
971  (*iv)=="ROCId"||(*iv)=="DCOLId"||(*iv)=="PXId"||(*iv)=="ROCNmbr"||
972  (*iv)=="TBMMessage"||(*iv)=="Type36Hitmap")
973  prefix="SUMRAW";
974  else if((*iv)=="ndigis"||(*iv)=="adc" ||
975  (*iv)=="ndigisFREQ" || (*iv)=="adcCOMB")
976  prefix="SUMDIG";
977  else if((*iv)=="nclusters"||(*iv)=="x"||(*iv)=="y"||(*iv)=="charge"||(*iv)=="chargeCOMB"||
978  (*iv)=="size"||(*iv)=="sizeX"||(*iv)=="sizeY"||(*iv)=="minrow"||
979  (*iv)=="maxrow"||(*iv)=="mincol"||(*iv)=="maxcol")
980  prefix="SUMCLU";
981  if(currDir.find("Track")!=string::npos) prefix="SUMTRK";
982  else if((*iv)=="residualX_mean"||(*iv)=="residualY_mean"||
983  (*iv)=="residualX_RMS"||(*iv)=="residualY_RMS")
984  prefix="SUMTRK";
985  else if((*iv)=="ClustX"||(*iv)=="ClustY"||(*iv)=="nRecHits"||(*iv)=="ErrorX"||(*iv)=="ErrorY")
986  prefix="SUMHIT";
987  else if((*iv)=="Gain1d_mean"||(*iv)=="GainChi2NDF1d_mean"||
988  (*iv)=="GainChi2Prob1d_mean"||(*iv)=="Pedestal1d_mean"||
989  (*iv)=="ScurveChi2ProbSummary_mean"||(*iv)=="ScurveFitResultSummary_mean"||
990  (*iv)=="ScurveSigmasSummary_mean"||(*iv)=="ScurveThresholdSummary_mean"||
991  (*iv)=="Gain1d_RMS"||(*iv)=="GainChi2NDF1d_RMS"||
992  (*iv)=="GainChi2Prob1d_RMS"||(*iv)=="Pedestal1d_RMS"||
993  (*iv)=="GainNPoints1d_mean" || (*iv)=="GainNPoints1d_RMS" ||
994  (*iv)=="GainHighPoint1d_mean" || (*iv)=="GainHighPoint1d_RMS" ||
995  (*iv)=="GainLowPoint1d_mean" || (*iv)=="GainLowPoint1d_RMS" ||
996  (*iv)=="GainEndPoint1d_mean" || (*iv)=="GainEndPoint1d_RMS" ||
997  (*iv)=="GainFitResult2d_mean" || (*iv)=="GainFitResult2d_RMS" ||
998  (*iv)=="GainDynamicRange2d_mean" || (*iv)=="GainDynamicRange2d_RMS" ||
999  (*iv)=="GainSaturate2d_mean" || (*iv)=="GainSaturate2d_RMS" ||
1000  (*iv)=="ScurveChi2ProbSummary_RMS"||(*iv)=="ScurveFitResultSummary_RMS"||
1001  (*iv)=="ScurveSigmasSummary_RMS"||(*iv)=="ScurveThresholdSummary_RMS"||
1002  (*iv)=="pixelAliveSummary_mean"||(*iv)=="pixelAliveSummary_FracOfPerfectPix" ||
1003  (*iv)=="SiPixelErrorsCalibDigis_NCalibErrors" )
1004  prefix="SUMCAL";
1005  } // end source_type if
1006 
1007  // bugfix: gsum_mes is filled using the contents of me_names. Proceeding with each entry in me_names.
1008  /*
1009  int actual_size = gsum_mes.size();
1010  int wanted_size = me_names.size();
1011  // printing cout << actual_size << "\t" << wanted_size << endl;
1012  if (actual_size != wanted_size) { */
1013  if (first_subdir && !isUpgrade){
1014 // bool create_me = true;
1015  nbin = me->getTH1F()->GetNbinsX();
1016  string me_name = prefix + "_" + (*iv) + "_" + dir_name;
1017  if((*iv)=="adcCOMB"||(*iv)=="chargeCOMB") me_name = "ALLMODS_" + (*iv) + "_" + dir_name;
1018  else if(prefix=="SUMOFF" && dir_name=="Barrel") nbin=192;
1019  else if((*iv)=="adcCOMB") nbin=256;
1020  else if(dir_name=="Barrel") nbin=768;
1021  else if(prefix=="SUMOFF" && dir_name.find("Shell")!=string::npos) nbin=48;
1022  else if(dir_name.find("Shell")!=string::npos) nbin=192;
1023  else nbin=nbin*nDirs;
1024 
1025  getGrandSummaryME(bei, nbin, me_name, gsum_mes);
1026  } else if (first_subdir && isUpgrade){
1027 // bool create_me = true;
1028  nbin = me->getTH1F()->GetNbinsX();
1029  string me_name = prefix + "_" + (*iv) + "_" + dir_name;
1030  if((*iv)=="adcCOMB"||(*iv)=="chargeCOMB") me_name = "ALLMODS_" + (*iv) + "_" + dir_name;
1031  else if(prefix=="SUMOFF" && dir_name=="Barrel") nbin=296;
1032  else if((*iv)=="adcCOMB") nbin=256;
1033  else if(dir_name=="Barrel") nbin=1184;
1034  else if(prefix=="SUMOFF" && dir_name.find("Shell")!=string::npos) nbin=74;
1035  else if(dir_name.find("Shell")!=string::npos) nbin=296;
1036  else nbin=nbin*nDirs;
1037 
1038  getGrandSummaryME(bei, nbin, me_name, gsum_mes);
1039  }
1040  /*
1041  for (vector<MonitorElement*>::const_iterator igm = gsum_mes.begin();
1042  igm !=gsum_mes.end(); igm++) {
1043  // To be further optimized
1044  if( (*iv).find("Clust") != string::npos && (*igm)->getName().find(me_name) != string::npos ) create_me = false; //cout << "Already have it" << endl;
1045  }
1046 
1047  // printing cout<<"me_name to be created= "<<me_name<<endl;
1048  if(create_me) getGrandSummaryME(bei, nbin, me_name, gsum_mes);
1049  }
1050  */
1051  // end bugfix: gsum_mes.
1052 
1053 
1054  for (vector<MonitorElement*>::const_iterator igm = gsum_mes.begin();
1055  igm != gsum_mes.end(); igm++) {
1056 // cout<<"\t \t C: iterating over "<<(*igm)->getName()<<" now:"<<endl;
1057  if ((*igm)->getName().find(var) != string::npos) {
1058 // cout<<"\t \t D: Have the correct var now!"<<endl;
1059  if(prefix=="SUMOFF") (*igm)->setAxisTitle("Ladders",1);
1060  else if((*igm)->getName().find("adcCOMB_")!=string::npos) (*igm)->setAxisTitle("Digi charge [ADC]",1);
1061  else if((*igm)->getName().find("chargeCOMB_")!=string::npos) (*igm)->setAxisTitle("Cluster charge [kilo electrons]",1);
1062  else (*igm)->setAxisTitle("Modules",1);
1063 
1064  // Setting title
1065 
1066  string title="";
1067  if((*igm)->getName().find("NErrors_") != string::npos && prefix=="SUMOFF") title = "Total number of errors per Ladder";
1068  else if((*igm)->getName().find("NErrors_") != string::npos && prefix=="SUMRAW") title = "Total number of errors per Module";
1069  else if(prefix=="SUMOFF") title = "mean " + (*iv) + " per Ladder";
1070  else if((*igm)->getName().find("FREQ_") != string::npos && prefix!="SUMOFF") title = "NEvents with digis per Module";
1071  else if((*igm)->getName().find("FREQ_") != string::npos && prefix=="SUMOFF") title = "NEvents with digis per Ladder/Blade";
1072  else if((*igm)->getName().find("adcCOMB_") != string::npos) title = "NDigis";
1073  else if((*igm)->getName().find("chargeCOMB_") != string::npos) title = "NClusters";
1074  else title = "mean " + (*iv) + " per Module";
1075  (*igm)->setAxisTitle(title,2);
1076 
1077  // Setting binning
1078  if (!isUpgrade) {
1079  if((*igm)->getName().find("ALLMODS_adcCOMB_")!=string::npos){
1080  nbin_subdir=128;
1081  }else if((*igm)->getName().find("ALLMODS_chargeCOMB_")!=string::npos){
1082  nbin_subdir=100;
1083  }else if((*igm)->getName().find("Ladder") != string::npos){
1084  nbin_i=0; nbin_subdir=4;
1085  }else if((*igm)->getName().find("Layer") != string::npos){
1086  nbin_i=(cnt-1)*4; nbin_subdir=4;
1087  }else if((*igm)->getName().find("Shell") != string::npos){
1088  if(prefix!="SUMOFF"){
1089  if(iDir==0){ nbin_i=0; nbin_subdir=40; }
1090  else if(iDir==1){ nbin_i=40; nbin_subdir=64; }
1091  else if(iDir==2){ nbin_i=104; nbin_subdir=88; }
1092  }else{
1093  if(iDir==0){ nbin_i=0; nbin_subdir=10; }
1094  else if(iDir==1){ nbin_i=10; nbin_subdir=16; }
1095  else if(iDir==2){ nbin_i=26; nbin_subdir=22; }
1096  }
1097  }else if((*igm)->getName().find("Barrel") != string::npos){
1098  if(prefix!="SUMOFF"){
1099  if(iDir==0){ nbin_i=0; nbin_subdir=192; }
1100  else if(iDir==1){ nbin_i=192; nbin_subdir=192; }
1101  else if(iDir==2){ nbin_i=384; nbin_subdir=192; }
1102  else if(iDir==3){ nbin_i=576; nbin_subdir=192; }
1103  }else{
1104  if(iDir==0){ nbin_i=0; nbin_subdir=48; }
1105  else if(iDir==1){ nbin_i=48; nbin_subdir=48; }
1106  else if(iDir==2){ nbin_i=96; nbin_subdir=48; }
1107  else if(iDir==3){ nbin_i=144; nbin_subdir=48; }
1108  }
1109  }
1110  } else if (isUpgrade) {
1111  if((*igm)->getName().find("ALLMODS_adcCOMB_")!=string::npos){
1112  nbin_subdir=128;
1113  }else if((*igm)->getName().find("ALLMODS_chargeCOMB_")!=string::npos){
1114  nbin_subdir=100;
1115  }else if((*igm)->getName().find("Ladder") != string::npos){
1116  nbin_i=0; nbin_subdir=4;
1117  }else if((*igm)->getName().find("Layer") != string::npos){
1118  nbin_i=(cnt-1)*4; nbin_subdir=4;
1119  }else if((*igm)->getName().find("Shell") != string::npos){
1120  if(prefix!="SUMOFF"){
1121  if(iDir==0){ nbin_i=0; nbin_subdir=24; }//40(2*20)-->24(2*12)
1122  else if(iDir==1){ nbin_i=24; nbin_subdir=56; }//64(32*2)-->56(2*28)
1123  else if(iDir==2){ nbin_i=80; nbin_subdir=88; }//88(44*2)-->same88(44*2)
1124  else if(iDir==3){ nbin_i=168; nbin_subdir=128; }
1125  }else{
1126  if(iDir==0){ nbin_i=0; nbin_subdir=6; }//10-->6
1127  else if(iDir==1){ nbin_i=6; nbin_subdir=14; }//16-->14
1128  else if(iDir==2){ nbin_i=20; nbin_subdir=22; }//22-->same22
1129  else if(iDir==3){ nbin_i=42; nbin_subdir=32; }
1130  }
1131  }else if((*igm)->getName().find("Barrel") != string::npos){
1132  if(prefix!="SUMOFF"){
1133  if(iDir==0){ nbin_i=0; nbin_subdir=296; }//192=76 8/4-->296=1184/4
1134  else if(iDir==1){ nbin_i=296; nbin_subdir=296; }//296*2,*3,*4=1184
1135  else if(iDir==2){ nbin_i=592; nbin_subdir=296; }
1136  else if(iDir==3){ nbin_i=888; nbin_subdir=296; }
1137  else if(iDir==4){ nbin_i=1184; nbin_subdir=296; }
1138  }else{
1139  if(iDir==0){ nbin_i=0; nbin_subdir=74; }//48=192/4-->74=296/4
1140  else if(iDir==1){ nbin_i=74; nbin_subdir=74; }//74*2,...*4=296
1141  else if(iDir==2){ nbin_i=148; nbin_subdir=74; }
1142  else if(iDir==3){ nbin_i=222; nbin_subdir=74; }
1143  else if(iDir==4){ nbin_i=296; nbin_subdir=74; }
1144  }
1145  }
1146  }
1147 
1148  if((*igm)->getName().find("ndigisFREQ")==string::npos)
1149  {
1150  if(((*igm)->getName().find("adcCOMB")!=string::npos && me->getName().find("adcCOMB")!=string::npos)
1151  || ((*igm)->getName().find("chargeCOMB")!=string::npos && me->getName().find("chargeCOMB")!=string::npos))
1152  {
1153  (*igm)->getTH1F()->Add(me->getTH1F());
1154  }else if(((*igm)->getName().find("charge_")!=string::npos && (*igm)->getName().find("Track_")==string::npos &&
1155  me->getName().find("charge_")!=string::npos && me->getName().find("Track_")==string::npos) ||
1156  ((*igm)->getName().find("nclusters_")!=string::npos && (*igm)->getName().find("Track_")==string::npos &&
1157  me->getName().find("nclusters_")!=string::npos && me->getName().find("Track_")==string::npos) ||
1158  ((*igm)->getName().find("size_")!=string::npos && (*igm)->getName().find("Track_")==string::npos &&
1159  me->getName().find("size_")!=string::npos && me->getName().find("Track_")==string::npos) ||
1160  ((*igm)->getName().find("charge_OffTrack_")!=string::npos && me->getName().find("charge_OffTrack_")!=string::npos) ||
1161  ((*igm)->getName().find("nclusters_OffTrack_")!=string::npos && me->getName().find("nclusters_OffTrack_")!=string::npos) ||
1162  ((*igm)->getName().find("size_OffTrack_")!=string::npos && me->getName().find("size_OffTrack_")!=string::npos) ||
1163  ((*igm)->getName().find("charge_OnTrack_")!=string::npos && me->getName().find("charge_OnTrack_")!=string::npos) ||
1164  ((*igm)->getName().find("nclusters_OnTrack_")!=string::npos && me->getName().find("nclusters_OnTrack_")!=string::npos) ||
1165  ((*igm)->getName().find("size_OnTrack_")!=string::npos && me->getName().find("size_OnTrack_")!=string::npos) ||
1166  ((*igm)->getName().find("charge_")==string::npos && (*igm)->getName().find("nclusters_")==string::npos &&
1167  (*igm)->getName().find("size_")==string::npos)){
1168  for (int k = 1; k < nbin_subdir+1; k++) if(me->getBinContent(k) > 0) (*igm)->setBinContent(k+nbin_i, me->getBinContent(k));
1169  }
1170  }
1171  else if(me->getName().find("ndigisFREQ")!=string::npos)
1172  {
1173  for (int k = 1; k < nbin_subdir+1; k++) if(me->getBinContent(k) > 0) (*igm)->setBinContent(k+nbin_i, me->getBinContent(k));
1174  }
1175  } // end var in igm (gsum_mes)
1176  } // end igm loop
1177  } // end var in im (contents)
1178  } // end of iv loop
1179  } // end of im loop
1180  iDir++;
1181  first_subdir = false; // We are done processing the first directory, we don't add any new MEs in the future passes.
1182  } // end of it loop (subdirs)
1183 // cout<<"...leaving SiPixelActionExecutor::fillGrandBarrelSummaryHistos!"<<endl;
1184 }
const std::string & getName(void) const
get name of ME
int k[5][pyjets_maxn]
TH1F * getTH1F(void) const
double getBinContent(int binx) const
get content of bin (1-D)
void getGrandSummaryME(DQMStore *bei, int nbin, std::string &me_name, std::vector< MonitorElement * > &mes)
void SiPixelActionExecutor::fillGrandEndcapSummaryHistos ( DQMStore bei,
std::vector< std::string > &  me_names,
bool  isUpgrade 
)
private

Definition at line 1187 of file SiPixelActionExecutor.cc.

References relmon_rootfiles_spy::contents, compare_using_db::dir_name, MonitorElement::getBinContent(), getGrandSummaryME(), MonitorElement::getName(), MonitorElement::getTH1F(), gen::k, create_public_lumi_plots::path_name, prof2calltree::prefix, source_type_, and indexGen::title.

Referenced by fillSummary().

1189  {
1190  //printing cout<<"Entering SiPixelActionExecutor::fillGrandEndcapSummaryHistos..."<<endl;
1191  vector<MonitorElement*> gsum_mes;
1192  string currDir = bei->pwd();
1193  string path_name = bei->pwd();
1194  string dir_name = path_name.substr(path_name.find_last_of("/")+1);
1195  if ((dir_name.find("DQMData") == 0) ||
1196  (dir_name.find("Pixel") == 0) ||
1197  (dir_name.find("AdditionalPixelErrors") == 0) ||
1198  (dir_name.find("Barrel") == 0) ||
1199  (dir_name.find("Shell") == 0) ||
1200  (dir_name.find("Layer") == 0) ||
1201  (dir_name.find("Ladder") == 0) ) return;
1202  vector<string> subdirs = bei->getSubdirs();
1203  int iDir =0;
1204  int nbin = 0;
1205  int nbin_i = 0;
1206  int nbin_subdir = 0;
1207  int cnt=0;
1208  bool first_subdir = true;
1209  for (vector<string>::const_iterator it = subdirs.begin();
1210  it != subdirs.end(); it++) {
1211  cnt++;
1212  bei->cd(*it);
1213  vector<string> contents = bei->getMEs();
1214  bei->goUp();
1215 
1216  string prefix;
1217  if(source_type_==0) prefix="SUMRAW";
1218  else if (source_type_==1) prefix="SUMDIG";
1219  else if (source_type_==2) prefix="SUMCLU";
1220  else if (source_type_==3) prefix="SUMTRK";
1221  else if (source_type_==4) prefix="SUMHIT";
1222  else if (source_type_>=7 && source_type_<20) prefix="SUMCAL";
1223  else if (source_type_==20) prefix="SUMOFF";
1224 
1225  for (vector<string>::const_iterator im = contents.begin();
1226  im != contents.end(); im++) {
1227  for (vector<string>::const_iterator iv = me_names.begin();
1228  iv != me_names.end(); iv++) {
1229  string var = "_" + (*iv) + "_";
1230  if ((*im).find(var) != string::npos) {
1231  if((var=="_charge_" || var=="_nclusters_" || var=="_size_" || var=="_sizeX_" || var=="_sizeY_") &&
1232  (*im).find("Track_")!=string::npos) continue;
1233  string full_path = (*it) + "/" +(*im);
1234  MonitorElement * me = bei->get(full_path.c_str());
1235  if (!me) continue;
1236  if(source_type_==5||source_type_==6){
1237  if((*iv)=="errorType"||(*iv)=="NErrors"||(*iv)=="fullType"||(*iv)=="chanNmbr"||
1238  (*iv)=="TBMType"||(*iv)=="EvtNbr"||(*iv)=="evtSize"||(*iv)=="linkId"||
1239  (*iv)=="ROCId"||(*iv)=="DCOLId"||(*iv)=="PXId"||(*iv)=="ROCNmbr"||
1240  (*iv)=="TBMMessage"||(*iv)=="Type36Hitmap")
1241  prefix="SUMRAW";
1242  else if((*iv)=="ndigis"||(*iv)=="adc" ||
1243  (*iv)=="ndigisFREQ"||(*iv)=="adcCOMB")
1244  prefix="SUMDIG";
1245  else if((*iv)=="nclusters"||(*iv)=="x"||(*iv)=="y"||(*iv)=="charge"||(*iv)=="chargeCOMB"||
1246  (*iv)=="size"||(*iv)=="sizeX"||(*iv)=="sizeY"||(*iv)=="minrow"||
1247  (*iv)=="maxrow"||(*iv)=="mincol"||(*iv)=="maxcol")
1248  prefix="SUMCLU";
1249  if(currDir.find("Track")!=string::npos) prefix="SUMTRK";
1250  else if((*iv)=="residualX_mean"||(*iv)=="residualY_mean"||
1251  (*iv)=="residualX_RMS"||(*iv)=="residualY_RMS")
1252  prefix="SUMTRK";
1253  else if((*iv)=="ClustX"||(*iv)=="ClustY"||(*iv)=="nRecHits"||(*iv)=="ErrorX"||(*iv)=="ErrorY")
1254  prefix="SUMHIT";
1255  else if((*iv)=="Gain1d_mean"||(*iv)=="GainChi2NDF1d_mean"||
1256  (*iv)=="GainChi2Prob1d_mean"||(*iv)=="Pedestal1d_mean"||
1257  (*iv)=="ScurveChi2ProbSummary_mean"||(*iv)=="ScurveFitResultSummary_mean"||
1258  (*iv)=="ScurveSigmasSummary_mean"||(*iv)=="ScurveThresholdSummary_mean"||
1259  (*iv)=="Gain1d_RMS"||(*iv)=="GainChi2NDF1d_RMS"||
1260  (*iv)=="GainChi2Prob1d_RMS"||(*iv)=="Pedestal1d_RMS"||
1261  (*iv)=="GainNPoints1d_mean" || (*iv)=="GainNPoints1d_RMS" ||
1262  (*iv)=="GainHighPoint1d_mean" || (*iv)=="GainHighPoint1d_RMS" ||
1263  (*iv)=="GainLowPoint1d_mean" || (*iv)=="GainLowPoint1d_RMS" ||
1264  (*iv)=="GainEndPoint1d_mean" || (*iv)=="GainEndPoint1d_RMS" ||
1265  (*iv)=="GainFitResult2d_mean" || (*iv)=="GainFitResult2d_RMS" ||
1266  (*iv)=="GainDynamicRange2d_mean" || (*iv)=="GainDynamicRange2d_RMS" ||
1267  (*iv)=="GainSaturate2d_mean" || (*iv)=="GainSaturate2d_RMS" ||
1268  (*iv)=="ScurveChi2ProbSummary_RMS"||(*iv)=="ScurveFitResultSummary_RMS"||
1269  (*iv)=="ScurveSigmasSummary_RMS"||(*iv)=="ScurveThresholdSummary_RMS"||
1270  (*iv)=="pixelAliveSummary_mean"||(*iv)=="pixelAliveSummary_FracOfPerfectPix"||
1271  (*iv) == "SiPixelErrorsCalibDigis_NCalibErrors")
1272  prefix="SUMCAL";
1273  }
1274 
1275  // bugfix: gsum_mes is filled using the contents of me_names. Proceeding with each entry in me_names.
1276  /*
1277  int actual_size = gsum_mes.size();
1278  int wanted_size = me_names.size();
1279  if (actual_size != wanted_size) { */
1280  if (first_subdir && !isUpgrade){
1281 // bool create_me = true;
1282  nbin = me->getTH1F()->GetNbinsX();
1283  string me_name = prefix + "_" + (*iv) + "_" + dir_name;
1284  if((*iv)=="adcCOMB"||(*iv)=="chargeCOMB") me_name = "ALLMODS_" + (*iv) + "_" + dir_name;
1285  else if(prefix=="SUMOFF" && dir_name=="Endcap") nbin=96;
1286  else if(dir_name=="Endcap") nbin=672;
1287  else if(prefix=="SUMOFF" && dir_name.find("HalfCylinder")!=string::npos) nbin=24;
1288  else if(dir_name.find("HalfCylinder")!=string::npos) nbin=168;
1289  else if(prefix=="SUMOFF" && dir_name.find("Disk")!=string::npos) nbin=12;
1290  else if(dir_name.find("Disk")!=string::npos) nbin=84;
1291  else if(dir_name.find("Blade")!=string::npos) nbin=7;
1292  //else if(dir_name.find("Panel_1")!=string::npos) nbin=4;
1293  //else if(dir_name.find("Panel_2")!=string::npos) nbin=3;
1294  //cout << dir_name.c_str() << "\t" << nbin << endl;
1295  getGrandSummaryME(bei, nbin, me_name, gsum_mes);
1296  } else if(first_subdir && isUpgrade){
1297  nbin = me->getTH1F()->GetNbinsX();
1298  string me_name = prefix + "_" + (*iv) + "_" + dir_name;
1299  if((*iv)=="adcCOMB"||(*iv)=="chargeCOMB") me_name = "ALLMODS_" + (*iv) + "_" + dir_name;
1300  else if(prefix=="SUMOFF" && dir_name=="Endcap") nbin=336;
1301  else if(dir_name=="Endcap") nbin=672;
1302  else if(prefix=="SUMOFF" && dir_name.find("HalfCylinder")!=string::npos) nbin=84;
1303  else if(dir_name.find("HalfCylinder")!=string::npos) nbin=168;
1304  else if(prefix=="SUMOFF" && dir_name.find("Disk")!=string::npos) nbin=28;
1305  else if(dir_name.find("Disk")!=string::npos) nbin=56;
1306  else if(dir_name.find("Blade")!=string::npos) nbin=2;
1307  getGrandSummaryME(bei, nbin, me_name, gsum_mes);
1308  }
1309  /*
1310 
1311  for (vector<MonitorElement*>::const_iterator igm = gsum_mes.begin();
1312  igm !=gsum_mes.end(); igm++) {
1313  // To be further optimized
1314  if( (*iv).find("Clust") != string::npos && (*igm)->getName().find(me_name) != string::npos ) create_me = false; //cout << "Already have it" << endl;
1315  }
1316 
1317  // printing cout<<"me_name to be created= "<<me_name<<endl;
1318  if(create_me) getGrandSummaryME(bei, nbin, me_name, gsum_mes);
1319  }
1320  */
1321  // end bugfix: gsum_mes.
1322 
1323  for (vector<MonitorElement*>::const_iterator igm = gsum_mes.begin();
1324  igm != gsum_mes.end(); igm++) {
1325  if ((*igm)->getName().find(var) != string::npos) {
1326  if(prefix=="SUMOFF") (*igm)->setAxisTitle("Blades",1);
1327  else if((*igm)->getName().find("adcCOMB_")!=string::npos) (*igm)->setAxisTitle("Digi charge [ADC]",1);
1328  else if((*igm)->getName().find("chargeCOMB_")!=string::npos) (*igm)->setAxisTitle("Cluster charge [kilo electrons]",1);
1329  else (*igm)->setAxisTitle("Modules",1);
1330  string title="";
1331  if((*igm)->getName().find("NErrors_") != string::npos && prefix=="SUMOFF") title = "Total number of errors per Blade";
1332  else if((*igm)->getName().find("NErrors_") != string::npos && prefix=="SUMRAW") title = "Total number of errors per Module";
1333  else if(prefix=="SUMOFF") title = "mean " + (*iv) + " per Blade";
1334  else if((*igm)->getName().find("FREQ_") != string::npos) title = "NEvents with digis per Module";
1335  else if((*igm)->getName().find("adcCOMB_")!=string::npos) title = "NDigis";
1336  else if((*igm)->getName().find("chargeCOMB_")!=string::npos) title = "NClusters";
1337  else title = "mean " + (*iv) + " per Module";
1338  (*igm)->setAxisTitle(title,2);
1339  nbin_i=0;
1340  if (!isUpgrade) {
1341  if((*igm)->getName().find("ALLMODS_adcCOMB_")!=string::npos){
1342  nbin_subdir=128;
1343  }else if((*igm)->getName().find("ALLMODS_chargeCOMB_")!=string::npos){
1344  nbin_subdir=100;
1345  }else if((*igm)->getName().find("Panel_") != string::npos){
1346  nbin_subdir=7;
1347 // }else if((*igm)->getName().find("Panel_1") != string::npos){
1348 // nbin_subdir=4;
1349 // }else if((*igm)->getName().find("Panel_2") != string::npos){
1350 // nbin_subdir=3;
1351  }else if((*igm)->getName().find("Blade") != string::npos){
1352  if((*im).find("_1") != string::npos) nbin_subdir=4;
1353  if((*im).find("_2") != string::npos) {nbin_i=4; nbin_subdir=3;}
1354  }else if((*igm)->getName().find("Disk") != string::npos){
1355  nbin_i=((cnt-1)%12)*7; nbin_subdir=7;
1356  }else if((*igm)->getName().find("HalfCylinder") != string::npos){
1357  if(prefix!="SUMOFF"){
1358  nbin_subdir=84;
1359  if((*im).find("_2") != string::npos) nbin_i=84;
1360  }else{
1361  nbin_subdir=12;
1362  if((*im).find("_2") != string::npos) nbin_i=12;
1363  }
1364  }else if((*igm)->getName().find("Endcap") != string::npos){
1365  if(prefix!="SUMOFF"){
1366  nbin_subdir=168;
1367  if((*im).find("_mO") != string::npos) nbin_i=168;
1368  if((*im).find("_pI") != string::npos) nbin_i=336;
1369  if((*im).find("_pO") != string::npos) nbin_i=504;
1370  }else{
1371  nbin_subdir=24;
1372  if((*im).find("_mO") != string::npos) nbin_i=24;
1373  if((*im).find("_pI") != string::npos) nbin_i=48;
1374  if((*im).find("_pO") != string::npos) nbin_i=72;
1375  }
1376  }
1377  } else if (isUpgrade) {
1378  if((*igm)->getName().find("ALLMODS_adcCOMB_")!=string::npos){
1379  nbin_subdir=128;
1380  }else if((*igm)->getName().find("ALLMODS_chargeCOMB_")!=string::npos){
1381  nbin_subdir=100;
1382  }else if((*igm)->getName().find("Panel_") != string::npos){
1383  nbin_subdir=2;
1384  // }else if((*igm)->getName().find("Panel_1") != string::npos){
1385  // nbin_subdir=4;
1386  // }else if((*igm)->getName().find("Panel_2") != string::npos){
1387  // nbin_subdir=3;
1388  }else if((*igm)->getName().find("Blade") != string::npos){
1389  if((*im).find("_1") != string::npos) nbin_subdir=1;
1390  if((*im).find("_2") != string::npos) {nbin_i=1; nbin_subdir=1;}
1391  }else if((*igm)->getName().find("Disk") != string::npos){
1392  nbin_i=((cnt-1)%28)*2; nbin_subdir=2;
1393  }else if((*igm)->getName().find("HalfCylinder") != string::npos){
1394  if(prefix!="SUMOFF"){
1395  nbin_subdir=56;
1396  if((*im).find("_2") != string::npos) nbin_i=56;
1397  if((*im).find("_3") != string::npos) nbin_i=112;
1398  }else{
1399  nbin_subdir=28;
1400  if((*im).find("_2") != string::npos) nbin_i=28;
1401  if((*im).find("_3") != string::npos) nbin_i=56;
1402  }
1403  }else if((*igm)->getName().find("Endcap") != string::npos){
1404  if(prefix!="SUMOFF"){
1405  nbin_subdir=168;
1406  if((*im).find("_mO") != string::npos) nbin_i=168;
1407  if((*im).find("_pI") != string::npos) nbin_i=336;
1408  if((*im).find("_pO") != string::npos) nbin_i=504;
1409  }else{
1410  nbin_subdir=84;
1411  if((*im).find("_mO") != string::npos) nbin_i=84;
1412  if((*im).find("_pI") != string::npos) nbin_i=168;
1413  if((*im).find("_pO") != string::npos) nbin_i=252;
1414  }
1415  }
1416  }
1417 
1418  // for (int k = 1; k < nbin_subdir+1; k++) {
1419  if((*igm)->getName().find("ndigisFREQ")==string::npos){
1420  if(((*igm)->getName().find("adcCOMB")!=string::npos && me->getName().find("adcCOMB")!=string::npos) || ((*igm)->getName().find("chargeCOMB")!=string::npos && me->getName().find("chargeCOMB")!=string::npos)){
1421  (*igm)->getTH1F()->Add(me->getTH1F());
1422  }else if(((*igm)->getName().find("charge_")!=string::npos && (*igm)->getName().find("Track_")==string::npos &&
1423  me->getName().find("charge_")!=string::npos && me->getName().find("Track_")==string::npos) ||
1424  ((*igm)->getName().find("nclusters_")!=string::npos && (*igm)->getName().find("Track_")==string::npos &&
1425  me->getName().find("nclusters_")!=string::npos && me->getName().find("Track_")==string::npos) ||
1426  ((*igm)->getName().find("size_")!=string::npos && (*igm)->getName().find("Track_")==string::npos &&
1427  me->getName().find("size_")!=string::npos && me->getName().find("Track_")==string::npos) ||
1428  ((*igm)->getName().find("charge_OffTrack_")!=string::npos && me->getName().find("charge_OffTrack_")!=string::npos) ||
1429  ((*igm)->getName().find("nclusters_OffTrack_")!=string::npos && me->getName().find("nclusters_OffTrack_")!=string::npos) ||
1430  ((*igm)->getName().find("size_OffTrack_")!=string::npos && me->getName().find("size_OffTrack_")!=string::npos) ||
1431  ((*igm)->getName().find("charge_OnTrack_")!=string::npos && me->getName().find("charge_OnTrack_")!=string::npos) ||
1432  ((*igm)->getName().find("nclusters_OnTrack_")!=string::npos && me->getName().find("nclusters_OnTrack_")!=string::npos) ||
1433  ((*igm)->getName().find("size_OnTrack_")!=string::npos && me->getName().find("size_OnTrack_")!=string::npos) ||
1434  ((*igm)->getName().find("charge_")==string::npos && (*igm)->getName().find("nclusters_")==string::npos &&
1435  (*igm)->getName().find("size_")==string::npos)){
1436  for (int k = 1; k < nbin_subdir+1; k++) if(me->getBinContent(k) > 0) (*igm)->setBinContent(k+nbin_i, me->getBinContent(k));
1437  }
1438  }else if(me->getName().find("ndigisFREQ")!=string::npos){
1439  for (int k = 1; k < nbin_subdir+1; k++) if(me->getBinContent(k) > 0) (*igm)->setBinContent(k+nbin_i, me->getBinContent(k));
1440  }
1441  // }// for
1442 
1443  }
1444  }
1445  }
1446  }
1447  }
1448 
1449  iDir++;
1450  first_subdir = false; // We are done processing the first directory, we don't add any new MEs in the future passes.
1451  } // end for it (subdirs)
1452 }
const std::string & getName(void) const
get name of ME
int k[5][pyjets_maxn]
TH1F * getTH1F(void) const
double getBinContent(int binx) const
get content of bin (1-D)
void getGrandSummaryME(DQMStore *bei, int nbin, std::string &me_name, std::vector< MonitorElement * > &mes)
void SiPixelActionExecutor::fillLayout ( DQMStore bei)

Definition at line 2119 of file SiPixelActionExecutor.cc.

References configWriter_, relmon_rootfiles_spy::contents, SiPixelConfigWriter::createColumn(), and SiPixelConfigWriter::createRow().

Referenced by createLayout().

2119  {
2120 
2121  static int icount = 0;
2122  string currDir = bei->pwd();
2123  if (currDir.find("Ladder_") != string::npos) {
2124 
2125  vector<string> contents = bei->getMEs();
2126 
2127  for (vector<string>::const_iterator im = contents.begin();
2128  im != contents.end(); im++) {
2129  if ((*im).find("Clusters") != string::npos) {
2130  icount++;
2131  if (icount != 0 && icount%6 == 0) {
2133  }
2134  ostringstream full_path;
2135  full_path << "test/" << currDir << "/" << *im ;
2136  string element = "monitorable";
2137  string element_name = full_path.str();
2138  configWriter_->createColumn(element, element_name);
2139  }
2140  }
2141  } else {
2142  vector<string> subdirs = bei->getSubdirs();
2143  for (vector<string>::const_iterator it = subdirs.begin();
2144  it != subdirs.end(); it++) {
2145  bei->cd(*it);
2146  fillLayout(bei);
2147  bei->goUp();
2148  }
2149  }
2150 }
void createColumn(std::string &element, std::string &name)
void fillLayout(DQMStore *bei)
SiPixelConfigWriter * configWriter_
void SiPixelActionExecutor::fillOccupancy ( DQMStore bei,
bool  isbarrel 
)
private

Definition at line 1657 of file SiPixelActionExecutor.cc.

References RefreshWebPage::dname, MonitorElement::getBinContent(), MonitorElement::getNbinsX(), MonitorElement::getNbinsY(), MonitorElement::getTH2F(), i, j, OccupancyMap, cmsHarvester::path, MonitorElement::setBinContent(), and Tier0Flag_.

Referenced by createOccupancy().

1658 {
1659  //occupancyprinting cout<<"entering SiPixelActionExecutor::fillOccupancy..."<<std::endl;
1660  if(Tier0Flag_) return;
1661  string currDir = bei->pwd();
1662  string dname = currDir.substr(currDir.find_last_of("/")+1);
1663  //occupancyprinting cout<<"currDir= "<<currDir<< " , dname= "<<dname<<std::endl;
1664 
1665  if(dname.find("Layer_")!=string::npos || dname.find("Disk_")!=string::npos){
1666  vector<string> meVec = bei->getMEs();
1667  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
1668  string full_path = currDir + "/" + (*it);
1669  if(full_path.find("hitmap_siPixelDigis")!=string::npos){ // If we have the hitmap ME
1670  MonitorElement * me = bei->get(full_path);
1671  if (!me) continue;
1672  //occupancyprinting cout << full_path << endl;
1673  string path = full_path;
1674  while (path.find_last_of("/") != 5) // Stop before Pixel/
1675  {
1676  path = path.substr(0,path.find_last_of("/"));
1677  // cout << "\t" << path << endl;
1678  OccupancyMap = bei->get(path + "/" + (isbarrel?"barrel":"endcap") + "OccupancyMap");
1679 
1680  if(OccupancyMap){
1681  for(int i=1; i!=me->getNbinsX()+1; i++) for(int j=1; j!=me->getNbinsY()+1; j++){
1682  float previous = OccupancyMap->getBinContent(i,j);
1683  OccupancyMap->setBinContent(i,j,previous + me->getBinContent(i,j));
1684  }
1685  OccupancyMap->getTH2F()->SetEntries(OccupancyMap->getTH2F()->Integral());
1686  }
1687 
1688  }
1689  }
1690 
1691  }
1692  //bei->goUp();
1693  } else {
1694  //occupancyprinting cout<<"finding subdirs now"<<std::endl;
1695  vector<string> subdirs = bei->getSubdirs();
1696  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
1697  bei->cd(*it);
1698  //occupancyprinting cout<<"now I am in "<<bei->pwd()<<std::endl;
1699  if(*it != "Pixel" && ((isbarrel && (*it).find("Barrel")==string::npos) || (!isbarrel && (*it).find("Endcap")==string::npos))) continue;
1700  //occupancyprinting cout<<"calling myself again "<<std::endl;
1701  fillOccupancy(bei, isbarrel);
1702  bei->goUp();
1703  }
1704  }
1705 
1706  //occupancyprinting cout<<"leaving SiPixelActionExecutor::fillOccupancy..."<<std::endl;
1707 
1708 }
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
void fillOccupancy(DQMStore *bei, bool isbarrel)
int getNbinsY(void) const
get # of bins in Y-axis
tuple path
else: Piece not in the list, fine.
int j
Definition: DBlmapReader.cc:9
double getBinContent(int binx) const
get content of bin (1-D)
int getNbinsX(void) const
get # of bins in X-axis
TH2F * getTH2F(void) const
void SiPixelActionExecutor::fillSummary ( DQMStore bei,
std::string  dir_name,
std::vector< std::string > &  me_names,
bool  isbarrel,
bool  isUpgrade 
)
private

Definition at line 397 of file SiPixelActionExecutor.cc.

References configParser_, relmon_rootfiles_spy::contents, gather_cfg::cout, MonitorElement::Fill(), fillGrandBarrelSummaryHistos(), fillGrandEndcapSummaryHistos(), spr::find(), MonitorElement::getBinContent(), GetBladeSubdirs(), MonitorElement::getEntries(), MonitorElement::getMean(), SiPixelConfigParser::getMENamesForGrandBarrelSummary(), SiPixelConfigParser::getMENamesForGrandEndcapSummary(), MonitorElement::getName(), MonitorElement::getNbinsX(), MonitorElement::getNbinsY(), MonitorElement::getRMS(), getSummaryME(), MonitorElement::getTH1F(), isum, findQualityFiles::jj, nlast, prof2calltree::prefix, tablePrinter::rows, lumiContext::sname, source_type_, mathSSE::sqrt(), GlobalPosition_Frontier_DevDB_cff::tag, groupFilesInBlocks::temp, and indexGen::title.

Referenced by createSummary().

398 {
399 
400 
401  //cout<<"entering SiPixelActionExecutor::fillSummary..."<<endl;
402  string currDir = bei->pwd();
403  //cout<<"currDir= "<<currDir<<endl;
404  string prefix;
405  if(source_type_==0) prefix="SUMRAW";
406  else if (source_type_==1) prefix="SUMDIG";
407  else if (source_type_==2) prefix="SUMCLU";
408  else if (source_type_==3) prefix="SUMTRK";
409  else if (source_type_==4) prefix="SUMHIT";
410  else if (source_type_>=7 && source_type_<20) prefix="SUMCAL";
411  else if (source_type_==20) prefix="SUMOFF";
412  if (currDir.find(dir_name) != string::npos) {
413  vector<MonitorElement*> sum_mes;
414  for (vector<string>::const_iterator iv = me_names.begin();
415  iv != me_names.end(); iv++) {
416  if(source_type_==5||source_type_==6){
417  if((*iv)=="errorType"||(*iv)=="NErrors"||(*iv)=="fullType"||(*iv)=="chanNmbr"||
418  (*iv)=="TBMType"||(*iv)=="EvtNbr"||(*iv)=="evtSize"||(*iv)=="linkId"||
419  (*iv)=="ROCId"||(*iv)=="DCOLId"||(*iv)=="PXId"||(*iv)=="ROCNmbr"||
420  (*iv)=="TBMMessage"||(*iv)=="Type36Hitmap")
421  prefix="SUMRAW";
422  else if((*iv)=="ndigis"||(*iv)=="adc")
423  prefix="SUMDIG";
424  else if((*iv)=="nclusters"||(*iv)=="x"||(*iv)=="y"||(*iv)=="charge"||
425  (*iv)=="size"||(*iv)=="sizeX"||(*iv)=="sizeY"||(*iv)=="minrow"||
426  (*iv)=="maxrow"||(*iv)=="mincol"||(*iv)=="maxcol")
427  prefix="SUMCLU";
428  if(currDir.find("Track")!=string::npos) prefix="SUMTRK";
429  else if((*iv)=="residualX"||(*iv)=="residualY")
430  prefix="SUMTRK";
431  else if((*iv)=="ClustX"||(*iv)=="ClustY"||(*iv)=="nRecHits"||(*iv)=="ErrorX"||(*iv)=="ErrorY")
432  prefix="SUMHIT";
433  else if((*iv)=="Gain1d"||(*iv)=="GainChi2NDF1d"||
434  (*iv)=="GainChi2Prob1d"||(*iv)=="Pedestal1d"||
435  (*iv)=="GainNPoints1d"||(*iv)=="GainHighPoint1d"||
436  (*iv)=="GainLowPoint1d"||(*iv)=="GainEndPoint1d"||
437  (*iv)=="GainFitResult2d"||(*iv)=="GainDynamicRange2d"||
438  (*iv)=="GainSaturate2d"||
439  (*iv)=="ScurveChi2ProbSummary"||(*iv)=="ScurveFitResultSummary"||
440  (*iv)=="ScurveSigmasSummary"||(*iv)=="ScurveThresholdSummary"||
441  (*iv)=="pixelAliveSummary" || (*iv) == "SiPixelErrorsCalibDigis")
442  prefix="SUMCAL";
443  }
444  MonitorElement* temp; string tag;
445  if((*iv).find("residual")!=string::npos){ // track residuals
446  tag = prefix + "_" + (*iv) + "_mean_"
447  + currDir.substr(currDir.find(dir_name));
448  temp = getSummaryME(bei, tag, isUpgrade);
449  sum_mes.push_back(temp);
450  tag = prefix + "_" + (*iv) + "_RMS_"
451  + currDir.substr(currDir.find(dir_name));
452  temp = getSummaryME(bei, tag, isUpgrade);
453  sum_mes.push_back(temp);
454  }else if(prefix == "SUMCAL"){ // calibrations
455  if((*iv)=="Gain1d" || (*iv)=="GainChi2NDF1d" || (*iv)=="GainChi2Prob1d" ||
456  (*iv)=="GainNPoints1d" || (*iv)=="GainHighPoint1d" ||
457  (*iv)=="GainLowPoint1d" || (*iv)=="GainEndPoint1d" ||
458  (*iv)=="GainDynamicRange2d" || (*iv)=="GainSaturate2d" ||
459  (*iv)=="Pedestal1d" ||
460  (*iv)=="ScurveChi2ProbSummary" || (*iv)=="ScurveFitResultSummary" ||
461  (*iv)=="ScurveSigmasSummary" || (*iv)=="ScurveThresholdSummary"){
462  tag = prefix + "_" + (*iv) + "_mean_"
463  + currDir.substr(currDir.find(dir_name));
464  temp = getSummaryME(bei, tag, isUpgrade);
465  sum_mes.push_back(temp);
466  tag = prefix + "_" + (*iv) + "_RMS_"
467  + currDir.substr(currDir.find(dir_name));
468  temp = getSummaryME(bei, tag, isUpgrade);
469  sum_mes.push_back(temp);
470  }else if((*iv) == "SiPixelErrorsCalibDigis"){
471  tag = prefix + "_" + (*iv) + "_NCalibErrors_"
472  + currDir.substr(currDir.find(dir_name));
473  temp = getSummaryME(bei, tag, isUpgrade);
474  sum_mes.push_back(temp);
475  }else if((*iv)=="GainFitResult2d"){
476  tag = prefix + "_" + (*iv) + "_NNegativeFits_"
477  + currDir.substr(currDir.find(dir_name));
478  temp = getSummaryME(bei, tag, isUpgrade);
479  sum_mes.push_back(temp);
480  }else if((*iv)=="pixelAliveSummary"){
481  tag = prefix + "_" + (*iv) + "_FracOfPerfectPix_"
482  + currDir.substr(currDir.find(dir_name));
483  temp = getSummaryME(bei, tag, isUpgrade);
484  sum_mes.push_back(temp);
485  tag = prefix + "_" + (*iv) + "_mean_"
486  + currDir.substr(currDir.find(dir_name));
487  temp = getSummaryME(bei, tag, isUpgrade);
488  sum_mes.push_back(temp);
489  }
490  }else{
491  tag = prefix + "_" + (*iv) + "_" + currDir.substr(currDir.find(dir_name));
492  temp = getSummaryME(bei, tag, isUpgrade);
493  sum_mes.push_back(temp);
494  if((*iv)=="ndigis"){
495  tag = prefix + "_" + (*iv) + "FREQ_"
496  + currDir.substr(currDir.find(dir_name));
497  temp = getSummaryME(bei, tag, isUpgrade);
498  sum_mes.push_back(temp);
499  }
500  if(prefix=="SUMDIG" && (*iv)=="adc"){
501  tag = "ALLMODS_" + (*iv) + "COMB_" + currDir.substr(currDir.find(dir_name));
502  temp = bei->book1D(tag.c_str(), tag.c_str(),128, 0., 256.);
503  sum_mes.push_back(temp);
504  }
505  if(prefix=="SUMCLU" && (*iv)=="charge"){
506  tag = "ALLMODS_" + (*iv) + "COMB_" + currDir.substr(currDir.find(dir_name));
507  temp = bei->book1D(tag.c_str(), tag.c_str(),100, 0., 200.); // To look to get the size automatically
508  sum_mes.push_back(temp);
509  }
510  }
511  }
512  if (sum_mes.size() == 0) {
513  edm::LogInfo("SiPixelActionExecutor") << " Summary MEs can not be created" << "\n" ;
514  return;
515  }
516  vector<string> subdirs = bei->getSubdirs();
517 //Blade
518  if(dir_name.find("Blade_") == 0) GetBladeSubdirs(bei, subdirs);
519 
520  int ndet = 0;
521  for (vector<string>::const_iterator it = subdirs.begin();
522  it != subdirs.end(); it++) {
523  if (prefix!="SUMOFF" && (*it).find("Module_") == string::npos) continue;
524  if (prefix=="SUMOFF" && (*it).find(isbarrel?"Layer_":"Disk_") == string::npos) continue;
525  bei->cd(*it);
526  ndet++;
527 
528  vector<string> contents = bei->getMEs();
529 
530  for (vector<MonitorElement*>::const_iterator isum = sum_mes.begin();
531  isum != sum_mes.end(); isum++) {
532  for (vector<string>::const_iterator im = contents.begin();
533  im != contents.end(); im++) {
534  string sname = ((*isum)->getName());
535  string tname = " ";
536  tname = sname.substr(7,(sname.find("_",7)-6));
537  if(sname.find("ALLMODS_adcCOMB_")!=string::npos) tname = "adc_";
538  if(sname.find("ALLMODS_chargeCOMB_")!=string::npos) tname = "charge_";
539  if(sname.find("_charge_")!=string::npos && sname.find("Track_")==string::npos) tname = "charge_";
540  if(sname.find("_nclusters_")!=string::npos && sname.find("Track_")==string::npos) tname = "nclusters_";
541  if(sname.find("_size_")!=string::npos && sname.find("Track_")==string::npos) tname = "size_";
542  if(sname.find("_charge_OffTrack_")!=string::npos) tname = "charge_OffTrack_";
543  if(sname.find("_nclusters_OffTrack_")!=string::npos) tname = "nclusters_OffTrack_";
544  if(sname.find("_size_OffTrack_")!=string::npos) tname = "size_OffTrack_";
545  if(sname.find("_sizeX_OffTrack_")!=string::npos) tname = "sizeX_OffTrack_";
546  if(sname.find("_sizeY_OffTrack_")!=string::npos) tname = "sizeY_OffTrack_";
547  if(sname.find("_charge_OnTrack_")!=string::npos) tname = "charge_OnTrack_";
548  if(sname.find("_nclusters_OnTrack_")!=string::npos) tname = "nclusters_OnTrack_";
549  if(sname.find("_size_OnTrack_")!=string::npos) tname = "size_OnTrack_";
550  if(sname.find("_sizeX_OnTrack_")!=string::npos) tname = "sizeX_OnTrack_";
551  if(sname.find("_sizeY_OnTrack_")!=string::npos) tname = "sizeY_OnTrack_";
552  //if(sname.find("ALLMODS")!=string::npos) cout<<"sname and tname= "<<sname<<","<<tname<<endl;
553  if(tname.find("FREQ")!=string::npos) tname = "ndigis_";
554  if (((*im)).find(tname) == 0) {
555  string fullpathname = bei->pwd() + "/" + (*im);
556  //cout<<"!!!!!!!!!!!!!!!!!!!!!!SNAME= "<<sname<<endl;
557  MonitorElement * me = bei->get(fullpathname);
558 
559  if (me){
560  if(sname.find("_charge")!=string::npos && sname.find("Track_")==string::npos && me->getName().find("Track_")!=string::npos) continue;
561  if(sname.find("_nclusters_")!=string::npos && sname.find("Track_")==string::npos && me->getName().find("Track_")!=string::npos) continue;
562  if(sname.find("_size")!=string::npos && sname.find("Track_")==string::npos && me->getName().find("Track_")!=string::npos) continue;
563 //cout<<"tell me the sname and me name: "<<sname<<" , "<<me->getName()<<endl;
564  // fill summary histos:
565  if (sname.find("_RMS_")!=string::npos &&
566  sname.find("GainDynamicRange2d")==string::npos &&
567  sname.find("GainSaturate2d")==string::npos){
568  (*isum)->Fill(ndet, me->getRMS());
569  }else if (sname.find("GainDynamicRange2d")!=string::npos ||
570  sname.find("GainSaturate2d")!=string::npos){
571  float SumOfEntries=0.; float SumOfSquaredEntries=0.; int SumOfPixels=0;
572  for(int cols=1; cols!=me->getNbinsX()+1; cols++) for(int rows=1; rows!=me->getNbinsY()+1; rows++){
573  SumOfEntries+=me->getBinContent(cols,rows);
574  SumOfSquaredEntries+=(me->getBinContent(cols,rows))*(me->getBinContent(cols,rows));
575  SumOfPixels++;
576  }
577 
578  float MeanInZ = SumOfEntries / float(SumOfPixels);
579  float RMSInZ = sqrt(SumOfSquaredEntries/float(SumOfPixels));
580  if(sname.find("_mean_")!=string::npos) (*isum)->Fill(ndet, MeanInZ);
581  if(sname.find("_RMS_")!=string::npos) (*isum)->Fill(ndet, RMSInZ);
582  }else if (sname.find("_FracOfPerfectPix_")!=string::npos){
583  //printing cout<<"nbins = "<<me->getNbinsX()<<" , "<<me->getBinContent(me->getNbinsX()-1)<<" , "<<me->getBinContent(me->getNbinsX())<<endl;
584  float nlast = me->getBinContent(me->getNbinsX());
585  float nall = (me->getTH1F())->Integral(1,11);
586  //printing cout << nall << endl;
587  (*isum)->Fill(ndet, nlast/nall);
588  }else if (sname.find("_NCalibErrors_")!=string::npos ||
589  sname.find("FREQ_")!=string::npos){
590  float nall = me->getEntries();
591  (*isum)->Fill(ndet, nall);
592  }else if (sname.find("GainFitResult2d")!=string::npos){
593  int NegFitPixels=0;
594  for(int cols=1; cols!=me->getNbinsX()+1; cols++) for(int rows=1; rows!=me->getNbinsY()+1; rows++){
595  if(me->getBinContent(cols,rows)<0.) NegFitPixels++;
596  }
597  (*isum)->Fill(ndet, float(NegFitPixels));
598  }else if (sname.find("ALLMODS_adcCOMB_")!=string::npos ||
599  (sname.find("ALLMODS_chargeCOMB_")!=string::npos && me->getName().find("Track_")==string::npos)){
600  (*isum)->getTH1F()->Add(me->getTH1F());
601  }else if (sname.find("_NErrors_")!=string::npos){
602  string path1 = fullpathname;
603  path1 = path1.replace(path1.find("NErrors"),7,"errorType");
604  MonitorElement * me1 = bei->get(path1);
605  bool notReset=true;
606  if(me1){
607  for(int jj=1; jj<16; jj++){
608  if(me1->getBinContent(jj)>0.){
609  if(jj==6){ //errorType=30 (reset)
610  string path2 = path1;
611  path2 = path2.replace(path2.find("errorType"),9,"TBMMessage");
612  MonitorElement * me2 = bei->get(path2);
613  if(me2) if(me2->getBinContent(6)>0. || me2->getBinContent(7)>0.) notReset=false;
614  }
615  }
616  }
617  }
618  if(notReset) (*isum)->Fill(ndet, me1->getEntries());
619  }else if ((sname.find("_charge_")!=string::npos && sname.find("Track_")==string::npos &&
620  me->getName().find("Track_")==string::npos) ||
621  (sname.find("_charge_")!=string::npos && sname.find("_OnTrack_")!=string::npos &&
622  me->getName().find("_OnTrack_")!=string::npos) ||
623  (sname.find("_charge_")!=string::npos && sname.find("_OffTrack_")!=string::npos &&
624  me->getName().find("_OffTrack_")!=string::npos) ||
625  (sname.find("_nclusters_")!=string::npos && sname.find("Track_")==string::npos &&
626  me->getName().find("Track_")==string::npos) ||
627  (sname.find("_nclusters_")!=string::npos && sname.find("_OnTrack_")!=string::npos &&
628  me->getName().find("_OnTrack_")!=string::npos) ||
629  (sname.find("_nclusters_")!=string::npos && sname.find("_OffTrack_")!=string::npos &&
630  me->getName().find("_OffTrack_")!=string::npos) ||
631  (sname.find("_size")!=string::npos && sname.find("Track_")==string::npos &&
632  me->getName().find("Track_")==string::npos) ||
633  (sname.find("_size")!=string::npos && sname.find("_OnTrack_")!=string::npos &&
634  me->getName().find("_OnTrack_")!=string::npos) ||
635  (sname.find("_size")!=string::npos && sname.find("_OffTrack_")!=string::npos &&
636  me->getName().find("_OffTrack_")!=string::npos)){
637  (*isum)->Fill(ndet, me->getMean());
638  }else if(sname.find("_charge_")==string::npos && sname.find("_nclusters_")==string::npos && sname.find("_size")==string::npos){
639  (*isum)->Fill(ndet, me->getMean());
640  //std::cout<<bei->pwd()<<"/"<<(*isum)->getName()<<" , "<<ndet<<" , "<<me->getMean()<<" , "<<(*isum)->getBinContent(ndet)<<std::endl;
641  }
642 
643  // set titles:
644  if(prefix=="SUMOFF"){
645  (*isum)->setAxisTitle(isbarrel?"Ladders":"Blades",1);
646  }else if(sname.find("ALLMODS_adcCOMB_")!=string::npos){
647  (*isum)->setAxisTitle("Digi charge [ADC]",1);
648  }else if(sname.find("ALLMODS_chargeCOMB_")!=string::npos){
649  (*isum)->setAxisTitle("Cluster charge [kilo electrons]",1);
650  }else{
651  (*isum)->setAxisTitle("Modules",1);
652  }
653  string title = " ";
654  if (sname.find("_RMS_")!=string::npos){
655  title = "RMS of " + sname.substr(7,(sname.find("_",7)-7)) + " per module";
656  }else if (sname.find("_FracOfPerfectPix_")!=string::npos){
657  title = "FracOfPerfectPix " + sname.substr(7,(sname.find("_",7)-7)) + " per module";
658  }else if(sname.find("_NCalibErrors_")!=string::npos){
659  title = "Number of CalibErrors " + sname.substr(7,(sname.find("_",7)-7)) + " per module";
660  }else if(sname.find("_NNegativeFits_")!=string::npos){
661  title = "Number of pixels with neg. fit result " + sname.substr(7,(sname.find("_",7)-7)) + " per module";
662  }else if (sname.find("FREQ_")!=string::npos){
663  title = "NEvents with digis per module";
664  }else if (sname.find("ALLMODS_adcCOMB_")!=string::npos){
665  title = "NDigis";
666  }else if (sname.find("ALLMODS_chargeCOMB_")!=string::npos){
667  title = "NClusters";
668  }else if (sname.find("_NErrors_")!=string::npos){
669  if(prefix=="SUMOFF" && isbarrel) title = "Total number of errors per Ladder";
670  else if(prefix=="SUMOFF" && !isbarrel) title = "Total number of errors per Blade";
671  else title = "Total number of errors per Module";
672  }else{
673  if(prefix=="SUMOFF") title = "Mean " + sname.substr(7,(sname.find("_",7)-7)) + (isbarrel?" per Ladder":" per Blade");
674  else title = "Mean " + sname.substr(7,(sname.find("_",7)-7)) + " per Module";
675  }
676  (*isum)->setAxisTitle(title,2);
677  }
678  break;
679  }
680  }
681  }
682  bei->goUp();
683  if(dir_name.find("Blade") == 0) bei->goUp(); // Going up a second time if we are processing the Blade
684  } // end for it (subdirs)
685  } else {
686  vector<string> subdirs = bei->getSubdirs();
687  // printing cout << "#\t" << bei->pwd() << endl;
688  if(isbarrel)
689  {
690 
691  for (vector<string>::const_iterator it = subdirs.begin();
692  it != subdirs.end(); it++) {
693  // cout << "##\t" << bei->pwd() << "\t" << (*it) << endl;
694  if((bei->pwd()).find("Endcap")!=string::npos ||
695  (bei->pwd()).find("AdditionalPixelErrors")!=string::npos) bei->goUp();
696  bei->cd(*it);
697  if((*it).find("Endcap")!=string::npos ||
698  (*it).find("AdditionalPixelErrors")!=string::npos) continue;
699  fillSummary(bei, dir_name, me_names, true, isUpgrade); // Barrel
700  bei->goUp();
701  }
702  string grandbarrel_structure_name;
703  vector<string> grandbarrel_me_names;
704  if (!configParser_->getMENamesForGrandBarrelSummary(grandbarrel_structure_name, grandbarrel_me_names)){
705  cout << "SiPixelActionExecutor::createSummary: Failed to read Grand Barrel Summary configuration parameters!! ";
706  return;
707  }
708  fillGrandBarrelSummaryHistos(bei, grandbarrel_me_names, isUpgrade);
709 
710  }
711  else // Endcap
712  {
713 
714  for (vector<string>::const_iterator it = subdirs.begin();
715  it != subdirs.end(); it++) {
716  // cout << "##\t" << bei->pwd() << "\t" << (*it) << endl;
717  if((bei->pwd()).find("Barrel")!=string::npos ||
718  (bei->pwd()).find("AdditionalPixelErrors")!=string::npos) bei->goUp();
719  bei->cd((*it));
720  if ((*it).find("Barrel")!=string::npos ||
721  (*it).find("AdditionalPixelErrors")!=string::npos) continue;
722  fillSummary(bei, dir_name, me_names, false, isUpgrade); // Endcap
723  bei->goUp();
724  }
725  string grandendcap_structure_name;
726  vector<string> grandendcap_me_names;
727  if (!configParser_->getMENamesForGrandEndcapSummary(grandendcap_structure_name, grandendcap_me_names)){
728  cout << "SiPixelActionExecutor::createSummary: Failed to read Grand Endcap Summary configuration parameters!! ";
729  return;
730  }
731  fillGrandEndcapSummaryHistos(bei, grandendcap_me_names, isUpgrade);
732 
733 
734  }
735  }
736 // cout<<"...leaving SiPixelActionExecutor::fillSummary!"<<endl;
737 
738  // End of cleanup
739 
740 
741 }
const std::string & getName(void) const
get name of ME
void fillGrandBarrelSummaryHistos(DQMStore *bei, std::vector< std::string > &me_names, bool isUpgrade)
SiPixelConfigParser * configParser_
double isum
double getEntries(void) const
get # of entries
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
MonitorElement * getSummaryME(DQMStore *bei, std::string me_name, bool isUpgrade)
void fillSummary(DQMStore *bei, std::string dir_name, std::vector< std::string > &me_names, bool isbarrel, bool isUpgrade)
int getNbinsY(void) const
get # of bins in Y-axis
void Fill(long long x)
bool getMENamesForGrandEndcapSummary(std::string &structure_name, std::vector< std::string > &me_names)
T sqrt(T t)
Definition: SSEVec.h:48
bool getMENamesForGrandBarrelSummary(std::string &structure_name, std::vector< std::string > &me_names)
void fillGrandEndcapSummaryHistos(DQMStore *bei, std::vector< std::string > &me_names, bool isUpgrade)
void GetBladeSubdirs(DQMStore *bei, std::vector< std::string > &blade_subdirs)
TH1F * getTH1F(void) const
double getBinContent(int binx) const
get content of bin (1-D)
int nlast
Definition: AMPTWrapper.h:47
double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
int getNbinsX(void) const
get # of bins in X-axis
tuple cout
Definition: gather_cfg.py:121
void SiPixelActionExecutor::GetBladeSubdirs ( DQMStore bei,
std::vector< std::string > &  blade_subdirs 
)
private

Definition at line 378 of file SiPixelActionExecutor.cc.

References edmConvertToStreamModule::modules.

Referenced by fillSummary().

378  {
379  blade_subdirs.clear();
380 // cout << "BladeSubdirs::" << bei->pwd() << endl;
381  vector<string> panels = bei->getSubdirs();
382  vector<string> modules;
383  for (vector<string>::const_iterator it = panels.begin(); it != panels.end(); it++) {
384  bei->cd(*it);
385  modules = bei->getSubdirs();
386  for (vector<string>::const_iterator m_it = modules.begin(); m_it != modules.end(); m_it++) {
387 // cout << "Would have added " << (*m_it) << "." << endl;
388  blade_subdirs.push_back(*m_it);
389  }
390  }
391 // cout << "Got Blade subdirs" << endl;
392 }
void SiPixelActionExecutor::getData ( Double_t  map[][NLev2][NLev3][NLev4],
std::string  type,
DQMStore bei,
funcType  ff,
Int_t  i,
Int_t  j,
Int_t  k,
Int_t  l 
)
private

Definition at line 1830 of file SiPixelActionExecutor.cc.

References relmon_rootfiles_spy::contents, EachBinContent, Entries, MonitorElement::getTH1F(), timingPdfMaker::histo, i, j, gen::k, ConfigFiles::l, m, python.multivaluedict::map(), Mean, pileupCalc::nbins, AlCaHLTBitMon_QueryRunRegistry::string, Sum, and WeightedSum.

Referenced by createMap().

1830  {
1831 
1832 // cout << "Starting with SiPixelActionExecutor::getData" << endl;
1833  vector<string> contents = bei->getMEs();
1834  for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++)
1835  {
1836  if((*im).find(type + "_") == string::npos){
1837  // cout << "Skip";
1838  continue; // Searching for specific type
1839  }
1840  //cout << "Name: " << *im << endl;
1841  std::string fullpathname = bei->pwd() + "/" + (*im);
1842  MonitorElement* me = bei->get(fullpathname);
1843 
1844  if (me) {
1845  TH1F* histo = me->getTH1F();
1846 
1847  Int_t nbins = histo->GetNbinsX();
1848  // cout << "# of bins: " << nbins << endl;
1849  switch (ff){
1850  case EachBinContent:
1851  map[i][j][k][l] = histo->GetBinContent(l + 1);
1852  break;
1853 
1854  case Entries:
1855  map[i][j][k][l] = histo->GetEntries();
1856  break;
1857 
1858  case Mean:
1859  map[i][j][k][l] = histo->GetMean();
1860  break;
1861 
1862  case Sum:
1863  {
1864  Double_t sum = 0;
1865  for(Int_t m = 0; m < nbins; m++)
1866  sum += histo->GetBinContent(m + 1);
1867  map[i][j][k][l] = sum;
1868  }
1869  break;
1870 
1871  case WeightedSum:
1872  {
1873  Double_t sum = 0;
1874  for(Int_t m = 0; m < nbins; m++)
1875  sum += histo->GetBinContent(m + 1) * histo->GetBinLowEdge(m + 1);
1876  map[i][j][k][l] = sum;
1877  }
1878  break;
1879 
1880  default:
1881  map[i][j][k][l] = 0;
1882  }
1883  }}
1884 // cout << "Done with SiPixelActionExecutor::getData" << endl;
1885 }
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
int k[5][pyjets_maxn]
TH1F * getTH1F(void) const
MonitorElement * SiPixelActionExecutor::getFEDSummaryME ( DQMStore bei,
std::string  me_name 
)
private

Definition at line 1565 of file SiPixelActionExecutor.cc.

References relmon_rootfiles_spy::contents, spr::find(), and MonitorElement::Reset().

Referenced by fillFEDErrorSummary().

1566  {
1567  //printing cout<<"Entering SiPixelActionExecutor::getFEDSummaryME..."<<endl;
1568  MonitorElement* me = 0;
1569  if((bei->pwd()).find("Pixel")==string::npos) return me;
1570  vector<string> contents = bei->getMEs();
1571 
1572  for (vector<string>::const_iterator it = contents.begin();
1573  it != contents.end(); it++) {
1574  if ((*it).find(me_name) == 0) {
1575  string fullpathname = bei->pwd() + "/" + (*it);
1576 
1577  me = bei->get(fullpathname);
1578 
1579  if (me) {
1580  //printing cout<<"got the ME: "<<fullpathname<<endl;
1581  me->Reset();
1582  return me;
1583  }
1584  }
1585  }
1586  contents.clear();
1587  me = bei->book1D(me_name.c_str(), me_name.c_str(),40,-0.5,39.5);
1588  //if(me) cout<<"finally got the ME: "<<me_name<<endl;
1589  return me;
1590  //printing cout<<"...leaving SiPixelActionExecutor::getFEDSummaryME!"<<endl;
1591 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
void Reset(void)
reset ME (ie. contents, errors, etc)
void SiPixelActionExecutor::getGrandSummaryME ( DQMStore bei,
int  nbin,
std::string &  me_name,
std::vector< MonitorElement * > &  mes 
)
private

Definition at line 1457 of file SiPixelActionExecutor.cc.

References relmon_rootfiles_spy::contents, spr::find(), and MonitorElement::Reset().

Referenced by fillGrandBarrelSummaryHistos(), and fillGrandEndcapSummaryHistos().

1460  {
1461  //printing cout<<"Entering SiPixelActionExecutor::getGrandSummaryME for: "<<me_name<<endl;
1462  if((bei->pwd()).find("Pixel")==string::npos) return; // If one doesn't find pixel
1463  vector<string> contents = bei->getMEs();
1464 
1465  for (vector<string>::const_iterator it = contents.begin();
1466  it != contents.end(); it++) {
1467  //printing cout<<"in grand summary me: "<<me_name<<","<<(*it)<<endl;
1468  if ((*it).find(me_name) == 0) {
1469  string fullpathname = bei->pwd() + "/" + me_name;
1470  // cout << "###\t" << fullpathname << endl;
1471  MonitorElement* me = bei->get(fullpathname);
1472 
1473  if (me) {
1474  // cout<<"Found grand ME: "<<fullpathname<<endl;
1475  me->Reset();
1476  mes.push_back(me);
1477  // if printing cout<<"reset and add the following me: "<<me->getName()<<endl;
1478  return;
1479  }
1480  }
1481  }
1482 
1483  // MonitorElement* temp_me = bei->book1D(me_name.c_str(),me_name.c_str(),nbin,1.,nbin+1.);
1484  // if (temp_me) mes.push_back(temp_me);
1485  MonitorElement* temp_me(0);
1486  if(me_name.find("ALLMODS_adcCOMB_")!=string::npos) temp_me = bei->book1D(me_name.c_str(),me_name.c_str(),128,0,256);
1487  else if(me_name.find("ALLMODS_chargeCOMB_")!=string::npos) temp_me = bei->book1D(me_name.c_str(),me_name.c_str(),100,0,200);
1488  else temp_me = bei->book1D(me_name.c_str(),me_name.c_str(),nbin,1.,nbin+1.);
1489  if (temp_me) mes.push_back(temp_me);
1490 
1491  // if(temp_me) cout<<"finally found grand ME: "<<me_name<<endl;
1492 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * SiPixelActionExecutor::getSummaryME ( DQMStore bei,
std::string  me_name,
bool  isUpgrade 
)
private

Definition at line 1499 of file SiPixelActionExecutor.cc.

References relmon_rootfiles_spy::contents, spr::find(), and MonitorElement::Reset().

Referenced by fillSummary().

1501  {
1502  //printing cout<<"Entering SiPixelActionExecutor::getSummaryME for: "<<me_name<<endl;
1503  MonitorElement* me = 0;
1504  if((bei->pwd()).find("Pixel")==string::npos) return me;
1505  vector<string> contents = bei->getMEs();
1506 
1507  for (vector<string>::const_iterator it = contents.begin();
1508  it != contents.end(); it++) {
1509  if ((*it).find(me_name) == 0) {
1510  string fullpathname = bei->pwd() + "/" + (*it);
1511  me = bei->get(fullpathname);
1512 
1513  if (me) {
1514  //printing cout<<"got this ME: "<<fullpathname<<endl;
1515  me->Reset();
1516  return me;
1517  }
1518  }
1519  }
1520  contents.clear();
1521 // cout << me_name.c_str()
1522 // << "\t" << ((me_name.find("SUMOFF")==string::npos)?"true":"false")
1523 // << "\t" << ((me_name.find("Blade_")!= string::npos)?"true":"false")
1524 // << "\t" << ((me_name.find("Layer1_")!=string::npos)?"true":"false")
1525 // << "\t" << ((me_name.find("Layer2_")!=string::npos)?"true":"false")
1526 // << "\t" << ((me_name.find("Layer3_")!=string::npos)?"true":"false")
1527 // << "\t" << ((me_name.find("Disk_")!=string::npos)?"true":"false")
1528 // << endl;
1529  if (!isUpgrade) {
1530  if(me_name.find("SUMOFF")==string::npos){
1531  if(me_name.find("Blade_")!=string::npos)me = bei->book1D(me_name.c_str(), me_name.c_str(),7,1.,8.);
1532  else me = bei->book1D(me_name.c_str(), me_name.c_str(),4,1.,5.);
1533 // if(me_name.find("Panel_2")!=string::npos) me = bei->book1D(me_name.c_str(), me_name.c_str(),3,1.,4.);
1534 // else me = bei->book1D(me_name.c_str(), me_name.c_str(),4,1.,5.);
1535  }else if(me_name.find("Layer_1")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),10,1.,11.);
1536  }else if(me_name.find("Layer_2")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),16,1.,17.);
1537  }else if(me_name.find("Layer_3")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),22,1.,23.);
1538  }else if(me_name.find("Disk_")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),12,1.,13.);
1539  }
1540  }//endifNOTUpgrade
1541  else if (isUpgrade) {
1542  if(me_name.find("SUMOFF")==string::npos){
1543  if(me_name.find("Blade_")!=string::npos)me = bei->book1D(me_name.c_str(), me_name.c_str(),2,1.,3.);
1544  else me = bei->book1D(me_name.c_str(), me_name.c_str(),1,1.,2.);
1545  // if(me_name.find("Panel_2")!=string::npos) me = bei->book1D(me_name.c_str(), me_name.c_str(),3,1.,4.);
1546  // else me = bei->book1D(me_name.c_str(), me_name.c_str(),4,1.,5.);
1547  }else if(me_name.find("Layer_1")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),6,1.,7.);
1548  }else if(me_name.find("Layer_2")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),14,1.,15.);
1549  }else if(me_name.find("Layer_3")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),22,1.,23.);
1550  }else if(me_name.find("Layer_4")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),32,1.,33.);
1551  }else if(me_name.find("Disk_")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),28,1.,29.);
1552  }
1553  }//endifUpgrade
1554 
1555 
1556  // if(me) cout<<"Finally got this ME: "<<me_name<<endl;
1557  //if(me_name.find("ALLMODS_adc_")!=string::npos) me = bei->book1D(me_name.c_str(), me_name.c_str(),256, 0., 256.);
1558 
1559  //printing cout<<"...leaving SiPixelActionExecutor::getSummaryME!"<<endl;
1560  return me;
1561 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
void Reset(void)
reset ME (ie. contents, errors, etc)
int SiPixelActionExecutor::getTkMapMENames ( std::vector< std::string > &  names)

Definition at line 2156 of file SiPixelActionExecutor.cc.

References tkMapMENames.

2156  {
2157  if (tkMapMENames.size() == 0) return 0;
2158  for (vector<string>::iterator it = tkMapMENames.begin();
2159  it != tkMapMENames.end(); it++) {
2160  names.push_back(*it) ;
2161  }
2162  return names.size();
2163 }
static const HistoName names[]
std::vector< std::string > tkMapMENames
Double_t SiPixelActionExecutor::mapMax ( const Double_t  map[][NLev2][NLev3][NLev4],
bool  isBarrel 
)
private

Definition at line 1978 of file SiPixelActionExecutor.cc.

References b, i, python.multivaluedict::map(), max(), NLev1, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by createMaps().

1978  {
1979 
1980  Double_t max = map[0][0][0][0];
1981 
1982  for(Int_t p = 0 ; p < NLev1 ; p++)
1983  for(Int_t d = 0 ; d < (isBarrel?3:2); d++)
1984  for(Int_t b = 0 ; b < (isBarrel?(d*6+10):12); b++)
1985  for(Int_t i = 0 ; i < (isBarrel?4:7); i++)
1986  if(map[p][d][b][i] > max)
1987  max = map[p][d][b][i];
1988  // cout << "Done with SiPixelActionExecutor::mapMax" << endl;
1989  return max;
1990 }
#define NLev1
int i
Definition: DBlmapReader.cc:9
const T & max(const T &a, const T &b)
double b
Definition: hdecay.h:120
Double_t SiPixelActionExecutor::mapMin ( const Double_t  map[][NLev2][NLev3][NLev4],
bool  isBarrel 
)
private

Definition at line 1961 of file SiPixelActionExecutor.cc.

References b, i, python.multivaluedict::map(), bookConverter::min, NLev1, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by createMaps().

1961  {
1962 
1963  Double_t min = map[0][0][0][0];
1964 
1965  for(Int_t p = 0 ; p < NLev1 ; p++)
1966  for(Int_t d = 0 ; d < (isBarrel?3:2) ; d++)
1967  for(Int_t b = 0 ; b < (isBarrel?(d*6+10):12) ; b++)
1968  for(Int_t i = 0 ; i < (isBarrel?4:7); i++){
1969  if(map[p][d][b][i] < min)
1970  min = map[p][d][b][i];
1971  }
1972  // cout << "Done with SiPixelActionExecutor::mapMin" << endl;
1973  return min;
1974 }
#define NLev1
int i
Definition: DBlmapReader.cc:9
double b
Definition: hdecay.h:120
void SiPixelActionExecutor::prephistosB ( MonitorElement me[NCyl],
DQMStore bei,
const Double_t  map[][NLev2][NLev3][NLev4],
std::string  name,
Double_t  min,
Double_t  max 
)
private

Definition at line 1889 of file SiPixelActionExecutor.cc.

References b, gather_cfg::cout, i, python.multivaluedict::map(), NLayer, NModuleB, AlCaHLTBitMon_ParallelJobs::p, cmsHarvester::path, AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.

Referenced by createMaps().

1889  {
1890  // cout << "Starting with SiPixelActionExecutor::prephistosB" << endl;
1891  std::string part[] = { "Layer_1", "Layer_2", "Layer_3"};
1892  std::string path = bei->pwd();
1893  for (Int_t i = 0; i < NLayer; i++)
1894  {
1895  std::string fullpath = path + "/" + "TRKMAP_" + name + "_" + part[i];
1896  MonitorElement* temp = bei->get(fullpath);
1897  if(temp)
1898  me[i] = temp;
1899  else
1900  cout << "Problem: " << fullpath << endl;
1901  }
1902 
1903  for(Int_t p = 0 ; p < NLayer ; p++){
1904  for(Int_t b = 0 ; b < (10 + 6 * p); b++)
1905  for(Int_t i = 0 ; i < NModuleB ; i++){
1906  me[p]->getTH2F()->SetBinContent(b + 1, i + 1, map[0][p][b][i]);
1907  me[p]->getTH2F()->SetBinContent(b + 1, i + 1 + NModuleB, map[1][p][b][i]);
1908  me[p]->getTH2F()->SetBinContent(b + 1 + 10 + 6 * p, i + 1, map[2][p][b][i]);
1909  me[p]->getTH2F()->SetBinContent(b + 1 + 10 + 6 * p, i + 1 + NModuleB, map[3][p][b][i]);
1910  }
1911  me[p]->getTH2F()->SetMinimum(min);
1912  me[p]->getTH2F()->SetMaximum(max);
1913  }
1914  // cout << "Done with SiPixelActionExecutor::prephistosB" << endl;
1915 }
int i
Definition: DBlmapReader.cc:9
#define NModuleB
tuple path
else: Piece not in the list, fine.
const T & max(const T &a, const T &b)
part
Definition: HCALResponse.h:20
double b
Definition: hdecay.h:120
#define NLayer
tuple cout
Definition: gather_cfg.py:121
TH2F * getTH2F(void) const
void SiPixelActionExecutor::prephistosE ( MonitorElement me[NCyl],
DQMStore bei,
const Double_t  map[][NLev2][NLev3][NLev4],
std::string  name,
Double_t  min,
Double_t  max 
)
private

Definition at line 1919 of file SiPixelActionExecutor.cc.

References b, trackerHits::c, gather_cfg::cout, i, python.multivaluedict::map(), NBlade, NCyl, NDisk, cmsHarvester::path, AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.

Referenced by createMaps().

1919  {
1920  // cout << "Starting with SiPixelActionExecutor::prephistosE" << endl;
1921  std::string part[] = { "Disc_1_M", "Disc_2_M", "Disc_1_P", "Disc_2_P" };
1922  std::string path = bei->pwd();
1923  for (Int_t i = 0; i < NCyl; i++)
1924  {
1925  std::string fullpath = path + "/" + "TRKMAP_" + name + "_" + part[i];
1926  MonitorElement* temp = bei->get(fullpath);
1927  if(temp)
1928  {
1929  me[i] = temp;
1930  me[i]->getTH2F()->SetMinimum(min);
1931  me[i]->getTH2F()->SetMaximum(max);
1932  }
1933  else
1934  cout << "Problem: " << fullpath << endl;
1935  }
1936 
1937  for(Int_t c = 0 ; c < NCyl ; c += 2)
1938  for(Int_t d = 0 ; d < NDisk ; d++)
1939  for(Int_t b = 0 ; b < NBlade ; b++){
1940  me[c + d]->getTH2F()->SetBinContent(b + 1, 1, map[c][d][b][0]);
1941  me[c + d]->getTH2F()->SetBinContent(b + 1, 2, map[c][d][b][4]);
1942  me[c + d]->getTH2F()->SetBinContent(b + 1, 3, map[c][d][b][1]);
1943  me[c + d]->getTH2F()->SetBinContent(b + 1, 4, map[c][d][b][5]);
1944  me[c + d]->getTH2F()->SetBinContent(b + 1, 5, map[c][d][b][2]);
1945  me[c + d]->getTH2F()->SetBinContent(b + 1, 6, map[c][d][b][6]);
1946  me[c + d]->getTH2F()->SetBinContent(b + 1, 7, map[c][d][b][3]);
1947 
1948  me[c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 1, map[c + 1][d][b][0]);
1949  me[c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 2, map[c + 1][d][b][4]);
1950  me[c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 3, map[c + 1][d][b][1]);
1951  me[c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 4, map[c + 1][d][b][5]);
1952  me[c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 5, map[c + 1][d][b][2]);
1953  me[c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 6, map[c + 1][d][b][6]);
1954  me[c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 7, map[c + 1][d][b][3]);
1955  }
1956  // cout << "Done with SiPixelActionExecutor::prephistosE" << endl;
1957 }
int i
Definition: DBlmapReader.cc:9
#define NDisk
#define NCyl
#define NBlade
tuple path
else: Piece not in the list, fine.
const T & max(const T &a, const T &b)
part
Definition: HCALResponse.h:20
double b
Definition: hdecay.h:120
tuple cout
Definition: gather_cfg.py:121
TH2F * getTH2F(void) const
bool SiPixelActionExecutor::readConfiguration ( int &  tkmap_freq,
int &  sum_barrel_freq,
int &  sum_endcap_freq,
int &  sum_grandbarrel_freq,
int &  sum_grandendcap_freq,
int &  message_limit,
int &  source_type,
int &  calib_type 
)

Definition at line 77 of file SiPixelActionExecutor.cc.

References configParser_, gather_cfg::cout, contentValuesFiles::fullPath, SiPixelConfigParser::getCalibType(), DQMParserBase::getDocument(), SiPixelConfigParser::getFrequencyForBarrelSummary(), SiPixelConfigParser::getFrequencyForEndcapSummary(), SiPixelConfigParser::getFrequencyForGrandBarrelSummary(), SiPixelConfigParser::getFrequencyForGrandEndcapSummary(), SiPixelConfigParser::getFrequencyForTrackerMap(), SiPixelConfigParser::getMessageLimitForQTests(), SiPixelConfigParser::getSourceType(), offlineXMLfile_, and AlCaHLTBitMon_QueryRunRegistry::string.

84  {
85  //printing cout<<"Entering SiPixelActionExecutor::readConfiguration..."<<endl;
86  string localPath;
87  if(offlineXMLfile_) localPath = string("DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
88  else localPath = string("DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
89  if (configParser_ == 0) {
92  }
93 
94  if (!configParser_->getFrequencyForTrackerMap(tkmap_freq)){
95  cout << "SiPixelActionExecutor::readConfiguration: Failed to read TrackerMap configuration parameters!! ";
96  return false;
97  }
98  if (!configParser_->getFrequencyForBarrelSummary(sum_barrel_freq)){
99  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Barrel Summary configuration parameters!! " << "\n" ;
100  return false;
101  }
102  if (!configParser_->getFrequencyForEndcapSummary(sum_endcap_freq)){
103  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Endcap Summary configuration parameters!! " << "\n" ;
104  return false;
105  }
106  if (!configParser_->getFrequencyForGrandBarrelSummary(sum_grandbarrel_freq)){
107  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Grand Barrel Summary configuration parameters!! " << "\n" ;
108  return false;
109  }
110  if (!configParser_->getFrequencyForGrandEndcapSummary(sum_grandendcap_freq)){
111  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Grand Endcap Summary configuration parameters!! " << "\n" ;
112  return false;
113  }
115  edm::LogInfo("SiPixelActionExecutor") << "Failed to read QTest Message Limit" << "\n" ;
116  return false;
117  }
119  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Source Type" << "\n" ;
120  return false;
121  }
123  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Calib Type" << "\n" ;
124  return false;
125  }
126  //printing cout<<"...leaving SiPixelActionExecutor::readConfiguration..."<<endl;
127  return true;
128 }
void getDocument(std::string configFile, bool UseDB=false)
Methor that parses the xml file configFile.
SiPixelConfigParser * configParser_
bool getCalibType(int &u_freq)
bool getFrequencyForGrandBarrelSummary(int &u_freq)
bool getFrequencyForEndcapSummary(int &u_freq)
bool getFrequencyForBarrelSummary(int &u_freq)
bool getFrequencyForGrandEndcapSummary(int &u_freq)
bool getMessageLimitForQTests(int &u_freq)
bool getSourceType(int &u_freq)
tuple cout
Definition: gather_cfg.py:121
bool getFrequencyForTrackerMap(int &u_freq)
bool SiPixelActionExecutor::readConfiguration ( int &  tkmap_freq,
int &  summary_freq 
)

Definition at line 130 of file SiPixelActionExecutor.cc.

References configParser_, gather_cfg::cout, contentValuesFiles::fullPath, DQMParserBase::getDocument(), SiPixelConfigParser::getFrequencyForBarrelSummary(), SiPixelConfigParser::getFrequencyForTrackerMap(), offlineXMLfile_, and AlCaHLTBitMon_QueryRunRegistry::string.

130  {
131  //printing cout<<"Entering SiPixelActionExecutor::readConfiguration..."<<endl;
132  string localPath;
133  if(offlineXMLfile_) localPath = string("DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
134  else localPath = string("DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
135  if (configParser_ == 0) {
138  }
139 
140  if (!configParser_->getFrequencyForTrackerMap(tkmap_freq)){
141  cout << "SiPixelActionExecutor::readConfiguration: Failed to read TrackerMap configuration parameters!! ";
142  return false;
143  }
144  if (!configParser_->getFrequencyForBarrelSummary(summary_freq)){
145  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Summary configuration parameters!! " << "\n" ;
146  return false;
147  }
148  //printing cout<<"...leaving SiPixelActionExecutor::readConfiguration..."<<endl;
149  return true;
150 }
void getDocument(std::string configFile, bool UseDB=false)
Methor that parses the xml file configFile.
SiPixelConfigParser * configParser_
bool getFrequencyForBarrelSummary(int &u_freq)
tuple cout
Definition: gather_cfg.py:121
bool getFrequencyForTrackerMap(int &u_freq)
void SiPixelActionExecutor::readConfiguration ( )

Definition at line 64 of file SiPixelActionExecutor.cc.

References configParser_, contentValuesFiles::fullPath, DQMParserBase::getDocument(), offlineXMLfile_, and AlCaHLTBitMon_QueryRunRegistry::string.

64  {
65  string localPath;
66  if(offlineXMLfile_) localPath = string("DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
67  else localPath = string("DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
68  if (configParser_ == 0) {
71  }
72 }
void getDocument(std::string configFile, bool UseDB=false)
Methor that parses the xml file configFile.
SiPixelConfigParser * configParser_
void SiPixelActionExecutor::setupQTests ( DQMStore bei)

Definition at line 1998 of file SiPixelActionExecutor.cc.

References QTestHandle::attachTests(), QTestHandle::configureTests(), gather_cfg::cout, edm::FileInPath::fullPath(), offlineXMLfile_, qtHandler_, and AlCaHLTBitMon_QueryRunRegistry::string.

1998  {
1999  //printing cout<<"Entering SiPixelActionExecutor::setupQTests: "<<endl;
2000 
2001  bei->cd();
2002  bei->cd("Pixel");
2003 
2004  string localPath;
2005  if(offlineXMLfile_) localPath = string("DQM/SiPixelMonitorClient/test/sipixel_tier0_qualitytest.xml");
2006  else localPath = string("DQM/SiPixelMonitorClient/test/sipixel_qualitytest_config.xml");
2007  if(!qtHandler_){
2008  qtHandler_ = new QTestHandle();
2009  }
2010  if(!qtHandler_->configureTests(edm::FileInPath(localPath).fullPath(),bei)){
2011  qtHandler_->attachTests(bei,false);
2012  bei->cd();
2013  }else{
2014  cout << " Problem setting up quality tests "<<endl;
2015  }
2016 
2017  //printing cout<<" leaving SiPixelActionExecutor::setupQTests. "<<endl;
2018 }
void attachTests(DQMStore *bei, bool verboseQT=true)
Attaches the quality tests to the MonitorElement.
Definition: QTestHandle.cc:62
bool configureTests(const std::string &configFile, DQMStore *bei, bool UseDB=false)
Parses Config File and configures the quality tests.
Definition: QTestHandle.cc:35
tuple cout
Definition: gather_cfg.py:121
std::string fullPath() const
Definition: FileInPath.cc:165

Member Data Documentation

int SiPixelActionExecutor::calib_type_
private

Definition at line 148 of file SiPixelActionExecutor.h.

Referenced by checkQTestResults().

SiPixelConfigParser* SiPixelActionExecutor::configParser_
private
SiPixelConfigWriter* SiPixelActionExecutor::configWriter_
private
MonitorElement* SiPixelActionExecutor::DEV_adc_Barrel
private

Definition at line 167 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_adc_Endcap
private

Definition at line 172 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_charge_Barrel
private

Definition at line 169 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_charge_Endcap
private

Definition at line 174 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_nclusters_Barrel
private

Definition at line 170 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_nclusters_Endcap
private

Definition at line 175 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_ndigis_Barrel
private

Definition at line 168 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_ndigis_Endcap
private

Definition at line 173 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_size_Barrel
private

Definition at line 171 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_size_Endcap
private

Definition at line 176 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::HitEfficiency_Dm1
private

Definition at line 164 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_Dm2
private

Definition at line 165 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_Dm3
private

Definition at line 166 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_Dp1
private

Definition at line 161 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_Dp2
private

Definition at line 162 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_Dp3
private

Definition at line 163 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_L1
private

Definition at line 157 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_L2
private

Definition at line 158 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_L3
private

Definition at line 159 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_L4
private

Definition at line 160 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

int SiPixelActionExecutor::message_limit_
private

Definition at line 146 of file SiPixelActionExecutor.h.

Referenced by checkQTestResults().

int SiPixelActionExecutor::ndet_
private
MonitorElement* SiPixelActionExecutor::OccupancyMap
private

Definition at line 155 of file SiPixelActionExecutor.h.

Referenced by bookOccupancyPlots(), and fillOccupancy().

bool SiPixelActionExecutor::offlineXMLfile_
private
MonitorElement* SiPixelActionExecutor::PixelOccupancyMap
private

Definition at line 156 of file SiPixelActionExecutor.h.

QTestHandle* SiPixelActionExecutor::qtHandler_
private
int SiPixelActionExecutor::source_type_
private
std::vector<std::string> SiPixelActionExecutor::summaryMENames
private

Definition at line 143 of file SiPixelActionExecutor.h.

TH2F* SiPixelActionExecutor::temp_1x2
private

Definition at line 187 of file SiPixelActionExecutor.h.

TH2F* SiPixelActionExecutor::temp_1x5
private

Definition at line 188 of file SiPixelActionExecutor.h.

TH2F* SiPixelActionExecutor::temp_2x3
private

Definition at line 189 of file SiPixelActionExecutor.h.

TH2F* SiPixelActionExecutor::temp_2x4
private

Definition at line 190 of file SiPixelActionExecutor.h.

TH2F* SiPixelActionExecutor::temp_2x5
private

Definition at line 191 of file SiPixelActionExecutor.h.

TH2F* SiPixelActionExecutor::temp_H
private

Definition at line 186 of file SiPixelActionExecutor.h.

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

Definition at line 141 of file SiPixelActionExecutor.h.

Referenced by dumpBarrelModIds(), and dumpEndcapModIds().

bool SiPixelActionExecutor::Tier0Flag_
private
std::vector<std::string> SiPixelActionExecutor::tkMapMENames
private

Definition at line 144 of file SiPixelActionExecutor.h.

Referenced by getTkMapMENames().