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:722
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:411
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:434
MonitorElement * DEV_adc_Barrel
void SiPixelActionExecutor::bookEfficiency ( DQMStore bei)

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

2269  {
2270  // Barrel
2271  bei->cd();
2272  bei->setCurrentFolder("Pixel/Barrel");
2273  if(Tier0Flag_){
2274  HitEfficiency_L1 = bei->book2D("HitEfficiency_L1","Hit Efficiency in Barrel_Layer1;z-side;Ladder",2,-1.,1.,20,-10.,10.);
2275  HitEfficiency_L2 = bei->book2D("HitEfficiency_L2","Hit Efficiency in Barrel_Layer2;z-side;Ladder",2,-1.,1.,32,-16.,16.);
2276  HitEfficiency_L3 = bei->book2D("HitEfficiency_L3","Hit Efficiency in Barrel_Layer3;z-side;Ladder",2,-1.,1.,44,-22.,22.);
2277  }else{
2278  HitEfficiency_L1 = bei->book2D("HitEfficiency_L1","Hit Efficiency in Barrel_Layer1;Module;Ladder",8,-4.,4.,20,-10.,10.);
2279  HitEfficiency_L2 = bei->book2D("HitEfficiency_L2","Hit Efficiency in Barrel_Layer2;Module;Ladder",8,-4.,4.,32,-16.,16.);
2280  HitEfficiency_L3 = bei->book2D("HitEfficiency_L3","Hit Efficiency in Barrel_Layer3;Module;Ladder",8,-4.,4.,44,-22.,22.);
2281  }
2282  // Endcap
2283  bei->cd();
2284  bei->setCurrentFolder("Pixel/Endcap");
2285  if(Tier0Flag_){
2286  HitEfficiency_Dp1 = bei->book2D("HitEfficiency_Dp1","Hit Efficiency in Endcap_Disk_p1;Blades;",24,-12.,12.,1,0.,1.);
2287  HitEfficiency_Dp2 = bei->book2D("HitEfficiency_Dp2","Hit Efficiency in Endcap_Disk_p2;Blades;",24,-12.,12.,1,0.,1.);
2288  HitEfficiency_Dm1 = bei->book2D("HitEfficiency_Dm1","Hit Efficiency in Endcap_Disk_m1;Blades;",24,-12.,12.,1,0.,1.);
2289  HitEfficiency_Dm2 = bei->book2D("HitEfficiency_Dm2","Hit Efficiency in Endcap_Disk_m2;Blades;",24,-12.,12.,1,0.,1.);
2290  }else{
2291  HitEfficiency_Dp1 = bei->book2D("HitEfficiency_Dp1","Hit Efficiency in Endcap_Disk_p1;Blades;Modules",24,-12.,12.,7,1.,8.);
2292  HitEfficiency_Dp2 = bei->book2D("HitEfficiency_Dp2","Hit Efficiency in Endcap_Disk_p2;Blades;Modules",24,-12.,12.,7,1.,8.);
2293  HitEfficiency_Dm1 = bei->book2D("HitEfficiency_Dm1","Hit Efficiency in Endcap_Disk_m1;Blades;Modules",24,-12.,12.,7,1.,8.);
2294  HitEfficiency_Dm2 = bei->book2D("HitEfficiency_Dm2","Hit Efficiency in Endcap_Disk_m2;Blades;Modules",24,-12.,12.,7,1.,8.);
2295  }
2296 }
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:411
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:850
MonitorElement * HitEfficiency_Dm1
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void SiPixelActionExecutor::bookOccupancyPlots ( DQMStore bei,
bool  hiRes,
bool  isbarrel 
)

Definition at line 1476 of file SiPixelActionExecutor.cc.

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

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

1477 {
1478  if(Tier0Flag_) return;
1479  vector<string> subdirs = bei->getSubdirs();
1480  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++)
1481  {
1482  if(isbarrel && (*it).find("Barrel")==string::npos) continue;
1483  if(!isbarrel && (*it).find("Endcap")==string::npos) continue;
1484 
1485  if((*it).find("Module_")!=string::npos) continue;
1486  if((*it).find("Panel_")!=string::npos) continue;
1487  if((*it).find("Ladder_")!=string::npos) continue;
1488  if((*it).find("Blade_")!=string::npos) continue;
1489  if((*it).find("Layer_")!=string::npos) continue;
1490  if((*it).find("Disk_")!=string::npos) continue;
1491  bei->cd(*it);
1492  bookOccupancyPlots(bei, hiRes, isbarrel);
1493  if(!hiRes){
1494  //occupancyprinting cout<<"booking low res barrel occ plot now!"<<endl;
1495  OccupancyMap = bei->book2D((isbarrel?"barrelOccupancyMap":"endcapOccupancyMap"),"Barrel Digi Occupancy Map (4 pix per bin)",isbarrel?208:130,0.,isbarrel?416.:260.,80,0.,160.);
1496  }else{
1497  //occupancyprinting cout<<"booking high res barrel occ plot now!"<<endl;
1498  OccupancyMap = bei->book2D((isbarrel?"barrelOccupancyMap":"endcapOccupancyMap"),"Barrel Digi Occupancy Map (1 pix per bin)",isbarrel?416:260,0.,isbarrel?416.:260.,160,0.,160.);
1499  }
1500  OccupancyMap->setAxisTitle("Columns",1);
1501  OccupancyMap->setAxisTitle("Rows",2);
1502 
1503  bei->goUp();
1504 
1505  }
1506 
1507 
1508 
1509 }
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1424
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:411
void bookOccupancyPlots(DQMStore *bei, bool hiRes, bool isbarrel)
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:445
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:850
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 1511 of file SiPixelActionExecutor.cc.

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

1511  {
1512 
1513  if(Tier0Flag_) return;
1514  // Barrel
1515  bei->cd();
1516  bei->setCurrentFolder("Pixel");
1517  this->bookOccupancyPlots(bei, hiRes, true);
1518 
1519  // Endcap
1520  bei->cd();
1521  bei->setCurrentFolder("Pixel");
1522  this->bookOccupancyPlots(bei, hiRes, false);
1523 
1524 }
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:411
void bookOccupancyPlots(DQMStore *bei, bool hiRes, bool isbarrel)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void SiPixelActionExecutor::bookTrackerMaps ( DQMStore bei,
std::string  name 
)

Definition at line 1597 of file SiPixelActionExecutor.cc.

References DQMStore::book2D(), NCyl, AlCaHLTBitMon_ParallelJobs::p, DQMStore::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

1598 {
1599  bei->setCurrentFolder("Pixel/Barrel");
1600  std::string partB[] = { "Layer_1", "Layer_2", "Layer_3"};
1601  bei->book2D("TRKMAP_" + name + "_" + partB[0], "TRKMAP_" + name + "_" + partB[0], 20, 1., 21., 8, 1., 9.);
1602  bei->book2D("TRKMAP_" + name + "_" + partB[1], "TRKMAP_" + name + "_" + partB[1], 32, 1., 33., 8, 1., 9.);
1603  bei->book2D("TRKMAP_" + name + "_" + partB[2], "TRKMAP_" + name + "_" + partB[2], 44, 1., 45., 8, 1., 9.);
1604 
1605  bei->setCurrentFolder("Pixel/Endcap");
1606  std::string partE[] = { "Disc_1_M", "Disc_2_M", "Disc_1_P", "Disc_2_P" };
1607  for(Int_t p = 0 ; p < NCyl ; p++)
1608  bei->book2D("TRKMAP_" + name + "_" + partE[p], "TRKMAP_" + name + "_" + partE[p], 24, 1., 25., 7, 1., 8.);
1609 }
#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:850
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void SiPixelActionExecutor::checkQTestResults ( DQMStore bei)

Definition at line 1905 of file SiPixelActionExecutor.cc.

References calib_type_, configParser_, relmon_rootfiles_spy::contents, benchmark_cfg::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(), AlCaHLTBitMon_QueryRunRegistry::string, and benchmark_cfg::warnings.

Referenced by SiPixelWebInterface::performAction().

1905  {
1906  //printing cout<<"Entering SiPixelActionExecutor::checkQTestResults..."<<endl;
1907 
1908  int messageCounter=0;
1909  string currDir = bei->pwd();
1910  vector<string> contentVec;
1911  bei->getContents(contentVec);
1913  // cout << calib_type_ << endl;
1915  for (vector<string>::iterator it = contentVec.begin();
1916  it != contentVec.end(); it++) {
1917  vector<string> contents;
1918  int nval = SiPixelUtility::getMEList((*it), contents);
1919  if (nval == 0) continue;
1920  for (vector<string>::const_iterator im = contents.begin();
1921  im != contents.end(); im++) {
1922 
1923  MonitorElement * me = bei->get((*im));
1924  if (me) {
1925  me->runQTests();
1926  // get all warnings associated with me
1927  vector<QReport*> warnings = me->getQWarnings();
1928  for(vector<QReport *>::const_iterator wi = warnings.begin();
1929  wi != warnings.end(); ++wi) {
1930  messageCounter++;
1931  if(messageCounter<message_limit_) {
1932  //edm::LogWarning("SiPixelQualityTester::checkTestResults") <<
1933  // " *** Warning for " << me->getName() <<
1934  // "," << (*wi)->getMessage() << "\n";
1935 
1936  edm::LogWarning("SiPixelActionExecutor::checkQTestResults") << " *** Warning for " << me->getName() << ","
1937  << (*wi)->getMessage() << " " << me->getMean()
1938  << " " << me->getRMS() << me->hasWarning()
1939  << endl;
1940  }
1941  }
1942  warnings=vector<QReport*>();
1943  // get all errors associated with me
1944  vector<QReport *> errors = me->getQErrors();
1945  for(vector<QReport *>::const_iterator ei = errors.begin();
1946  ei != errors.end(); ++ei) {
1947 
1948  float empty_mean = me->getMean();
1949  float empty_rms = me->getRMS();
1950  if((empty_mean != 0 && empty_rms != 0) || (calib_type_ == 0)){
1951  messageCounter++;
1952  if(messageCounter<=message_limit_) {
1953  //edm::LogError("SiPixelQualityTester::checkTestResults") <<
1954  // " *** Error for " << me->getName() <<
1955  // "," << (*ei)->getMessage() << "\n";
1956 
1957  edm::LogWarning("SiPixelActionExecutor::checkQTestResults") << " *** Error for " << me->getName() << ","
1958  << (*ei)->getMessage() << " " << me->getMean()
1959  << " " << me->getRMS()
1960  << endl;
1961  }
1962  }
1963  }
1964  errors=vector<QReport*>();
1965  }
1966  me=0;
1967  }
1968  nval=int(); contents=vector<string>();
1969  }
1970  LogDebug("SiPixelActionExecutor::checkQTestResults") <<"messageCounter: "<<messageCounter<<" , message_limit: "<<message_limit_<<endl;
1971  // if (messageCounter>=message_limit_)
1972  // edm::LogWarning("SiPixelActionExecutor::checkQTestResults") << "WARNING: too many QTest failures! Giving up after "<<message_limit_<<" messages."<<endl;
1973  contentVec=vector<string>(); currDir=string(); messageCounter=int();
1974  //printing cout<<"...leaving SiPixelActionExecutor::checkQTestResults!"<<endl;
1975 }
#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:1473
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1502
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:406
void SiPixelActionExecutor::createEfficiency ( DQMStore bei)

