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)
 
void bookEfficiency (DQMStore *bei)
 
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)
 
void createLayout (DQMStore *bei)
 
void createMaps (DQMStore *bei, std::string type, std::string name, funcType ff)
 
void createOccupancy (DQMStore *bei)
 
void createSummary (DQMStore *bei)
 
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)
 
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)
 
void fillGrandEndcapSummaryHistos (DQMStore *bei, std::vector< std::string > &me_names)
 
void fillOccupancy (DQMStore *bei, bool isbarrel)
 
void fillSummary (DQMStore *bei, std::string dir_name, std::vector< std::string > &me_names, bool isbarrel)
 
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)
 
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_Dp1
 
MonitorElementHitEfficiency_Dp2
 
MonitorElementHitEfficiency_L1
 
MonitorElementHitEfficiency_L2
 
MonitorElementHitEfficiency_L3
 
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 35 of file SiPixelActionExecutor.cc.

References configParser_, configWriter_, ndet_, and qtHandler_.

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

Definition at line 51 of file SiPixelActionExecutor.cc.

References configParser_, configWriter_, and qtHandler_.

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

Member Function Documentation

void SiPixelActionExecutor::bookDeviations ( DQMStore bei)

Definition at line 232 of file SiPixelActionExecutor.cc.

References DQMStore::book1D(), DQMStore::cd(), 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, DEV_size_Endcap, and DQMStore::setCurrentFolder().

Referenced by SiPixelEDAClient::beginRun().

232  {
233  bei->cd();
234  bei->setCurrentFolder("Pixel/Barrel");
235  DEV_adc_Barrel = bei->book1D("DEV_adc_Barrel","Deviation from reference;Module;<adc_ref>-<adc>",768,0.,768.);
236  DEV_ndigis_Barrel = bei->book1D("DEV_ndigis_Barrel","Deviation from reference;Module;<ndigis_ref>-<ndigis>",768,0.,768.);
237  DEV_charge_Barrel = bei->book1D("DEV_charge_Barrel","Deviation from reference;Module;<charge_ref>-<charge>",768,0.,768.);
238  DEV_nclusters_Barrel = bei->book1D("DEV_nclusters_Barrel","Deviation from reference;Module;<nclusters_ref>-<nclusters>",768,0.,768.);
239  DEV_size_Barrel = bei->book1D("DEV_size_Barrel","Deviation from reference;Module;<size_ref>-<size>",768,0.,768.);
240  bei->cd();
241  bei->setCurrentFolder("Pixel/Endcap");
242  DEV_adc_Endcap = bei->book1D("DEV_adc_Endcap","Deviation from reference;Module;<adc_ref>-<adc>",672,0.,672.);
243  DEV_ndigis_Endcap = bei->book1D("DEV_ndigis_Endcap","Deviation from reference;Module;<ndigis_ref>-<ndigis>",672,0.,672.);
244  DEV_charge_Endcap = bei->book1D("DEV_charge_Endcap","Deviation from reference;Module;<charge_ref>-<charge>",672,0.,672.);
245  DEV_nclusters_Endcap = bei->book1D("DEV_nclusters_Endcap","Deviation from reference;Module;<nclusters_ref>-<nclusters>",672,0.,672.);
246  DEV_size_Endcap = bei->book1D("DEV_size_Endcap","Deviation from reference;Module;<size_ref>-<size>",672,0.,672.);
247  bei->cd();
248 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:519
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
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
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
MonitorElement * DEV_adc_Barrel
void SiPixelActionExecutor::bookEfficiency ( DQMStore bei)

Definition at line 2249 of file SiPixelActionExecutor.cc.

References DQMStore::book2D(), DQMStore::cd(), HitEfficiency_Dm1, HitEfficiency_Dm2, HitEfficiency_Dp1, HitEfficiency_Dp2, HitEfficiency_L1, HitEfficiency_L2, HitEfficiency_L3, DQMStore::setCurrentFolder(), and Tier0Flag_.

Referenced by SiPixelEDAClient::beginRun().

2249  {
2250  // Barrel
2251  bei->cd();
2252  bei->setCurrentFolder("Pixel/Barrel");
2253  if(Tier0Flag_){
2254  HitEfficiency_L1 = bei->book2D("HitEfficiency_L1","Hit Efficiency in Barrel_Layer1;z-side;Ladder",2,-1.,1.,20,-10.,10.);
2255  HitEfficiency_L2 = bei->book2D("HitEfficiency_L2","Hit Efficiency in Barrel_Layer2;z-side;Ladder",2,-1.,1.,32,-16.,16.);
2256  HitEfficiency_L3 = bei->book2D("HitEfficiency_L3","Hit Efficiency in Barrel_Layer3;z-side;Ladder",2,-1.,1.,44,-22.,22.);
2257  }else{
2258  HitEfficiency_L1 = bei->book2D("HitEfficiency_L1","Hit Efficiency in Barrel_Layer1;Module;Ladder",8,-4.,4.,20,-10.,10.);
2259  HitEfficiency_L2 = bei->book2D("HitEfficiency_L2","Hit Efficiency in Barrel_Layer2;Module;Ladder",8,-4.,4.,32,-16.,16.);
2260  HitEfficiency_L3 = bei->book2D("HitEfficiency_L3","Hit Efficiency in Barrel_Layer3;Module;Ladder",8,-4.,4.,44,-22.,22.);
2261  }
2262  // Endcap
2263  bei->cd();
2264  bei->setCurrentFolder("Pixel/Endcap");
2265  if(Tier0Flag_){
2266  HitEfficiency_Dp1 = bei->book2D("HitEfficiency_Dp1","Hit Efficiency in Endcap_Disk_p1;Blades;",24,-12.,12.,1,0.,1.);
2267  HitEfficiency_Dp2 = bei->book2D("HitEfficiency_Dp2","Hit Efficiency in Endcap_Disk_p2;Blades;",24,-12.,12.,1,0.,1.);
2268  HitEfficiency_Dm1 = bei->book2D("HitEfficiency_Dm1","Hit Efficiency in Endcap_Disk_m1;Blades;",24,-12.,12.,1,0.,1.);
2269  HitEfficiency_Dm2 = bei->book2D("HitEfficiency_Dm2","Hit Efficiency in Endcap_Disk_m2;Blades;",24,-12.,12.,1,0.,1.);
2270  }else{
2271  HitEfficiency_Dp1 = bei->book2D("HitEfficiency_Dp1","Hit Efficiency in Endcap_Disk_p1;Blades;Modules",24,-12.,12.,7,1.,8.);
2272  HitEfficiency_Dp2 = bei->book2D("HitEfficiency_Dp2","Hit Efficiency in Endcap_Disk_p2;Blades;Modules",24,-12.,12.,7,1.,8.);
2273  HitEfficiency_Dm1 = bei->book2D("HitEfficiency_Dm1","Hit Efficiency in Endcap_Disk_m1;Blades;Modules",24,-12.,12.,7,1.,8.);
2274  HitEfficiency_Dm2 = bei->book2D("HitEfficiency_Dm2","Hit Efficiency in Endcap_Disk_m2;Blades;Modules",24,-12.,12.,7,1.,8.);
2275  }
2276 }
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
MonitorElement * HitEfficiency_L3
MonitorElement * HitEfficiency_Dm2
MonitorElement * HitEfficiency_L2
MonitorElement * HitEfficiency_L1
MonitorElement * HitEfficiency_Dp1
MonitorElement * HitEfficiency_Dp2
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:647
MonitorElement * HitEfficiency_Dm1
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
void SiPixelActionExecutor::bookOccupancyPlots ( DQMStore bei,
bool  hiRes,
bool  isbarrel 
)

Definition at line 1458 of file SiPixelActionExecutor.cc.

References DQMStore::book2D(), DQMStore::cd(), DQMStore::getSubdirs(), DQMStore::goUp(), OccupancyMap, MonitorElement::setAxisTitle(), and Tier0Flag_.

Referenced by SiPixelEDAClient::beginRun(), and bookOccupancyPlots().

1459 {
1460  if(Tier0Flag_) return;
1461  vector<string> subdirs = bei->getSubdirs();
1462  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++)
1463  {
1464  if(isbarrel && (*it).find("Barrel")==string::npos) continue;
1465  if(!isbarrel && (*it).find("Endcap")==string::npos) continue;
1466 
1467  if((*it).find("Module_")!=string::npos) continue;
1468  if((*it).find("Panel_")!=string::npos) continue;
1469  if((*it).find("Ladder_")!=string::npos) continue;
1470  if((*it).find("Blade_")!=string::npos) continue;
1471  if((*it).find("Layer_")!=string::npos) continue;
1472  if((*it).find("Disk_")!=string::npos) continue;
1473  bei->cd(*it);
1474  bookOccupancyPlots(bei, hiRes, isbarrel);
1475  if(!hiRes){
1476  //occupancyprinting cout<<"booking low res barrel occ plot now!"<<endl;
1477  OccupancyMap = bei->book2D((isbarrel?"barrelOccupancyMap":"endcapOccupancyMap"),"Barrel Digi Occupancy Map (4 pix per bin)",isbarrel?208:130,0.,isbarrel?416.:260.,80,0.,160.);
1478  }else{
1479  //occupancyprinting cout<<"booking high res barrel occ plot now!"<<endl;
1480  OccupancyMap = bei->book2D((isbarrel?"barrelOccupancyMap":"endcapOccupancyMap"),"Barrel Digi Occupancy Map (1 pix per bin)",isbarrel?416:260,0.,isbarrel?416.:260.,160,0.,160.);
1481  }
1482  OccupancyMap->setAxisTitle("Columns",1);
1483  OccupancyMap->setAxisTitle("Rows",2);
1484 
1485  bei->goUp();
1486 
1487  }
1488 
1489 
1490 
1491 }
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1221
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
void bookOccupancyPlots(DQMStore *bei, bool hiRes, bool isbarrel)
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:248
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:647
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 1493 of file SiPixelActionExecutor.cc.

References bookOccupancyPlots(), DQMStore::cd(), DQMStore::setCurrentFolder(), and Tier0Flag_.

1493  {
1494 
1495  if(Tier0Flag_) return;
1496  // Barrel
1497  bei->cd();
1498  bei->setCurrentFolder("Pixel");
1499  this->bookOccupancyPlots(bei, hiRes, true);
1500 
1501  // Endcap
1502  bei->cd();
1503  bei->setCurrentFolder("Pixel");
1504  this->bookOccupancyPlots(bei, hiRes, false);
1505 
1506 }
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
void bookOccupancyPlots(DQMStore *bei, bool hiRes, bool isbarrel)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
void SiPixelActionExecutor::bookTrackerMaps ( DQMStore bei,
std::string  name 
)

Definition at line 1579 of file SiPixelActionExecutor.cc.

References DQMStore::book2D(), NCyl, L1TEmulatorMonitor_cff::p, and DQMStore::setCurrentFolder().

1580 {
1581  bei->setCurrentFolder("Pixel/Barrel");
1582  std::string partB[] = { "Layer_1", "Layer_2", "Layer_3"};
1583  bei->book2D("TRKMAP_" + name + "_" + partB[0], "TRKMAP_" + name + "_" + partB[0], 20, 1., 21., 8, 1., 9.);
1584  bei->book2D("TRKMAP_" + name + "_" + partB[1], "TRKMAP_" + name + "_" + partB[1], 32, 1., 33., 8, 1., 9.);
1585  bei->book2D("TRKMAP_" + name + "_" + partB[2], "TRKMAP_" + name + "_" + partB[2], 44, 1., 45., 8, 1., 9.);
1586 
1587  bei->setCurrentFolder("Pixel/Endcap");
1588  std::string partE[] = { "Disc_1_M", "Disc_2_M", "Disc_1_P", "Disc_2_P" };
1589  for(Int_t p = 0 ; p < NCyl ; p++)
1590  bei->book2D("TRKMAP_" + name + "_" + partE[p], "TRKMAP_" + name + "_" + partE[p], 24, 1., 25., 7, 1., 8.);
1591 }
#define NCyl
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:647
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
void SiPixelActionExecutor::checkQTestResults ( DQMStore bei)

Definition at line 1887 of file SiPixelActionExecutor.cc.

References calib_type_, configParser_, ExpressReco_HICollisions_FallBack::errors, DQMStore::get(), SiPixelConfigParser::getCalibType(), DQMStore::getContents(), MonitorElement::getMean(), SiPixelUtility::getMEList(), SiPixelConfigParser::getMessageLimitForQTests(), MonitorElement::getName(), MonitorElement::getQErrors(), MonitorElement::getQWarnings(), MonitorElement::getRMS(), MonitorElement::hasWarning(), LogDebug, message_limit_, DQMStore::pwd(), MonitorElement::runQTests(), and ExpressReco_HICollisions_FallBack::warnings.

Referenced by SiPixelWebInterface::performAction().

