CMS 3D CMS Logo

SiPixelActionExecutor Class Reference

#include <DQM/SiPixelMonitorClient/interface/SiPixelActionExecutor.h>

List of all members.

Public Member Functions

void bookOccupancyPlots (DQMStore *bei, bool hiRes)
void bookOccupancyPlots (DQMStore *bei, bool hiRes, bool isbarrel)
void checkQTestResults (DQMStore *bei)
void createLayout (DQMStore *bei)
void createOccupancy (DQMStore *bei)
void createSummary (DQMStore *bei)
void createTkMap (DQMStore *bei, std::string mEName, std::string theTKType)
void dumpBarrelModIds (DQMStore *bei)
void dumpEndcapModIds (DQMStore *bei)
void dumpModIds (DQMStore *bei)
void fillLayout (DQMStore *bei)
int getTkMapMENames (std::vector< std::string > &names)
void readConfiguration ()
bool readConfiguration (int &tkmap_freq, int &summary_freq)
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)
void setupQTests (DQMStore *bei)
 SiPixelActionExecutor (bool offlineXMLfile)
 ~SiPixelActionExecutor ()

Private Member Functions

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

Private Attributes

int calib_type_
SiPixelConfigParserconfigParser_
SiPixelConfigWriterconfigWriter_
int message_limit_
int ndet_
MonitorElementOccupancyMap
bool offlineXMLfile_
MonitorElementPixelOccupancyMap
QTestHandleqtHandler_
int source_type_
std::vector< std::string > summaryMENames
std::vector< std::string > tkMapMENames


Detailed Description

Definition at line 15 of file SiPixelActionExecutor.h.


Constructor & Destructor Documentation

SiPixelActionExecutor::SiPixelActionExecutor ( bool  offlineXMLfile  ) 

Definition at line 24 of file SiPixelActionExecutor.cc.

References configParser_, configWriter_, ndet_, and qtHandler_.

00024                                                                 : offlineXMLfile_(offlineXMLfile) {
00025   edm::LogInfo("SiPixelActionExecutor") << 
00026     " Creating SiPixelActionExecutor " << "\n" ;
00027   configParser_ = 0;
00028   configWriter_ = 0;
00029   qtHandler_ = 0;  
00030   ndet_ = 0;
00031   //collationDone = false;
00032 }

SiPixelActionExecutor::~SiPixelActionExecutor (  ) 

Definition at line 37 of file SiPixelActionExecutor.cc.

References configParser_, configWriter_, and qtHandler_.

00037                                               {
00038   edm::LogInfo("SiPixelActionExecutor") << 
00039     " Deleting SiPixelActionExecutor " << "\n" ;
00040   if (configParser_) delete configParser_;
00041   if (configWriter_) delete configWriter_;  
00042   if (qtHandler_) delete qtHandler_;
00043 }


Member Function Documentation

void SiPixelActionExecutor::bookOccupancyPlots ( DQMStore bei,
bool  hiRes 
)

Definition at line 1097 of file SiPixelActionExecutor.cc.

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

01097                                                                         {
01098 
01099         // Barrel
01100         bei->cd();
01101         bei->setCurrentFolder("Pixel");
01102         this->bookOccupancyPlots(bei, hiRes, true);
01103 
01104         // Endcap
01105         bei->cd();
01106         bei->setCurrentFolder("Pixel");
01107         this->bookOccupancyPlots(bei, hiRes, false);
01108 
01109 }

void SiPixelActionExecutor::bookOccupancyPlots ( DQMStore bei,
bool  hiRes,
bool  isbarrel 
)

Definition at line 1067 of file SiPixelActionExecutor.cc.

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

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

01068 {
01069 
01070         vector<string> subdirs = bei->getSubdirs();
01071         for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++)
01072         {
01073                 if(isbarrel && (*it).find("Barrel")==string::npos) continue;
01074                 if(!isbarrel && (*it).find("Endcap")==string::npos) continue;
01075                 
01076                 if((*it).find("Module_")!=string::npos) continue;
01077                 bei->cd(*it);
01078                 bookOccupancyPlots(bei, hiRes, isbarrel);
01079                 if(!hiRes){
01080                         //occupancyprinting cout<<"booking low res barrel occ plot now!"<<endl;
01081                         OccupancyMap = bei->book2D((isbarrel?"barrelOccupancyMap":"endcapOccupancyMap"),"Barrel Digi Occupancy Map (4 pix per bin)",isbarrel?208:130,0.,isbarrel?416.:260.,80,0.,160.);
01082                 }else{
01083                         //occupancyprinting cout<<"booking high res barrel occ plot now!"<<endl;
01084                         OccupancyMap = bei->book2D((isbarrel?"barrelOccupancyMap":"endcapOccupancyMap"),"Barrel Digi Occupancy Map (1 pix per bin)",isbarrel?416:260,0.,isbarrel?416.:260.,160,0.,160.);
01085                 }
01086                 OccupancyMap->setAxisTitle("Columns",1);
01087                 OccupancyMap->setAxisTitle("Rows",2);
01088 
01089                 bei->goUp();
01090 
01091         }
01092 
01093 
01094         
01095 }