Definition at line 2300 of file SiPixelActionExecutor.cc.

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

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

2300  {
2301  //std::cout<<"entering SiPixelActionExecutor::createEfficiency..."<<std::endl;
2302  bei->cd();
2303  fillEfficiency(bei, true); // Barrel
2304  bei->cd();
2305  fillEfficiency(bei, false); // Endcap
2306  bei->cd();
2307  //std::cout<<"leaving SiPixelActionExecutor::createEfficiency..."<<std::endl;
2308 }
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:411
void fillEfficiency(DQMStore *bei, bool isbarrel)
void SiPixelActionExecutor::createLayout ( DQMStore bei)

Definition at line 1978 of file SiPixelActionExecutor.cc.

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

1978  {
1979  if (configWriter_ == 0) {
1981  if (!configWriter_->init()) return;
1982  }
1983  string currDir = bei->pwd();
1984  if (currDir.find("Layer") != string::npos) {
1985  string name = "Default";
1986  configWriter_->createLayout(name);
1988  fillLayout(bei);
1989  } else {
1990  vector<string> subdirs = bei->getSubdirs();
1991  for (vector<string>::const_iterator it = subdirs.begin();
1992  it != subdirs.end(); it++) {
1993  bei->cd(*it);
1994  createLayout(bei);
1995  bei->goUp();
1996  }
1997  }
1998 }
bool init()
Write XML file.
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1424
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:411
void fillLayout(DQMStore *bei)
SiPixelConfigWriter * configWriter_
void createLayout(DQMStore *bei)
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:445
void createLayout(std::string &name)
const std::string & pwd(void) const
Definition: DQMStore.cc:406
int SiPixelActionExecutor::createMap ( Double_t  map[][NLev2][NLev3][NLev4],
std::string  type,
DQMStore bei,
funcType  ff,
bool  isBarrel 
)
private

Definition at line 1652 of file SiPixelActionExecutor.cc.

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

Referenced by createMaps().

1653 {
1654  // cout << "Starting with SiPixelActionExecutor::createMap" << endl;
1655  //int createMap(Double_t map[][NLev2][NLev3][NLev4], TString type, TDirectoryFile* dirMain, funcType ff){
1656  vector<string> dirLev1 = bei->getSubdirs();
1657  Int_t i = 0;
1658  for (vector<string>::const_iterator it = dirLev1.begin(); it != dirLev1.end(); it++) // goes over HalfCylinders in Endcap and over Shells in Barrel
1659  {
1660  //cout << "Current Directory: " << *it << endl;
1661  bei->cd(*it);
1662  vector<string> dirLev2 = bei->getSubdirs();
1663  Int_t j = 0;
1664  for (vector<string>::const_iterator it2 = dirLev2.begin(); it2 != dirLev2.end(); it2++) // goes over Disks in Endcap and over Layers in Barrel
1665  {
1666  //cout << "Current Directory: " << *it2 << endl;
1667  bei->cd(*it2);
1668  Int_t k = 0;
1669  vector<string> dirLev3 = bei->getSubdirs();
1670  for (vector<string>::const_iterator it3 = dirLev3.begin(); it3 != dirLev3.end(); it3++) // goes over Blades in Endcap and over Ladders in Barrel
1671  {
1672  //cout << "Current Directory: " << *it3 << endl;
1673  bei->cd(*it3);
1674  if(Tier0Flag_)
1675  for (Int_t l = 0; l < NLev4; l++)
1676  getData(map, type, bei, ff, i, j, k, l);
1677  else
1678  {
1679  Int_t l = 0;
1680  vector<string> dirLev4 = bei->getSubdirs();
1681  for (vector<string>::const_iterator it4 = dirLev4.begin(); it4 != dirLev4.end(); it4++)
1682  {
1683  // cout << "Current Directory: " << *it4 << endl;
1684  bei->cd(*it4);
1685  if (isBarrel)
1686  getData(map, type, bei, ff, i, j, k, l++);
1687  else
1688  {
1689  vector<string> dirLev5 = bei->getSubdirs();
1690  for (vector<string>::const_iterator it5 = dirLev5.begin(); it5 != dirLev5.end(); it5++)
1691  {
1692  // cout << "Current Directory: " << *it5 << endl;
1693  bei->cd(*it5);
1694  getData(map, type, bei, ff, i, j, k, l++);
1695  }
1696  }
1697  }
1698  }
1699  k++;
1700  }
1701  j++;
1702  }
1703  i++;
1704  }
1705 
1706  // cout << "Done with SiPixelActionExecutor::createMap" << endl;
1707  return 0;
1708 }
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1424
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:411
dictionary map
Definition: Association.py:205
int j
Definition: DBlmapReader.cc:9
int k[5][pyjets_maxn]
void getData(Double_t map[][NLev2][NLev3][NLev4], std::string type, DQMStore *bei, funcType ff, Int_t i, Int_t j, Int_t k, Int_t l)
#define NLev4
void SiPixelActionExecutor::createMaps ( DQMStore bei,
std::string  type,
std::string  name,
funcType  ff 
)

Definition at line 1612 of file SiPixelActionExecutor.cc.

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

1613 {
1614 // cout << "Starting with SiPixelActionExecutor::createMaps" << endl;
1615 
1616  Double_t mapB[NLev1][NLev2][NLev3][NLev4];
1617  bei->setCurrentFolder("Pixel/Barrel/");
1618  createMap(mapB, type, bei, ff, true);
1619  Double_t minB = mapMin(mapB, true);
1620  Double_t maxB = mapMax(mapB, true);
1621 
1622 
1623  Double_t mapE[NLev1][NLev2][NLev3][NLev4];
1624  bei->setCurrentFolder("Pixel/Endcap/");
1625  createMap(mapE, type, bei, ff, false);
1626  Double_t minE = mapMin(mapE, false);
1627  Double_t maxE = mapMax(mapE, false);
1628 
1629  Double_t min = minE<=minB?minE:minB;
1630  Double_t max = maxE>=maxB?maxE:maxB;
1631  if(!min)
1632  min = -0.01;
1633 
1634  // prephistosB(histB, mapB, type, min, max);
1635  // prephistosE(histE, mapE, type, min, max);
1636 
1637 
1638  MonitorElement* meB[NLayer];
1639  // TH2F* histB[NLayer];
1640  MonitorElement* meE[NCyl];
1641  // TH2F* histE[NCyl];
1642  bei->setCurrentFolder("Pixel/Barrel");
1643  prephistosB(meB, bei, mapB, name, min, max);
1644  bei->setCurrentFolder("Pixel/Endcap");
1645  prephistosE(meE, bei, mapE, name, min, max);
1646 
1647 // cout << "Done with SiPixelActionExecutor::createMaps" << endl;
1648 }
type
Definition: HCALResponse.h:21
#define NLev1
#define NCyl
#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
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:434
#define NLev4
void SiPixelActionExecutor::createOccupancy ( DQMStore bei)

Definition at line 1526 of file SiPixelActionExecutor.cc.

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

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

1526  {
1527  //std::cout<<"entering SiPixelActionExecutor::createOccupancy..."<<std::endl;
1528  if(Tier0Flag_) return;
1529  bei->cd();
1530  fillOccupancy(bei, true);
1531  bei->cd();
1532  fillOccupancy(bei, false);
1533  bei->cd();
1534  //std::cout<<"leaving SiPixelActionExecutor::createOccupancy..."<<std::endl;
1535 }
void fillOccupancy(DQMStore *bei, bool isbarrel)
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:411
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(), source_type_, and AlCaHLTBitMon_QueryRunRegistry::string.

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:121
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
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 2061 of file SiPixelActionExecutor.cc.

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

Referenced by dumpModIds().