1887  {
1888  //printing cout<<"Entering SiPixelActionExecutor::checkQTestResults..."<<endl;
1889 
1890  int messageCounter=0;
1891  string currDir = bei->pwd();
1892  vector<string> contentVec;
1893  bei->getContents(contentVec);
1895  // cout << calib_type_ << endl;
1897  for (vector<string>::iterator it = contentVec.begin();
1898  it != contentVec.end(); it++) {
1899  vector<string> contents;
1900  int nval = SiPixelUtility::getMEList((*it), contents);
1901  if (nval == 0) continue;
1902  for (vector<string>::const_iterator im = contents.begin();
1903  im != contents.end(); im++) {
1904 
1905  MonitorElement * me = bei->get((*im));
1906  if (me) {
1907  me->runQTests();
1908  // get all warnings associated with me
1909  vector<QReport*> warnings = me->getQWarnings();
1910  for(vector<QReport *>::const_iterator wi = warnings.begin();
1911  wi != warnings.end(); ++wi) {
1912  messageCounter++;
1913  if(messageCounter<message_limit_) {
1914  //edm::LogWarning("SiPixelQualityTester::checkTestResults") <<
1915  // " *** Warning for " << me->getName() <<
1916  // "," << (*wi)->getMessage() << "\n";
1917 
1918  edm::LogWarning("SiPixelActionExecutor::checkQTestResults") << " *** Warning for " << me->getName() << ","
1919  << (*wi)->getMessage() << " " << me->getMean()
1920  << " " << me->getRMS() << me->hasWarning()
1921  << endl;
1922  }
1923  }
1924  warnings=vector<QReport*>();
1925  // get all errors associated with me
1926  vector<QReport *> errors = me->getQErrors();
1927  for(vector<QReport *>::const_iterator ei = errors.begin();
1928  ei != errors.end(); ++ei) {
1929 
1930  float empty_mean = me->getMean();
1931  float empty_rms = me->getRMS();
1932  if((empty_mean != 0 && empty_rms != 0) || (calib_type_ == 0)){
1933  messageCounter++;
1934  if(messageCounter<=message_limit_) {
1935  //edm::LogError("SiPixelQualityTester::checkTestResults") <<
1936  // " *** Error for " << me->getName() <<
1937  // "," << (*ei)->getMessage() << "\n";
1938 
1939  edm::LogWarning("SiPixelActionExecutor::checkQTestResults") << " *** Error for " << me->getName() << ","
1940  << (*ei)->getMessage() << " " << me->getMean()
1941  << " " << me->getRMS()
1942  << endl;
1943  }
1944  }
1945  }
1946  errors=vector<QReport*>();
1947  }
1948  me=0;
1949  }
1950  nval=int(); contents=vector<string>();
1951  }
1952  LogDebug("SiPixelActionExecutor::checkQTestResults") <<"messageCounter: "<<messageCounter<<" , message_limit: "<<message_limit_<<endl;
1953  // if (messageCounter>=message_limit_)
1954  // edm::LogWarning("SiPixelActionExecutor::checkQTestResults") << "WARNING: too many QTest failures! Giving up after "<<message_limit_<<" messages."<<endl;
1955  contentVec=vector<string>(); currDir=string(); messageCounter=int();
1956  //printing cout<<"...leaving SiPixelActionExecutor::checkQTestResults!"<<endl;
1957 }
#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
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1270
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1299
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
const std::string & pwd(void) const
Definition: DQMStore.cc:209
void SiPixelActionExecutor::createEfficiency ( DQMStore bei)

Definition at line 2280 of file SiPixelActionExecutor.cc.

References DQMStore::cd(), and fillEfficiency().

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

2280  {
2281  //std::cout<<"entering SiPixelActionExecutor::createEfficiency..."<<std::endl;
2282  bei->cd();
2283  fillEfficiency(bei, true); // Barrel
2284  bei->cd();
2285  fillEfficiency(bei, false); // Endcap
2286  bei->cd();
2287  //std::cout<<"leaving SiPixelActionExecutor::createEfficiency..."<<std::endl;
2288 }
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
void fillEfficiency(DQMStore *bei, bool isbarrel)
void SiPixelActionExecutor::createLayout ( DQMStore bei)

Definition at line 1960 of file SiPixelActionExecutor.cc.

References DQMStore::cd(), configWriter_, SiPixelConfigWriter::createLayout(), SiPixelConfigWriter::createRow(), fillLayout(), DQMStore::getSubdirs(), DQMStore::goUp(), SiPixelConfigWriter::init(), AlCaRecoCosmics_cfg::name, and DQMStore::pwd().

1960  {
1961  if (configWriter_ == 0) {
1963  if (!configWriter_->init()) return;
1964  }
1965  string currDir = bei->pwd();
1966  if (currDir.find("Layer") != string::npos) {
1967  string name = "Default";
1968  configWriter_->createLayout(name);
1970  fillLayout(bei);
1971  } else {
1972  vector<string> subdirs = bei->getSubdirs();
1973  for (vector<string>::const_iterator it = subdirs.begin();
1974  it != subdirs.end(); it++) {
1975  bei->cd(*it);
1976  createLayout(bei);
1977  bei->goUp();
1978  }
1979  }
1980 }
bool init()
Write XML file.
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1221
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
void fillLayout(DQMStore *bei)
SiPixelConfigWriter * configWriter_
void createLayout(DQMStore *bei)
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:248
void createLayout(std::string &name)
const std::string & pwd(void) const
Definition: DQMStore.cc:209
int SiPixelActionExecutor::createMap ( Double_t  map[][NLev2][NLev3][NLev4],
std::string  type,
DQMStore bei,
funcType  ff,
bool  isBarrel 
)
private

Definition at line 1634 of file SiPixelActionExecutor.cc.

References DQMStore::cd(), getData(), DQMStore::getSubdirs(), i, j, gen::k, prof2calltree::l, Association::map, NLev4, and Tier0Flag_.

Referenced by createMaps().

1635 {
1636  // cout << "Starting with SiPixelActionExecutor::createMap" << endl;
1637  //int createMap(Double_t map[][NLev2][NLev3][NLev4], TString type, TDirectoryFile* dirMain, funcType ff){
1638  vector<string> dirLev1 = bei->getSubdirs();
1639  Int_t i = 0;
1640  for (vector<string>::const_iterator it = dirLev1.begin(); it != dirLev1.end(); it++) // goes over HalfCylinders in Endcap and over Shells in Barrel
1641  {
1642  //cout << "Current Directory: " << *it << endl;
1643  bei->cd(*it);
1644  vector<string> dirLev2 = bei->getSubdirs();
1645  Int_t j = 0;
1646  for (vector<string>::const_iterator it2 = dirLev2.begin(); it2 != dirLev2.end(); it2++) // goes over Disks in Endcap and over Layers in Barrel
1647  {
1648  //cout << "Current Directory: " << *it2 << endl;
1649  bei->cd(*it2);
1650  Int_t k = 0;
1651  vector<string> dirLev3 = bei->getSubdirs();
1652  for (vector<string>::const_iterator it3 = dirLev3.begin(); it3 != dirLev3.end(); it3++) // goes over Blades in Endcap and over Ladders in Barrel
1653  {
1654  //cout << "Current Directory: " << *it3 << endl;
1655  bei->cd(*it3);
1656  if(Tier0Flag_)
1657  for (Int_t l = 0; l < NLev4; l++)
1658  getData(map, type, bei, ff, i, j, k, l);
1659  else
1660  {
1661  Int_t l = 0;
1662  vector<string> dirLev4 = bei->getSubdirs();
1663  for (vector<string>::const_iterator it4 = dirLev4.begin(); it4 != dirLev4.end(); it4++)
1664  {
1665  // cout << "Current Directory: " << *it4 << endl;
1666  bei->cd(*it4);
1667  if (isBarrel)
1668  getData(map, type, bei, ff, i, j, k, l++);
1669  else
1670  {
1671  vector<string> dirLev5 = bei->getSubdirs();
1672  for (vector<string>::const_iterator it5 = dirLev5.begin(); it5 != dirLev5.end(); it5++)
1673  {
1674  // cout << "Current Directory: " << *it5 << endl;
1675  bei->cd(*it5);
1676  getData(map, type, bei, ff, i, j, k, l++);
1677  }
1678  }
1679  }
1680  }
1681  k++;
1682  }
1683  j++;
1684  }
1685  i++;
1686  }
1687 
1688  // cout << "Done with SiPixelActionExecutor::createMap" << endl;
1689  return 0;
1690 }
type
Definition: HCALResponse.h:22
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1221
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
dictionary map
Definition: Association.py:160
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)
tuple ff
Definition: createTree.py:204
#define NLev4
void SiPixelActionExecutor::createMaps ( DQMStore bei,
std::string  type,
std::string  name,
funcType  ff 
)

Definition at line 1594 of file SiPixelActionExecutor.cc.

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

1595 {
1596 // cout << "Starting with SiPixelActionExecutor::createMaps" << endl;
1597 
1598  Double_t mapB[NLev1][NLev2][NLev3][NLev4];
1599  bei->setCurrentFolder("Pixel/Barrel/");
1600  createMap(mapB, type, bei, ff, true);
1601  Double_t minB = mapMin(mapB, true);
1602  Double_t maxB = mapMax(mapB, true);
1603 
1604 
1605  Double_t mapE[NLev1][NLev2][NLev3][NLev4];
1606  bei->setCurrentFolder("Pixel/Endcap/");
1607  createMap(mapE, type, bei, ff, false);
1608  Double_t minE = mapMin(mapE, false);
1609  Double_t maxE = mapMax(mapE, false);
1610 
1611  Double_t min = minE<=minB?minE:minB;
1612  Double_t max = maxE>=maxB?maxE:maxB;
1613  if(!min)
1614  min = -0.01;
1615 
1616  // prephistosB(histB, mapB, type, min, max);
1617  // prephistosE(histE, mapE, type, min, max);
1618 
1619 
1620  MonitorElement* meB[NLayer];
1621  // TH2F* histB[NLayer];
1622  MonitorElement* meE[NLayer];
1623  // TH2F* histE[NCyl];
1624  bei->setCurrentFolder("Pixel/Barrel");
1625  prephistosB(meB, bei, mapB, name, min, max);
1626  bei->setCurrentFolder("Pixel/Endcap");
1627  prephistosE(meE, bei, mapE, name, min, max);
1628 
1629 // cout << "Done with SiPixelActionExecutor::createMaps" << endl;
1630 }
type
Definition: HCALResponse.h:22
#define NLev1
#define min(a, b)
Definition: mlp_lapack.h:161
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
tuple ff
Definition: createTree.py:204
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)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
#define NLev4
void SiPixelActionExecutor::createOccupancy ( DQMStore bei)

Definition at line 1508 of file SiPixelActionExecutor.cc.

References DQMStore::cd(), fillOccupancy(), and Tier0Flag_.

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

1508  {
1509  //std::cout<<"entering SiPixelActionExecutor::createOccupancy..."<<std::endl;
1510  if(Tier0Flag_) return;
1511  bei->cd();
1512  fillOccupancy(bei, true);
1513  bei->cd();
1514  fillOccupancy(bei, false);
1515  bei->cd();
1516  //std::cout<<"leaving SiPixelActionExecutor::createOccupancy..."<<std::endl;
1517 }
void fillOccupancy(DQMStore *bei, bool isbarrel)
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
void SiPixelActionExecutor::createSummary ( DQMStore bei)

Definition at line 171 of file SiPixelActionExecutor.cc.

References configParser_, configWriter_, gather_cfg::cout, fillFEDErrorSummary(), fillSummary(), DQMParserBase::getDocument(), SiPixelConfigParser::getMENamesForBarrelSummary(), SiPixelConfigParser::getMENamesForEndcapSummary(), SiPixelConfigParser::getMENamesForFEDErrorSummary(), SiPixelConfigParser::getSourceType(), offlineXMLfile_, DQMStore::setCurrentFolder(), and source_type_.

Referenced by SiPixelEDAClient::beginRun(), and SiPixelWebInterface::performAction().

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

References SiPixelTrackerMapCreator::create(), and offlineXMLfile_.

Referenced by SiPixelWebInterface::createTkMap().

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

Definition at line 2043 of file SiPixelActionExecutor.cc.

References DQMStore::cd(), gather_cfg::cout, ExpressReco_HICollisions_FallBack::detector, edm::EventSetup::get(), DQMStore::getMEs(), DQMStore::getSubdirs(), DQMStore::goUp(), sipixelobjects::ElectronicIndex::link, ndet_, edm::ESHandle< class >::product(), DQMStore::pwd(), and theCablingMap.

Referenced by dumpModIds().

2043  {
2044  string currDir = bei->pwd();
2045  string dir_name = "Ladder_";
2046  eSetup.get<SiPixelFedCablingMapRcd>().get(theCablingMap);
2047  int fedId=-1; int linkId=-1;
2048  if (currDir.find(dir_name) != string::npos) {
2049  vector<string> subdirs = bei->getSubdirs();
2050  for (vector<string>::const_iterator it = subdirs.begin();
2051  it != subdirs.end(); it++) {
2052  if ( (*it).find("Module_") == string::npos) continue;
2053  bei->cd(*it);
2054  ndet_++;
2055  // long version:
2056  //cout<<"Ndet: "<<ndet_<<" , Module: "<<bei->pwd();
2057  // short version:
2058  cout<<bei->pwd();
2059  vector<string> contents = bei->getMEs();
2060  bool first_me = false;
2061  int detId = -999;
2062  for (vector<string>::const_iterator im = contents.begin();
2063  im != contents.end(); im++) {
2064  if(first_me) break;
2065  string mEName = (*im);
2066  string detIdString = mEName.substr((mEName.find_last_of("_"))+1,9);
2067  std::istringstream isst;
2068  isst.str(detIdString);
2069  if(mEName.find("_3")!=string::npos) isst>>detId;
2070  }
2071  bei->goUp();
2072  // long version:
2073  //cout<<" , detector ID: "<<detId;
2074  // short version:
2075  cout<<" "<<detId;
2076  for(int fedid=0; fedid<=40; ++fedid){
2077  SiPixelFrameConverter converter(theCablingMap.product(),fedid);
2078  uint32_t newDetId = detId;
2079  if(converter.hasDetUnit(newDetId)){
2080  fedId=fedid;
2081  break;
2082  }
2083  }
2084  if(fedId==-1) continue;
2086  SiPixelFrameConverter formatter(theCablingMap.product(),fedId);
2087  sipixelobjects::DetectorIndex detector = {detId, 1, 1};
2088  formatter.toCabling(cabling,detector);
2089  linkId = cabling.link;
2090  // long version:
2091  //cout<<" , FED ID: "<<fedId<<" , Link ID: "<<linkId<<endl;
2092  // short version:
2093  cout<<" "<<fedId<<" "<<linkId<<endl;
2094  }
2095  } else {
2096  vector<string> subdirs = bei->getSubdirs();
2097  for (vector<string>::const_iterator it = subdirs.begin();
2098  it != subdirs.end(); it++) {
2099  if((*it).find("Endcap")!=string::npos) continue;
2100  bei->cd(*it);
2101  dumpBarrelModIds(bei,eSetup);
2102  bei->goUp();
2103  }
2104  }
2105 }
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1221
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
void dumpBarrelModIds(DQMStore *bei, edm::EventSetup const &eSetup)
edm::ESHandle< SiPixelFedCablingMap > theCablingMap
T const * product() const
Definition: ESHandle.h:62
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1244
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:248
tuple cout
Definition: gather_cfg.py:41
const std::string & pwd(void) const
Definition: DQMStore.cc:209
void SiPixelActionExecutor::dumpBarrelRefValues ( DQMStore bei,
edm::EventSetup const &  eSetup 
)