void SiPixelActionExecutor::checkQTestResults ( DQMStore bei  ) 

Definition at line 1244 of file SiPixelActionExecutor.cc.

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

Referenced by SiPixelWebInterface::performAction().

01244                                                             {
01245 //printing cout<<"Entering SiPixelActionExecutor::checkQTestResults..."<<endl;
01246 
01247   int messageCounter=0;
01248   string currDir = bei->pwd();
01249   vector<string> contentVec;
01250   bei->getContents(contentVec);
01251   configParser_->getCalibType(calib_type_);
01252 //  cout << calib_type_ << endl;
01253   configParser_->getMessageLimitForQTests(message_limit_);
01254   for (vector<string>::iterator it = contentVec.begin();
01255        it != contentVec.end(); it++) {
01256     vector<string> contents;
01257     int nval = SiPixelUtility::getMEList((*it), contents);
01258     if (nval == 0) continue;
01259     for (vector<string>::const_iterator im = contents.begin();
01260          im != contents.end(); im++) {
01261 
01262       MonitorElement * me = bei->get((*im));
01263       if (me) {
01264         me->runQTests();
01265         // get all warnings associated with me
01266         vector<QReport*> warnings = me->getQWarnings();
01267         for(vector<QReport *>::const_iterator wi = warnings.begin();
01268             wi != warnings.end(); ++wi) {
01269           messageCounter++;
01270           if(messageCounter<message_limit_) {
01271             //edm::LogWarning("SiPixelQualityTester::checkTestResults") << 
01272             //  " *** Warning for " << me->getName() << 
01273             //  "," << (*wi)->getMessage() << "\n";
01274           
01275             edm::LogWarning("SiPixelActionExecutor::checkQTestResults") <<  " *** Warning for " << me->getName() << "," 
01276                  << (*wi)->getMessage() << " " << me->getMean() 
01277                  << " " << me->getRMS() << me->hasWarning() 
01278                  << endl;
01279           }
01280         }
01281         warnings=vector<QReport*>();
01282         // get all errors associated with me
01283         vector<QReport *> errors = me->getQErrors();
01284         for(vector<QReport *>::const_iterator ei = errors.begin();
01285             ei != errors.end(); ++ei) {
01286 
01287           float empty_mean = me->getMean();
01288           float empty_rms = me->getRMS();
01289           if((empty_mean != 0 && empty_rms != 0) || (calib_type_ == 0)){
01290           messageCounter++;
01291           if(messageCounter<=message_limit_) {
01292             //edm::LogError("SiPixelQualityTester::checkTestResults") << 
01293             //  " *** Error for " << me->getName() << 
01294             //  "," << (*ei)->getMessage() << "\n";
01295           
01296             edm::LogWarning("SiPixelActionExecutor::checkQTestResults")  <<   " *** Error for " << me->getName() << ","
01297                   << (*ei)->getMessage() << " " << me->getMean() 
01298                   << " " << me->getRMS() 
01299                   << endl;
01300           }
01301           }
01302         }
01303         errors=vector<QReport*>();
01304       }
01305       me=0;
01306     }
01307     nval=int(); contents=vector<string>();
01308   }
01309   LogDebug("SiPixelActionExecutor::checkQTestResults") <<"messageCounter: "<<messageCounter<<" , message_limit: "<<message_limit_<<endl;
01310 //  if (messageCounter>=message_limit_)
01311 //    edm::LogWarning("SiPixelActionExecutor::checkQTestResults") << "WARNING: too many QTest failures! Giving up after "<<message_limit_<<" messages."<<endl;
01312   contentVec=vector<string>(); currDir=string(); messageCounter=int();
01313   //printing cout<<"...leaving SiPixelActionExecutor::checkQTestResults!"<<endl;
01314 }