2061  {
2062  string currDir = bei->pwd();
2063  string dir_name = "Ladder_";
2064  eSetup.get<SiPixelFedCablingMapRcd>().get(theCablingMap);
2065  int fedId=-1; int linkId=-1;
2066  if (currDir.find(dir_name) != string::npos) {
2067  vector<string> subdirs = bei->getSubdirs();
2068  for (vector<string>::const_iterator it = subdirs.begin();
2069  it != subdirs.end(); it++) {
2070  if ( (*it).find("Module_") == string::npos) continue;
2071  bei->cd(*it);
2072  ndet_++;
2073  // long version:
2074  //cout<<"Ndet: "<<ndet_<<" , Module: "<<bei->pwd();
2075  // short version:
2076  cout<<bei->pwd();
2077  vector<string> contents = bei->getMEs();
2078  bool first_me = false;
2079  int detId = -999;
2080  for (vector<string>::const_iterator im = contents.begin();
2081  im != contents.end(); im++) {
2082  if(first_me) break;
2083  string mEName = (*im);
2084  string detIdString = mEName.substr((mEName.find_last_of("_"))+1,9);
2085  std::istringstream isst;
2086  isst.str(detIdString);
2087  if(mEName.find("_3")!=string::npos) isst>>detId;
2088  }
2089  bei->goUp();
2090  // long version:
2091  //cout<<" , detector ID: "<<detId;
2092  // short version:
2093  cout<<" "<<detId;
2094  for(int fedid=0; fedid<=40; ++fedid){
2095  SiPixelFrameConverter converter(theCablingMap.product(),fedid);
2096  uint32_t newDetId = detId;
2097  if(converter.hasDetUnit(newDetId)){
2098  fedId=fedid;
2099  break;
2100  }
2101  }
2102  if(fedId==-1) continue;
2104  SiPixelFrameConverter formatter(theCablingMap.product(),fedId);
2105  assert(detId >= 0);
2106  sipixelobjects::DetectorIndex detector = {static_cast<unsigned int>(detId), 1, 1};
2107  formatter.toCabling(cabling,detector);
2108  linkId = cabling.link;
2109  // long version:
2110  //cout<<" , FED ID: "<<fedId<<" , Link ID: "<<linkId<<endl;
2111  // short version:
2112  cout<<" "<<fedId<<" "<<linkId<<endl;
2113  }
2114  } else {
2115  vector<string> subdirs = bei->getSubdirs();
2116  for (vector<string>::const_iterator it = subdirs.begin();
2117  it != subdirs.end(); it++) {
2118  if((*it).find("Endcap")!=string::npos) continue;
2119  bei->cd(*it);
2120  dumpBarrelModIds(bei,eSetup);
2121  bei->goUp();
2122  }
2123  }
2124 }
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1424
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:411
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:1447
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:445
tuple cout
Definition: gather_cfg.py:121
const std::string & pwd(void) const
Definition: DQMStore.cc:406
void SiPixelActionExecutor::dumpBarrelRefValues ( DQMStore bei,
edm::EventSetup const &  eSetup 
)

Definition at line 2208 of file SiPixelActionExecutor.cc.

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

Referenced by dumpRefValues().