Definition at line 2188 of file SiPixelActionExecutor.cc.

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

Referenced by dumpRefValues().

2188  {
2189  MonitorElement* me;
2190  me = bei->get("Pixel/Barrel/SUMDIG_adc_Barrel");
2191  if(me){
2192  std::cout<<"SUMDIG_adc_Barrel: "<<std::endl;
2193  for(int i=1; i!=769; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2194  }
2195  me = bei->get("Pixel/Barrel/SUMDIG_ndigis_Barrel");
2196  if(me){
2197  std::cout<<"SUMDIG_ndigis_Barrel: "<<std::endl;
2198  for(int i=1; i!=769; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2199  }
2200  me = bei->get("Pixel/Barrel/SUMCLU_charge_Barrel");
2201  if(me){
2202  std::cout<<"SUMCLU_charge_Barrel: "<<std::endl;
2203  for(int i=1; i!=769; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2204  }
2205  me = bei->get("Pixel/Barrel/SUMCLU_nclusters_Barrel");
2206  if(me){
2207  std::cout<<"SUMCLU_nclusters_Barrel: "<<std::endl;
2208  for(int i=1; i!=769; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2209  }
2210  me = bei->get("Pixel/Barrel/SUMCLU_size_Barrel");
2211  if(me){
2212  std::cout<<"SUMCLU_size_Barrel: "<<std::endl;
2213  for(int i=1; i!=769; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2214  }
2215 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1270
double getBinContent(int binx) const
get content of bin (1-D)
tuple cout
Definition: gather_cfg.py:41
void SiPixelActionExecutor::dumpEndcapModIds ( DQMStore bei,
edm::EventSetup const &  eSetup 
)

Definition at line 2108 of file SiPixelActionExecutor.cc.

References DQMStore::cd(), gather_cfg::cout, ExpressReco_HICollisions_FallBack::detector, spr::find(), edm::EventSetup::get(), DQMStore::getMEs(), DQMStore::getSubdirs(), DQMStore::goUp(), sipixelobjects::ElectronicIndex::link, ndet_, edm::ESHandle< class >::product(), DQMStore::pwd(), and theCablingMap.

Referenced by dumpModIds().

2108  {
2109  string currDir = bei->pwd();
2110  string dir_name = "Panel_";
2111  eSetup.get<SiPixelFedCablingMapRcd>().get(theCablingMap);
2112  int fedId=-1; int linkId=-1;
2113  if (currDir.find(dir_name) != string::npos) {
2114  vector<string> subdirs = bei->getSubdirs();
2115  for (vector<string>::const_iterator it = subdirs.begin();
2116  it != subdirs.end(); it++) {
2117  if ( (*it).find("Module_") == string::npos) continue;
2118  bei->cd(*it);
2119  ndet_++;
2120  // long version:
2121  //cout<<"Ndet: "<<ndet_<<" , Module: "<<bei->pwd();
2122  // short version:
2123  cout<<bei->pwd();
2124  vector<string> contents = bei->getMEs();
2125  bool first_me = false;
2126  int detId = -999;
2127  for (vector<string>::const_iterator im = contents.begin();
2128  im != contents.end(); im++) {
2129  if(first_me) break;
2130  string mEName = (*im);
2131  string detIdString = mEName.substr((mEName.find_last_of("_"))+1,9);
2132  std::istringstream isst;
2133  isst.str(detIdString);
2134  if(mEName.find("_3")!=string::npos) isst>>detId;
2135  }
2136  bei->goUp();
2137  // long version:
2138  //cout<<" , detector ID: "<<detId;
2139  // short version:
2140  cout<<" "<<detId;
2141  for(int fedid=0; fedid<=40; ++fedid){
2142  SiPixelFrameConverter converter(theCablingMap.product(),fedid);
2143  uint32_t newDetId = detId;
2144  if(converter.hasDetUnit(newDetId)){
2145  fedId=fedid;
2146  break;
2147  }
2148  }
2149  if(fedId==-1) continue;
2151  SiPixelFrameConverter formatter(theCablingMap.product(),fedId);
2152  sipixelobjects::DetectorIndex detector = {detId, 1, 1};
2153  formatter.toCabling(cabling,detector);
2154  linkId = cabling.link;
2155  // long version:
2156  //cout<<" , FED ID: "<<fedId<<" , Link ID: "<<linkId<<endl;
2157  // short version:
2158  cout<<" "<<fedId<<" "<<linkId<<endl;
2159  }
2160  } else {
2161  vector<string> subdirs = bei->getSubdirs();
2162  for (vector<string>::const_iterator it = subdirs.begin();
2163  it != subdirs.end(); it++) {
2164  if((bei->pwd()).find("Barrel")!=string::npos) bei->goUp();
2165  bei->cd((*it));
2166  if((*it).find("Barrel")!=string::npos) continue;
2167  dumpEndcapModIds(bei,eSetup);
2168  bei->goUp();
2169  }
2170  }
2171 
2172 }
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1221
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
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:62
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1244
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:248
tuple cout
Definition: gather_cfg.py:41
const std::string & pwd(void) const
Definition: DQMStore.cc:209
void SiPixelActionExecutor::dumpEndcapRefValues ( DQMStore bei,
edm::EventSetup const &  eSetup 
)

Definition at line 2218 of file SiPixelActionExecutor.cc.

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

Referenced by dumpRefValues().

2218  {
2219  MonitorElement* me;
2220  me = bei->get("Pixel/Endcap/SUMDIG_adc_Endcap");
2221  if(me){
2222  std::cout<<"SUMDIG_adc_Endcap: "<<std::endl;
2223  for(int i=1; i!=673; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2224  }
2225  me = bei->get("Pixel/Endcap/SUMDIG_ndigis_Endcap");
2226  if(me){
2227  std::cout<<"SUMDIG_ndigis_Endcap: "<<std::endl;
2228  for(int i=1; i!=673; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2229  }
2230  me = bei->get("Pixel/Endcap/SUMCLU_charge_Endcap");
2231  if(me){
2232  std::cout<<"SUMCLU_charge_Endcap: "<<std::endl;
2233  for(int i=1; i!=673; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2234  }
2235  me = bei->get("Pixel/Endcap/SUMCLU_nclusters_Endcap");
2236  if(me){
2237  std::cout<<"SUMCLU_nclusters_Endcap: "<<std::endl;
2238  for(int i=1; i!=673; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2239  }
2240  me = bei->get("Pixel/Endcap/SUMCLU_size_Endcap");
2241  if(me){
2242  std::cout<<"SUMCLU_size_Endcap: "<<std::endl;
2243  for(int i=1; i!=673; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2244  }
2245 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1270
double getBinContent(int binx) const
get content of bin (1-D)
tuple cout
Definition: gather_cfg.py:41
void SiPixelActionExecutor::dumpModIds ( DQMStore bei,
edm::EventSetup const &  eSetup 
)

Definition at line 2031 of file SiPixelActionExecutor.cc.

References DQMStore::cd(), dumpBarrelModIds(), and dumpEndcapModIds().

2031  {
2032  //printing cout<<"Going to dump module IDs now!"<<endl;
2033  bei->cd();
2034  dumpBarrelModIds(bei,eSetup);
2035  bei->cd();
2036  dumpEndcapModIds(bei,eSetup);
2037  bei->cd();
2038  //printing cout<<"Done dumping module IDs!"<<endl;
2039 }
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
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 2176 of file SiPixelActionExecutor.cc.

References DQMStore::cd(), dumpBarrelRefValues(), and dumpEndcapRefValues().

2176  {
2177  //printing cout<<"Going to dump module IDs now!"<<endl;
2178  bei->cd();
2179  dumpBarrelRefValues(bei,eSetup);
2180  bei->cd();
2181  dumpEndcapRefValues(bei,eSetup);
2182  bei->cd();
2183  //printing cout<<"Done dumping module IDs!"<<endl;
2184 }
void dumpBarrelRefValues(DQMStore *bei, edm::EventSetup const &eSetup)
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
void dumpEndcapRefValues(DQMStore *bei, edm::EventSetup const &eSetup)
void SiPixelActionExecutor::fillDeviations ( DQMStore bei)
private

Definition at line 251 of file SiPixelActionExecutor.cc.

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

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

Definition at line 2292 of file SiPixelActionExecutor.cc.

References DQMStore::cd(), DQMStore::get(), MonitorElement::getEntries(), DQMStore::getMEs(), DQMStore::getSubdirs(), DQMStore::goUp(), HitEfficiency_Dm1, HitEfficiency_Dm2, HitEfficiency_Dp1, HitEfficiency_Dp2, HitEfficiency_L1, HitEfficiency_L2, HitEfficiency_L3, DQMStore::pwd(), MonitorElement::setBinContent(), and Tier0Flag_.

Referenced by createEfficiency().

2292  {
2293  //cout<<"entering SiPixelActionExecutor::fillEfficiency..."<<std::endl;
2294  string currDir = bei->pwd();
2295  string dname = currDir.substr(currDir.find_last_of("/")+1);
2296  //cout<<"currDir= "<<currDir<< " , dname= "<<dname<<std::endl;
2297 
2298  if(Tier0Flag_){ // Offline
2299  if(isbarrel && dname.find("Ladder_")!=string::npos){
2300  vector<string> meVec = bei->getMEs();
2301  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2302  string full_path = currDir + "/" + (*it);
2303  if(full_path.find("missing_")!=string::npos){ // If we have missing hits ME
2304  MonitorElement * me = bei->get(full_path);
2305  if (!me) continue;
2306  float missingHits = me->getEntries();
2307  //if(currDir.find("Barrel/Shell_mI/Layer_1/Ladder_09F")!=string::npos) cout<<"missingHits= "<<missingHits<<endl;
2308  string new_path = full_path.replace(full_path.find("missing"),7,"valid");
2309  me = bei->get(new_path);
2310  if (!me) continue;
2311  float validHits = me->getEntries();
2312  //if(currDir.find("Barrel/Shell_mI/Layer_1/Ladder_09F")!=string::npos) cout<<"validHits= "<<validHits<<endl;
2313  float hitEfficiency = -1.;
2314  if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2315  //if(currDir.find("Barrel/Shell_mI/Layer_1/Ladder_09F")!=string::npos) cout<<"hitEfficiency= "<<hitEfficiency<<endl;
2316  int binx = 0; int biny = 0;
2317  if(currDir.find("Shell_m")!=string::npos){ binx = 1;}else{ binx = 2;}
2318  if(dname.find("01")!=string::npos){ biny = 1;}else if(dname.find("02")!=string::npos){ biny = 2;}
2319  else if(dname.find("03")!=string::npos){ biny = 3;}else if(dname.find("04")!=string::npos){ biny = 4;}
2320  else if(dname.find("05")!=string::npos){ biny = 5;}else if(dname.find("06")!=string::npos){ biny = 6;}
2321  else if(dname.find("07")!=string::npos){ biny = 7;}else if(dname.find("08")!=string::npos){ biny = 8;}
2322  else if(dname.find("09")!=string::npos){ biny = 9;}else if(dname.find("10")!=string::npos){ biny = 10;}
2323  else if(dname.find("11")!=string::npos){ biny = 11;}else if(dname.find("12")!=string::npos){ biny = 12;}
2324  else if(dname.find("13")!=string::npos){ biny = 13;}else if(dname.find("14")!=string::npos){ biny = 14;}
2325  else if(dname.find("15")!=string::npos){ biny = 15;}else if(dname.find("16")!=string::npos){ biny = 16;}
2326  else if(dname.find("17")!=string::npos){ biny = 17;}else if(dname.find("18")!=string::npos){ biny = 18;}
2327  else if(dname.find("19")!=string::npos){ biny = 19;}else if(dname.find("20")!=string::npos){ biny = 20;}
2328  else if(dname.find("21")!=string::npos){ biny = 21;}else if(dname.find("22")!=string::npos){ biny = 22;}
2329  if(currDir.find("Shell_mO")!=string::npos || currDir.find("Shell_pO")!=string::npos){
2330  if(currDir.find("Layer_1")!=string::npos){ biny = biny + 10;}
2331  else if(currDir.find("Layer_2")!=string::npos){ biny = biny + 16;}
2332  else if(currDir.find("Layer_3")!=string::npos){ biny = biny + 22;}
2333  }
2334  if(currDir.find("Layer_1")!=string::npos){
2335  HitEfficiency_L1 = bei->get("Pixel/Barrel/HitEfficiency_L1");
2336  if(HitEfficiency_L1) HitEfficiency_L1->setBinContent(binx, biny,(float)hitEfficiency);
2337  //if(currDir.find("Barrel/Shell_mI/Layer_1/Ladder_09F")!=string::npos) cout<<"setting bin ("<<binx<<","<<biny<<") with "<<(float)hitEfficiency<<endl;
2338  }else if(currDir.find("Layer_2")!=string::npos){
2339  HitEfficiency_L2 = bei->get("Pixel/Barrel/HitEfficiency_L2");
2340  if(HitEfficiency_L2) HitEfficiency_L2->setBinContent(binx, biny,(float)hitEfficiency);
2341  }else if(currDir.find("Layer_3")!=string::npos){
2342  HitEfficiency_L3 = bei->get("Pixel/Barrel/HitEfficiency_L3");
2343  if(HitEfficiency_L3) HitEfficiency_L3->setBinContent(binx, biny,(float)hitEfficiency);
2344  }
2345  }
2346  }
2347  }else if(!isbarrel && dname.find("Blade_")!=string::npos){
2348  vector<string> meVec = bei->getMEs();
2349  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2350  string full_path = currDir + "/" + (*it);
2351  if(full_path.find("missing_")!=string::npos){ // If we have missing hits ME
2352  MonitorElement * me = bei->get(full_path);
2353  if (!me) continue;
2354  float missingHits = me->getEntries();
2355  string new_path = full_path.replace(full_path.find("missing"),7,"valid");
2356  me = bei->get(new_path);
2357  if (!me) continue;
2358  float validHits = me->getEntries();
2359  float hitEfficiency = -1.;
2360  if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2361  int binx = 0; int biny = 1;
2362  if(currDir.find("01")!=string::npos){ binx = 1;}else if(currDir.find("02")!=string::npos){ binx = 2;}
2363  else if(currDir.find("03")!=string::npos){ binx = 3;}else if(currDir.find("04")!=string::npos){ binx = 4;}
2364  else if(currDir.find("05")!=string::npos){ binx = 5;}else if(currDir.find("06")!=string::npos){ binx = 6;}
2365  else if(currDir.find("07")!=string::npos){ binx = 7;}else if(currDir.find("08")!=string::npos){ binx = 8;}
2366  else if(currDir.find("09")!=string::npos){ binx = 9;}else if(currDir.find("10")!=string::npos){ binx = 10;}
2367  else if(currDir.find("11")!=string::npos){ binx = 11;}else if(currDir.find("12")!=string::npos){ binx = 12;}
2368  if(currDir.find("HalfCylinder_mI")!=string::npos || currDir.find("HalfCylinder_pI")!=string::npos){ binx = binx + 12;}
2369  else{
2370  if(binx==1) binx = 12;
2371  else if(binx==2) binx = 11;
2372  else if(binx==3) binx = 10;
2373  else if(binx==4) binx = 9;
2374  else if(binx==5) binx = 8;
2375  else if(binx==6) binx = 7;
2376  else if(binx==7) binx = 6;
2377  else if(binx==8) binx = 5;
2378  else if(binx==9) binx = 4;
2379  else if(binx==10) binx = 3;
2380  else if(binx==11) binx = 2;
2381  else if(binx==12) binx = 1;
2382  }
2383  if(currDir.find("Disk_1")!=string::npos && currDir.find("HalfCylinder_m")!=string::npos){
2384  HitEfficiency_Dm1 = bei->get("Pixel/Endcap/HitEfficiency_Dm1");
2385  if(HitEfficiency_Dm1) HitEfficiency_Dm1->setBinContent(binx, biny, (float)hitEfficiency);
2386  }else if(currDir.find("Disk_2")!=string::npos && currDir.find("HalfCylinder_m")!=string::npos){
2387  HitEfficiency_Dm2 = bei->get("Pixel/Endcap/HitEfficiency_Dm2");
2388  if(HitEfficiency_Dm2) HitEfficiency_Dm2->setBinContent(binx, biny, (float)hitEfficiency);
2389  }else if(currDir.find("Disk_1")!=string::npos && currDir.find("HalfCylinder_p")!=string::npos){
2390  HitEfficiency_Dp1 = bei->get("Pixel/Endcap/HitEfficiency_Dp1");
2391  if(HitEfficiency_Dp1) HitEfficiency_Dp1->setBinContent(binx, biny, (float)hitEfficiency);
2392  }else if(currDir.find("Disk_2")!=string::npos && currDir.find("HalfCylinder_p")!=string::npos){
2393  HitEfficiency_Dp2 = bei->get("Pixel/Endcap/HitEfficiency_Dp2");
2394  if(HitEfficiency_Dp2) HitEfficiency_Dp2->setBinContent(binx, biny, (float)hitEfficiency);
2395  }
2396  //std::cout<<"EFFI: "<<currDir<<" , x: "<<binx<<" , y: "<<biny<<std::endl;
2397  }
2398  }
2399  }else{
2400  //cout<<"finding subdirs now"<<std::endl;
2401  vector<string> subdirs = bei->getSubdirs();
2402  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
2403  bei->cd(*it);
2404  //cout<<"now I am in "<<bei->pwd()<<std::endl;
2405  if(*it != "Pixel" && ((isbarrel && (*it).find("Barrel")==string::npos) || (!isbarrel && (*it).find("Endcap")==string::npos))) continue;
2406  //cout<<"calling myself again "<<std::endl;
2407  fillEfficiency(bei, isbarrel);
2408  bei->goUp();
2409  }
2410  }
2411  }else{ // Online
2412  if(dname.find("Module_")!=string::npos){
2413  vector<string> meVec = bei->getMEs();
2414  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2415  string full_path = currDir + "/" + (*it);
2416  if(full_path.find("missing_")!=string::npos){ // If we have missing hits ME
2417  MonitorElement * me = bei->get(full_path);
2418  if (!me) continue;
2419  float missingHits = me->getEntries();
2420  string new_path = full_path.replace(full_path.find("missing"),7,"valid");
2421  me = bei->get(new_path);
2422  if (!me) continue;
2423  float validHits = me->getEntries();
2424  float hitEfficiency = -1.;
2425  if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2426  int binx = 0; int biny = 0;
2427  if(isbarrel){
2428  if(currDir.find("Shell_m")!=string::npos){
2429  if(currDir.find("Module_4")!=string::npos){ binx = 1;}else if(currDir.find("Module_3")!=string::npos){ binx = 2;}
2430  if(currDir.find("Module_2")!=string::npos){ binx = 3;}else if(currDir.find("Module_1")!=string::npos){ binx = 4;}
2431  }else if(currDir.find("Shell_p")!=string::npos){
2432  if(currDir.find("Module_1")!=string::npos){ binx = 5;}else if(currDir.find("Module_2")!=string::npos){ binx = 6;}
2433  if(currDir.find("Module_3")!=string::npos){ binx = 7;}else if(currDir.find("Module_4")!=string::npos){ binx = 8;}
2434  }
2435  if(currDir.find("01")!=string::npos){ biny = 1;}else if(currDir.find("02")!=string::npos){ biny = 2;}
2436  else if(currDir.find("03")!=string::npos){ biny = 3;}else if(currDir.find("04")!=string::npos){ biny = 4;}
2437  else if(currDir.find("05")!=string::npos){ biny = 5;}else if(currDir.find("06")!=string::npos){ biny = 6;}
2438  else if(currDir.find("07")!=string::npos){ biny = 7;}else if(currDir.find("08")!=string::npos){ biny = 8;}
2439  else if(currDir.find("09")!=string::npos){ biny = 9;}else if(currDir.find("10")!=string::npos){ biny = 10;}
2440  else if(currDir.find("11")!=string::npos){ biny = 11;}else if(currDir.find("12")!=string::npos){ biny = 12;}
2441  else if(currDir.find("13")!=string::npos){ biny = 13;}else if(currDir.find("14")!=string::npos){ biny = 14;}
2442  else if(currDir.find("15")!=string::npos){ biny = 15;}else if(currDir.find("16")!=string::npos){ biny = 16;}
2443  else if(currDir.find("17")!=string::npos){ biny = 17;}else if(currDir.find("18")!=string::npos){ biny = 18;}
2444  else if(currDir.find("19")!=string::npos){ biny = 19;}else if(currDir.find("20")!=string::npos){ biny = 20;}
2445  else if(currDir.find("21")!=string::npos){ biny = 21;}else if(currDir.find("22")!=string::npos){ biny = 22;}
2446  if(currDir.find("Shell_mO")!=string::npos || currDir.find("Shell_pO")!=string::npos){
2447  if(currDir.find("Layer_1")!=string::npos){ biny = biny + 10;}
2448  else if(currDir.find("Layer_2")!=string::npos){ biny = biny + 16;}
2449  else if(currDir.find("Layer_3")!=string::npos){ biny = biny + 22;}
2450  }
2451  }else{
2452  if(currDir.find("01")!=string::npos){ binx = 1;}else if(currDir.find("02")!=string::npos){ binx = 2;}
2453  else if(currDir.find("03")!=string::npos){ binx = 3;}else if(currDir.find("04")!=string::npos){ binx = 4;}
2454  else if(currDir.find("05")!=string::npos){ binx = 5;}else if(currDir.find("06")!=string::npos){ binx = 6;}
2455  else if(currDir.find("07")!=string::npos){ binx = 7;}else if(currDir.find("08")!=string::npos){ binx = 8;}
2456  else if(currDir.find("09")!=string::npos){ binx = 9;}else if(currDir.find("10")!=string::npos){ binx = 10;}
2457  else if(currDir.find("11")!=string::npos){ binx = 11;}else if(currDir.find("12")!=string::npos){ binx = 12;}
2458  if(currDir.find("HalfCylinder_mO")!=string::npos || currDir.find("HalfCylinder_pO")!=string::npos){ binx = binx + 12;}
2459  if(currDir.find("Panel_1/Module_1")!=string::npos){ biny = 1;}else if(currDir.find("Panel_2/Module_1")!=string::npos){ biny = 2;}
2460  else if(currDir.find("Panel_1/Module_2")!=string::npos){ biny = 3;}else if(currDir.find("Panel_2/Module_2")!=string::npos){ biny = 4;}
2461  else if(currDir.find("Panel_1/Module_3")!=string::npos){ biny = 5;}else if(currDir.find("Panel_2/Module_3")!=string::npos){ biny = 6;}
2462  else if(currDir.find("Panel_1/Module_4")!=string::npos){ biny = 7;}
2463  }
2464 
2465  if(currDir.find("Layer_1")!=string::npos){
2466  HitEfficiency_L1 = bei->get("Pixel/Barrel/HitEfficiency_L1");
2467  if(HitEfficiency_L1) HitEfficiency_L1->setBinContent(binx, biny,(float)hitEfficiency);
2468  }else if(currDir.find("Layer_2")!=string::npos){
2469  HitEfficiency_L2 = bei->get("Pixel/Barrel/HitEfficiency_L2");
2470  if(HitEfficiency_L2) HitEfficiency_L2->setBinContent(binx, biny,(float)hitEfficiency);
2471  }else if(currDir.find("Layer_3")!=string::npos){
2472  HitEfficiency_L3 = bei->get("Pixel/Barrel/HitEfficiency_L3");
2473  if(HitEfficiency_L3) HitEfficiency_L3->setBinContent(binx, biny,(float)hitEfficiency);
2474  }else if(currDir.find("Disk_1")!=string::npos && currDir.find("HalfCylinder_m")!=string::npos){
2475  HitEfficiency_Dm1 = bei->get("Pixel/Endcap/HitEfficiency_Dm1");
2476  if(HitEfficiency_Dm1) HitEfficiency_Dm1->setBinContent(binx, biny,(float)hitEfficiency);
2477  }else if(currDir.find("Disk_2")!=string::npos && currDir.find("HalfCylinder_m")!=string::npos){
2478  HitEfficiency_Dm2 = bei->get("Pixel/Endcap/HitEfficiency_Dm2");
2479  if(HitEfficiency_Dm2) HitEfficiency_Dm2->setBinContent(binx, biny,(float)hitEfficiency);
2480  }else if(currDir.find("Disk_1")!=string::npos && currDir.find("HalfCylinder_p")!=string::npos){
2481  HitEfficiency_Dp1 = bei->get("Pixel/Endcap/HitEfficiency_Dp1");
2482  if(HitEfficiency_Dp1) HitEfficiency_Dp1->setBinContent(binx, biny,(float)hitEfficiency);
2483  }else if(currDir.find("Disk_2")!=string::npos && currDir.find("HalfCylinder_p")!=string::npos){
2484  HitEfficiency_Dp2 = bei->get("Pixel/Endcap/HitEfficiency_Dp2");
2485  if(HitEfficiency_Dp2) HitEfficiency_Dp2->setBinContent(binx, biny,(float)hitEfficiency);
2486  }
2487  }
2488  }
2489  }else{
2490  //cout<<"finding subdirs now"<<std::endl;
2491  vector<string> subdirs = bei->getSubdirs();
2492  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
2493  bei->cd(*it);
2494  //cout<<"now I am in "<<bei->pwd()<<std::endl;
2495  if(*it != "Pixel" && ((isbarrel && (*it).find("Barrel")==string::npos) || (!isbarrel && (*it).find("Endcap")==string::npos))) continue;
2496  //cout<<"calling myself again "<<std::endl;
2497  fillEfficiency(bei, isbarrel);
2498  bei->goUp();
2499  }
2500  }
2501  } // end online/offline
2502 
2503  //cout<<"leaving SiPixelActionExecutor::fillEfficiency..."<<std::endl;
2504 
2505 }
void setBinContent(int binx, double content)
set content of bin (1-D)
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1221
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
MonitorElement * HitEfficiency_L3
void fillEfficiency(DQMStore *bei, bool isbarrel)
MonitorElement * HitEfficiency_Dm2
double getEntries(void) const
get # of entries
MonitorElement * HitEfficiency_L2
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1270
MonitorElement * HitEfficiency_L1
MonitorElement * HitEfficiency_Dp1
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1244
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:248
MonitorElement * HitEfficiency_Dp2
MonitorElement * HitEfficiency_Dm1
const std::string & pwd(void) const
Definition: DQMStore.cc:209
void SiPixelActionExecutor::fillFEDErrorSummary ( DQMStore bei,
std::string  dir_name,
std::vector< std::string > &  me_names 
)
private

Definition at line 739 of file SiPixelActionExecutor.cc.

References DQMStore::book2D(), DQMStore::cd(), spr::find(), DQMStore::get(), MonitorElement::getBinContent(), MonitorElement::getEntries(), getFEDSummaryME(), MonitorElement::getIntValue(), MonitorElement::getMean(), DQMStore::getMEs(), DQMStore::getSubdirs(), DQMStore::goUp(), i, isum, n, prof2calltree::prefix, DQMStore::pwd(), MonitorElement::setBinContent(), MonitorElement::setBinLabel(), source_type_, GlobalPosition_Frontier_DevDB_cff::tag, cond::rpcobtemp::temp, and indexGen::title.

Referenced by createSummary().

741  {
742  //printing cout<<"entering SiPixelActionExecutor::fillFEDErrorSummary..."<<endl;
743  string currDir = bei->pwd();
744  string prefix;
745  if(source_type_==0) prefix="SUMRAW";
746  else if(source_type_==20) prefix="SUMOFF";
747 
748  if (currDir.find(dir_name) != string::npos) {
749  vector<MonitorElement*> sum_mes;
750  for (vector<string>::const_iterator iv = me_names.begin();
751  iv != me_names.end(); iv++) {
752  if(source_type_==5||source_type_==6){
753  if((*iv)=="errorType"||(*iv)=="NErrors"||(*iv)=="fullType"||(*iv)=="chanNmbr"||
754  (*iv)=="TBMType"||(*iv)=="EvtNbr"||(*iv)=="evtSize"||(*iv)=="linkId"||
755  (*iv)=="ROCId"||(*iv)=="DCOLId"||(*iv)=="PXId"||(*iv)=="ROCNmbr"||
756  (*iv)=="TBMMessage"||(*iv)=="Type36Hitmap"||
757  (*iv)=="FedChLErrArray"||(*iv)=="FedChNErrArray"||(*iv)=="FedETypeNErrArray")
758  prefix="SUMRAW";
759  }
760  if((*iv)=="errorType"||(*iv)=="NErrors"||(*iv)=="fullType"||(*iv)=="chanNmbr"||
761  (*iv)=="TBMType"||(*iv)=="EvtNbr"||(*iv)=="evtSize"||(*iv)=="linkId"||
762  (*iv)=="ROCId"||(*iv)=="DCOLId"||(*iv)=="PXId"||(*iv)=="ROCNmbr"||
763  (*iv)=="TBMMessage"||(*iv)=="Type36Hitmap"){
764  string tag = prefix + "_" + (*iv) + "_FEDErrors";
765  MonitorElement* temp = getFEDSummaryME(bei, tag);
766  sum_mes.push_back(temp);
767  }else if((*iv)=="FedChLErrArray"||(*iv)=="FedChNErrArray"||(*iv)=="FedETypeNErrArray"){
768  string tag = prefix + "_" + (*iv);
770  if((*iv)=="FedChLErrArray") temp = bei->book2D("FedChLErrArray","Type of last error",40,-0.5,39.5,37,0.,37.);
771  if((*iv)=="FedChNErrArray") temp = bei->book2D("FedChNErrArray","Total number of errors",40,-0.5,39.5,37,0.,37.);
772  if((*iv)=="FedETypeNErrArray"){
773  temp = bei->book2D("FedETypeNErrArray","Number of each error type",40,-0.5,39.5,21,0.,21.);
774  temp->setBinLabel(1,"ROC of 25",2);
775  temp->setBinLabel(2,"Gap word",2);
776  temp->setBinLabel(3,"Dummy word",2);
777  temp->setBinLabel(4,"FIFO full",2);
778  temp->setBinLabel(5,"Timeout",2);
779  temp->setBinLabel(6,"Stack full",2);
780  temp->setBinLabel(7,"Pre-cal issued",2);
781  temp->setBinLabel(8,"Trigger clear or sync",2);
782  temp->setBinLabel(9,"No token bit",2);
783  temp->setBinLabel(10,"Overflow",2);
784  temp->setBinLabel(11,"FSM error",2);
785  temp->setBinLabel(12,"Invalid #ROCs",2);
786  temp->setBinLabel(13,"Event number",2);
787  temp->setBinLabel(14,"Slink header",2);
788  temp->setBinLabel(15,"Slink trailer",2);
789  temp->setBinLabel(16,"Event size",2);
790  temp->setBinLabel(17,"Invalid channel#",2);
791  temp->setBinLabel(18,"ROC value",2);
792  temp->setBinLabel(19,"Dcol or pixel value",2);
793  temp->setBinLabel(20,"Readout order",2);
794  temp->setBinLabel(21,"CRC error",2);
795  }
796  sum_mes.push_back(temp);
797  }
798  }
799  if (sum_mes.size() == 0) {
800  edm::LogInfo("SiPixelActionExecutor") << " Summary MEs can not be created" << "\n" ;
801  return;
802  }
803  vector<string> subdirs = bei->getSubdirs();
804  int ndet = 0;
805  for (vector<string>::const_iterator it = subdirs.begin();
806  it != subdirs.end(); it++) {
807  if ( (*it).find("FED_") == string::npos) continue;
808  bei->cd(*it);
809  string fedid = (*it).substr((*it).find("_")+1);
810  std::istringstream isst;
811  isst.str(fedid);
812  isst>>ndet; ndet++;
813  vector<string> contents = bei->getMEs();
814 
815  for (vector<MonitorElement*>::const_iterator isum = sum_mes.begin();
816  isum != sum_mes.end(); isum++) {
817  for (vector<string>::const_iterator im = contents.begin();
818  im != contents.end(); im++) {
819  if(((*im).find("FedChNErrArray_")!=std::string::npos && (*isum)->getName().find("FedChNErrArray")!=std::string::npos) ||
820  ((*im).find("FedChLErrArray_")!=std::string::npos && (*isum)->getName().find("FedChLErrArray")!=std::string::npos) ||
821  ((*im).find("FedETypeNErrArray_")!=std::string::npos && (*isum)->getName().find("FedETypeNErrArray")!=std::string::npos)){
822  string fullpathname = bei->pwd() + "/" + (*im);
823  MonitorElement * me = bei->get(fullpathname);
824  if(me && me->getIntValue()>0){
825  for(int i=0; i!=37; i++){
826  int n = (*im).find("_"); n++;
827  string channel_str = (*im).substr(n);
828  std::istringstream jsst;
829  jsst.str(channel_str);
830  int channel=-1;
831  jsst>>channel;
832  if(channel==i){
833  if((*im).find("FedETypeNErrArray_")!=std::string::npos && i<21) (*isum)->Fill(ndet-1,i,me->getIntValue());
834  else (*isum)->Fill(ndet-1,i,me->getIntValue());
835  }
836  }
837  }
838  }
839  string sname = ((*isum)->getName());
840  string tname = " ";
841  tname = sname.substr(7,(sname.find("_",7)-6));
842  if (((*im)).find(tname) == 0) {
843  string fullpathname = bei->pwd() + "/" + (*im);
844  MonitorElement * me = bei->get(fullpathname);
845 
846  if (me){
847  if(me->getMean()>0.){
848  if (sname.find("_NErrors_")!=string::npos){
849  string path1 = fullpathname;
850  path1 = path1.replace(path1.find("NErrors"),7,"errorType");
851  MonitorElement * me1 = bei->get(path1);
852  bool notReset=true;
853  if(me1){
854  for(int jj=1; jj<16; jj++){
855  if(me1->getBinContent(jj)>0.){
856  if(jj==6){ //errorType=30 (reset)
857  string path2 = path1;
858  path2 = path2.replace(path2.find("errorType"),9,"TBMMessage");
859  MonitorElement * me2 = bei->get(path2);
860  if(me2) if(me2->getBinContent(6)>0. || me2->getBinContent(7)>0.) notReset=false;
861  }
862  }
863  }
864  }
865  if(notReset) (*isum)->setBinContent(ndet, (*isum)->getBinContent(ndet) + me1->getEntries());
866  }else (*isum)->setBinContent(ndet, (*isum)->getBinContent(ndet) + me->getEntries());
867  }
868  (*isum)->setAxisTitle("FED #",1);
869  string title = " ";
870  title = sname.substr(7,(sname.find("_",7)-7)) + " per FED";
871  (*isum)->setAxisTitle(title,2);
872  }
873  break;
874  }
875  }
876  }
877  bei->goUp();
878  }
879  } else {
880  vector<string> subdirs = bei->getSubdirs();
881  for (vector<string>::const_iterator it = subdirs.begin();
882  it != subdirs.end(); it++) {
883  if((*it).find("Endcap")!=string::npos ||
884  (*it).find("Barrel")!=string::npos) continue;
885  bei->cd(*it);
886  fillFEDErrorSummary(bei, dir_name, me_names);
887  bei->goUp();
888  }
889  }
890  //printing cout<<"...leaving SiPixelActionExecutor::fillFEDErrorSummary!"<<endl;
891 }
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1221
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
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
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1270
int64_t getIntValue(void) const
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1244
double getBinContent(int binx) const
get content of bin (1-D)
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:248
MonitorElement * getFEDSummaryME(DQMStore *bei, std::string me_name)
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:647
void fillFEDErrorSummary(DQMStore *bei, std::string dir_name, std::vector< std::string > &me_names)
const std::string & pwd(void) const
Definition: DQMStore.cc:209
void SiPixelActionExecutor::fillGrandBarrelSummaryHistos ( DQMStore bei,
std::vector< std::string > &  me_names 
)
private

Definition at line 895 of file SiPixelActionExecutor.cc.

References DQMStore::cd(), DQMStore::get(), MonitorElement::getBinContent(), getGrandSummaryME(), DQMStore::getMEs(), MonitorElement::getName(), DQMStore::getSubdirs(), MonitorElement::getTH1F(), DQMStore::goUp(), gen::k, prof2calltree::prefix, DQMStore::pwd(), source_type_, and indexGen::title.

Referenced by fillSummary().

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

Definition at line 1122 of file SiPixelActionExecutor.cc.

References DQMStore::cd(), DQMStore::get(), MonitorElement::getBinContent(), getGrandSummaryME(), DQMStore::getMEs(), MonitorElement::getName(), DQMStore::getSubdirs(), MonitorElement::getTH1F(), DQMStore::goUp(), gen::k, prof2calltree::prefix, DQMStore::pwd(), source_type_, and indexGen::title.

Referenced by fillSummary().

1123  {
1124  //printing cout<<"Entering SiPixelActionExecutor::fillGrandEndcapSummaryHistos..."<<endl;
1125  vector<MonitorElement*> gsum_mes;
1126  string currDir = bei->pwd();
1127  string path_name = bei->pwd();
1128  string dir_name = path_name.substr(path_name.find_last_of("/")+1);
1129  if ((dir_name.find("DQMData") == 0) ||
1130  (dir_name.find("Pixel") == 0) ||
1131  (dir_name.find("AdditionalPixelErrors") == 0) ||
1132  (dir_name.find("Barrel") == 0) ||
1133  (dir_name.find("Shell") == 0) ||
1134  (dir_name.find("Layer") == 0) ||
1135  (dir_name.find("Ladder") == 0) ) return;
1136  vector<string> subdirs = bei->getSubdirs();
1137  int iDir =0;
1138  int nbin = 0;
1139  int nbin_i = 0;
1140  int nbin_subdir = 0;
1141  int cnt=0;
1142  bool first_subdir = true;
1143  for (vector<string>::const_iterator it = subdirs.begin();
1144  it != subdirs.end(); it++) {
1145  cnt++;
1146  bei->cd(*it);
1147  vector<string> contents = bei->getMEs();
1148  bei->goUp();
1149 
1150  string prefix;
1151  if(source_type_==0) prefix="SUMRAW";
1152  else if (source_type_==1) prefix="SUMDIG";
1153  else if (source_type_==2) prefix="SUMCLU";
1154  else if (source_type_==3) prefix="SUMTRK";
1155  else if (source_type_==4) prefix="SUMHIT";
1156  else if (source_type_>=7 && source_type_<20) prefix="SUMCAL";
1157  else if (source_type_==20) prefix="SUMOFF";
1158 
1159  for (vector<string>::const_iterator im = contents.begin();
1160  im != contents.end(); im++) {
1161  for (vector<string>::const_iterator iv = me_names.begin();
1162  iv != me_names.end(); iv++) {
1163  string var = "_" + (*iv) + "_";
1164  if ((*im).find(var) != string::npos) {
1165  if((var=="_charge_" || var=="_nclusters_" || var=="_size_" || var=="_sizeX_" || var=="_sizeY_") &&
1166  (*im).find("Track_")!=string::npos) continue;
1167  string full_path = (*it) + "/" +(*im);
1168  MonitorElement * me = bei->get(full_path.c_str());
1169  if (!me) continue;
1170  if(source_type_==5||source_type_==6){
1171  if((*iv)=="errorType"||(*iv)=="NErrors"||(*iv)=="fullType"||(*iv)=="chanNmbr"||
1172  (*iv)=="TBMType"||(*iv)=="EvtNbr"||(*iv)=="evtSize"||(*iv)=="linkId"||
1173  (*iv)=="ROCId"||(*iv)=="DCOLId"||(*iv)=="PXId"||(*iv)=="ROCNmbr"||
1174  (*iv)=="TBMMessage"||(*iv)=="Type36Hitmap")
1175  prefix="SUMRAW";
1176  else if((*iv)=="ndigis"||(*iv)=="adc" ||
1177  (*iv)=="ndigisFREQ"||(*iv)=="adcCOMB")
1178  prefix="SUMDIG";
1179  else if((*iv)=="nclusters"||(*iv)=="x"||(*iv)=="y"||(*iv)=="charge"||(*iv)=="chargeCOMB"||
1180  (*iv)=="size"||(*iv)=="sizeX"||(*iv)=="sizeY"||(*iv)=="minrow"||
1181  (*iv)=="maxrow"||(*iv)=="mincol"||(*iv)=="maxcol")
1182  prefix="SUMCLU";
1183  if(currDir.find("Track")!=string::npos) prefix="SUMTRK";
1184  else if((*iv)=="residualX_mean"||(*iv)=="residualY_mean"||
1185  (*iv)=="residualX_RMS"||(*iv)=="residualY_RMS")
1186  prefix="SUMTRK";
1187  else if((*iv)=="ClustX"||(*iv)=="ClustY"||(*iv)=="nRecHits"||(*iv)=="ErrorX"||(*iv)=="ErrorY")
1188  prefix="SUMHIT";
1189  else if((*iv)=="Gain1d_mean"||(*iv)=="GainChi2NDF1d_mean"||
1190  (*iv)=="GainChi2Prob1d_mean"||(*iv)=="Pedestal1d_mean"||
1191  (*iv)=="ScurveChi2ProbSummary_mean"||(*iv)=="ScurveFitResultSummary_mean"||
1192  (*iv)=="ScurveSigmasSummary_mean"||(*iv)=="ScurveThresholdSummary_mean"||
1193  (*iv)=="Gain1d_RMS"||(*iv)=="GainChi2NDF1d_RMS"||
1194  (*iv)=="GainChi2Prob1d_RMS"||(*iv)=="Pedestal1d_RMS"||
1195  (*iv)=="GainNPoints1d_mean" || (*iv)=="GainNPoints1d_RMS" ||
1196  (*iv)=="GainHighPoint1d_mean" || (*iv)=="GainHighPoint1d_RMS" ||
1197  (*iv)=="GainLowPoint1d_mean" || (*iv)=="GainLowPoint1d_RMS" ||
1198  (*iv)=="GainEndPoint1d_mean" || (*iv)=="GainEndPoint1d_RMS" ||
1199  (*iv)=="GainFitResult2d_mean" || (*iv)=="GainFitResult2d_RMS" ||
1200  (*iv)=="GainDynamicRange2d_mean" || (*iv)=="GainDynamicRange2d_RMS" ||
1201  (*iv)=="GainSaturate2d_mean" || (*iv)=="GainSaturate2d_RMS" ||
1202  (*iv)=="ScurveChi2ProbSummary_RMS"||(*iv)=="ScurveFitResultSummary_RMS"||
1203  (*iv)=="ScurveSigmasSummary_RMS"||(*iv)=="ScurveThresholdSummary_RMS"||
1204  (*iv)=="pixelAliveSummary_mean"||(*iv)=="pixelAliveSummary_FracOfPerfectPix"||
1205  (*iv) == "SiPixelErrorsCalibDigis_NCalibErrors")
1206  prefix="SUMCAL";
1207  }
1208 
1209  // bugfix: gsum_mes is filled using the contents of me_names. Proceeding with each entry in me_names.
1210  /*
1211  int actual_size = gsum_mes.size();
1212  int wanted_size = me_names.size();
1213  if (actual_size != wanted_size) { */
1214  if (first_subdir){
1215 // bool create_me = true;
1216  nbin = me->getTH1F()->GetNbinsX();
1217  string me_name = prefix + "_" + (*iv) + "_" + dir_name;
1218  if((*iv)=="adcCOMB"||(*iv)=="chargeCOMB") me_name = "ALLMODS_" + (*iv) + "_" + dir_name;
1219  else if(prefix=="SUMOFF" && dir_name=="Endcap") nbin=96;
1220  else if(dir_name=="Endcap") nbin=672;
1221  else if(prefix=="SUMOFF" && dir_name.find("HalfCylinder")!=string::npos) nbin=24;
1222  else if(dir_name.find("HalfCylinder")!=string::npos) nbin=168;
1223  else if(prefix=="SUMOFF" && dir_name.find("Disk")!=string::npos) nbin=12;
1224  else if(dir_name.find("Disk")!=string::npos) nbin=84;
1225  else if(dir_name.find("Blade")!=string::npos) nbin=7;
1226  //else if(dir_name.find("Panel_1")!=string::npos) nbin=4;
1227  //else if(dir_name.find("Panel_2")!=string::npos) nbin=3;
1228  //cout << dir_name.c_str() << "\t" << nbin << endl;
1229  getGrandSummaryME(bei, nbin, me_name, gsum_mes);
1230  }
1231  /*
1232 
1233  for (vector<MonitorElement*>::const_iterator igm = gsum_mes.begin();
1234  igm !=gsum_mes.end(); igm++) {
1235  // To be further optimized
1236  if( (*iv).find("Clust") != string::npos && (*igm)->getName().find(me_name) != string::npos ) create_me = false; //cout << "Already have it" << endl;
1237  }
1238 
1239  // printing cout<<"me_name to be created= "<<me_name<<endl;
1240  if(create_me) getGrandSummaryME(bei, nbin, me_name, gsum_mes);
1241  }
1242  */
1243  // end bugfix: gsum_mes.
1244 
1245  for (vector<MonitorElement*>::const_iterator igm = gsum_mes.begin();
1246  igm != gsum_mes.end(); igm++) {
1247  if ((*igm)->getName().find(var) != string::npos) {
1248  if(prefix=="SUMOFF") (*igm)->setAxisTitle("Blades",1);
1249  else if((*igm)->getName().find("adcCOMB_")!=string::npos) (*igm)->setAxisTitle("Digi charge [ADC]",1);
1250  else if((*igm)->getName().find("chargeCOMB_")!=string::npos) (*igm)->setAxisTitle("Cluster charge [kilo electrons]",1);
1251  else (*igm)->setAxisTitle("Modules",1);
1252  string title="";
1253  if((*igm)->getName().find("NErrors_") != string::npos && prefix=="SUMOFF") title = "Total number of errors per Blade";
1254  else if((*igm)->getName().find("NErrors_") != string::npos && prefix=="SUMRAW") title = "Total number of errors per Module";
1255  else if(prefix=="SUMOFF") title = "mean " + (*iv) + " per Blade";
1256  else if((*igm)->getName().find("FREQ_") != string::npos) title = "NEvents with digis per Module";
1257  else if((*igm)->getName().find("adcCOMB_")!=string::npos) title = "NDigis";
1258  else if((*igm)->getName().find("chargeCOMB_")!=string::npos) title = "NClusters";
1259  else title = "mean " + (*iv) + " per Module";
1260  (*igm)->setAxisTitle(title,2);
1261  nbin_i=0;
1262  if((*igm)->getName().find("ALLMODS_adcCOMB_")!=string::npos){
1263  nbin_subdir=128;
1264  }else if((*igm)->getName().find("ALLMODS_chargeCOMB_")!=string::npos){
1265  nbin_subdir=100;
1266  }else if((*igm)->getName().find("Panel_") != string::npos){
1267  nbin_subdir=7;
1268 // }else if((*igm)->getName().find("Panel_1") != string::npos){
1269 // nbin_subdir=4;
1270 // }else if((*igm)->getName().find("Panel_2") != string::npos){
1271 // nbin_subdir=3;
1272  }else if((*igm)->getName().find("Blade") != string::npos){
1273  if((*im).find("_1") != string::npos) nbin_subdir=4;
1274  if((*im).find("_2") != string::npos) {nbin_i=4; nbin_subdir=3;}
1275  }else if((*igm)->getName().find("Disk") != string::npos){
1276  nbin_i=((cnt-1)%12)*7; nbin_subdir=7;
1277  }else if((*igm)->getName().find("HalfCylinder") != string::npos){
1278  if(prefix!="SUMOFF"){
1279  nbin_subdir=84;
1280  if((*im).find("_2") != string::npos) nbin_i=84;
1281  }else{
1282  nbin_subdir=12;
1283  if((*im).find("_2") != string::npos) nbin_i=12;
1284  }
1285  }else if((*igm)->getName().find("Endcap") != string::npos){
1286  if(prefix!="SUMOFF"){
1287  nbin_subdir=168;
1288  if((*im).find("_mO") != string::npos) nbin_i=168;
1289  if((*im).find("_pI") != string::npos) nbin_i=336;
1290  if((*im).find("_pO") != string::npos) nbin_i=504;
1291  }else{
1292  nbin_subdir=24;
1293  if((*im).find("_mO") != string::npos) nbin_i=24;
1294  if((*im).find("_pI") != string::npos) nbin_i=48;
1295  if((*im).find("_pO") != string::npos) nbin_i=72;
1296  }
1297  }
1298 
1299  // for (int k = 1; k < nbin_subdir+1; k++) {
1300  if((*igm)->getName().find("ndigisFREQ")==string::npos){
1301  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)){
1302  (*igm)->getTH1F()->Add(me->getTH1F());
1303  }else if(((*igm)->getName().find("charge_")!=string::npos && (*igm)->getName().find("Track_")==string::npos &&
1304  me->getName().find("charge_")!=string::npos && me->getName().find("Track_")==string::npos) ||
1305  ((*igm)->getName().find("nclusters_")!=string::npos && (*igm)->getName().find("Track_")==string::npos &&
1306  me->getName().find("nclusters_")!=string::npos && me->getName().find("Track_")==string::npos) ||
1307  ((*igm)->getName().find("size_")!=string::npos && (*igm)->getName().find("Track_")==string::npos &&
1308  me->getName().find("size_")!=string::npos && me->getName().find("Track_")==string::npos) ||
1309  ((*igm)->getName().find("charge_OffTrack_")!=string::npos && me->getName().find("charge_OffTrack_")!=string::npos) ||
1310  ((*igm)->getName().find("nclusters_OffTrack_")!=string::npos && me->getName().find("nclusters_OffTrack_")!=string::npos) ||
1311  ((*igm)->getName().find("size_OffTrack_")!=string::npos && me->getName().find("size_OffTrack_")!=string::npos) ||
1312  ((*igm)->getName().find("charge_OnTrack_")!=string::npos && me->getName().find("charge_OnTrack_")!=string::npos) ||
1313  ((*igm)->getName().find("nclusters_OnTrack_")!=string::npos && me->getName().find("nclusters_OnTrack_")!=string::npos) ||
1314  ((*igm)->getName().find("size_OnTrack_")!=string::npos && me->getName().find("size_OnTrack_")!=string::npos) ||
1315  ((*igm)->getName().find("charge_")==string::npos && (*igm)->getName().find("nclusters_")==string::npos &&
1316  (*igm)->getName().find("size_")==string::npos)){
1317  for (int k = 1; k < nbin_subdir+1; k++) if(me->getBinContent(k) > 0) (*igm)->setBinContent(k+nbin_i, me->getBinContent(k));
1318  }
1319  }else if(me->getName().find("ndigisFREQ")!=string::npos){
1320  for (int k = 1; k < nbin_subdir+1; k++) if(me->getBinContent(k) > 0) (*igm)->setBinContent(k+nbin_i, me->getBinContent(k));
1321  }
1322  // }// for
1323 
1324  }
1325  }
1326  }
1327  }
1328  }
1329 
1330  iDir++;
1331  first_subdir = false; // We are done processing the first directory, we don't add any new MEs in the future passes.
1332  } // end for it (subdirs)
1333 }
const std::string & getName(void) const
get name of ME
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1221
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1270
int k[5][pyjets_maxn]
TH1F * getTH1F(void) const
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1244
double getBinContent(int binx) const
get content of bin (1-D)
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:248
void getGrandSummaryME(DQMStore *bei, int nbin, std::string &me_name, std::vector< MonitorElement * > &mes)
const std::string & pwd(void) const
Definition: DQMStore.cc:209
void SiPixelActionExecutor::fillLayout ( DQMStore bei)

Definition at line 1983 of file SiPixelActionExecutor.cc.

References DQMStore::cd(), configWriter_, SiPixelConfigWriter::createColumn(), SiPixelConfigWriter::createRow(), DQMStore::getMEs(), DQMStore::getSubdirs(), DQMStore::goUp(), and DQMStore::pwd().

Referenced by createLayout().

1983  {
1984 
1985  static int icount = 0;
1986  string currDir = bei->pwd();
1987  if (currDir.find("Ladder_") != string::npos) {
1988 
1989  vector<string> contents = bei->getMEs();
1990 
1991  for (vector<string>::const_iterator im = contents.begin();
1992  im != contents.end(); im++) {
1993  if ((*im).find("Clusters") != string::npos) {
1994  icount++;
1995  if (icount != 0 && icount%6 == 0) {
1997  }
1998  ostringstream full_path;
1999  full_path << "test/" << currDir << "/" << *im ;
2000  string element = "monitorable";
2001  string element_name = full_path.str();
2002  configWriter_->createColumn(element, element_name);
2003  }
2004  }
2005  } else {
2006  vector<string> subdirs = bei->getSubdirs();
2007  for (vector<string>::const_iterator it = subdirs.begin();
2008  it != subdirs.end(); it++) {
2009  bei->cd(*it);
2010  fillLayout(bei);
2011  bei->goUp();
2012  }
2013  }
2014 }
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1221
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
void createColumn(std::string &element, std::string &name)
void fillLayout(DQMStore *bei)
SiPixelConfigWriter * configWriter_
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1244
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:248
const std::string & pwd(void) const
Definition: DQMStore.cc:209
void SiPixelActionExecutor::fillOccupancy ( DQMStore bei,
bool  isbarrel 
)
private

Definition at line 1521 of file SiPixelActionExecutor.cc.

References DQMStore::cd(), DQMStore::get(), MonitorElement::getBinContent(), DQMStore::getMEs(), MonitorElement::getNbinsX(), MonitorElement::getNbinsY(), DQMStore::getSubdirs(), MonitorElement::getTH2F(), DQMStore::goUp(), i, j, OccupancyMap, path(), DQMStore::pwd(), MonitorElement::setBinContent(), and Tier0Flag_.

Referenced by createOccupancy().

1522 {
1523  //occupancyprinting cout<<"entering SiPixelActionExecutor::fillOccupancy..."<<std::endl;
1524  if(Tier0Flag_) return;
1525  string currDir = bei->pwd();
1526  string dname = currDir.substr(currDir.find_last_of("/")+1);
1527  //occupancyprinting cout<<"currDir= "<<currDir<< " , dname= "<<dname<<std::endl;
1528 
1529  if(dname.find("Layer_")!=string::npos || dname.find("Disk_")!=string::npos){
1530  vector<string> meVec = bei->getMEs();
1531  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
1532  string full_path = currDir + "/" + (*it);
1533  if(full_path.find("hitmap_siPixelDigis")!=string::npos){ // If we have the hitmap ME
1534  MonitorElement * me = bei->get(full_path);
1535  if (!me) continue;
1536  //occupancyprinting cout << full_path << endl;
1537  string path = full_path;
1538  while (path.find_last_of("/") != 5) // Stop before Pixel/
1539  {
1540  path = path.substr(0,path.find_last_of("/"));
1541  // cout << "\t" << path << endl;
1542  OccupancyMap = bei->get(path + "/" + (isbarrel?"barrel":"endcap") + "OccupancyMap");
1543 
1544  if(OccupancyMap){
1545  for(int i=1; i!=me->getNbinsX()+1; i++) for(int j=1; j!=me->getNbinsY()+1; j++){
1546  float previous = OccupancyMap->getBinContent(i,j);
1547  OccupancyMap->setBinContent(i,j,previous + me->getBinContent(i,j));
1548  }
1549  OccupancyMap->getTH2F()->SetEntries(OccupancyMap->getTH2F()->Integral());
1550  }
1551 
1552  }
1553  }
1554 
1555  }
1556  //bei->goUp();
1557  } else {
1558  //occupancyprinting cout<<"finding subdirs now"<<std::endl;
1559  vector<string> subdirs = bei->getSubdirs();
1560  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
1561  bei->cd(*it);
1562  //occupancyprinting cout<<"now I am in "<<bei->pwd()<<std::endl;
1563  if(*it != "Pixel" && ((isbarrel && (*it).find("Barrel")==string::npos) || (!isbarrel && (*it).find("Endcap")==string::npos))) continue;
1564  //occupancyprinting cout<<"calling myself again "<<std::endl;
1565  fillOccupancy(bei, isbarrel);
1566  bei->goUp();
1567  }
1568  }
1569 
1570  //occupancyprinting cout<<"leaving SiPixelActionExecutor::fillOccupancy..."<<std::endl;
1571 
1572 }
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1221
void fillOccupancy(DQMStore *bei, bool isbarrel)
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
int getNbinsY(void) const
get # of bins in Y-axis
int path() const
Definition: HLTadd.h:3
int j
Definition: DBlmapReader.cc:9
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1270
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1244
double getBinContent(int binx) const
get content of bin (1-D)
int getNbinsX(void) const
get # of bins in X-axis
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:248
TH2F * getTH2F(void) const
const std::string & pwd(void) const
Definition: DQMStore.cc:209
void SiPixelActionExecutor::fillSummary ( DQMStore bei,
std::string  dir_name,
std::vector< std::string > &  me_names,
bool  isbarrel 
)
private

Definition at line 392 of file SiPixelActionExecutor.cc.

References DQMStore::book1D(), DQMStore::cd(), configParser_, gather_cfg::cout, MonitorElement::Fill(), fillGrandBarrelSummaryHistos(), fillGrandEndcapSummaryHistos(), spr::find(), DQMStore::get(), MonitorElement::getBinContent(), GetBladeSubdirs(), MonitorElement::getEntries(), MonitorElement::getMean(), SiPixelConfigParser::getMENamesForGrandBarrelSummary(), SiPixelConfigParser::getMENamesForGrandEndcapSummary(), DQMStore::getMEs(), MonitorElement::getName(), MonitorElement::getNbinsX(), MonitorElement::getNbinsY(), MonitorElement::getRMS(), DQMStore::getSubdirs(), getSummaryME(), MonitorElement::getTH1F(), DQMStore::goUp(), isum, nlast, prof2calltree::prefix, DQMStore::pwd(), tablePrinter::rows, source_type_, mathSSE::sqrt(), GlobalPosition_Frontier_DevDB_cff::tag, cond::rpcobtemp::temp, and indexGen::title.

Referenced by createSummary().

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

Definition at line 373 of file SiPixelActionExecutor.cc.

References DQMStore::cd(), and DQMStore::getSubdirs().

Referenced by fillSummary().

373  {
374  blade_subdirs.clear();
375 // cout << "BladeSubdirs::" << bei->pwd() << endl;
376  vector<string> panels = bei->getSubdirs();
377  vector<string> modules;
378  for (vector<string>::const_iterator it = panels.begin(); it != panels.end(); it++) {
379  bei->cd(*it);
380  modules = bei->getSubdirs();
381  for (vector<string>::const_iterator m_it = modules.begin(); m_it != modules.end(); m_it++) {
382 // cout << "Would have added " << (*m_it) << "." << endl;
383  blade_subdirs.push_back(*m_it);
384  }
385  }
386 // cout << "Got Blade subdirs" << endl;
387 }
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1221
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
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 1694 of file SiPixelActionExecutor.cc.

References EachBinContent, Entries, DQMStore::get(), DQMStore::getMEs(), MonitorElement::getTH1F(), trackerHits::histo, i, j, gen::k, prof2calltree::l, m, Association::map, Mean, ExpressReco_HICollisions_FallBack::nbins, DQMStore::pwd(), Sum, and WeightedSum.

Referenced by createMap().

1694  {
1695 
1696 // cout << "Starting with SiPixelActionExecutor::getData" << endl;
1697  vector<string> contents = bei->getMEs();
1698  for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++)
1699  {
1700  if((*im).find(type + "_") == string::npos){
1701  // cout << "Skip";
1702  continue; // Searching for specific type
1703  }
1704  //cout << "Name: " << *im << endl;
1705  std::string fullpathname = bei->pwd() + "/" + (*im);
1706  MonitorElement* me = bei->get(fullpathname);
1707 
1708  if (me) {
1709  TH1F* histo = me->getTH1F();
1710 
1711  Int_t nbins = histo->GetNbinsX();
1712  // cout << "# of bins: " << nbins << endl;
1713  switch (ff){
1714  case EachBinContent:
1715  map[i][j][k][l] = histo->GetBinContent(l + 1);
1716  break;
1717 
1718  case Entries:
1719  map[i][j][k][l] = histo->GetEntries();
1720  break;
1721 
1722  case Mean:
1723  map[i][j][k][l] = histo->GetMean();
1724  break;
1725 
1726  case Sum:
1727  {
1728  Double_t sum = 0;
1729  for(Int_t m = 0; m < nbins; m++)
1730  sum += histo->GetBinContent(m + 1);
1731  map[i][j][k][l] = sum;
1732  }
1733  break;
1734 
1735  case WeightedSum:
1736  {
1737  Double_t sum = 0;
1738  for(Int_t m = 0; m < nbins; m++)
1739  sum += histo->GetBinContent(m + 1) * histo->GetBinLowEdge(m + 1);
1740  map[i][j][k][l] = sum;
1741  }
1742  break;
1743 
1744  default:
1745  map[i][j][k][l] = 0;
1746  }
1747  }}
1748 // cout << "Done with SiPixelActionExecutor::getData" << endl;
1749 }
type
Definition: HCALResponse.h:22
int i
Definition: DBlmapReader.cc:9
tuple histo
Definition: trackerHits.py:12
dictionary map
Definition: Association.py:160
int j
Definition: DBlmapReader.cc:9
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1270
int k[5][pyjets_maxn]
tuple ff
Definition: createTree.py:204
TH1F * getTH1F(void) const
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1244
const std::string & pwd(void) const
Definition: DQMStore.cc:209
MonitorElement * SiPixelActionExecutor::getFEDSummaryME ( DQMStore bei,
std::string  me_name 
)
private

Definition at line 1429 of file SiPixelActionExecutor.cc.

References DQMStore::book1D(), spr::find(), DQMStore::get(), DQMStore::getMEs(), DQMStore::pwd(), and MonitorElement::Reset().

Referenced by fillFEDErrorSummary().

1430  {
1431  //printing cout<<"Entering SiPixelActionExecutor::getFEDSummaryME..."<<endl;
1432  MonitorElement* me = 0;
1433  if((bei->pwd()).find("Pixel")==string::npos) return me;
1434  vector<string> contents = bei->getMEs();
1435 
1436  for (vector<string>::const_iterator it = contents.begin();
1437  it != contents.end(); it++) {
1438  if ((*it).find(me_name) == 0) {
1439  string fullpathname = bei->pwd() + "/" + (*it);
1440 
1441  me = bei->get(fullpathname);
1442 
1443  if (me) {
1444  //printing cout<<"got the ME: "<<fullpathname<<endl;
1445  me->Reset();
1446  return me;
1447  }
1448  }
1449  }
1450  contents.clear();
1451  me = bei->book1D(me_name.c_str(), me_name.c_str(),40,-0.5,39.5);
1452  //if(me) cout<<"finally got the ME: "<<me_name<<endl;
1453  return me;
1454  //printing cout<<"...leaving SiPixelActionExecutor::getFEDSummaryME!"<<endl;
1455 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:519
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1270
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1244
void Reset(void)
reset ME (ie. contents, errors, etc)
const std::string & pwd(void) const
Definition: DQMStore.cc:209
void SiPixelActionExecutor::getGrandSummaryME ( DQMStore bei,
int  nbin,
std::string &  me_name,
std::vector< MonitorElement * > &  mes 
)
private

Definition at line 1338 of file SiPixelActionExecutor.cc.

References DQMStore::book1D(), spr::find(), DQMStore::get(), DQMStore::getMEs(), DQMStore::pwd(), and MonitorElement::Reset().

Referenced by fillGrandBarrelSummaryHistos(), and fillGrandEndcapSummaryHistos().

1341  {
1342  //printing cout<<"Entering SiPixelActionExecutor::getGrandSummaryME for: "<<me_name<<endl;
1343  if((bei->pwd()).find("Pixel")==string::npos) return; // If one doesn't find pixel
1344  vector<string> contents = bei->getMEs();
1345 
1346  for (vector<string>::const_iterator it = contents.begin();
1347  it != contents.end(); it++) {
1348  //printing cout<<"in grand summary me: "<<me_name<<","<<(*it)<<endl;
1349  if ((*it).find(me_name) == 0) {
1350  string fullpathname = bei->pwd() + "/" + me_name;
1351  // cout << "###\t" << fullpathname << endl;
1352  MonitorElement* me = bei->get(fullpathname);
1353 
1354  if (me) {
1355  // cout<<"Found grand ME: "<<fullpathname<<endl;
1356  me->Reset();
1357  mes.push_back(me);
1358  // if printing cout<<"reset and add the following me: "<<me->getName()<<endl;
1359  return;
1360  }
1361  }
1362  }
1363 
1364  // MonitorElement* temp_me = bei->book1D(me_name.c_str(),me_name.c_str(),nbin,1.,nbin+1.);
1365  // if (temp_me) mes.push_back(temp_me);
1366  MonitorElement* temp_me(0);
1367  if(me_name.find("ALLMODS_adcCOMB_")!=string::npos) temp_me = bei->book1D(me_name.c_str(),me_name.c_str(),128,0,256);
1368  else if(me_name.find("ALLMODS_chargeCOMB_")!=string::npos) temp_me = bei->book1D(me_name.c_str(),me_name.c_str(),100,0,200);
1369  else temp_me = bei->book1D(me_name.c_str(),me_name.c_str(),nbin,1.,nbin+1.);
1370  if (temp_me) mes.push_back(temp_me);
1371 
1372  // if(temp_me) cout<<"finally found grand ME: "<<me_name<<endl;
1373 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:519
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1270
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1244
void Reset(void)
reset ME (ie. contents, errors, etc)
const std::string & pwd(void) const
Definition: DQMStore.cc:209
MonitorElement * SiPixelActionExecutor::getSummaryME ( DQMStore bei,
std::string  me_name 
)
private

Definition at line 1380 of file SiPixelActionExecutor.cc.

References DQMStore::book1D(), spr::find(), DQMStore::get(), DQMStore::getMEs(), DQMStore::pwd(), and MonitorElement::Reset().

Referenced by fillSummary().

1381  {
1382  //printing cout<<"Entering SiPixelActionExecutor::getSummaryME for: "<<me_name<<endl;
1383  MonitorElement* me = 0;
1384  if((bei->pwd()).find("Pixel")==string::npos) return me;
1385  vector<string> contents = bei->getMEs();
1386 
1387  for (vector<string>::const_iterator it = contents.begin();
1388  it != contents.end(); it++) {
1389  if ((*it).find(me_name) == 0) {
1390  string fullpathname = bei->pwd() + "/" + (*it);
1391  me = bei->get(fullpathname);
1392 
1393  if (me) {
1394  //printing cout<<"got this ME: "<<fullpathname<<endl;
1395  me->Reset();
1396  return me;
1397  }
1398  }
1399  }
1400  contents.clear();
1401 // cout << me_name.c_str()
1402 // << "\t" << ((me_name.find("SUMOFF")==string::npos)?"true":"false")
1403 // << "\t" << ((me_name.find("Blade_")!= string::npos)?"true":"false")
1404 // << "\t" << ((me_name.find("Layer1_")!=string::npos)?"true":"false")
1405 // << "\t" << ((me_name.find("Layer2_")!=string::npos)?"true":"false")
1406 // << "\t" << ((me_name.find("Layer3_")!=string::npos)?"true":"false")
1407 // << "\t" << ((me_name.find("Disk_")!=string::npos)?"true":"false")
1408 // << endl;
1409  if(me_name.find("SUMOFF")==string::npos){
1410  if(me_name.find("Blade_")!=string::npos)me = bei->book1D(me_name.c_str(), me_name.c_str(),7,1.,8.);
1411  else me = bei->book1D(me_name.c_str(), me_name.c_str(),4,1.,5.);
1412 // if(me_name.find("Panel_2")!=string::npos) me = bei->book1D(me_name.c_str(), me_name.c_str(),3,1.,4.);
1413 // else me = bei->book1D(me_name.c_str(), me_name.c_str(),4,1.,5.);
1414  }else if(me_name.find("Layer_1")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),10,1.,11.);
1415  }else if(me_name.find("Layer_2")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),16,1.,17.);
1416  }else if(me_name.find("Layer_3")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),22,1.,23.);
1417  }else if(me_name.find("Disk_")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),12,1.,13.);
1418  }
1419 
1420  // if(me) cout<<"Finally got this ME: "<<me_name<<endl;
1421  //if(me_name.find("ALLMODS_adc_")!=string::npos) me = bei->book1D(me_name.c_str(), me_name.c_str(),256, 0., 256.);
1422 
1423  //printing cout<<"...leaving SiPixelActionExecutor::getSummaryME!"<<endl;
1424  return me;
1425 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:519
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1270
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1244
void Reset(void)
reset ME (ie. contents, errors, etc)
const std::string & pwd(void) const
Definition: DQMStore.cc:209
int SiPixelActionExecutor::getTkMapMENames ( std::vector< std::string > &  names)