void SiPixelActionExecutor::createLayout ( DQMStore bei  ) 

Definition at line 1317 of file SiPixelActionExecutor.cc.

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

01317                                                       {
01318   if (configWriter_ == 0) {
01319     configWriter_ = new SiPixelConfigWriter();
01320     if (!configWriter_->init()) return;
01321   }
01322   string currDir = bei->pwd();   
01323   if (currDir.find("Layer") != string::npos) {
01324     string name = "Default";
01325    configWriter_->createLayout(name);
01326    configWriter_->createRow();
01327     fillLayout(bei);
01328   } else {
01329     vector<string> subdirs = bei->getSubdirs();
01330     for (vector<string>::const_iterator it = subdirs.begin();
01331          it != subdirs.end(); it++) {
01332       bei->cd(*it);
01333       createLayout(bei);
01334       bei->goUp();
01335     }
01336   }  
01337 }

void SiPixelActionExecutor::createOccupancy ( DQMStore bei  ) 

Definition at line 1111 of file SiPixelActionExecutor.cc.

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

Referenced by SiPixelWebInterface::performAction().

01111                                                          {
01112 //std::cout<<"entering SiPixelActionExecutor::createOccupancy..."<<std::endl;
01113   bei->cd();
01114   fillOccupancy(bei, true);
01115   bei->cd();
01116   fillOccupancy(bei, false);
01117   bei->cd();
01118 //std::cout<<"leaving SiPixelActionExecutor::createOccupancy..."<<std::endl;
01119 }

void SiPixelActionExecutor::createSummary ( DQMStore bei  ) 

Definition at line 156 of file SiPixelActionExecutor.cc.

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

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