2208  {
2209  MonitorElement* me;
2210  me = bei->get("Pixel/Barrel/SUMDIG_adc_Barrel");
2211  if(me){
2212  std::cout<<"SUMDIG_adc_Barrel: "<<std::endl;
2213  for(int i=1; i!=769; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2214  }
2215  me = bei->get("Pixel/Barrel/SUMDIG_ndigis_Barrel");
2216  if(me){
2217  std::cout<<"SUMDIG_ndigis_Barrel: "<<std::endl;
2218  for(int i=1; i!=769; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2219  }
2220  me = bei->get("Pixel/Barrel/SUMCLU_charge_Barrel");
2221  if(me){
2222  std::cout<<"SUMCLU_charge_Barrel: "<<std::endl;
2223  for(int i=1; i!=769; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2224  }
2225  me = bei->get("Pixel/Barrel/SUMCLU_nclusters_Barrel");
2226  if(me){
2227  std::cout<<"SUMCLU_nclusters_Barrel: "<<std::endl;
2228  for(int i=1; i!=769; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2229  }
2230  me = bei->get("Pixel/Barrel/SUMCLU_size_Barrel");
2231  if(me){
2232  std::cout<<"SUMCLU_size_Barrel: "<<std::endl;
2233  for(int i=1; i!=769; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2234  }
2235 }
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:1473
double getBinContent(int binx) const
get content of bin (1-D)
tuple cout
Definition: gather_cfg.py:121
void SiPixelActionExecutor::dumpEndcapModIds ( DQMStore bei,
edm::EventSetup const &  eSetup 
)

Definition at line 2127 of file SiPixelActionExecutor.cc.

References DQMStore::cd(), relmon_rootfiles_spy::contents, gather_cfg::cout, 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().

2127  {
2128  string currDir = bei->pwd();
2129  string dir_name = "Panel_";
2130  eSetup.get<SiPixelFedCablingMapRcd>().get(theCablingMap);
2131  int fedId=-1; int linkId=-1;
2132  if (currDir.find(dir_name) != string::npos) {
2133  vector<string> subdirs = bei->getSubdirs();
2134  for (vector<string>::const_iterator it = subdirs.begin();
2135  it != subdirs.end(); it++) {
2136  if ( (*it).find("Module_") == string::npos) continue;
2137  bei->cd(*it);
2138  ndet_++;
2139  // long version:
2140  //cout<<"Ndet: "<<ndet_<<" , Module: "<<bei->pwd();
2141  // short version:
2142  cout<<bei->pwd();
2143  vector<string> contents = bei->getMEs();
2144  bool first_me = false;
2145  int detId = -999;
2146  for (vector<string>::const_iterator im = contents.begin();
2147  im != contents.end(); im++) {
2148  if(first_me) break;
2149  string mEName = (*im);
2150  string detIdString = mEName.substr((mEName.find_last_of("_"))+1,9);
2151  std::istringstream isst;
2152  isst.str(detIdString);
2153  if(mEName.find("_3")!=string::npos) isst>>detId;
2154  }
2155  bei->goUp();
2156  // long version:
2157  //cout<<" , detector ID: "<<detId;
2158  // short version:
2159  cout<<" "<<detId;
2160  for(int fedid=0; fedid<=40; ++fedid){
2161  SiPixelFrameConverter converter(theCablingMap.product(),fedid);
2162  uint32_t newDetId = detId;
2163  if(converter.hasDetUnit(newDetId)){
2164  fedId=fedid;
2165  break;
2166  }
2167  }
2168  if(fedId==-1) continue;
2170  SiPixelFrameConverter formatter(theCablingMap.product(),fedId);
2171  assert(detId >= 0);
2172  sipixelobjects::DetectorIndex detector = {static_cast<unsigned int>(detId), 1, 1};
2173  formatter.toCabling(cabling,detector);
2174  linkId = cabling.link;
2175  // long version:
2176  //cout<<" , FED ID: "<<fedId<<" , Link ID: "<<linkId<<endl;
2177  // short version:
2178  cout<<" "<<fedId<<" "<<linkId<<endl;
2179  }
2180  } else {
2181  vector<string> subdirs = bei->getSubdirs();
2182  for (vector<string>::const_iterator it = subdirs.begin();
2183  it != subdirs.end(); it++) {
2184  if((bei->pwd()).find("Barrel")!=string::npos) bei->goUp();
2185  bei->cd((*it));
2186  if((*it).find("Barrel")!=string::npos) continue;
2187  dumpEndcapModIds(bei,eSetup);
2188  bei->goUp();
2189  }
2190  }
2191 
2192 }
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1424
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:411
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:1447
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:445
tuple cout
Definition: gather_cfg.py:121
const std::string & pwd(void) const
Definition: DQMStore.cc:406
void SiPixelActionExecutor::dumpEndcapRefValues ( DQMStore bei,
edm::EventSetup const &  eSetup 
)

Definition at line 2238 of file SiPixelActionExecutor.cc.

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

Referenced by dumpRefValues().

2238  {
2239  MonitorElement* me;
2240  me = bei->get("Pixel/Endcap/SUMDIG_adc_Endcap");
2241  if(me){
2242  std::cout<<"SUMDIG_adc_Endcap: "<<std::endl;
2243  for(int i=1; i!=673; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2244  }
2245  me = bei->get("Pixel/Endcap/SUMDIG_ndigis_Endcap");
2246  if(me){
2247  std::cout<<"SUMDIG_ndigis_Endcap: "<<std::endl;
2248  for(int i=1; i!=673; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2249  }
2250  me = bei->get("Pixel/Endcap/SUMCLU_charge_Endcap");
2251  if(me){
2252  std::cout<<"SUMCLU_charge_Endcap: "<<std::endl;
2253  for(int i=1; i!=673; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2254  }
2255  me = bei->get("Pixel/Endcap/SUMCLU_nclusters_Endcap");
2256  if(me){
2257  std::cout<<"SUMCLU_nclusters_Endcap: "<<std::endl;
2258  for(int i=1; i!=673; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2259  }
2260  me = bei->get("Pixel/Endcap/SUMCLU_size_Endcap");
2261  if(me){
2262  std::cout<<"SUMCLU_size_Endcap: "<<std::endl;
2263  for(int i=1; i!=673; i++) std::cout<<i<<" "<<me->getBinContent(i)<<std::endl;
2264  }
2265 }
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:1473
double getBinContent(int binx) const
get content of bin (1-D)
tuple cout
Definition: gather_cfg.py:121
void SiPixelActionExecutor::dumpModIds ( DQMStore bei,
edm::EventSetup const &  eSetup 
)

Definition at line 2049 of file SiPixelActionExecutor.cc.

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

2049  {
2050  //printing cout<<"Going to dump module IDs now!"<<endl;
2051  bei->cd();
2052  dumpBarrelModIds(bei,eSetup);
2053  bei->cd();
2054  dumpEndcapModIds(bei,eSetup);
2055  bei->cd();
2056  //printing cout<<"Done dumping module IDs!"<<endl;
2057 }
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:411
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 2196 of file SiPixelActionExecutor.cc.

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

2196  {
2197  //printing cout<<"Going to dump module IDs now!"<<endl;
2198  bei->cd();
2199  dumpBarrelRefValues(bei,eSetup);
2200  bei->cd();
2201  dumpEndcapRefValues(bei,eSetup);
2202  bei->cd();
2203  //printing cout<<"Done dumping module IDs!"<<endl;
2204 }
void dumpBarrelRefValues(DQMStore *bei, edm::EventSetup const &eSetup)
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:411
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:1473
double getBinContent(int binx) const
get content of bin (1-D)
void SiPixelActionExecutor::fillEfficiency ( DQMStore bei,
bool  isbarrel 
)

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

2312  {
2313  //cout<<"entering SiPixelActionExecutor::fillEfficiency..."<<std::endl;
2314  string currDir = bei->pwd();
2315  string dname = currDir.substr(currDir.find_last_of("/")+1);
2316  //cout<<"currDir= "<<currDir<< " , dname= "<<dname<<std::endl;
2317 
2318  if(Tier0Flag_){ // Offline
2319  if(isbarrel && dname.find("Ladder_")!=string::npos){
2320  vector<string> meVec = bei->getMEs();
2321  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2322  string full_path = currDir + "/" + (*it);
2323  if(full_path.find("missing_")!=string::npos){ // If we have missing hits ME
2324  MonitorElement * me = bei->get(full_path);
2325  if (!me) continue;
2326  float missingHits = me->getEntries();
2327  //if(currDir.find("Barrel/Shell_mI/Layer_1/Ladder_09F")!=string::npos) cout<<"missingHits= "<<missingHits<<endl;
2328  string new_path = full_path.replace(full_path.find("missing"),7,"valid");
2329  me = bei->get(new_path);
2330  if (!me) continue;
2331  float validHits = me->getEntries();
2332  //if(currDir.find("Barrel/Shell_mI/Layer_1/Ladder_09F")!=string::npos) cout<<"validHits= "<<validHits<<endl;
2333  float hitEfficiency = -1.;
2334  if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2335  //if(currDir.find("Barrel/Shell_mI/Layer_1/Ladder_09F")!=string::npos) cout<<"hitEfficiency= "<<hitEfficiency<<endl;
2336  int binx = 0; int biny = 0;
2337  if(currDir.find("Shell_m")!=string::npos){ binx = 1;}else{ binx = 2;}
2338  if(dname.find("01")!=string::npos){ biny = 1;}else if(dname.find("02")!=string::npos){ biny = 2;}
2339  else if(dname.find("03")!=string::npos){ biny = 3;}else if(dname.find("04")!=string::npos){ biny = 4;}
2340  else if(dname.find("05")!=string::npos){ biny = 5;}else if(dname.find("06")!=string::npos){ biny = 6;}
2341  else if(dname.find("07")!=string::npos){ biny = 7;}else if(dname.find("08")!=string::npos){ biny = 8;}
2342  else if(dname.find("09")!=string::npos){ biny = 9;}else if(dname.find("10")!=string::npos){ biny = 10;}
2343  else if(dname.find("11")!=string::npos){ biny = 11;}else if(dname.find("12")!=string::npos){ biny = 12;}
2344  else if(dname.find("13")!=string::npos){ biny = 13;}else if(dname.find("14")!=string::npos){ biny = 14;}
2345  else if(dname.find("15")!=string::npos){ biny = 15;}else if(dname.find("16")!=string::npos){ biny = 16;}
2346  else if(dname.find("17")!=string::npos){ biny = 17;}else if(dname.find("18")!=string::npos){ biny = 18;}
2347  else if(dname.find("19")!=string::npos){ biny = 19;}else if(dname.find("20")!=string::npos){ biny = 20;}
2348  else if(dname.find("21")!=string::npos){ biny = 21;}else if(dname.find("22")!=string::npos){ biny = 22;}
2349  if(currDir.find("Shell_mO")!=string::npos || currDir.find("Shell_pO")!=string::npos){
2350  if(currDir.find("Layer_1")!=string::npos){ biny = biny + 10;}
2351  else if(currDir.find("Layer_2")!=string::npos){ biny = biny + 16;}
2352  else if(currDir.find("Layer_3")!=string::npos){ biny = biny + 22;}
2353  }
2354  if(currDir.find("Layer_1")!=string::npos){
2355  HitEfficiency_L1 = bei->get("Pixel/Barrel/HitEfficiency_L1");
2356  if(HitEfficiency_L1) HitEfficiency_L1->setBinContent(binx, biny,(float)hitEfficiency);
2357  //if(currDir.find("Barrel/Shell_mI/Layer_1/Ladder_09F")!=string::npos) cout<<"setting bin ("<<binx<<","<<biny<<") with "<<(float)hitEfficiency<<endl;
2358  }else if(currDir.find("Layer_2")!=string::npos){
2359  HitEfficiency_L2 = bei->get("Pixel/Barrel/HitEfficiency_L2");
2360  if(HitEfficiency_L2) HitEfficiency_L2->setBinContent(binx, biny,(float)hitEfficiency);
2361  }else if(currDir.find("Layer_3")!=string::npos){
2362  HitEfficiency_L3 = bei->get("Pixel/Barrel/HitEfficiency_L3");
2363  if(HitEfficiency_L3) HitEfficiency_L3->setBinContent(binx, biny,(float)hitEfficiency);
2364  }
2365  }
2366  }
2367  }else if(!isbarrel && dname.find("Blade_")!=string::npos){
2368  vector<string> meVec = bei->getMEs();
2369  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2370  string full_path = currDir + "/" + (*it);
2371  if(full_path.find("missing_")!=string::npos){ // If we have missing hits ME
2372  MonitorElement * me = bei->get(full_path);
2373  if (!me) continue;
2374  float missingHits = me->getEntries();
2375  string new_path = full_path.replace(full_path.find("missing"),7,"valid");
2376  me = bei->get(new_path);
2377  if (!me) continue;
2378  float validHits = me->getEntries();
2379  float hitEfficiency = -1.;
2380  if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2381  int binx = 0; int biny = 1;
2382  if(currDir.find("01")!=string::npos){ binx = 1;}else if(currDir.find("02")!=string::npos){ binx = 2;}
2383  else if(currDir.find("03")!=string::npos){ binx = 3;}else if(currDir.find("04")!=string::npos){ binx = 4;}
2384  else if(currDir.find("05")!=string::npos){ binx = 5;}else if(currDir.find("06")!=string::npos){ binx = 6;}
2385  else if(currDir.find("07")!=string::npos){ binx = 7;}else if(currDir.find("08")!=string::npos){ binx = 8;}
2386  else if(currDir.find("09")!=string::npos){ binx = 9;}else if(currDir.find("10")!=string::npos){ binx = 10;}
2387  else if(currDir.find("11")!=string::npos){ binx = 11;}else if(currDir.find("12")!=string::npos){ binx = 12;}
2388  if(currDir.find("HalfCylinder_mI")!=string::npos || currDir.find("HalfCylinder_pI")!=string::npos){ binx = binx + 12;}
2389  else{
2390  if(binx==1) binx = 12;
2391  else if(binx==2) binx = 11;
2392  else if(binx==3) binx = 10;
2393  else if(binx==4) binx = 9;
2394  else if(binx==5) binx = 8;
2395  else if(binx==6) binx = 7;
2396  else if(binx==7) binx = 6;
2397  else if(binx==8) binx = 5;
2398  else if(binx==9) binx = 4;
2399  else if(binx==10) binx = 3;
2400  else if(binx==11) binx = 2;
2401  else if(binx==12) binx = 1;
2402  }
2403  if(currDir.find("Disk_1")!=string::npos && currDir.find("HalfCylinder_m")!=string::npos){
2404  HitEfficiency_Dm1 = bei->get("Pixel/Endcap/HitEfficiency_Dm1");
2405  if(HitEfficiency_Dm1) HitEfficiency_Dm1->setBinContent(binx, biny, (float)hitEfficiency);
2406  }else if(currDir.find("Disk_2")!=string::npos && currDir.find("HalfCylinder_m")!=string::npos){
2407  HitEfficiency_Dm2 = bei->get("Pixel/Endcap/HitEfficiency_Dm2");
2408  if(HitEfficiency_Dm2) HitEfficiency_Dm2->setBinContent(binx, biny, (float)hitEfficiency);
2409  }else if(currDir.find("Disk_1")!=string::npos && currDir.find("HalfCylinder_p")!=string::npos){
2410  HitEfficiency_Dp1 = bei->get("Pixel/Endcap/HitEfficiency_Dp1");
2411  if(HitEfficiency_Dp1) HitEfficiency_Dp1->setBinContent(binx, biny, (float)hitEfficiency);
2412  }else if(currDir.find("Disk_2")!=string::npos && currDir.find("HalfCylinder_p")!=string::npos){
2413  HitEfficiency_Dp2 = bei->get("Pixel/Endcap/HitEfficiency_Dp2");
2414  if(HitEfficiency_Dp2) HitEfficiency_Dp2->setBinContent(binx, biny, (float)hitEfficiency);
2415  }
2416  //std::cout<<"EFFI: "<<currDir<<" , x: "<<binx<<" , y: "<<biny<<std::endl;
2417  }
2418  }
2419  }else{
2420  //cout<<"finding subdirs now"<<std::endl;
2421  vector<string> subdirs = bei->getSubdirs();
2422  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
2423  bei->cd(*it);
2424  //cout<<"now I am in "<<bei->pwd()<<std::endl;
2425  if(*it != "Pixel" && ((isbarrel && (*it).find("Barrel")==string::npos) || (!isbarrel && (*it).find("Endcap")==string::npos))) continue;
2426  //cout<<"calling myself again "<<std::endl;
2427  fillEfficiency(bei, isbarrel);
2428  bei->goUp();
2429  }
2430  }
2431  }else{ // Online
2432  if(dname.find("Module_")!=string::npos){
2433  vector<string> meVec = bei->getMEs();
2434  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2435  string full_path = currDir + "/" + (*it);
2436  if(full_path.find("missing_")!=string::npos){ // If we have missing hits ME
2437  MonitorElement * me = bei->get(full_path);
2438  if (!me) continue;
2439  float missingHits = me->getEntries();
2440  string new_path = full_path.replace(full_path.find("missing"),7,"valid");
2441  me = bei->get(new_path);
2442  if (!me) continue;
2443  float validHits = me->getEntries();
2444  float hitEfficiency = -1.;
2445  if(validHits + missingHits > 0.) hitEfficiency = validHits / (validHits + missingHits);
2446  int binx = 0; int biny = 0;
2447  if(isbarrel){
2448  if(currDir.find("Shell_m")!=string::npos){
2449  if(currDir.find("Module_4")!=string::npos){ binx = 1;}else if(currDir.find("Module_3")!=string::npos){ binx = 2;}
2450  if(currDir.find("Module_2")!=string::npos){ binx = 3;}else if(currDir.find("Module_1")!=string::npos){ binx = 4;}
2451  }else if(currDir.find("Shell_p")!=string::npos){
2452  if(currDir.find("Module_1")!=string::npos){ binx = 5;}else if(currDir.find("Module_2")!=string::npos){ binx = 6;}
2453  if(currDir.find("Module_3")!=string::npos){ binx = 7;}else if(currDir.find("Module_4")!=string::npos){ binx = 8;}
2454  }
2455  if(currDir.find("01")!=string::npos){ biny = 1;}else if(currDir.find("02")!=string::npos){ biny = 2;}
2456  else if(currDir.find("03")!=string::npos){ biny = 3;}else if(currDir.find("04")!=string::npos){ biny = 4;}
2457  else if(currDir.find("05")!=string::npos){ biny = 5;}else if(currDir.find("06")!=string::npos){ biny = 6;}
2458  else if(currDir.find("07")!=string::npos){ biny = 7;}else if(currDir.find("08")!=string::npos){ biny = 8;}
2459  else if(currDir.find("09")!=string::npos){ biny = 9;}else if(currDir.find("10")!=string::npos){ biny = 10;}
2460  else if(currDir.find("11")!=string::npos){ biny = 11;}else if(currDir.find("12")!=string::npos){ biny = 12;}
2461  else if(currDir.find("13")!=string::npos){ biny = 13;}else if(currDir.find("14")!=string::npos){ biny = 14;}
2462  else if(currDir.find("15")!=string::npos){ biny = 15;}else if(currDir.find("16")!=string::npos){ biny = 16;}
2463  else if(currDir.find("17")!=string::npos){ biny = 17;}else if(currDir.find("18")!=string::npos){ biny = 18;}
2464  else if(currDir.find("19")!=string::npos){ biny = 19;}else if(currDir.find("20")!=string::npos){ biny = 20;}
2465  else if(currDir.find("21")!=string::npos){ biny = 21;}else if(currDir.find("22")!=string::npos){ biny = 22;}
2466  if(currDir.find("Shell_mO")!=string::npos || currDir.find("Shell_pO")!=string::npos){
2467  if(currDir.find("Layer_1")!=string::npos){ biny = biny + 10;}
2468  else if(currDir.find("Layer_2")!=string::npos){ biny = biny + 16;}
2469  else if(currDir.find("Layer_3")!=string::npos){ biny = biny + 22;}
2470  }
2471  }else{
2472  if(currDir.find("01")!=string::npos){ binx = 1;}else if(currDir.find("02")!=string::npos){ binx = 2;}
2473  else if(currDir.find("03")!=string::npos){ binx = 3;}else if(currDir.find("04")!=string::npos){ binx = 4;}
2474  else if(currDir.find("05")!=string::npos){ binx = 5;}else if(currDir.find("06")!=string::npos){ binx = 6;}
2475  else if(currDir.find("07")!=string::npos){ binx = 7;}else if(currDir.find("08")!=string::npos){ binx = 8;}
2476  else if(currDir.find("09")!=string::npos){ binx = 9;}else if(currDir.find("10")!=string::npos){ binx = 10;}
2477  else if(currDir.find("11")!=string::npos){ binx = 11;}else if(currDir.find("12")!=string::npos){ binx = 12;}
2478  if(currDir.find("HalfCylinder_mO")!=string::npos || currDir.find("HalfCylinder_pO")!=string::npos){ binx = binx + 12;}
2479  if(currDir.find("Panel_1/Module_1")!=string::npos){ biny = 1;}else if(currDir.find("Panel_2/Module_1")!=string::npos){ biny = 2;}
2480  else if(currDir.find("Panel_1/Module_2")!=string::npos){ biny = 3;}else if(currDir.find("Panel_2/Module_2")!=string::npos){ biny = 4;}
2481  else if(currDir.find("Panel_1/Module_3")!=string::npos){ biny = 5;}else if(currDir.find("Panel_2/Module_3")!=string::npos){ biny = 6;}
2482  else if(currDir.find("Panel_1/Module_4")!=string::npos){ biny = 7;}
2483  }
2484 
2485  if(currDir.find("Layer_1")!=string::npos){
2486  HitEfficiency_L1 = bei->get("Pixel/Barrel/HitEfficiency_L1");
2487  if(HitEfficiency_L1) HitEfficiency_L1->setBinContent(binx, biny,(float)hitEfficiency);
2488  }else if(currDir.find("Layer_2")!=string::npos){
2489  HitEfficiency_L2 = bei->get("Pixel/Barrel/HitEfficiency_L2");
2490  if(HitEfficiency_L2) HitEfficiency_L2->setBinContent(binx, biny,(float)hitEfficiency);
2491  }else if(currDir.find("Layer_3")!=string::npos){
2492  HitEfficiency_L3 = bei->get("Pixel/Barrel/HitEfficiency_L3");
2493  if(HitEfficiency_L3) HitEfficiency_L3->setBinContent(binx, biny,(float)hitEfficiency);
2494  }else if(currDir.find("Disk_1")!=string::npos && currDir.find("HalfCylinder_m")!=string::npos){
2495  HitEfficiency_Dm1 = bei->get("Pixel/Endcap/HitEfficiency_Dm1");
2496  if(HitEfficiency_Dm1) HitEfficiency_Dm1->setBinContent(binx, biny,(float)hitEfficiency);
2497  }else if(currDir.find("Disk_2")!=string::npos && currDir.find("HalfCylinder_m")!=string::npos){
2498  HitEfficiency_Dm2 = bei->get("Pixel/Endcap/HitEfficiency_Dm2");
2499  if(HitEfficiency_Dm2) HitEfficiency_Dm2->setBinContent(binx, biny,(float)hitEfficiency);
2500  }else if(currDir.find("Disk_1")!=string::npos && currDir.find("HalfCylinder_p")!=string::npos){
2501  HitEfficiency_Dp1 = bei->get("Pixel/Endcap/HitEfficiency_Dp1");
2502  if(HitEfficiency_Dp1) HitEfficiency_Dp1->setBinContent(binx, biny,(float)hitEfficiency);
2503  }else if(currDir.find("Disk_2")!=string::npos && currDir.find("HalfCylinder_p")!=string::npos){
2504  HitEfficiency_Dp2 = bei->get("Pixel/Endcap/HitEfficiency_Dp2");
2505  if(HitEfficiency_Dp2) HitEfficiency_Dp2->setBinContent(binx, biny,(float)hitEfficiency);
2506  }
2507  }
2508  }
2509  }else{
2510  //cout<<"finding subdirs now"<<std::endl;
2511  vector<string> subdirs = bei->getSubdirs();
2512  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
2513  bei->cd(*it);
2514  //cout<<"now I am in "<<bei->pwd()<<std::endl;
2515  if(*it != "Pixel" && ((isbarrel && (*it).find("Barrel")==string::npos) || (!isbarrel && (*it).find("Endcap")==string::npos))) continue;
2516  //cout<<"calling myself again "<<std::endl;
2517  fillEfficiency(bei, isbarrel);
2518  bei->goUp();
2519  }
2520  }
2521  } // end online/offline
2522 
2523  //cout<<"leaving SiPixelActionExecutor::fillEfficiency..."<<std::endl;
2524 
2525 }
void setBinContent(int binx, double content)
set content of bin (1-D)
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1424
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:411
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:1473
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:1447
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:445
MonitorElement * HitEfficiency_Dp2
MonitorElement * HitEfficiency_Dm1
const std::string & pwd(void) const
Definition: DQMStore.cc:406
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(), relmon_rootfiles_spy::contents, spr::find(), DQMStore::get(), MonitorElement::getBinContent(), MonitorElement::getEntries(), getFEDSummaryME(), MonitorElement::getIntValue(), MonitorElement::getMean(), DQMStore::getMEs(), DQMStore::getSubdirs(), DQMStore::goUp(), i, isum, findQualityFiles::jj, n, prof2calltree::prefix, DQMStore::pwd(), MonitorElement::Reset(), MonitorElement::setBinContent(), MonitorElement::setBinLabel(), lumiContext::sname, source_type_, GlobalPosition_Frontier_DevDB_cff::tag, groupFilesInBlocks::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  bool isBooked = false;
753  vector<string> contents = bei->getMEs();
754  for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++)
755  if ((*im).find(*iv) != string::npos) isBooked = true;
756  if(source_type_==5||source_type_==6){
757  if((*iv)=="errorType"||(*iv)=="NErrors"||(*iv)=="fullType"||(*iv)=="chanNmbr"||
758  (*iv)=="TBMType"||(*iv)=="EvtNbr"||(*iv)=="evtSize"||(*iv)=="linkId"||
759  (*iv)=="ROCId"||(*iv)=="DCOLId"||(*iv)=="PXId"||(*iv)=="ROCNmbr"||
760  (*iv)=="TBMMessage"||(*iv)=="Type36Hitmap"||
761  (*iv)=="FedChLErrArray"||(*iv)=="FedChNErrArray"||(*iv)=="FedETypeNErrArray")
762  prefix="SUMRAW";
763  }
764  if((*iv)=="errorType"||(*iv)=="NErrors"||(*iv)=="fullType"||(*iv)=="chanNmbr"||
765  (*iv)=="TBMType"||(*iv)=="EvtNbr"||(*iv)=="evtSize"||(*iv)=="linkId"||
766  (*iv)=="ROCId"||(*iv)=="DCOLId"||(*iv)=="PXId"||(*iv)=="ROCNmbr"||
767  (*iv)=="TBMMessage"||(*iv)=="Type36Hitmap"){
768  string tag = prefix + "_" + (*iv) + "_FEDErrors";
769  MonitorElement* temp = getFEDSummaryME(bei, tag);
770  sum_mes.push_back(temp);
771  }else if((*iv)=="FedChLErrArray"||(*iv)=="FedChNErrArray"||(*iv)=="FedETypeNErrArray"){
772  string tag = prefix + "_" + (*iv);
774  if((*iv)=="FedChLErrArray") {if (!isBooked) temp = bei->book2D("FedChLErrArray","Type of last error",40,-0.5,39.5,37,0.,37.);
775  else{
776  string fullpathname = bei->pwd() + "/" + (*iv);
777  temp = bei->get(fullpathname);
778  temp->Reset();}} //If I don't reset this one, then I instead start adding error codes..
779  if((*iv)=="FedChNErrArray") {if (!isBooked) temp = bei->book2D("FedChNErrArray","Total number of errors",40,-0.5,39.5,37,0.,37.);
780  else{
781  string fullpathname = bei->pwd() + "/" + (*iv);
782  temp = bei->get(fullpathname);
783  temp->Reset();}} //If I don't reset this one, then I instead start adding error codes..
784  if((*iv)=="FedETypeNErrArray"){
785  if(!isBooked){
786  temp = bei->book2D("FedETypeNErrArray","Number of each error type",40,-0.5,39.5,21,0.,21.);
787  temp->setBinLabel(1,"ROC of 25",2);
788  temp->setBinLabel(2,"Gap word",2);
789  temp->setBinLabel(3,"Dummy word",2);
790  temp->setBinLabel(4,"FIFO full",2);
791  temp->setBinLabel(5,"Timeout",2);
792  temp->setBinLabel(6,"Stack full",2);
793  temp->setBinLabel(7,"Pre-cal issued",2);
794  temp->setBinLabel(8,"Trigger clear or sync",2);
795  temp->setBinLabel(9,"No token bit",2);
796  temp->setBinLabel(10,"Overflow",2);
797  temp->setBinLabel(11,"FSM error",2);
798  temp->setBinLabel(12,"Invalid #ROCs",2);
799  temp->setBinLabel(13,"Event number",2);
800  temp->setBinLabel(14,"Slink header",2);
801  temp->setBinLabel(15,"Slink trailer",2);
802  temp->setBinLabel(16,"Event size",2);
803  temp->setBinLabel(17,"Invalid channel#",2);
804  temp->setBinLabel(18,"ROC value",2);
805  temp->setBinLabel(19,"Dcol or pixel value",2);
806  temp->setBinLabel(20,"Readout order",2);
807  temp->setBinLabel(21,"CRC error",2);
808  }
809  else{
810  string fullpathname = bei->pwd() + "/" + (*iv);
811  temp = bei->get(fullpathname);
812  temp->Reset();} //If I don't reset this one, then I instead start adding error codes..
813  }
814  sum_mes.push_back(temp);
815  }
816  }
817  if (sum_mes.size() == 0) {
818  edm::LogInfo("SiPixelActionExecutor") << " Summary MEs can not be created" << "\n" ;
819  return;
820  }
821  vector<string> subdirs = bei->getSubdirs();
822  int ndet = 0;
823  for (vector<string>::const_iterator it = subdirs.begin();
824  it != subdirs.end(); it++) {
825  if ( (*it).find("FED_") == string::npos) continue;
826  bei->cd(*it);
827  string fedid = (*it).substr((*it).find("_")+1);
828  std::istringstream isst;
829  isst.str(fedid);
830  isst>>ndet; ndet++;
831  vector<string> contents = bei->getMEs();
832 
833  for (vector<MonitorElement*>::const_iterator isum = sum_mes.begin();
834  isum != sum_mes.end(); isum++) {
835  for (vector<string>::const_iterator im = contents.begin();
836  im != contents.end(); im++) {
837  if(((*im).find("FedChNErrArray_")!=std::string::npos && (*isum)->getName().find("FedChNErrArray")!=std::string::npos) ||
838  ((*im).find("FedChLErrArray_")!=std::string::npos && (*isum)->getName().find("FedChLErrArray")!=std::string::npos) ||
839  ((*im).find("FedETypeNErrArray_")!=std::string::npos && (*isum)->getName().find("FedETypeNErrArray")!=std::string::npos)){
840  string fullpathname = bei->pwd() + "/" + (*im);
841  MonitorElement * me = bei->get(fullpathname);
842  if(me && me->getIntValue()>0){
843  for(int i=0; i!=37; i++){
844  int n = (*im).find("_"); n++;
845  string channel_str = (*im).substr(n);
846  std::istringstream jsst;
847  jsst.str(channel_str);
848  int channel=-1;
849  jsst>>channel;
850  if(channel==i){
851  if((*im).find("FedETypeNErrArray_")!=std::string::npos && i<21) (*isum)->Fill(ndet-1,i,me->getIntValue());
852  else (*isum)->Fill(ndet-1,i,me->getIntValue());
853  }
854  }
855  }
856  }
857  string sname = ((*isum)->getName());
858  string tname = " ";
859  tname = sname.substr(7,(sname.find("_",7)-6));
860  if (((*im)).find(tname) == 0) {
861  string fullpathname = bei->pwd() + "/" + (*im);
862  MonitorElement * me = bei->get(fullpathname);
863 
864  if (me){
865  if(me->getMean()>0.){
866  if (sname.find("_NErrors_")!=string::npos){
867  string path1 = fullpathname;
868  path1 = path1.replace(path1.find("NErrors"),7,"errorType");
869  MonitorElement * me1 = bei->get(path1);
870  bool notReset=true;
871  if(me1){
872  for(int jj=1; jj<16; jj++){
873  if(me1->getBinContent(jj)>0.){
874  if(jj==6){ //errorType=30 (reset)
875  string path2 = path1;
876  path2 = path2.replace(path2.find("errorType"),9,"TBMMessage");
877  MonitorElement * me2 = bei->get(path2);
878  if(me2) if(me2->getBinContent(6)>0. || me2->getBinContent(7)>0.) notReset=false;
879  }
880  }
881  }
882  }
883  if(notReset) (*isum)->setBinContent(ndet, (*isum)->getBinContent(ndet) + me1->getEntries());
884  }else (*isum)->setBinContent(ndet, (*isum)->getBinContent(ndet) + me->getEntries());
885  }
886  (*isum)->setAxisTitle("FED #",1);
887  string title = " ";
888  title = sname.substr(7,(sname.find("_",7)-7)) + " per FED";
889  (*isum)->setAxisTitle(title,2);
890  }
891  break;
892  }
893  }
894  }
895  bei->goUp();
896  }
897  } else {
898  vector<string> subdirs = bei->getSubdirs();
899  for (vector<string>::const_iterator it = subdirs.begin();
900  it != subdirs.end(); it++) {
901  if((*it).find("Endcap")!=string::npos ||
902  (*it).find("Barrel")!=string::npos) continue;
903  bei->cd(*it);
904  fillFEDErrorSummary(bei, dir_name, me_names);
905  bei->goUp();
906  }
907  }
908  //printing cout<<"...leaving SiPixelActionExecutor::fillFEDErrorSummary!"<<endl;
909 }
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:1424
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:411
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:1473
int64_t getIntValue(void) const
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1447
double getBinContent(int binx) const
get content of bin (1-D)
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:445
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:850
void Reset(void)
reset ME (ie. contents, errors, etc)
void fillFEDErrorSummary(DQMStore *bei, std::string dir_name, std::vector< std::string > &me_names)
const std::string & pwd(void) const
Definition: DQMStore.cc:406
void SiPixelActionExecutor::fillGrandBarrelSummaryHistos ( DQMStore bei,
std::vector< std::string > &  me_names 
)
private