Definition at line 2020 of file SiPixelActionExecutor.cc.

References tkMapMENames.

2020  {
2021  if (tkMapMENames.size() == 0) return 0;
2022  for (vector<string>::iterator it = tkMapMENames.begin();
2023  it != tkMapMENames.end(); it++) {
2024  names.push_back(*it) ;
2025  }
2026  return names.size();
2027 }
std::vector< std::string > tkMapMENames
static const HistoName names[]
Double_t SiPixelActionExecutor::mapMax ( const Double_t  map[][NLev2][NLev3][NLev4],
bool  isBarrel 
)
private

Definition at line 1842 of file SiPixelActionExecutor.cc.

References b, i, Association::map, max(), NLev1, and L1TEmulatorMonitor_cff::p.

Referenced by createMaps().

1842  {
1843 
1844  Double_t max = map[0][0][0][0];
1845 
1846  for(Int_t p = 0 ; p < NLev1 ; p++)
1847  for(Int_t d = 0 ; d < (isBarrel?3:2); d++)
1848  for(Int_t b = 0 ; b < (isBarrel?(d*6+10):12); b++)
1849  for(Int_t i = 0 ; i < (isBarrel?4:7); i++)
1850  if(map[p][d][b][i] > max)
1851  max = map[p][d][b][i];
1852  // cout << "Done with SiPixelActionExecutor::mapMax" << endl;
1853  return max;
1854 }
#define NLev1
int i
Definition: DBlmapReader.cc:9
dictionary map
Definition: Association.py:160
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 1825 of file SiPixelActionExecutor.cc.