00156                                                        {
00157 //printing cout<<"entering SiPixelActionExecutor::createSummary..."<<endl;
00158   string barrel_structure_name;
00159   vector<string> barrel_me_names;
00160   string localPath;
00161   if(offlineXMLfile_) localPath = string("DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
00162   else localPath = string("DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
00163   if (configParser_ == 0) {
00164     configParser_ = new SiPixelConfigParser();
00165     configParser_->getDocument(edm::FileInPath(localPath).fullPath());
00166   }
00167   if (!configParser_->getMENamesForBarrelSummary(barrel_structure_name, barrel_me_names)){
00168     cout << "SiPixelActionExecutor::createSummary: Failed to read Barrel Summary configuration parameters!! ";
00169     return;
00170   }
00171   configParser_->getSourceType(source_type_); 
00172   bei->setCurrentFolder("Pixel/");
00173   //bei->cd();
00174   fillSummary(bei, barrel_structure_name, barrel_me_names, true); // Barrel
00175   bei->setCurrentFolder("Pixel/");
00176   //bei->cd();
00177   string endcap_structure_name;
00178   vector<string> endcap_me_names;
00179   if (!configParser_->getMENamesForEndcapSummary(endcap_structure_name, endcap_me_names)){
00180     edm::LogInfo("SiPixelActionExecutor")  << "Failed to read Endcap Summary configuration parameters!! " << "\n" ;
00181     return;
00182   }
00183   bei->setCurrentFolder("Pixel/");
00184   //bei->cd();
00185   fillSummary(bei, endcap_structure_name, endcap_me_names, false); // Endcap
00186   bei->setCurrentFolder("Pixel/");
00187   //bei->cd();
00188   if(source_type_==0||source_type_==5 || source_type_ == 20){//do this only if RawData source is present
00189     string federror_structure_name;
00190     vector<string> federror_me_names;
00191     if (!configParser_->getMENamesForFEDErrorSummary(federror_structure_name, federror_me_names)){
00192       cout << "SiPixelActionExecutor::createSummary: Failed to read FED Error Summary configuration parameters!! ";
00193       return;
00194     }
00195     bei->setCurrentFolder("Pixel/");
00196     //bei->cd();
00197     fillFEDErrorSummary(bei, federror_structure_name, federror_me_names);
00198     bei->setCurrentFolder("Pixel/");
00199     //bei->cd();
00200   }
00201   //createLayout(bei);
00202   //string fname = "test.xml";
00203  // configWriter_->write(fname);
00204   if (configWriter_) delete configWriter_;
00205   configWriter_ = 0;
00206 //printing cout<<"leaving SiPixelActionExecutor::createSummary..."<<endl;
00207 }

void SiPixelActionExecutor::createTkMap ( DQMStore bei,
std::string  mEName,
std::string  theTKType 
)

Referenced by SiPixelWebInterface::createTkMap().

void SiPixelActionExecutor::dumpBarrelModIds ( DQMStore bei  ) 

Definition at line 1400 of file SiPixelActionExecutor.cc.

References DQMStore::cd(), GenMuonPlsPt100GeV_cfg::cout, detId, lat::endl(), DQMStore::getMEs(), DQMStore::getSubdirs(), DQMStore::goUp(), it, ndet_, and DQMStore::pwd().

Referenced by dumpModIds().

01400                                                           {
01401   string currDir = bei->pwd();
01402   string dir_name = "Ladder_";
01403   if (currDir.find(dir_name) != string::npos)  {
01404     vector<string> subdirs = bei->getSubdirs();
01405     for (vector<string>::const_iterator it = subdirs.begin();
01406        it != subdirs.end(); it++) {
01407       if ( (*it).find("Module_") == string::npos) continue;
01408       bei->cd(*it);
01409       ndet_++;
01410       cout<<"Ndet: "<<ndet_<<"  ,  Module: "<<bei->pwd();  
01411       vector<string> contents = bei->getMEs(); 
01412       bool first_me = false;
01413       int detId = -999;
01414       for (vector<string>::const_iterator im = contents.begin();
01415          im != contents.end(); im++) {
01416         if(first_me) break;
01417         QRegExp rx("(\\w+)_(\\w+)_(\\d+)") ;
01418         QString mEName = (*im);
01419         if(rx.search(mEName) != -1 ) detId = rx.cap(3).toInt() ;
01420       }
01421       bei->goUp();
01422       cout<<"  , detector ID: "<<detId<<endl;
01423     }
01424   } else {  
01425     vector<string> subdirs = bei->getSubdirs();
01426     for (vector<string>::const_iterator it = subdirs.begin();
01427        it != subdirs.end(); it++) {
01428       if((*it).find("Endcap")!=string::npos) continue;
01429       bei->cd(*it);
01430       dumpBarrelModIds(bei);
01431       bei->goUp();
01432     }
01433   }
01434 }

void SiPixelActionExecutor::dumpEndcapModIds ( DQMStore bei  ) 

Definition at line 1437 of file SiPixelActionExecutor.cc.

References DQMStore::cd(), GenMuonPlsPt100GeV_cfg::cout, detId, lat::endl(), find(), DQMStore::getMEs(), DQMStore::getSubdirs(), DQMStore::goUp(), it, ndet_, and DQMStore::pwd().

Referenced by dumpModIds().

01437                                                           {
01438   string currDir = bei->pwd();
01439   string dir_name = "Panel_";
01440   if (currDir.find(dir_name) != string::npos)  {
01441     vector<string> subdirs = bei->getSubdirs();
01442     for (vector<string>::const_iterator it = subdirs.begin();
01443        it != subdirs.end(); it++) {
01444       if ( (*it).find("Module_") == string::npos) continue;
01445       bei->cd(*it);
01446       ndet_++;
01447       cout<<"Ndet: "<<ndet_<<"  ,  Module: "<<bei->pwd();  
01448       vector<string> contents = bei->getMEs(); 
01449       bool first_me = false;
01450       int detId = -999;
01451       for (vector<string>::const_iterator im = contents.begin();
01452          im != contents.end(); im++) {
01453         if(first_me) break;
01454         QRegExp rx("(\\w+)_(\\w+)_(\\d+)") ;
01455         QString mEName = (*im);
01456         if(rx.search(mEName) != -1 ) detId = rx.cap(3).toInt() ;
01457       }
01458       bei->goUp();
01459       cout<<"  , detector ID: "<<detId<<endl;
01460     }
01461   } else {  
01462     vector<string> subdirs = bei->getSubdirs();
01463     for (vector<string>::const_iterator it = subdirs.begin();
01464        it != subdirs.end(); it++) {
01465       if((bei->pwd()).find("Barrel")!=string::npos) bei->goUp();
01466       bei->cd((*it));
01467       if((*it).find("Barrel")!=string::npos) continue;
01468       dumpEndcapModIds(bei);
01469       bei->goUp();
01470     }
01471   }
01472 
01473 }

void SiPixelActionExecutor::dumpModIds ( DQMStore bei  ) 

Definition at line 1388 of file SiPixelActionExecutor.cc.

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

Referenced by SiPixelWebInterface::performAction().

01388                                                     {
01389 //printing cout<<"Going to dump module IDs now!"<<endl;
01390   bei->cd();
01391   dumpBarrelModIds(bei);
01392   bei->cd();
01393   dumpEndcapModIds(bei);
01394   bei->cd();
01395 //printing cout<<"Done dumping module IDs!"<<endl;
01396 }

void SiPixelActionExecutor::fillFEDErrorSummary ( DQMStore bei,
std::string  dir_name,
std::vector< std::string > &  me_names 
) [private]

Referenced by createSummary().

void SiPixelActionExecutor::fillGrandBarrelSummaryHistos ( DQMStore bei,
std::vector< std::string > &  me_names 
) [private]

void SiPixelActionExecutor::fillGrandEndcapSummaryHistos ( DQMStore bei,
std::vector< std::string > &  me_names 
) [private]

void SiPixelActionExecutor::fillLayout ( DQMStore bei  ) 

Definition at line 1340 of file SiPixelActionExecutor.cc.

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

Referenced by createLayout().

01340                                                     {
01341   
01342   static int icount = 0;
01343   string currDir = bei->pwd();
01344   if (currDir.find("Ladder_") != string::npos) {
01345 
01346     vector<string> contents = bei->getMEs(); 
01347     
01348     for (vector<string>::const_iterator im = contents.begin();
01349          im != contents.end(); im++) {
01350       if ((*im).find("Clusters") != string::npos) {
01351         icount++;
01352         if (icount != 0 && icount%6 == 0) {
01353           configWriter_->createRow();
01354         }
01355         ostringstream full_path;
01356         full_path << "test/" << currDir << "/" << *im ;
01357         string element = "monitorable";
01358         string element_name = full_path.str();     
01359         configWriter_->createColumn(element, element_name);
01360       }
01361     }
01362   } else {
01363     vector<string> subdirs = bei->getSubdirs();
01364     for (vector<string>::const_iterator it = subdirs.begin();
01365          it != subdirs.end(); it++) {
01366       bei->cd(*it);
01367       fillLayout(bei);
01368       bei->goUp();
01369     }
01370   }
01371 }

void SiPixelActionExecutor::fillOccupancy ( DQMStore bei,
bool  isbarrel 
) [private]

Definition at line 1123 of file SiPixelActionExecutor.cc.

References DQMStore::cd(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), DQMStore::get(), MonitorElement::getBinContent(), DQMStore::getMEs(), MonitorElement::getNbinsX(), MonitorElement::getNbinsY(), DQMStore::getSubdirs(), MonitorElement::getTH2F(), DQMStore::goUp(), i, it, j, OccupancyMap, path(), and DQMStore::pwd().

Referenced by createOccupancy().

01124 {
01125         //occupancyprinting cout<<"entering SiPixelActionExecutor::fillOccupancy..."<<std::endl;
01126         string currDir = bei->pwd();
01127         string dname = currDir.substr(currDir.find_last_of("/")+1);
01128         QRegExp rx("Module_");
01129         //occupancyprinting cout<<"currDir= "<<currDir<< " , dname= "<<dname<<std::endl;
01130                 
01131     if(rx.search(dname)!=-1 && currDir.find("Pixel/Endcap/HalfCylinder_mI/Disk_1/Blade_01/Panel_2/Module_2")==string::npos){ // Skipping noisy module/ROC
01132                 vector<string> meVec = bei->getMEs();
01133                 for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
01134                         string full_path = currDir + "/" + (*it);
01135                         if(full_path.find("hitmap_siPixelDigis")!=string::npos){ // If we have the hitmap ME
01136                                 MonitorElement * me = bei->get(full_path);
01137                                 if (!me) continue;
01138                                 //occupancyprinting cout << full_path << endl;
01139                                 string path = full_path;
01140                                 while (path.find_last_of("/") != 5) // Stop before Pixel/
01141                                 {
01142                                         path = path.substr(0,path.find_last_of("/"));
01143                                                         cout << "\t" << path << endl;
01144                                         OccupancyMap = bei->get(path + "/" + (isbarrel?"barrel":"endcap") + "OccupancyMap");
01145                                         
01146                                         if(OccupancyMap){ 
01147                                                 //occupancyprinting cout<<"I found the occupancy map!"<<std::endl;
01148                                                 
01149                                                 
01150                                                 if(!isbarrel)
01151                                                 {
01152 
01153                 cout << full_path << endl;
01154                 
01155                 cout << "OccupancyMap" <<endl;
01156                 cout << "X:\t" << OccupancyMap->getTH2F()->GetNbinsX() << "\tY:\t" << OccupancyMap->getTH2F()->GetNbinsY() << endl;
01157                 cout << OccupancyMap->getTH2F()->ProjectionX()->GetBinLowEdge(1) << "\t" << OccupancyMap->getTH2F()->ProjectionX()->GetBinLowEdge(OccupancyMap->getTH2F()->GetNbinsX()+1) << endl;
01158                 cout << OccupancyMap->getTH2F()->ProjectionY()->GetBinLowEdge(1) << "\t" << OccupancyMap->getTH2F()->ProjectionY()->GetBinLowEdge(OccupancyMap->getTH2F()->GetNbinsY()+1) << endl;
01159 
01160                 cout << "ME" << endl;
01161                 cout << "X:\t" << me->getTH2F()->GetNbinsX() << "\tY:\t" << me->getTH2F()->GetNbinsY() << endl;
01162                 cout << me->getTH2F()->ProjectionX()->GetBinLowEdge(1) << "\t" << me->getTH2F()->ProjectionX()->GetBinLowEdge(me->getTH2F()->GetNbinsX()+1) << endl;
01163                 cout << me->getTH2F()->ProjectionY()->GetBinLowEdge(1) << "\t" << me->getTH2F()->ProjectionY()->GetBinLowEdge(me->getTH2F()->GetNbinsY()+1) << endl;
01164                 cout << "--------------------" << endl;                                         
01165                                                 
01166                                                 }
01167                                                 
01168                                                 if(isbarrel && full_path.find("F/")!=string::npos) OccupancyMap->getTH2F()->Add(me->getTH2F());
01169                                                 if(!isbarrel || (isbarrel && full_path.find("H/")!=string::npos)) 
01170                                                 {  
01171                                                         TH2F *tmpHist = (TH2F*) OccupancyMap->getTH2F()->Clone("tmpHist");
01172                                                         tmpHist->Reset();
01173                                                         
01174                                                         for(int i=1; i!=me->getNbinsX()+1; i++) for(int j=1; j!=me->getNbinsY()+1; j++) tmpHist->SetBinContent(i,j,me->getBinContent(i,j));
01175                                                         me->getTH2F()->Print();
01176                                                         // Exceptions for endcap
01177                                                         if(currDir.find("Pixel/Endcap/HalfCylinder_pI/Disk_1/Blade_10/Panel_2/Module_1")!=string::npos || currDir.find("Pixel/Endcap/HalfCylinder_pI/Disk_1/Blade_10/Panel_2/Module_3")!=string::npos)
01178                                                                 for(int i=27 ; i<=52 ; i++)
01179                                                                         for(int j=1 ; j<=40 ; j++)
01180                                                                                 tmpHist->SetBinContent(i,j,0);
01181                                                         if(currDir.find("Pixel/Endcap/HalfCylinder_pI/Disk_1/Blade_09/Panel_1/Module_4")!=string::npos)
01182                                                                 for(int i=52 ; i<=78 ; i++)
01183                                                                         for(int j=1 ; j<=40 ; j++)
01184                                                                                 tmpHist->SetBinContent(i,j,0);                                                  
01185                                                         
01186                                                         OccupancyMap->getTH2F()->Add(tmpHist);
01187                                                         
01188                                                         tmpHist->Delete();
01189                                                 }
01190                                                 
01191                                                 OccupancyMap->getTH2F()->SetEntries(OccupancyMap->getTH2F()->Integral());
01192                                                 
01193                                         }       
01194                                         
01195                                 }
01196                         }
01197                         
01198                 }
01199                 //bei->goUp();
01200     } else {  
01201                 //occupancyprinting cout<<"finding subdirs now"<<std::endl;
01202                 vector<string> subdirs = bei->getSubdirs();
01203                 for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
01204                         bei->cd(*it);
01205                         //occupancyprinting cout<<"now I am in "<<bei->pwd()<<std::endl;
01206                         if(*it != "Pixel" && ((isbarrel && (*it).find("Barrel")==string::npos) || (!isbarrel && (*it).find("Endcap")==string::npos))) continue;
01207                         //occupancyprinting cout<<"calling myself again "<<std::endl;
01208                         fillOccupancy(bei, isbarrel);
01209                         bei->goUp();
01210                 }
01211     }
01212         
01213         //occupancyprinting cout<<"leaving SiPixelActionExecutor::fillOccupancy..."<<std::endl;
01214         
01215 }