Definition at line 913 of file SiPixelActionExecutor.cc.

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

Referenced by fillSummary().

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

Definition at line 1140 of file SiPixelActionExecutor.cc.

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

Referenced by fillSummary().

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

Definition at line 2001 of file SiPixelActionExecutor.cc.

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

Referenced by createLayout().

2001  {
2002 
2003  static int icount = 0;
2004  string currDir = bei->pwd();
2005  if (currDir.find("Ladder_") != string::npos) {
2006 
2007  vector<string> contents = bei->getMEs();
2008 
2009  for (vector<string>::const_iterator im = contents.begin();
2010  im != contents.end(); im++) {
2011  if ((*im).find("Clusters") != string::npos) {
2012  icount++;
2013  if (icount != 0 && icount%6 == 0) {
2015  }
2016  ostringstream full_path;
2017  full_path << "test/" << currDir << "/" << *im ;
2018  string element = "monitorable";
2019  string element_name = full_path.str();
2020  configWriter_->createColumn(element, element_name);
2021  }
2022  }
2023  } else {
2024  vector<string> subdirs = bei->getSubdirs();
2025  for (vector<string>::const_iterator it = subdirs.begin();
2026  it != subdirs.end(); it++) {
2027  bei->cd(*it);
2028  fillLayout(bei);
2029  bei->goUp();
2030  }
2031  }
2032 }
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1424
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:411
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:1447
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:445
const std::string & pwd(void) const
Definition: DQMStore.cc:406
void SiPixelActionExecutor::fillOccupancy ( DQMStore bei,
bool  isbarrel 
)
private

