#include <DQM/SiStripMonitorClient/interface/SiStripTrackerMapCreator.h>
Public Member Functions | |
void | create (const edm::ParameterSet &tkmapPset, const edm::ESHandle< SiStripFedCabling > &fedcabling, DQMStore *dwm_store) |
int | getFrequency () |
int | getMENames (std::vector< std::string > &me_names) |
bool | readConfiguration () |
SiStripTrackerMapCreator () | |
~SiStripTrackerMapCreator () | |
Private Member Functions | |
void | paintTkMap (int det_id, std::map< MonitorElement *, int > &me_map) |
Private Attributes | |
std::vector< std::string > | meNames_ |
int | tkMapFrequency_ |
std::string | tkMapName_ |
TrackerMap * | trackerMap_ |
Definition at line 17 of file SiStripTrackerMapCreator.h.
SiStripTrackerMapCreator::SiStripTrackerMapCreator | ( | ) |
Definition at line 12 of file SiStripTrackerMapCreator.cc.
References tkMapFrequency_, and trackerMap_.
00012 { 00013 tkMapFrequency_ = -1; 00014 trackerMap_ = 0; 00015 }
SiStripTrackerMapCreator::~SiStripTrackerMapCreator | ( | ) |
Definition at line 19 of file SiStripTrackerMapCreator.cc.
References trackerMap_.
00019 { 00020 if (trackerMap_) delete trackerMap_; 00021 }
void SiStripTrackerMapCreator::create | ( | const edm::ParameterSet & | tkmapPset, | |
const edm::ESHandle< SiStripFedCabling > & | fedcabling, | |||
DQMStore * | dwm_store | |||
) |
Definition at line 56 of file SiStripTrackerMapCreator.cc.
References detId, DQMStore::getContents(), SiStripFolderOrganizer::getFolderName(), SiStripUtility::getMEStatus(), it, meNames_, paintTkMap(), TrackerMap::printonline(), and trackerMap_.
Referenced by SiStripActionExecutor::createTkMap().
00057 { 00058 00059 if (meNames_.size() == 0) return; 00060 if (!trackerMap_) trackerMap_ = new TrackerMap(tkmapPset, fedcabling); 00061 00062 const vector<uint16_t>& feds = fedcabling->feds(); 00063 uint32_t detId_save = 0; 00064 map<MonitorElement*,int> local_mes; 00065 SiStripFolderOrganizer folder_organizer; 00066 for(vector<unsigned short>::const_iterator ifed = feds.begin(); 00067 ifed < feds.end(); ifed++){ 00068 const std::vector<FedChannelConnection> fedChannels = fedcabling->connections( *ifed ); 00069 for(std::vector<FedChannelConnection>::const_iterator iconn = fedChannels.begin(); iconn < fedChannels.end(); iconn++){ 00070 00071 uint32_t detId = iconn->detId(); 00072 if (detId == 0 || detId == 0xFFFFFFFF) continue; 00073 if (detId_save != detId) { 00074 detId_save = detId; 00075 local_mes.clear(); 00076 string dir_path; 00077 folder_organizer.getFolderName(detId, dir_path); 00078 vector<MonitorElement*> all_mes = dqm_store->getContents(dir_path); 00079 for (vector<MonitorElement *>::const_iterator it = all_mes.begin(); 00080 it!= all_mes.end(); it++) { 00081 if (!(*it)) continue; 00082 string me_name = (*it)->getName(); 00083 int istat = 0; 00084 for (vector<string>::const_iterator im = meNames_.begin(); 00085 im != meNames_.end(); im++) { 00086 if (me_name.find(*im) == string::npos) continue; 00087 istat = SiStripUtility::getMEStatus((*it)); 00088 local_mes.insert(pair<MonitorElement*, int>((*it), istat)); 00089 } 00090 } 00091 paintTkMap(detId,local_mes); 00092 } 00093 } 00094 } 00095 00096 trackerMap_->printonline(); 00097 }
int SiStripTrackerMapCreator::getFrequency | ( | ) | [inline] |
Definition at line 29 of file SiStripTrackerMapCreator.h.
References tkMapFrequency_.
00029 { return tkMapFrequency_;}
int SiStripTrackerMapCreator::getMENames | ( | std::vector< std::string > & | me_names | ) |
void SiStripTrackerMapCreator::paintTkMap | ( | int | det_id, | |
std::map< MonitorElement *, int > & | me_map | |||
) | [private] |
Referenced by create().
bool SiStripTrackerMapCreator::readConfiguration | ( | ) |
Definition at line 25 of file SiStripTrackerMapCreator.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), DQMParserBase::getDocument(), SiStripConfigParser::getFrequencyForTrackerMap(), SiStripConfigParser::getMENamesForTrackerMap(), meNames_, tkMapFrequency_, and tkMapName_.
Referenced by SiStripActionExecutor::readTkMapConfiguration().
00025 { 00026 SiStripConfigParser config_parser; 00027 string localPath = string("DQM/SiStripMonitorClient/data/sistrip_monitorelement_config.xml"); 00028 config_parser.getDocument(edm::FileInPath(localPath).fullPath()); 00029 if (!config_parser.getFrequencyForTrackerMap(tkMapFrequency_)){ 00030 cout << "SiStripActionExecutor::readConfiguration: Failed to read TrackerMap configuration parameters!! "; 00031 tkMapFrequency_ = -1; 00032 return false; 00033 } 00034 00035 if (!config_parser.getMENamesForTrackerMap(tkMapName_, meNames_)){ 00036 cout << "SiStripTrackerMapCreator::readConfiguration: Failed to read TrackerMap configuration parameters!! "; 00037 return false; 00038 } 00039 cout << " # of MEs in Tk Map " << meNames_.size() << endl; 00040 return true; 00041 }
std::vector<std::string> SiStripTrackerMapCreator::meNames_ [private] |
Definition at line 38 of file SiStripTrackerMapCreator.h.
Referenced by create(), and readConfiguration().
int SiStripTrackerMapCreator::tkMapFrequency_ [private] |
Definition at line 40 of file SiStripTrackerMapCreator.h.
Referenced by getFrequency(), readConfiguration(), and SiStripTrackerMapCreator().
std::string SiStripTrackerMapCreator::tkMapName_ [private] |
TrackerMap* SiStripTrackerMapCreator::trackerMap_ [private] |
Definition at line 37 of file SiStripTrackerMapCreator.h.
Referenced by create(), SiStripTrackerMapCreator(), and ~SiStripTrackerMapCreator().