void SiPixelActionExecutor::fillSummary ( DQMStore bei,
std::string  dir_name,
std::vector< std::string > &  me_names,
bool  isbarrel 
) [private]

Referenced by createSummary().

MonitorElement* SiPixelActionExecutor::getFEDSummaryME ( DQMStore bei,
std::string  me_name 
) [private]

void SiPixelActionExecutor::getGrandSummaryME ( DQMStore bei,
int  nbin,
std::string &  me_name,
std::vector< MonitorElement * > &  mes 
) [private]

MonitorElement* SiPixelActionExecutor::getSummaryME ( DQMStore bei,
std::string  me_name 
) [private]

int SiPixelActionExecutor::getTkMapMENames ( std::vector< std::string > &  names  ) 

Definition at line 1377 of file SiPixelActionExecutor.cc.

References it, and tkMapMENames.

01377                                                                       {
01378   if (tkMapMENames.size() == 0) return 0;
01379   for (vector<string>::iterator it = tkMapMENames.begin();
01380        it != tkMapMENames.end(); it++) {
01381     names.push_back(*it) ;
01382   }
01383   return names.size();
01384 }

void SiPixelActionExecutor::readConfiguration (  ) 

Definition at line 48 of file SiPixelActionExecutor.cc.

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

00048                                               {
00049   string localPath;
00050   if(offlineXMLfile_) localPath = string("DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
00051   else localPath = string("DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
00052   if (configParser_ == 0) {
00053     configParser_ = new SiPixelConfigParser();
00054     configParser_->getDocument(edm::FileInPath(localPath).fullPath());
00055   }
00056 }

bool SiPixelActionExecutor::readConfiguration ( int tkmap_freq,
int summary_freq 
)

Definition at line 114 of file SiPixelActionExecutor.cc.

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

00114                                                                                 {
00115 //printing cout<<"Entering SiPixelActionExecutor::readConfiguration..."<<endl;
00116   string localPath;
00117   if(offlineXMLfile_) localPath = string("DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
00118   else localPath = string("DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
00119   if (configParser_ == 0) {
00120     configParser_ = new SiPixelConfigParser();
00121     configParser_->getDocument(edm::FileInPath(localPath).fullPath());
00122   }
00123  
00124   if (!configParser_->getFrequencyForTrackerMap(tkmap_freq)){
00125     cout << "SiPixelActionExecutor::readConfiguration: Failed to read TrackerMap configuration parameters!! ";
00126     return false;
00127   }
00128   if (!configParser_->getFrequencyForBarrelSummary(summary_freq)){
00129     edm::LogInfo("SiPixelActionExecutor") << "Failed to read Summary configuration parameters!! " << "\n" ;
00130     return false;
00131   }
00132 //printing cout<<"...leaving SiPixelActionExecutor::readConfiguration..."<<endl;
00133   return true;
00134 }

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

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

Referenced by SiPixelWebInterface::readConfiguration().

00068                                                                 {
00069 //printing cout<<"Entering SiPixelActionExecutor::readConfiguration..."<<endl;
00070   string localPath;
00071   if(offlineXMLfile_) localPath = string("DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
00072   else localPath = string("DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
00073   if (configParser_ == 0) {
00074     configParser_ = new SiPixelConfigParser();
00075     configParser_->getDocument(edm::FileInPath(localPath).fullPath());
00076   }
00077  
00078   if (!configParser_->getFrequencyForTrackerMap(tkmap_freq)){
00079     cout << "SiPixelActionExecutor::readConfiguration: Failed to read TrackerMap configuration parameters!! ";
00080     return false;
00081   }
00082   if (!configParser_->getFrequencyForBarrelSummary(sum_barrel_freq)){
00083     edm::LogInfo("SiPixelActionExecutor") << "Failed to read Barrel Summary configuration parameters!! " << "\n" ;
00084     return false;
00085   }
00086   if (!configParser_->getFrequencyForEndcapSummary(sum_endcap_freq)){
00087     edm::LogInfo("SiPixelActionExecutor")  << "Failed to read Endcap Summary configuration parameters!! " << "\n" ;
00088     return false;
00089   }
00090   if (!configParser_->getFrequencyForGrandBarrelSummary(sum_grandbarrel_freq)){
00091     edm::LogInfo("SiPixelActionExecutor") << "Failed to read Grand Barrel Summary configuration parameters!! " << "\n" ;
00092     return false;
00093   }
00094   if (!configParser_->getFrequencyForGrandEndcapSummary(sum_grandendcap_freq)){
00095     edm::LogInfo("SiPixelActionExecutor")  << "Failed to read Grand Endcap Summary configuration parameters!! " << "\n" ;
00096     return false;
00097   }
00098   if (!configParser_->getMessageLimitForQTests(message_limit_)){
00099     edm::LogInfo("SiPixelActionExecutor")  << "Failed to read QTest Message Limit" << "\n" ;
00100     return false;
00101   }
00102   if (!configParser_->getSourceType(source_type_)){
00103     edm::LogInfo("SiPixelActionExecutor")  << "Failed to read Source Type" << "\n" ;
00104     return false;
00105   }
00106   if (!configParser_->getCalibType(calib_type_)){
00107     edm::LogInfo("SiPixelActionExecutor")  << "Failed to read Calib Type" << "\n" ;
00108     return false;
00109   }
00110 //printing cout<<"...leaving SiPixelActionExecutor::readConfiguration..."<<endl;
00111   return true;
00112 }

void SiPixelActionExecutor::setupQTests ( DQMStore bei  ) 

Definition at line 1221 of file SiPixelActionExecutor.cc.

References QTestHandle::attachTests(), DQMStore::cd(), QTestHandle::configureTests(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), and qtHandler_.

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

01221                                                       {
01222 //printing cout<<"Entering SiPixelActionExecutor::setupQTests: "<<endl;
01223 
01224   bei->cd();
01225   bei->cd("Pixel");
01226   
01227   string localPath = string("DQM/SiPixelMonitorClient/test/sipixel_qualitytest_config.xml");
01228   if(!qtHandler_){
01229     qtHandler_ = new QTestHandle();
01230   }
01231   if(!qtHandler_->configureTests(edm::FileInPath(localPath).fullPath(),bei)){
01232     qtHandler_->attachTests(bei);
01233     bei->cd();
01234   }else{
01235     cout << " Problem setting up quality tests "<<endl;
01236   }
01237 
01238 //printing cout<<" leaving SiPixelActionExecutor::setupQTests. "<<endl;
01239 }


Member Data Documentation

int SiPixelActionExecutor::calib_type_ [private]

Definition at line 88 of file SiPixelActionExecutor.h.

Referenced by checkQTestResults().

SiPixelConfigParser* SiPixelActionExecutor::configParser_ [private]

Definition at line 80 of file SiPixelActionExecutor.h.

Referenced by checkQTestResults(), createSummary(), readConfiguration(), SiPixelActionExecutor(), and ~SiPixelActionExecutor().

SiPixelConfigWriter* SiPixelActionExecutor::configWriter_ [private]

Definition at line 81 of file SiPixelActionExecutor.h.

Referenced by createLayout(), createSummary(), fillLayout(), SiPixelActionExecutor(), and ~SiPixelActionExecutor().

int SiPixelActionExecutor::message_limit_ [private]

Definition at line 86 of file SiPixelActionExecutor.h.

Referenced by checkQTestResults().

int SiPixelActionExecutor::ndet_ [private]

Definition at line 89 of file SiPixelActionExecutor.h.

Referenced by dumpBarrelModIds(), dumpEndcapModIds(), and SiPixelActionExecutor().

MonitorElement* SiPixelActionExecutor::OccupancyMap [private]

Definition at line 94 of file SiPixelActionExecutor.h.

Referenced by bookOccupancyPlots(), and fillOccupancy().

bool SiPixelActionExecutor::offlineXMLfile_ [private]

Definition at line 90 of file SiPixelActionExecutor.h.

Referenced by createSummary(), and readConfiguration().

MonitorElement* SiPixelActionExecutor::PixelOccupancyMap [private]

Definition at line 95 of file SiPixelActionExecutor.h.

QTestHandle* SiPixelActionExecutor::qtHandler_ [private]

Definition at line 92 of file SiPixelActionExecutor.h.

Referenced by setupQTests(), SiPixelActionExecutor(), and ~SiPixelActionExecutor().

int SiPixelActionExecutor::source_type_ [private]

Definition at line 87 of file SiPixelActionExecutor.h.

Referenced by createSummary().

std::vector<std::string> SiPixelActionExecutor::summaryMENames [private]

Definition at line 83 of file SiPixelActionExecutor.h.

std::vector<std::string> SiPixelActionExecutor::tkMapMENames [private]

Definition at line 84 of file SiPixelActionExecutor.h.

Referenced by getTkMapMENames().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:31:50 2009 for CMSSW by  doxygen 1.5.4