Definition at line 1539 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, getHLTPrescaleColumns::path, DQMStore::pwd(), MonitorElement::setBinContent(), and Tier0Flag_.

Referenced by createOccupancy().

1540 {
1541  //occupancyprinting cout<<"entering SiPixelActionExecutor::fillOccupancy..."<<std::endl;
1542  if(Tier0Flag_) return;
1543  string currDir = bei->pwd();
1544  string dname = currDir.substr(currDir.find_last_of("/")+1);
1545  //occupancyprinting cout<<"currDir= "<<currDir<< " , dname= "<<dname<<std::endl;
1546 
1547  if(dname.find("Layer_")!=string::npos || dname.find("Disk_")!=string::npos){
1548  vector<string> meVec = bei->getMEs();
1549  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
1550  string full_path = currDir + "/" + (*it);
1551  if(full_path.find("hitmap_siPixelDigis")!=string::npos){ // If we have the hitmap ME
1552  MonitorElement * me = bei->get(full_path);
1553  if (!me) continue;
1554  //occupancyprinting cout << full_path << endl;
1555  string path = full_path;
1556  while (path.find_last_of("/") != 5) // Stop before Pixel/
1557  {
1558  path = path.substr(0,path.find_last_of("/"));
1559  // cout << "\t" << path << endl;
1560  OccupancyMap = bei->get(path + "/" + (isbarrel?"barrel":"endcap") + "OccupancyMap");
1561 
1562  if(OccupancyMap){
1563  for(int i=1; i!=me->getNbinsX()+1; i++) for(int j=1; j!=me->getNbinsY()+1; j++){
1564  float previous = OccupancyMap->getBinContent(i,j);
1565  OccupancyMap->setBinContent(i,j,previous + me->getBinContent(i,j));
1566  }
1567  OccupancyMap->getTH2F()->SetEntries(OccupancyMap->getTH2F()->Integral());
1568  }
1569 
1570  }
1571  }
1572 
1573  }
1574  //bei->goUp();
1575  } else {
1576  //occupancyprinting cout<<"finding subdirs now"<<std::endl;
1577  vector<string> subdirs = bei->getSubdirs();
1578  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
1579  bei->cd(*it);
1580  //occupancyprinting cout<<"now I am in "<<bei->pwd()<<std::endl;
1581  if(*it != "Pixel" && ((isbarrel && (*it).find("Barrel")==string::npos) || (!isbarrel && (*it).find("Endcap")==string::npos))) continue;
1582  //occupancyprinting cout<<"calling myself again "<<std::endl;
1583  fillOccupancy(bei, isbarrel);
1584  bei->goUp();
1585  }
1586  }
1587 
1588  //occupancyprinting cout<<"leaving SiPixelActionExecutor::fillOccupancy..."<<std::endl;
1589 
1590 }
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:1424
void fillOccupancy(DQMStore *bei, bool isbarrel)
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:411
int getNbinsY(void) const
get # of bins in Y-axis
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:1473
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1447
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:445
TH2F * getTH2F(void) const
const std::string & pwd(void) const
Definition: DQMStore.cc:406
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_, relmon_rootfiles_spy::contents, 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, findQualityFiles::jj, nlast, prof2calltree::prefix, DQMStore::pwd(), tablePrinter::rows, lumiContext::sname, source_type_, mathSSE::sqrt(), GlobalPosition_Frontier_DevDB_cff::tag, groupFilesInBlocks::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:1424
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:411
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:48
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:1473
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:1447
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:445
tuple cout
Definition: gather_cfg.py:121
const std::string & pwd(void) const
Definition: DQMStore.cc:406
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:1424
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:411
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 1712 of file SiPixelActionExecutor.cc.