References b, i, Association::map, min, NLev1, and L1TEmulatorMonitor_cff::p.

Referenced by createMaps().

1825  {
1826 
1827  Double_t min = map[0][0][0][0];
1828 
1829  for(Int_t p = 0 ; p < NLev1 ; p++)
1830  for(Int_t d = 0 ; d < (isBarrel?3:2) ; d++)
1831  for(Int_t b = 0 ; b < (isBarrel?(d*6+10):12) ; b++)
1832  for(Int_t i = 0 ; i < (isBarrel?4:7); i++){
1833  if(map[p][d][b][i] < min)
1834  min = map[p][d][b][i];
1835  }
1836  // cout << "Done with SiPixelActionExecutor::mapMin" << endl;
1837  return min;
1838 }
#define NLev1
int i
Definition: DBlmapReader.cc:9
#define min(a, b)
Definition: mlp_lapack.h:161
dictionary map
Definition: Association.py:160
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 1753 of file SiPixelActionExecutor.cc.

References b, gather_cfg::cout, DQMStore::get(), i, Association::map, NLayer, NModuleB, L1TEmulatorMonitor_cff::p, path(), DQMStore::pwd(), and cond::rpcobtemp::temp.

Referenced by createMaps().

1753  {
1754  // cout << "Starting with SiPixelActionExecutor::prephistosB" << endl;
1755  std::string part[] = { "Layer_1", "Layer_2", "Layer_3"};
1756  std::string path = bei->pwd();
1757  for (Int_t i = 0; i < NLayer; i++)
1758  {
1759  std::string fullpath = path + "/" + "TRKMAP_" + name + "_" + part[i];
1760  MonitorElement* temp = bei->get(fullpath);
1761  if(temp)
1762  me[i] = temp;
1763  else
1764  cout << "Problem: " << fullpath << endl;
1765  }
1766 
1767  for(Int_t p = 0 ; p < NLayer ; p++){
1768  for(Int_t b = 0 ; b < (10 + 6 * p); b++)
1769  for(Int_t i = 0 ; i < NModuleB ; i++){
1770  me[p]->getTH2F()->SetBinContent(b + 1, i + 1, map[0][p][b][i]);
1771  me[p]->getTH2F()->SetBinContent(b + 1, i + 1 + NModuleB, map[1][p][b][i]);
1772  me[p]->getTH2F()->SetBinContent(b + 1 + 10 + 6 * p, i + 1, map[2][p][b][i]);
1773  me[p]->getTH2F()->SetBinContent(b + 1 + 10 + 6 * p, i + 1 + NModuleB, map[3][p][b][i]);
1774  }
1775  me[p]->getTH2F()->SetMinimum(min);
1776  me[p]->getTH2F()->SetMaximum(max);
1777  }
1778  // cout << "Done with SiPixelActionExecutor::prephistosB" << endl;
1779 }
int i
Definition: DBlmapReader.cc:9
#define min(a, b)
Definition: mlp_lapack.h:161
dictionary map
Definition: Association.py:160
int path() const
Definition: HLTadd.h:3
#define NModuleB
const T & max(const T &a, const T &b)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1270
part
Definition: HCALResponse.h:21
double b
Definition: hdecay.h:120
#define NLayer
tuple cout
Definition: gather_cfg.py:41
TH2F * getTH2F(void) const
const std::string & pwd(void) const
Definition: DQMStore.cc:209
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 1783 of file SiPixelActionExecutor.cc.

References b, trackerHits::c, gather_cfg::cout, DQMStore::get(), i, Association::map, NBlade, NCyl, NDisk, path(), DQMStore::pwd(), and cond::rpcobtemp::temp.

Referenced by createMaps().

1783  {
1784  // cout << "Starting with SiPixelActionExecutor::prephistosE" << endl;
1785  std::string part[] = { "Disc_1_M", "Disc_2_M", "Disc_1_P", "Disc_2_P" };
1786  std::string path = bei->pwd();
1787  for (Int_t i = 0; i < NCyl; i++)
1788  {
1789  std::string fullpath = path + "/" + "TRKMAP_" + name + "_" + part[i];
1790  MonitorElement* temp = bei->get(fullpath);
1791  if(temp)
1792  {
1793  me[i] = temp;
1794  me[i]->getTH2F()->SetMinimum(min);
1795  me[i]->getTH2F()->SetMaximum(max);
1796  }
1797  else
1798  cout << "Problem: " << fullpath << endl;
1799  }
1800 
1801  for(Int_t c = 0 ; c < NCyl ; c += 2)
1802  for(Int_t d = 0 ; d < NDisk ; d++)
1803  for(Int_t b = 0 ; b < NBlade ; b++){
1804  me[c + d]->getTH2F()->SetBinContent(b + 1, 1, map[c][d][b][0]);
1805  me[c + d]->getTH2F()->SetBinContent(b + 1, 2, map[c][d][b][4]);
1806  me[c + d]->getTH2F()->SetBinContent(b + 1, 3, map[c][d][b][1]);
1807  me[c + d]->getTH2F()->SetBinContent(b + 1, 4, map[c][d][b][5]);
1808  me[c + d]->getTH2F()->SetBinContent(b + 1, 5, map[c][d][b][2]);
1809  me[c + d]->getTH2F()->SetBinContent(b + 1, 6, map[c][d][b][6]);
1810  me[c + d]->getTH2F()->SetBinContent(b + 1, 7, map[c][d][b][3]);
1811 
1812  me[c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 1, map[c + 1][d][b][0]);
1813  me[c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 2, map[c + 1][d][b][4]);
1814  me[c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 3, map[c + 1][d][b][1]);
1815  me[c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 4, map[c + 1][d][b][5]);
1816  me[c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 5, map[c + 1][d][b][2]);
1817  me[c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 6, map[c + 1][d][b][6]);
1818  me[c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 7, map[c + 1][d][b][3]);
1819  }
1820  // cout << "Done with SiPixelActionExecutor::prephistosE" << endl;
1821 }
int i
Definition: DBlmapReader.cc:9
#define NDisk
#define NCyl
#define NBlade
#define min(a, b)
Definition: mlp_lapack.h:161
dictionary map
Definition: Association.py:160
int path() const
Definition: HLTadd.h:3
const T & max(const T &a, const T &b)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1270
part
Definition: HCALResponse.h:21
double b
Definition: hdecay.h:120
tuple cout
Definition: gather_cfg.py:41
TH2F * getTH2F(void) const
const std::string & pwd(void) const
Definition: DQMStore.cc:209
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 75 of file SiPixelActionExecutor.cc.

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