References relmon_rootfiles_spy::contents, EachBinContent, Entries, DQMStore::get(), DQMStore::getMEs(), MonitorElement::getTH1F(), timingPdfMaker::histo, i, j, gen::k, prof2calltree::l, m, Association::map, Mean, pileupCalc::nbins, DQMStore::pwd(), AlCaHLTBitMon_QueryRunRegistry::string, Sum, and WeightedSum.

Referenced by createMap().

1712  {
1713 
1714 // cout << "Starting with SiPixelActionExecutor::getData" << endl;
1715  vector<string> contents = bei->getMEs();
1716  for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++)
1717  {
1718  if((*im).find(type + "_") == string::npos){
1719  // cout << "Skip";
1720  continue; // Searching for specific type
1721  }
1722  //cout << "Name: " << *im << endl;
1723  std::string fullpathname = bei->pwd() + "/" + (*im);
1724  MonitorElement* me = bei->get(fullpathname);
1725 
1726  if (me) {
1727  TH1F* histo = me->getTH1F();
1728 
1729  Int_t nbins = histo->GetNbinsX();
1730  // cout << "# of bins: " << nbins << endl;
1731  switch (ff){
1732  case EachBinContent:
1733  map[i][j][k][l] = histo->GetBinContent(l + 1);
1734  break;
1735 
1736  case Entries:
1737  map[i][j][k][l] = histo->GetEntries();
1738  break;
1739 
1740  case Mean:
1741  map[i][j][k][l] = histo->GetMean();
1742  break;
1743 
1744  case Sum:
1745  {
1746  Double_t sum = 0;
1747  for(Int_t m = 0; m < nbins; m++)
1748  sum += histo->GetBinContent(m + 1);
1749  map[i][j][k][l] = sum;
1750  }
1751  break;
1752 
1753  case WeightedSum:
1754  {
1755  Double_t sum = 0;
1756  for(Int_t m = 0; m < nbins; m++)
1757  sum += histo->GetBinContent(m + 1) * histo->GetBinLowEdge(m + 1);
1758  map[i][j][k][l] = sum;
1759  }
1760  break;
1761 
1762  default:
1763  map[i][j][k][l] = 0;
1764  }
1765  }}
1766 // cout << "Done with SiPixelActionExecutor::getData" << endl;
1767 }
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
dictionary map
Definition: Association.py:205
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:1473
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:1447
const std::string & pwd(void) const
Definition: DQMStore.cc:406
MonitorElement * SiPixelActionExecutor::getFEDSummaryME ( DQMStore bei,
std::string  me_name 
)
private

Definition at line 1447 of file SiPixelActionExecutor.cc.

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

Referenced by fillFEDErrorSummary().

1448  {
1449  //printing cout<<"Entering SiPixelActionExecutor::getFEDSummaryME..."<<endl;
1450  MonitorElement* me = 0;
1451  if((bei->pwd()).find("Pixel")==string::npos) return me;
1452  vector<string> contents = bei->getMEs();
1453 
1454  for (vector<string>::const_iterator it = contents.begin();
1455  it != contents.end(); it++) {
1456  if ((*it).find(me_name) == 0) {
1457  string fullpathname = bei->pwd() + "/" + (*it);
1458 
1459  me = bei->get(fullpathname);
1460 
1461  if (me) {
1462  //printing cout<<"got the ME: "<<fullpathname<<endl;
1463  me->Reset();
1464  return me;
1465  }
1466  }
1467  }
1468  contents.clear();
1469  me = bei->book1D(me_name.c_str(), me_name.c_str(),40,-0.5,39.5);
1470  //if(me) cout<<"finally got the ME: "<<me_name<<endl;
1471  return me;
1472  //printing cout<<"...leaving SiPixelActionExecutor::getFEDSummaryME!"<<endl;
1473 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
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:1473
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1447
void Reset(void)
reset ME (ie. contents, errors, etc)
const std::string & pwd(void) const
Definition: DQMStore.cc:406
void SiPixelActionExecutor::getGrandSummaryME ( DQMStore bei,
int  nbin,
std::string &  me_name,
std::vector< MonitorElement * > &  mes 
)
private

Definition at line 1356 of file SiPixelActionExecutor.cc.

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

Referenced by fillGrandBarrelSummaryHistos(), and fillGrandEndcapSummaryHistos().

1359  {
1360  //printing cout<<"Entering SiPixelActionExecutor::getGrandSummaryME for: "<<me_name<<endl;
1361  if((bei->pwd()).find("Pixel")==string::npos) return; // If one doesn't find pixel
1362  vector<string> contents = bei->getMEs();
1363 
1364  for (vector<string>::const_iterator it = contents.begin();
1365  it != contents.end(); it++) {
1366  //printing cout<<"in grand summary me: "<<me_name<<","<<(*it)<<endl;
1367  if ((*it).find(me_name) == 0) {
1368  string fullpathname = bei->pwd() + "/" + me_name;
1369  // cout << "###\t" << fullpathname << endl;
1370  MonitorElement* me = bei->get(fullpathname);
1371 
1372  if (me) {
1373  // cout<<"Found grand ME: "<<fullpathname<<endl;
1374  me->Reset();
1375  mes.push_back(me);
1376  // if printing cout<<"reset and add the following me: "<<me->getName()<<endl;
1377  return;
1378  }
1379  }
1380  }
1381 
1382  // MonitorElement* temp_me = bei->book1D(me_name.c_str(),me_name.c_str(),nbin,1.,nbin+1.);
1383  // if (temp_me) mes.push_back(temp_me);
1384  MonitorElement* temp_me(0);
1385  if(me_name.find("ALLMODS_adcCOMB_")!=string::npos) temp_me = bei->book1D(me_name.c_str(),me_name.c_str(),128,0,256);
1386  else if(me_name.find("ALLMODS_chargeCOMB_")!=string::npos) temp_me = bei->book1D(me_name.c_str(),me_name.c_str(),100,0,200);
1387  else temp_me = bei->book1D(me_name.c_str(),me_name.c_str(),nbin,1.,nbin+1.);
1388  if (temp_me) mes.push_back(temp_me);
1389 
1390  // if(temp_me) cout<<"finally found grand ME: "<<me_name<<endl;
1391 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
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:1473
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1447
void Reset(void)
reset ME (ie. contents, errors, etc)
const std::string & pwd(void) const
Definition: DQMStore.cc:406
MonitorElement * SiPixelActionExecutor::getSummaryME ( DQMStore bei,
std::string  me_name 
)
private

Definition at line 1398 of file SiPixelActionExecutor.cc.

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

Referenced by fillSummary().

1399  {
1400  //printing cout<<"Entering SiPixelActionExecutor::getSummaryME for: "<<me_name<<endl;
1401  MonitorElement* me = 0;
1402  if((bei->pwd()).find("Pixel")==string::npos) return me;
1403  vector<string> contents = bei->getMEs();
1404 
1405  for (vector<string>::const_iterator it = contents.begin();
1406  it != contents.end(); it++) {
1407  if ((*it).find(me_name) == 0) {
1408  string fullpathname = bei->pwd() + "/" + (*it);
1409  me = bei->get(fullpathname);
1410 
1411  if (me) {
1412  //printing cout<<"got this ME: "<<fullpathname<<endl;
1413  me->Reset();
1414  return me;
1415  }
1416  }
1417  }
1418  contents.clear();
1419 // cout << me_name.c_str()
1420 // << "\t" << ((me_name.find("SUMOFF")==string::npos)?"true":"false")
1421 // << "\t" << ((me_name.find("Blade_")!= string::npos)?"true":"false")
1422 // << "\t" << ((me_name.find("Layer1_")!=string::npos)?"true":"false")
1423 // << "\t" << ((me_name.find("Layer2_")!=string::npos)?"true":"false")
1424 // << "\t" << ((me_name.find("Layer3_")!=string::npos)?"true":"false")
1425 // << "\t" << ((me_name.find("Disk_")!=string::npos)?"true":"false")
1426 // << endl;
1427  if(me_name.find("SUMOFF")==string::npos){
1428  if(me_name.find("Blade_")!=string::npos)me = bei->book1D(me_name.c_str(), me_name.c_str(),7,1.,8.);
1429  else me = bei->book1D(me_name.c_str(), me_name.c_str(),4,1.,5.);
1430 // if(me_name.find("Panel_2")!=string::npos) me = bei->book1D(me_name.c_str(), me_name.c_str(),3,1.,4.);
1431 // else me = bei->book1D(me_name.c_str(), me_name.c_str(),4,1.,5.);
1432  }else if(me_name.find("Layer_1")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),10,1.,11.);
1433  }else if(me_name.find("Layer_2")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),16,1.,17.);
1434  }else if(me_name.find("Layer_3")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),22,1.,23.);
1435  }else if(me_name.find("Disk_")!=string::npos){ me = bei->book1D(me_name.c_str(), me_name.c_str(),12,1.,13.);
1436  }
1437 
1438  // if(me) cout<<"Finally got this ME: "<<me_name<<endl;
1439  //if(me_name.find("ALLMODS_adc_")!=string::npos) me = bei->book1D(me_name.c_str(), me_name.c_str(),256, 0., 256.);
1440 
1441  //printing cout<<"...leaving SiPixelActionExecutor::getSummaryME!"<<endl;
1442  return me;
1443 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
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:1473
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1447
void Reset(void)
reset ME (ie. contents, errors, etc)
const std::string & pwd(void) const
Definition: DQMStore.cc:406
int SiPixelActionExecutor::getTkMapMENames ( std::vector< std::string > &  names)