Referenced by SiPixelWebInterface::readConfiguration().

82  {
83  //printing cout<<"Entering SiPixelActionExecutor::readConfiguration..."<<endl;
84  string localPath;
85  if(offlineXMLfile_) localPath = string("DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
86  else localPath = string("DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
87  if (configParser_ == 0) {
89  configParser_->getDocument(edm::FileInPath(localPath).fullPath());
90  }
91 
92  if (!configParser_->getFrequencyForTrackerMap(tkmap_freq)){
93  cout << "SiPixelActionExecutor::readConfiguration: Failed to read TrackerMap configuration parameters!! ";
94  return false;
95  }
96  if (!configParser_->getFrequencyForBarrelSummary(sum_barrel_freq)){
97  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Barrel Summary configuration parameters!! " << "\n" ;
98  return false;
99  }
100  if (!configParser_->getFrequencyForEndcapSummary(sum_endcap_freq)){
101  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Endcap Summary configuration parameters!! " << "\n" ;
102  return false;
103  }
104  if (!configParser_->getFrequencyForGrandBarrelSummary(sum_grandbarrel_freq)){
105  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Grand Barrel Summary configuration parameters!! " << "\n" ;
106  return false;
107  }
108  if (!configParser_->getFrequencyForGrandEndcapSummary(sum_grandendcap_freq)){
109  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Grand Endcap Summary configuration parameters!! " << "\n" ;
110  return false;
111  }
113  edm::LogInfo("SiPixelActionExecutor") << "Failed to read QTest Message Limit" << "\n" ;
114  return false;
115  }
117  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Source Type" << "\n" ;
118  return false;
119  }
121  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Calib Type" << "\n" ;
122  return false;
123  }
124  //printing cout<<"...leaving SiPixelActionExecutor::readConfiguration..."<<endl;
125  return true;
126 }
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:41
bool getFrequencyForTrackerMap(int &u_freq)
bool SiPixelActionExecutor::readConfiguration ( int &  tkmap_freq,
int &  summary_freq 
)

Definition at line 128 of file SiPixelActionExecutor.cc.

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

128  {
129  //printing cout<<"Entering SiPixelActionExecutor::readConfiguration..."<<endl;
130  string localPath;
131  if(offlineXMLfile_) localPath = string("DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
132  else localPath = string("DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
133  if (configParser_ == 0) {
135  configParser_->getDocument(edm::FileInPath(localPath).fullPath());
136  }
137 
138  if (!configParser_->getFrequencyForTrackerMap(tkmap_freq)){
139  cout << "SiPixelActionExecutor::readConfiguration: Failed to read TrackerMap configuration parameters!! ";
140  return false;
141  }
142  if (!configParser_->getFrequencyForBarrelSummary(summary_freq)){
143  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Summary configuration parameters!! " << "\n" ;
144  return false;
145  }
146  //printing cout<<"...leaving SiPixelActionExecutor::readConfiguration..."<<endl;
147  return true;
148 }
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:41
bool getFrequencyForTrackerMap(int &u_freq)
void SiPixelActionExecutor::readConfiguration ( )

Definition at line 62 of file SiPixelActionExecutor.cc.

References configParser_, DQMParserBase::getDocument(), and offlineXMLfile_.

62  {
63  string localPath;
64  if(offlineXMLfile_) localPath = string("DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
65  else localPath = string("DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
66  if (configParser_ == 0) {
68  configParser_->getDocument(edm::FileInPath(localPath).fullPath());
69  }
70 }
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 1862 of file SiPixelActionExecutor.cc.

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

Referenced by SiPixelWebInterface::performAction().

1862  {
1863  //printing cout<<"Entering SiPixelActionExecutor::setupQTests: "<<endl;
1864 
1865  bei->cd();
1866  bei->cd("Pixel");
1867 
1868  string localPath;
1869  if(offlineXMLfile_) localPath = string("DQM/SiPixelMonitorClient/test/sipixel_tier0_qualitytest.xml");
1870  else localPath = string("DQM/SiPixelMonitorClient/test/sipixel_qualitytest_config.xml");
1871  if(!qtHandler_){
1872  qtHandler_ = new QTestHandle();
1873  }
1874  if(!qtHandler_->configureTests(edm::FileInPath(localPath).fullPath(),bei)){
1875  qtHandler_->attachTests(bei,false);
1876  bei->cd();
1877  }else{
1878  cout << " Problem setting up quality tests "<<endl;
1879  }
1880 
1881  //printing cout<<" leaving SiPixelActionExecutor::setupQTests. "<<endl;
1882 }
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
void attachTests(DQMStore *bei, bool verboseQT=true)
Attaches the quality tests to the MonitorElement.
Definition: QTestHandle.cc:64
bool configureTests(const std::string &configFile, DQMStore *bei, bool UseDB=false)
Parses Config File and configures the quality tests.
Definition: QTestHandle.cc:37
tuple cout
Definition: gather_cfg.py:41
std::string fullPath() const
Definition: FileInPath.cc:170

Member Data Documentation

int SiPixelActionExecutor::calib_type_
private

Definition at line 139 of file SiPixelActionExecutor.h.

Referenced by checkQTestResults().

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

Definition at line 155 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_adc_Endcap
private

Definition at line 160 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_charge_Barrel
private

Definition at line 157 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_charge_Endcap
private

Definition at line 162 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_nclusters_Barrel
private

Definition at line 158 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_nclusters_Endcap
private

Definition at line 163 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_ndigis_Barrel
private

Definition at line 156 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_ndigis_Endcap
private

Definition at line 161 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_size_Barrel
private

Definition at line 159 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_size_Endcap
private

Definition at line 164 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::HitEfficiency_Dm1
private

Definition at line 153 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_Dm2
private

Definition at line 154 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_Dp1
private

Definition at line 151 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_Dp2
private

Definition at line 152 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_L1
private

Definition at line 148 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_L2
private

Definition at line 149 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_L3
private

Definition at line 150 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

int SiPixelActionExecutor::message_limit_
private

Definition at line 137 of file SiPixelActionExecutor.h.

Referenced by checkQTestResults().

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

Definition at line 146 of file SiPixelActionExecutor.h.

Referenced by bookOccupancyPlots(), and fillOccupancy().

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

Definition at line 147 of file SiPixelActionExecutor.h.

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

Definition at line 134 of file SiPixelActionExecutor.h.

TH2F* SiPixelActionExecutor::temp_1x2
private

Definition at line 175 of file SiPixelActionExecutor.h.

TH2F* SiPixelActionExecutor::temp_1x5
private

Definition at line 176 of file SiPixelActionExecutor.h.

TH2F* SiPixelActionExecutor::temp_2x3
private

Definition at line 177 of file SiPixelActionExecutor.h.

TH2F* SiPixelActionExecutor::temp_2x4
private

Definition at line 178 of file SiPixelActionExecutor.h.

TH2F* SiPixelActionExecutor::temp_2x5
private

Definition at line 179 of file SiPixelActionExecutor.h.

TH2F* SiPixelActionExecutor::temp_H
private

Definition at line 174 of file SiPixelActionExecutor.h.

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

Definition at line 132 of file SiPixelActionExecutor.h.

Referenced by dumpBarrelModIds(), and dumpEndcapModIds().

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

Definition at line 135 of file SiPixelActionExecutor.h.

Referenced by getTkMapMENames().