Definition at line 2038 of file SiPixelActionExecutor.cc.

References tkMapMENames.

2038  {
2039  if (tkMapMENames.size() == 0) return 0;
2040  for (vector<string>::iterator it = tkMapMENames.begin();
2041  it != tkMapMENames.end(); it++) {
2042  names.push_back(*it) ;
2043  }
2044  return names.size();
2045 }
static const HistoName names[]
std::vector< std::string > tkMapMENames
Double_t SiPixelActionExecutor::mapMax ( const Double_t  map[][NLev2][NLev3][NLev4],
bool  isBarrel 
)
private

Definition at line 1860 of file SiPixelActionExecutor.cc.

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

Referenced by createMaps().

1860  {
1861 
1862  Double_t max = map[0][0][0][0];
1863 
1864  for(Int_t p = 0 ; p < NLev1 ; p++)
1865  for(Int_t d = 0 ; d < (isBarrel?3:2); d++)
1866  for(Int_t b = 0 ; b < (isBarrel?(d*6+10):12); b++)
1867  for(Int_t i = 0 ; i < (isBarrel?4:7); i++)
1868  if(map[p][d][b][i] > max)
1869  max = map[p][d][b][i];
1870  // cout << "Done with SiPixelActionExecutor::mapMax" << endl;
1871  return max;
1872 }
#define NLev1
int i
Definition: DBlmapReader.cc:9
dictionary map
Definition: Association.py:205
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 1843 of file SiPixelActionExecutor.cc.

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

Referenced by createMaps().

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

References b, gather_cfg::cout, DQMStore::get(), i, Association::map, NLayer, NModuleB, AlCaHLTBitMon_ParallelJobs::p, getHLTPrescaleColumns::path, DQMStore::pwd(), AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.

Referenced by createMaps().

1771  {
1772  // cout << "Starting with SiPixelActionExecutor::prephistosB" << endl;
1773  std::string part[] = { "Layer_1", "Layer_2", "Layer_3"};
1774  std::string path = bei->pwd();
1775  for (Int_t i = 0; i < NLayer; i++)
1776  {
1777  std::string fullpath = path + "/" + "TRKMAP_" + name + "_" + part[i];
1778  MonitorElement* temp = bei->get(fullpath);
1779  if(temp)
1780  me[i] = temp;
1781  else
1782  cout << "Problem: " << fullpath << endl;
1783  }
1784 
1785  for(Int_t p = 0 ; p < NLayer ; p++){
1786  for(Int_t b = 0 ; b < (10 + 6 * p); b++)
1787  for(Int_t i = 0 ; i < NModuleB ; i++){
1788  me[p]->getTH2F()->SetBinContent(b + 1, i + 1, map[0][p][b][i]);
1789  me[p]->getTH2F()->SetBinContent(b + 1, i + 1 + NModuleB, map[1][p][b][i]);
1790  me[p]->getTH2F()->SetBinContent(b + 1 + 10 + 6 * p, i + 1, map[2][p][b][i]);
1791  me[p]->getTH2F()->SetBinContent(b + 1 + 10 + 6 * p, i + 1 + NModuleB, map[3][p][b][i]);
1792  }
1793  me[p]->getTH2F()->SetMinimum(min);
1794  me[p]->getTH2F()->SetMaximum(max);
1795  }
1796  // cout << "Done with SiPixelActionExecutor::prephistosB" << endl;
1797 }
int i
Definition: DBlmapReader.cc:9
#define min(a, b)
Definition: mlp_lapack.h:161
dictionary map
Definition: Association.py:205
#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:1473
part
Definition: HCALResponse.h:20
double b
Definition: hdecay.h:120
#define NLayer
tuple cout
Definition: gather_cfg.py:121
TH2F * getTH2F(void) const
const std::string & pwd(void) const
Definition: DQMStore.cc:406
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 1801 of file SiPixelActionExecutor.cc.

References b, trackerHits::c, gather_cfg::cout, DQMStore::get(), i, Association::map, NBlade, NCyl, NDisk, getHLTPrescaleColumns::path, DQMStore::pwd(), AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.

Referenced by createMaps().

1801  {
1802  // cout << "Starting with SiPixelActionExecutor::prephistosE" << endl;
1803  std::string part[] = { "Disc_1_M", "Disc_2_M", "Disc_1_P", "Disc_2_P" };
1804  std::string path = bei->pwd();
1805  for (Int_t i = 0; i < NCyl; i++)
1806  {
1807  std::string fullpath = path + "/" + "TRKMAP_" + name + "_" + part[i];
1808  MonitorElement* temp = bei->get(fullpath);
1809  if(temp)
1810  {
1811  me[i] = temp;
1812  me[i]->getTH2F()->SetMinimum(min);
1813  me[i]->getTH2F()->SetMaximum(max);
1814  }
1815  else
1816  cout << "Problem: " << fullpath << endl;
1817  }
1818 
1819  for(Int_t c = 0 ; c < NCyl ; c += 2)
1820  for(Int_t d = 0 ; d < NDisk ; d++)
1821  for(Int_t b = 0 ; b < NBlade ; b++){
1822  me[c + d]->getTH2F()->SetBinContent(b + 1, 1, map[c][d][b][0]);
1823  me[c + d]->getTH2F()->SetBinContent(b + 1, 2, map[c][d][b][4]);
1824  me[c + d]->getTH2F()->SetBinContent(b + 1, 3, map[c][d][b][1]);
1825  me[c + d]->getTH2F()->SetBinContent(b + 1, 4, map[c][d][b][5]);
1826  me[c + d]->getTH2F()->SetBinContent(b + 1, 5, map[c][d][b][2]);
1827  me[c + d]->getTH2F()->SetBinContent(b + 1, 6, map[c][d][b][6]);
1828  me[c + d]->getTH2F()->SetBinContent(b + 1, 7, map[c][d][b][3]);
1829 
1830  me[c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 1, map[c + 1][d][b][0]);
1831  me[c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 2, map[c + 1][d][b][4]);
1832  me[c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 3, map[c + 1][d][b][1]);
1833  me[c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 4, map[c + 1][d][b][5]);
1834  me[c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 5, map[c + 1][d][b][2]);
1835  me[c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 6, map[c + 1][d][b][6]);
1836  me[c + d]->getTH2F()->SetBinContent(2 * NBlade - b, 7, map[c + 1][d][b][3]);
1837  }
1838  // cout << "Done with SiPixelActionExecutor::prephistosE" << endl;
1839 }
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:205
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:1473
part
Definition: HCALResponse.h:20
double b
Definition: hdecay.h:120
tuple cout
Definition: gather_cfg.py:121
TH2F * getTH2F(void) const
const std::string & pwd(void) const
Definition: DQMStore.cc:406
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(), offlineXMLfile_, and AlCaHLTBitMon_QueryRunRegistry::string.

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:121
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(), offlineXMLfile_, and AlCaHLTBitMon_QueryRunRegistry::string.

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:121
bool getFrequencyForTrackerMap(int &u_freq)
void SiPixelActionExecutor::readConfiguration ( )

Definition at line 62 of file SiPixelActionExecutor.cc.

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

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 1880 of file SiPixelActionExecutor.cc.

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

Referenced by SiPixelWebInterface::performAction().

1880  {
1881  //printing cout<<"Entering SiPixelActionExecutor::setupQTests: "<<endl;
1882 
1883  bei->cd();
1884  bei->cd("Pixel");
1885 
1886  string localPath;
1887  if(offlineXMLfile_) localPath = string("DQM/SiPixelMonitorClient/test/sipixel_tier0_qualitytest.xml");
1888  else localPath = string("DQM/SiPixelMonitorClient/test/sipixel_qualitytest_config.xml");
1889  if(!qtHandler_){
1890  qtHandler_ = new QTestHandle();
1891  }
1892  if(!qtHandler_->configureTests(edm::FileInPath(localPath).fullPath(),bei)){
1893  qtHandler_->attachTests(bei,false);
1894  bei->cd();
1895  }else{
1896  cout << " Problem setting up quality tests "<<endl;
1897  }
1898 
1899  //printing cout<<" leaving SiPixelActionExecutor::setupQTests. "<<endl;
1900 }
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:411
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:121
std::string fullPath() const
Definition: FileInPath.cc:171

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