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

#include <SiStripInformationExtractor.h>

Public Member Functions

void createImages (DQMStore *dqm_store)
 
void getCondDBHistos (DQMStore *dqm_store, bool &plot_flag, const std::multimap< std::string, std::string > &req_map, xgi::Output *out)
 
void getGlobalHistos (DQMStore *dqm_store, const std::multimap< std::string, std::string > &req_map, xgi::Output *out)
 
void getHistosFromPath (DQMStore *dqm_store, const std::multimap< std::string, std::string > &req_map, xgi::Output *out)
 
void getImage (const std::multimap< std::string, std::string > &req_map, xgi::Output *out)
 
void getSingleModuleHistos (DQMStore *dqm_store, const std::multimap< std::string, std::string > &req_map, xgi::Output *out)
 
void getTrackerMapHistos (DQMStore *dqm_store, const std::multimap< std::string, std::string > &req_map, xgi::Output *out)
 
void plotHistosFromLayout (DQMStore *dqm_store)
 
void readAlarmTree (DQMStore *dqm_store, std::string &str_name, xgi::Output *out)
 
void readGlobalHistoList (DQMStore *dqm_store, std::string &dname, xgi::Output *out)
 
void readLayoutNames (DQMStore *dqm_store, xgi::Output *out)
 
void readModuleAndHistoList (DQMStore *dqm_store, std::string &sname, const edm::ESHandle< SiStripDetCabling > &detcabling, xgi::Output *out)
 
void readNonGeomHistoTree (DQMStore *dqm_store, std::string &fld_name, xgi::Output *out)
 
void readQTestSummary (DQMStore *dqm_store, std::string type, xgi::Output *out)
 
void readStatusMessage (DQMStore *dqm_store, std::multimap< std::string, std::string > &req_map, xgi::Output *out)
 
void readSummaryHistoTree (DQMStore *dqm_store, std::string &str_name, xgi::Output *out)
 
 SiStripInformationExtractor ()
 
 ~SiStripInformationExtractor ()
 

Private Member Functions

void getItemList (const std::multimap< std::string, std::string > &req_map, std::string item_name, std::vector< std::string > &items)
 
std::string getItemValue (const std::multimap< std::string, std::string > &req_map, std::string item_name)
 
bool hasItem (const std::multimap< std::string, std::string > &req_map, std::string item_name)
 
void printAlarmList (DQMStore *dqm_store, std::ostringstream &str_val)
 
void printNonGeomHistoList (DQMStore *dqm_store, std::ostringstream &str_val)
 
void printSummaryHistoList (DQMStore *dqm_store, std::ostringstream &str_val)
 
void readConfiguration ()
 
void selectColor (std::string &col, int status)
 
void selectColor (std::string &col, std::vector< QReport * > &reports)
 
void selectImage (std::string &name, int status)
 
void selectImage (std::string &name, std::vector< QReport * > &reports)
 
void setHTMLHeader (xgi::Output *out)
 
void setPlainHeader (xgi::Output *out)
 
void setXMLHeader (xgi::Output *out)
 

Private Attributes

SiStripHistoPlotterhistoPlotter_
 
std::map< std::string,
std::vector< std::string > > 
layoutMap
 
SiStripLayoutParserlayoutParser_
 
bool readReference_
 
std::vector< std::string > subdetVec
 

Detailed Description

Definition at line 25 of file SiStripInformationExtractor.h.

Constructor & Destructor Documentation

SiStripInformationExtractor::SiStripInformationExtractor ( )

Definition at line 22 of file SiStripInformationExtractor.cc.

References histoPlotter_, layoutMap, layoutParser_, and readConfiguration().

22  {
23  edm::LogInfo("SiStripInformationExtractor") <<
24  " Creating SiStripInformationExtractor " << "\n" ;
25  layoutParser_ = 0;
26  layoutMap.clear();
27  histoPlotter_=0;
30 }
std::map< std::string, std::vector< std::string > > layoutMap
SiStripInformationExtractor::~SiStripInformationExtractor ( )

Definition at line 34 of file SiStripInformationExtractor.cc.

References histoPlotter_, and layoutParser_.

34  {
35  edm::LogInfo("SiStripInformationExtractor") <<
36  " Deleting SiStripInformationExtractor " << "\n" ;
37  if (layoutParser_) delete layoutParser_;
38  if (histoPlotter_) delete histoPlotter_;
39 
40 }

Member Function Documentation

void SiStripInformationExtractor::createImages ( DQMStore dqm_store)
void SiStripInformationExtractor::getCondDBHistos ( DQMStore dqm_store,
bool &  plot_flag,
const std::multimap< std::string, std::string > &  req_map,
xgi::Output out 
)

Definition at line 343 of file SiStripInformationExtractor.cc.

References DQMStore::getContents(), SiStripFolderOrganizer::getFolderName(), getItemValue(), MonitorElement::getName(), hasItem(), histoPlotter_, path(), SiStripHistoPlotter::setNewCondDBPlot(), setXMLHeader(), SiStripUtility::split(), and tablePrinter::width.

Referenced by SiStripWebInterface::handleAnalyserRequest().

343  {
344 
345  plot_flag = true;
346  std::string sname = getItemValue(req_map,"StructureName");
347  int width = atoi(getItemValue(req_map, "width").c_str());
348  int height = atoi(getItemValue(req_map, "height").c_str());
349 
350  std::string path = "";
351  uint32_t detId;
352  if (hasItem(req_map,std::string("ModId"))) {
353  detId = atoi(getItemValue(req_map,"ModId").c_str());
354  if (detId != 0) {
355  SiStripFolderOrganizer folder_organizer;
356  folder_organizer.getFolderName(detId,path);
357  }
358  } else {
359  if (sname.size() > 0) path = "SiStrip/" + sname;
360  }
361  if (path.size() == 0) path = "dummy_path";
362 
363  setXMLHeader(out);
364  *out << "<HPathAndHNameList>" << std::endl;
365  *out << "<HPath>" << path << "</HPath>" << std::endl;
366 
367  if (path == "dummy_path") {
368  *out << "<HName>" << "Dummy" << "</HName>" << std::endl;
369  plot_flag = false;
370  } else {
371  std::string opt = getItemValue(req_map,"option");
372  std::vector<std::string> htypes;
373  SiStripUtility::split(opt, htypes, ",");
374  // Check if CondDB histograms already exists
375  std::vector<MonitorElement*> all_mes = dqm_store->getContents(path);
376  for (std::vector<std::string>::const_iterator ih = htypes.begin();
377  ih!= htypes.end(); ih++) {
378  std::string type = (*ih);
379  if (type.size() == 0) continue;
380  for (std::vector<MonitorElement *>::const_iterator it = all_mes.begin();
381  it!= all_mes.end(); it++) {
382  MonitorElement * me = (*it);
383  if (!me) continue;
384  std::string hname = me->getName();
385  if (hname.find(type) != std::string::npos) {
386  plot_flag = false;
387  break;
388  }
389  }
390  if (plot_flag == false) break;
391  }
392  histoPlotter_->setNewCondDBPlot(path, opt, width, height);
393  for (std::vector<std::string>::const_iterator ih = htypes.begin();
394  ih != htypes.end(); ih++) {
395  if ((*ih).size() > 0) {
396  *out << "<HName>" << (*ih) << "</HName>" << std::endl;
397  }
398  }
399  }
400  *out << "</HPathAndHNameList>" << std::endl;
401 }
type
Definition: HCALResponse.h:22
const std::string & getName(void) const
get name of ME
void setNewCondDBPlot(std::string &path, std::string &option, int width, int height)
static void split(const std::string &str, std::vector< std::string > &tokens, const std::string &delimiters=" ")
int path() const
Definition: HLTadd.h:3
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1299
tuple out
Definition: dbtoconf.py:99
void getFolderName(int32_t rawdetid, std::string &lokal_folder)
std::string getItemValue(const std::multimap< std::string, std::string > &req_map, std::string item_name)
bool hasItem(const std::multimap< std::string, std::string > &req_map, std::string item_name)
void SiStripInformationExtractor::getGlobalHistos ( DQMStore dqm_store,
const std::multimap< std::string, std::string > &  req_map,
xgi::Output out 
)

Definition at line 206 of file SiStripInformationExtractor.cc.

References DQMStore::getContents(), getItemList(), getItemValue(), MonitorElement::getName(), histoPlotter_, AlCaRecoCosmics_cfg::name, path(), SiStripHistoPlotter::setNewPlot(), setXMLHeader(), and tablePrinter::width.

Referenced by SiStripWebInterface::handleAnalyserRequest().

206  {
207 
208  std::vector<std::string> hlist;
209  getItemList(req_map,"histo", hlist);
210 
211  std::string path = getItemValue(req_map, "GlobalFolder");
212 
213  int width = atoi(getItemValue(req_map, "width").c_str());
214  int height = atoi(getItemValue(req_map, "height").c_str());
215 
216  std::string opt =" ";
217 
218  std::vector<MonitorElement *> all_mes = dqm_store->getContents(path);
219 
220  setXMLHeader(out);
221  *out << "<HPathAndHNameList>" << std::endl;
222  *out << "<HPath>" << path << "</HPath>" << std::endl;
223 
224  for (std::vector<std::string>::const_iterator ih = hlist.begin();
225  ih != hlist.end(); ih++) {
226  for (std::vector<MonitorElement *>::const_iterator it = all_mes.begin();
227  it!= all_mes.end(); it++) {
228  MonitorElement * me = (*it);
229  if (!me) continue;
230  std::string hname = me->getName();
231  std::string name = hname.substr(0, hname.find("__det__"));
232  if (name == (*ih)) {
233  std::string full_path = path + "/" + hname;
234  histoPlotter_->setNewPlot(full_path, opt, width, height);
235  *out << "<HName>" << name << "</HName>" << std::endl;
236  }
237  }
238  }
239  *out << "</HPathAndHNameList>" << std::endl;
240 }
const std::string & getName(void) const
get name of ME
int path() const
Definition: HLTadd.h:3
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1299
tuple out
Definition: dbtoconf.py:99
std::string getItemValue(const std::multimap< std::string, std::string > &req_map, std::string item_name)
void setNewPlot(std::string &path, std::string &option, int width, int height)
void getItemList(const std::multimap< std::string, std::string > &req_map, std::string item_name, std::vector< std::string > &items)
void SiStripInformationExtractor::getHistosFromPath ( DQMStore dqm_store,
const std::multimap< std::string, std::string > &  req_map,
xgi::Output out 
)

Definition at line 244 of file SiStripInformationExtractor.cc.

References DQMStore::getContents(), getItemValue(), MonitorElement::getName(), histoPlotter_, AlCaRecoCosmics_cfg::name, path(), SiStripHistoPlotter::setNewPlot(), setXMLHeader(), and tablePrinter::width.

Referenced by SiStripWebInterface::handleAnalyserRequest().

244  {
245 
246  std::string path = getItemValue(req_map,"Path");
247 
248  if (path.size() == 0) return;
249 
250  int width = atoi(getItemValue(req_map, "width").c_str());
251  int height = atoi(getItemValue(req_map, "height").c_str());
252 
253  std::string opt =" ";
254 
255  setXMLHeader(out);
256  *out << "<HPathAndHNameList>" << std::endl;
257  *out << "<HPath>" << path << "</HPath>" << std::endl;
258 
259  std::vector<MonitorElement*> all_mes = dqm_store->getContents(path);
260  for(std::vector<MonitorElement*>::iterator it=all_mes.begin(); it!=all_mes.end(); it++){
261  MonitorElement* me = (*it);
262  if (!me) continue;
263  std::string name = me->getName();
264  std::string full_path = path + "/" + name;
265  histoPlotter_->setNewPlot(full_path, opt, width, height);
266  *out << "<HName>" << name << "</HName>" << std::endl;
267  }
268  *out << "</HPathAndHNameList>" << std::endl;
269 }
const std::string & getName(void) const
get name of ME
int path() const
Definition: HLTadd.h:3
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1299
tuple out
Definition: dbtoconf.py:99
std::string getItemValue(const std::multimap< std::string, std::string > &req_map, std::string item_name)
void setNewPlot(std::string &path, std::string &option, int width, int height)
void SiStripInformationExtractor::getImage ( const std::multimap< std::string, std::string > &  req_map,
xgi::Output out 
)

Definition at line 405 of file SiStripInformationExtractor.cc.

References getItemValue(), SiStripHistoPlotter::getNamedImageBuffer(), histoPlotter_, and path().

Referenced by SiStripWebInterface::handleAnalyserRequest().

405  {
406 
407  std::string path = getItemValue(req_map,"Path");
408  std::string image;
409  histoPlotter_->getNamedImageBuffer(path, image);
410  out->getHTTPResponseHeader().addHeader("Content-Type", "image/png");
411  out->getHTTPResponseHeader().addHeader("Pragma", "no-cache");
412  out->getHTTPResponseHeader().addHeader("Cache-Control", "no-store, no-cache, must-revalidate,max-age=0");
413  out->getHTTPResponseHeader().addHeader("Expires","Mon, 26 Jul 1997 05:00:00 GMT");
414  *out << image;
415 
416 }
int path() const
Definition: HLTadd.h:3
void getNamedImageBuffer(const std::string &path, std::string &image)
tuple out
Definition: dbtoconf.py:99
std::string getItemValue(const std::multimap< std::string, std::string > &req_map, std::string item_name)
void SiStripInformationExtractor::getItemList ( const std::multimap< std::string, std::string > &  req_map,
std::string  item_name,
std::vector< std::string > &  items 
)
private

Definition at line 573 of file SiStripInformationExtractor.cc.

Referenced by getGlobalHistos(), and getSingleModuleHistos().

573  {
574  items.clear();
575  for (std::multimap<std::string, std::string>::const_iterator it = req_map.begin();
576  it != req_map.end(); it++) {
577 
578  if (it->first == item_name) {
579  items.push_back(it->second);
580  }
581  }
582 }
std::string SiStripInformationExtractor::getItemValue ( const std::multimap< std::string, std::string > &  req_map,
std::string  item_name 
)
private

Definition at line 595 of file SiStripInformationExtractor.cc.

References pos, and relativeConstraints::value.

Referenced by getCondDBHistos(), getGlobalHistos(), getHistosFromPath(), getImage(), getSingleModuleHistos(), getTrackerMapHistos(), and readStatusMessage().

596  {
597  std::multimap<std::string,std::string>::const_iterator pos = req_map.find(item_name);
598  std::string value = " ";
599  if (pos != req_map.end()) {
600  value = pos->second;
601  }
602  return value;
603 }
void SiStripInformationExtractor::getSingleModuleHistos ( DQMStore dqm_store,
const std::multimap< std::string, std::string > &  req_map,
xgi::Output out 
)

Definition at line 164 of file SiStripInformationExtractor.cc.

References DQMStore::getContents(), SiStripFolderOrganizer::getFolderName(), getItemList(), getItemValue(), MonitorElement::getName(), histoPlotter_, AlCaRecoCosmics_cfg::name, path(), SiStripHistoPlotter::setNewPlot(), setXMLHeader(), and tablePrinter::width.

Referenced by SiStripWebInterface::handleAnalyserRequest().

165  {
166 
167  std::vector<std::string> hlist;
168  getItemList(req_map,"histo", hlist);
169 
170  uint32_t detId = atoi(getItemValue(req_map,"ModId").c_str());
171 
172  int width = atoi(getItemValue(req_map, "width").c_str());
173  int height = atoi(getItemValue(req_map, "height").c_str());
174 
175  std::string opt =" ";
176 
177  SiStripFolderOrganizer folder_organizer;
178  std::string path;
179  folder_organizer.getFolderName(detId,path);
180 
181  std::vector<MonitorElement*> all_mes = dqm_store->getContents(path);
182  setXMLHeader(out);
183  *out << "<HPathAndHNameList>" << std::endl;
184  *out << "<HPath>" << path << "</HPath>" << std::endl;
185 
186  for (std::vector<std::string>::const_iterator ih = hlist.begin();
187  ih != hlist.end(); ih++) {
188  for (std::vector<MonitorElement *>::const_iterator it = all_mes.begin();
189  it!= all_mes.end(); it++) {
190  MonitorElement * me = (*it);
191  if (!me) continue;
192  std::string hname = me->getName();
193  std::string name = hname.substr(0, hname.find("__det__"));
194  if (name == (*ih)) {
195  std::string full_path = path + "/" + hname;
196  histoPlotter_->setNewPlot(full_path, opt, width, height);
197  *out << "<HName>" << hname << "</HName>" << std::endl;
198  }
199  }
200  }
201  *out << "</HPathAndHNameList>" << std::endl;
202 }
const std::string & getName(void) const
get name of ME
int path() const
Definition: HLTadd.h:3
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1299
tuple out
Definition: dbtoconf.py:99
void getFolderName(int32_t rawdetid, std::string &lokal_folder)
std::string getItemValue(const std::multimap< std::string, std::string > &req_map, std::string item_name)
void setNewPlot(std::string &path, std::string &option, int width, int height)
void getItemList(const std::multimap< std::string, std::string > &req_map, std::string item_name, std::vector< std::string > &items)
void SiStripInformationExtractor::getTrackerMapHistos ( DQMStore dqm_store,
const std::multimap< std::string, std::string > &  req_map,
xgi::Output out 
)

Definition at line 310 of file SiStripInformationExtractor.cc.

References DQMStore::getContents(), SiStripFolderOrganizer::getFolderName(), getItemValue(), MonitorElement::getName(), histoPlotter_, path(), SiStripHistoPlotter::setNewPlot(), setXMLHeader(), and tablePrinter::width.

Referenced by SiStripWebInterface::handleAnalyserRequest().

310  {
311 
312  uint32_t detId = atoi(getItemValue(req_map,"ModId").c_str());
313 
314  int width = atoi(getItemValue(req_map, "width").c_str());
315  int height = atoi(getItemValue(req_map, "height").c_str());
316 
317  std::string opt =" ";
318 
319  SiStripFolderOrganizer folder_organizer;
320  std::string path;
321  folder_organizer.getFolderName(detId,path);
322 
323  std::vector<MonitorElement*> all_mes = dqm_store->getContents(path);
324  setXMLHeader(out);
325  *out << "<HPathAndHNameList>" << std::endl;
326  *out << "<HPath>" << path << "</HPath>" << std::endl;
327  for (std::vector<MonitorElement *>::const_iterator it = all_mes.begin();
328  it!= all_mes.end(); it++) {
329  MonitorElement * me = (*it);
330  if (!me) continue;
331  std::string hname = me->getName();
332  std::string full_path;
333  full_path = path + "/" + hname;
334  histoPlotter_->setNewPlot(full_path, opt, width, height);
335  *out << "<HName>" << hname << "</HName>" << std::endl;
336  }
337  *out << "</HPathAndHNameList>" << std::endl;
338 
339 }
const std::string & getName(void) const
get name of ME
int path() const
Definition: HLTadd.h:3
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1299
tuple out
Definition: dbtoconf.py:99
void getFolderName(int32_t rawdetid, std::string &lokal_folder)
std::string getItemValue(const std::multimap< std::string, std::string > &req_map, std::string item_name)
void setNewPlot(std::string &path, std::string &option, int width, int height)
bool SiStripInformationExtractor::hasItem ( const std::multimap< std::string, std::string > &  req_map,
std::string  item_name 
)
private

Definition at line 586 of file SiStripInformationExtractor.cc.

References pos.

Referenced by getCondDBHistos().

587  {
588  std::multimap<std::string,std::string>::const_iterator pos = req_map.find(item_name);
589  if (pos != req_map.end()) return true;
590  return false;
591 }
void SiStripInformationExtractor::plotHistosFromLayout ( DQMStore dqm_store)

Definition at line 273 of file SiStripInformationExtractor.cc.

References SiStripHistoPlotter::createStaticPlot(), alignmentValidation::fname, DQMStore::get(), MonitorElement::getName(), histoPlotter_, layoutMap, Association::map, and dbtoconf::out.

Referenced by SiStripWebInterface::performAction().

273  {
274  if (layoutMap.size() == 0) return;
275 
276  ofstream image_file;
277 
278  for (std::map<std::string, std::vector< std::string > >::iterator it = layoutMap.begin() ; it != layoutMap.end(); it++) {
279  unsigned int ival = 0;
280  std::string image_list = "images/" + it->first +".lis";
281  image_file.open(image_list.c_str(), std::ios::out);
282  if (!image_file) return;
283 
284  image_file << "[";
285  for (std::vector<std::string>::iterator im = it->second.begin();
286  im != it->second.end(); im++) {
287  std::string path_name = (*im);
288  if (path_name.size() == 0) continue;
289  MonitorElement* me = dqm_store->get(path_name);
290  ival++;
291  std::ostringstream fname, ftitle;
292  if (!me) {
293  fname << "images/EmptyPlot.png";
294  ftitle << "EmptyPlot";
295  } else {
296  fname << "images/" << it->first << "_" <<ival << ".png";
297  ftitle << me->getName();
298  histoPlotter_->createStaticPlot(me, fname.str());
299  }
300  image_file << "["<< "\"" << fname.str() << "\",\"" << path_name << "\"]";
301  if (ival != it->second.size()) image_file << ","<< std::endl;
302  }
303  image_file << "]" << std::endl;
304  image_file.close();
305  }
306 }
const std::string & getName(void) const
get name of ME
dictionary map
Definition: Association.py:160
void createStaticPlot(MonitorElement *me, const std::string &file_name)
std::map< std::string, std::vector< std::string > > layoutMap
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1270
tuple out
Definition: dbtoconf.py:99
string fname
main script
void SiStripInformationExtractor::printAlarmList ( DQMStore dqm_store,
std::ostringstream &  str_val 
)
private

Definition at line 115 of file SiStripInformationExtractor.cc.

References DQMStore::cd(), DQMStore::getContents(), MonitorElement::getName(), MonitorElement::getQReports(), DQMStore::getStatus(), DQMStore::getSubdirs(), DQMStore::goUp(), DQMStore::pwd(), and selectImage().

Referenced by readAlarmTree().

115  {
116  static std::string indent_str = "";
117 
118  std::string currDir = dqm_store->pwd();
119  std::string dname = currDir.substr(currDir.find_last_of("/")+1);
120  std::string image_name;
121  selectImage(image_name,dqm_store->getStatus(currDir));
122  str_val << "<li><span class=\"folder\">"
123  << dname << "<img src=\""
124  << image_name << "\"></span>" << std::endl;
125  std::vector<std::string> subDirVec = dqm_store->getSubdirs();
126  std::vector<MonitorElement *> meVec = dqm_store->getContents(currDir);
127 
128  if (subDirVec.size() == 0 && meVec.size() == 0) {
129  str_val << "</li> "<< std::endl;
130  return;
131  }
132  str_val << "<ul>" << std::endl;
133  if (dname.find("module_") != std::string::npos) {
134  if (meVec.size() > 0) {
135  for (std::vector<MonitorElement *>::const_iterator it = meVec.begin();
136  it != meVec.end(); it++) {
137  MonitorElement * me = (*it);
138  if (!me) continue;
139  std::vector<QReport*> q_reports = me->getQReports();
140  if (q_reports.size() > 0) {
141  std::string image_name1;
142  selectImage(image_name1,q_reports);
143  str_val << "<li><span class=\"file\"><a href=\"javascript:RequestHistos.ReadAlarmStatus('"
144  << currDir << "')\">"<<me->getName()
145  << "</a><img src=\""
146  << image_name1 << "\">"
147  << "</span></li>" << std::endl;
148  }
149  }
150  }
151  }
152  for (std::vector<std::string>::const_iterator ic = subDirVec.begin();
153  ic != subDirVec.end(); ic++) {
154  dqm_store->cd(*ic);
155  printAlarmList(dqm_store, str_val);
156  dqm_store->goUp();
157  }
158  str_val << "</ul> "<< std::endl;
159  str_val << "</li> "<< std::endl;
160 }
const std::string & getName(void) const
get name of ME
int getStatus(const std::string &path="") const
Definition: DQMStore.cc:2481
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1221
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
void printAlarmList(DQMStore *dqm_store, std::ostringstream &str_val)
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1299
std::vector< QReport * > getQReports(void) const
get map of QReports
void selectImage(std::string &name, int status)
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:248
const std::string & pwd(void) const
Definition: DQMStore.cc:209
void SiStripInformationExtractor::printNonGeomHistoList ( DQMStore dqm_store,
std::ostringstream &  str_val 
)
private

Definition at line 834 of file SiStripInformationExtractor.cc.

References DQMStore::cd(), DQMStore::getContents(), DQMStore::getSubdirs(), DQMStore::goUp(), AlCaRecoCosmics_cfg::name, and DQMStore::pwd().

Referenced by readNonGeomHistoTree().

834  {
835  static std::string indent_str = "";
836 
837  std::string currDir = dqm_store->pwd();
838  std::string dname = currDir.substr(currDir.find_last_of("/")+1);
839  str_val << "<li><span class=\"folder\">" << dname << "</span>" << std::endl;
840  std::vector<MonitorElement *> meVec = dqm_store->getContents(currDir);
841  std::vector<std::string> subDirVec = dqm_store->getSubdirs();
842  if ( meVec.size()== 0 && subDirVec.size() == 0 ) {
843  str_val << "</li> "<< std::endl;
844  return;
845  }
846  str_val << "<ul>" << std::endl;
847  for (std::vector<MonitorElement *>::const_iterator it = meVec.begin();
848  it != meVec.end(); it++) {
849  MonitorElement* me = (*it);
850  if (!me) continue;
851  std::string name = (*it)->getName();
852  str_val << "<li> <span class=\"file\"><a href=\"javascript:RequestHistos.DrawSummaryHistogram('"
853  << currDir
854  << "')\">" << name << "</a></span></li>" << std::endl;
855  }
856  for (std::vector<std::string>::const_iterator ic = subDirVec.begin();
857  ic != subDirVec.end(); ic++) {
858  dqm_store->cd(*ic);
859  printNonGeomHistoList(dqm_store, str_val);
860  dqm_store->goUp();
861  }
862  str_val << "</ul> "<< std::endl;
863  str_val << "</li> "<< std::endl;
864 }
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1221
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
void printNonGeomHistoList(DQMStore *dqm_store, std::ostringstream &str_val)
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1299
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:248
const std::string & pwd(void) const
Definition: DQMStore.cc:209
void SiStripInformationExtractor::printSummaryHistoList ( DQMStore dqm_store,
std::ostringstream &  str_val 
)
private

Definition at line 68 of file SiStripInformationExtractor.cc.

References DQMStore::cd(), DQMStore::getContents(), DQMStore::getSubdirs(), DQMStore::goUp(), AlCaRecoCosmics_cfg::name, and DQMStore::pwd().

Referenced by readSummaryHistoTree().

68  {
69  static std::string indent_str = "";
70 
71  std::string currDir = dqm_store->pwd();
72  std::string dname = currDir.substr(currDir.find_last_of("/")+1);
73  if (dname.find("module_") ==0) return;
74  // str_val << "<li><a href=\"#\" id=\"" << currDir << "\">" << dname << "</a>" << std::endl;
75  str_val << "<li><span class=\"folder\">" << dname << "</span>" << std::endl;
76  std::vector<MonitorElement *> meVec = dqm_store->getContents(currDir);
77  std::vector<std::string> subDirVec = dqm_store->getSubdirs();
78  if ( meVec.size()== 0 && subDirVec.size() == 0 ) {
79  str_val << "</li> "<< std::endl;
80  return;
81  }
82  str_val << "<ul>" << std::endl;
83  for (std::vector<MonitorElement *>::const_iterator it = meVec.begin();
84  it != meVec.end(); it++) {
85  MonitorElement* me = (*it);
86  if (!me) continue;
87  std::string name = (*it)->getName();
88  str_val << "<li> <span class=\"file\"><a href=\"javascript:RequestHistos.DrawSummaryHistogram('"
89  << currDir
90  << "')\">" << name << "</a></span></li>" << std::endl;
91  }
92 
93  std::string mtag ="Modules: ";
94  for (std::vector<std::string>::const_iterator ic = subDirVec.begin();
95  ic != subDirVec.end(); ic++) {
96  dqm_store->cd(*ic);
97  std::string titl = (*ic);
98  if (titl.find("module_") == 0) {
99  titl = titl.substr(titl.find("module_")+7);
100  mtag += titl + " ";
101  }
102  printSummaryHistoList(dqm_store, str_val);
103  dqm_store->goUp();
104  }
105  if (mtag.size() > 10) {
106  // str_val << "<li class=\"note.gif\"><a href=\"#\">" << mtag << "</a></li>" << std::endl;
107  str_val << "<li> <span class=\"file\"><a href=\"#\">" << mtag << "</a></span></li>" << std::endl;
108  }
109  str_val << "</ul> "<< std::endl;
110  str_val << "</li> "<< std::endl;
111 }
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1221
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1299
void printSummaryHistoList(DQMStore *dqm_store, std::ostringstream &str_val)
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:248
const std::string & pwd(void) const
Definition: DQMStore.cc:209
void SiStripInformationExtractor::readAlarmTree ( DQMStore dqm_store,
std::string &  str_name,
xgi::Output out 
)

Definition at line 552 of file SiStripInformationExtractor.cc.

References DQMStore::cd(), DQMStore::dirExists(), printAlarmList(), and setPlainHeader().

Referenced by SiStripWebInterface::handleAnalyserRequest().

553  {
554  std::ostringstream alarmtree;
555  std::string dname = "SiStrip/" + str_name;
556  if (dqm_store->dirExists(dname)) {
557  dqm_store->cd(dname);
558  alarmtree << "<ul id=\"alarm_tree\" class=\"filetree\">" << std::endl;
559  printAlarmList(dqm_store,alarmtree);
560  alarmtree <<"</ul>" << std::endl;
561  } else {
562  alarmtree << "Desired Directory : " << std::endl;
563  alarmtree << dname << std::endl;
564  alarmtree << " does not exist !!!! " << std::endl;
565  }
567  *out << alarmtree.str();
568  dqm_store->cd();
569 }
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
void printAlarmList(DQMStore *dqm_store, std::ostringstream &str_val)
bool dirExists(const std::string &path) const
true if directory exists
Definition: DQMStore.cc:301
tuple out
Definition: dbtoconf.py:99
void SiStripInformationExtractor::readConfiguration ( )
private

Definition at line 44 of file SiStripInformationExtractor.cc.

References SiStripLayoutParser::getAllLayouts(), DQMParserBase::getDocument(), layoutMap, layoutParser_, and subdetVec.

Referenced by SiStripInformationExtractor().

44  {
45  std::string localPath = std::string("DQM/SiStripMonitorClient/data/sistrip_plot_layout.xml");
46  if (layoutParser_ == 0) {
48  layoutParser_->getDocument(edm::FileInPath(localPath).fullPath());
49  }
51  edm::LogInfo("SiStripInformationExtractor") <<
52  " Layouts correctly readout " << "\n" ;
53  } else edm::LogInfo("SiStripInformationExtractor") <<
54  " Problem in reading Layout " << "\n" ;
55  if (layoutParser_) delete layoutParser_;
56 
57  subdetVec.push_back("SiStrip/MechanicalView/TIB");
58  subdetVec.push_back("SiStrip/MechanicalView/TOB");
59  subdetVec.push_back("SiStrip/MechanicalView/TID/side_2");
60  subdetVec.push_back("SiStrip/MechanicalView/TID/side_1");
61  subdetVec.push_back("SiStrip/MechanicalView/TEC/side_2");
62  subdetVec.push_back("SiStrip/MechanicalView/TEC/side_1");
63 
64 }
void getDocument(std::string configFile, bool UseDB=false)
Methor that parses the xml file configFile.
std::vector< std::string > subdetVec
std::map< std::string, std::vector< std::string > > layoutMap
bool getAllLayouts(std::map< std::string, std::vector< std::string > > &me_names)
void SiStripInformationExtractor::readGlobalHistoList ( DQMStore dqm_store,
std::string &  dname,
xgi::Output out 
)

Definition at line 508 of file SiStripInformationExtractor.cc.

References DQMStore::dirExists(), DQMStore::getContents(), MonitorElement::getName(), and setXMLHeader().

Referenced by SiStripWebInterface::handleAnalyserRequest().

508  {
509  std::vector<std::string> hnames;
510  std::string dname = str_name;
511 
512  setXMLHeader(out);
513  *out << "<GlobalHistoList>" << std::endl;
514  if (dqm_store->dirExists(dname)) {
515  std::vector<MonitorElement*> meVec = dqm_store->getContents(dname);
516  for (std::vector<MonitorElement *>::const_iterator it = meVec.begin();
517  it != meVec.end(); it++) {
518  MonitorElement* me = (*it);
519  if (!me) continue;
520  *out << "<GHisto>" << (*it)->getName() << "</GHisto>" << std::endl;
521  }
522  } else {
523  *out << "<GHisto>" << " Desired directory : " << "</GHisto>" << std::endl;
524  *out << "<GHisto>" << dname << "</GHisto>" << std::endl;
525  *out << "<GHisto>" << " does not exist!!!! " << "</GHisto>" << std::endl;
526  }
527  *out << "</GlobalHistoList>" << std::endl;
528 }
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1299
bool dirExists(const std::string &path) const
true if directory exists
Definition: DQMStore.cc:301
tuple out
Definition: dbtoconf.py:99
void SiStripInformationExtractor::readLayoutNames ( DQMStore dqm_store,
xgi::Output out 
)

Definition at line 420 of file SiStripInformationExtractor.cc.

References DQMStore::cd(), DQMStore::dirExists(), DQMStore::getMEs(), DQMStore::getSubdirs(), layoutMap, Association::map, AlCaRecoCosmics_cfg::name, setXMLHeader(), and subdetVec.

Referenced by SiStripWebInterface::handleAnalyserRequest().

420  {
421  setXMLHeader(out);
422  *out << "<LayoutAndTKMapList>" << std::endl;
423  if (layoutMap.size() > 0) {
424  *out << "<LayoutList>" << std::endl;
425  for (std::map<std::string, std::vector< std::string > >::iterator it = layoutMap.begin();
426  it != layoutMap.end(); it++) {
427  *out << "<LName>" << it->first << "</LName>" << std::endl;
428  }
429  *out << "</LayoutList>" << std::endl;
430  }
431  dqm_store->cd();
432  *out << "<TKMapOptionList>" << std::endl;
433  *out << "<TkMapOption>" << "QTestAlarm" << "</TkMapOption>" << std::endl;
434 
435  for (std::vector<std::string>::const_iterator isubdet = subdetVec.begin(); isubdet != subdetVec.end(); isubdet++) {
436  std::string dname = (*isubdet);
437  if (!dqm_store->dirExists(dname)) continue;
438  dqm_store->cd(dname);
439  std::vector<std::string> subDirVec = dqm_store->getSubdirs();
440  if (subDirVec.size() == 0) continue;
441  for (std::vector<std::string>::const_iterator ilayer = subDirVec.begin(); ilayer != subDirVec.end(); ilayer++) {
442  std::string lname = (*ilayer);
443  if (lname.find("BadModuleList") != std::string::npos) continue;
444  dqm_store->cd(lname);
445  break;
446  }
447  std::vector<std::string> meVec = dqm_store->getMEs();
448  for (std::vector<std::string>::const_iterator it = meVec.begin();
449  it != meVec.end(); it++) {
450  std::string hname = (*it);
451  if (hname.find("TkHMap_") != std::string::npos) {
452  std::string name = hname.substr(hname.find("TkHMap_")+7);
453  name = name.substr(0,name.find_first_of("_"));
454  *out << "<TkMapOption>" << name << "</TkMapOption>" << std::endl;
455  }
456  }
457  break;
458  }
459  *out << "</TKMapOptionList>" << std::endl;
460  *out << "</LayoutAndTKMapList>" << std::endl;
461  dqm_store->cd();
462 }
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1221
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
dictionary map
Definition: Association.py:160
std::vector< std::string > subdetVec
std::map< std::string, std::vector< std::string > > layoutMap
bool dirExists(const std::string &path) const
true if directory exists
Definition: DQMStore.cc:301
tuple out
Definition: dbtoconf.py:99
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1244
void SiStripInformationExtractor::readModuleAndHistoList ( DQMStore dqm_store,
std::string &  sname,
const edm::ESHandle< SiStripDetCabling > &  detcabling,
xgi::Output out 
)

Definition at line 466 of file SiStripInformationExtractor.cc.

References DQMStore::cd(), DQMStore::dirExists(), DQMStore::getContents(), SiStripUtility::getModuleFolderList(), MonitorElement::getName(), and setXMLHeader().

Referenced by SiStripWebInterface::handleAnalyserRequest().

466  {
467 
468  std::string dname = "SiStrip/" + sname;
469  if (!dqm_store->dirExists(dname)) return;
470 
471  dqm_store->cd(dname);
472  std::vector<std::string> mids;
473  SiStripUtility::getModuleFolderList(dqm_store, mids);
474  dqm_store->cd();
475 
476  setXMLHeader(out);
477  *out << "<ModuleAndHistoList>" << std::endl;
478 
479  // Fill Module List
480  *out << "<ModuleList>" << std::endl;
481  uint32_t aDetId = 0;
482  for (std::vector<std::string>::const_iterator it=mids.begin(); it != mids.end(); it++){
483  std::string moduleId = (*it);
484  moduleId = moduleId.substr(moduleId.find("module_")+7);
485  *out << "<ModuleNum>" << moduleId << "</ModuleNum>" << std::endl;
486  if (aDetId == 0) aDetId = atoi(moduleId.c_str());
487  }
488 
489  *out << "</ModuleList>" << std::endl;
490  // Fill Histo list
491  *out << "<HistoList>" << std::endl;
492 
493  std::vector<MonitorElement*> detector_mes = dqm_store->getContents(mids[0]);
494  for (std::vector<MonitorElement *>::const_iterator it = detector_mes.begin();
495  it!= detector_mes.end(); it++) {
496  MonitorElement * me = (*it);
497  if (!me) continue;
498  std::string hname_full = me->getName();
499  std::string hname = hname_full.substr(0, hname_full.find("__det__"));
500  *out << "<Histo>" << hname << "</Histo>" << std::endl;
501  }
502  *out << "</HistoList>" << std::endl;
503  *out << "</ModuleAndHistoList>" << std::endl;
504 }
const std::string & getName(void) const
get name of ME
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1299
bool dirExists(const std::string &path) const
true if directory exists
Definition: DQMStore.cc:301
tuple out
Definition: dbtoconf.py:99
static void getModuleFolderList(DQMStore *dqm_store, std::vector< std::string > &m_ids)
void SiStripInformationExtractor::readNonGeomHistoTree ( DQMStore dqm_store,
std::string &  fld_name,
xgi::Output out 
)

Definition at line 814 of file SiStripInformationExtractor.cc.

References DQMStore::cd(), DQMStore::dirExists(), printNonGeomHistoList(), and setPlainHeader().

Referenced by SiStripWebInterface::handleAnalyserRequest().

814  {
815  std::ostringstream sumtree;
816  std::string dname = "SiStrip/" + fld_name;
817  if (dqm_store->dirExists(dname)) {
818  dqm_store->cd(dname);
819  sumtree << "<ul id=\"non_geo_tree\" class=\"filetree\">" << std::endl;
820  printNonGeomHistoList(dqm_store,sumtree);
821  sumtree <<"</ul>" << std::endl;
822  } else {
823  sumtree << " Desired Directory : " << std::endl;
824  sumtree << dname << std::endl;
825  sumtree << " does not exist !!!! " << std::endl;
826  }
828  *out << sumtree.str();
829  dqm_store->cd();
830 }
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
void printNonGeomHistoList(DQMStore *dqm_store, std::ostringstream &str_val)
bool dirExists(const std::string &path) const
true if directory exists
Definition: DQMStore.cc:301
tuple out
Definition: dbtoconf.py:99
void SiStripInformationExtractor::readQTestSummary ( DQMStore dqm_store,
std::string  type,
xgi::Output out 
)

Definition at line 714 of file SiStripInformationExtractor.cc.

References DQMStore::cd(), DQMStore::dirExists(), SiStripUtility::getBadModuleStatus(), DQMStore::getContents(), SiStripUtility::getModuleFolderList(), argparse::message, setHTMLHeader(), and subdetVec.

Referenced by SiStripWebInterface::handleAnalyserRequest().

714  {
715 
716  int nDetsWithError = 0;
717  int nDetsTotal = 0;
718  std::ostringstream qtest_summary, lite_summary;
719 
720  dqm_store->cd();
721  SiStripFolderOrganizer folder_organizer;
722  for (std::vector<std::string>::const_iterator isubdet = subdetVec.begin(); isubdet != subdetVec.end(); isubdet++) {
723  std::string dname = (*isubdet);
724  std::string bad_module_folder = dname + "/" + "BadModuleList";
725  if (!dqm_store->dirExists(dname)) continue;
726 
727  dqm_store->cd(dname);
728  std::vector<std::string> mids;
729  SiStripUtility::getModuleFolderList(dqm_store, mids);
730 
731  int ndet = mids.size();
732  int errdet = 0;
733  dqm_store->cd();
734  dqm_store->cd(dname);
735 
736  qtest_summary << dname.substr(dname.find("View/")+5) << " : <br/>";
737  qtest_summary << "=============================="<< "<br/>";
738  if (dqm_store->dirExists(bad_module_folder)) {
739 
740  std::vector<MonitorElement *> meVec = dqm_store->getContents(bad_module_folder);
741  for (std::vector<MonitorElement *>::const_iterator it = meVec.begin();
742  it != meVec.end(); it++) {
743  errdet++;
744  int flag = (*it)->getIntValue();
745  std::string message;
746  SiStripUtility::getBadModuleStatus(flag, message);
747  qtest_summary << " Module Id " << (*it)->getName() << " has "<< message << "<br/>";
748  }
749  }
750  qtest_summary << "--------------------------------------------------------------------"<< "<br/>";
751  qtest_summary << " Detectors : Total "<< ndet
752  << " with Error " << errdet << "<br/>";
753  qtest_summary << "--------------------------------------------------------------------"<< "<br/>";
754  nDetsWithError += errdet;
755  nDetsTotal += ndet;
756  }
757  qtest_summary << "--------------------------------------------------------------------"<< "<br/>";
758  qtest_summary << "--------------------------------------------------------------------"<< "<br/>";
759  qtest_summary << " Total Detectors " << nDetsTotal;
760  qtest_summary << " # of Detectors with Error " << nDetsWithError << "<br/>";
761  qtest_summary << "--------------------------------------------------------------------"<< "<br/>";
762  qtest_summary << "--------------------------------------------------------------------"<< "<br/>";
763 
764  lite_summary << " Total Detectors " << nDetsTotal << "<br/>";
765  lite_summary << " # of Detectors with Error " << nDetsWithError << "<br/>";
766 
768  if (type == "Lite") *out << lite_summary.str();
769  else {
770  *out << qtest_summary.str();
771  }
772  dqm_store->cd();
773 }
type
Definition: HCALResponse.h:22
long int flag
Definition: mlp_lapack.h:47
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
static void getBadModuleStatus(uint16_t flag, std::string &message)
std::vector< std::string > subdetVec
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1299
bool dirExists(const std::string &path) const
true if directory exists
Definition: DQMStore.cc:301
tuple out
Definition: dbtoconf.py:99
string message
Definition: argparse.py:126
static void getModuleFolderList(DQMStore *dqm_store, std::vector< std::string > &m_ids)
void SiStripInformationExtractor::readStatusMessage ( DQMStore dqm_store,
std::multimap< std::string, std::string > &  req_map,
xgi::Output out 
)

Definition at line 653 of file SiStripInformationExtractor.cc.

References dqm::qstatus::ERROR, DQMStore::getContents(), getItemValue(), MonitorElement::getName(), MonitorElement::getQReports(), histoPlotter_, AlCaRecoCosmics_cfg::name, dqm::qstatus::OTHER, path(), SiStripHistoPlotter::setNewPlot(), setXMLHeader(), ntuplemaker::status, dqm::qstatus::STATUS_OK, dqm::qstatus::WARNING, and tablePrinter::width.

Referenced by SiStripWebInterface::handleAnalyserRequest().

653  {
654 
655  std::string path = getItemValue(req_map,"Path");
656 
657  int width = atoi(getItemValue(req_map, "width").c_str());
658  int height = atoi(getItemValue(req_map, "height").c_str());
659 
660  std::string opt =" ";
661 
662  std::ostringstream test_status;
663 
664  setXMLHeader(out);
665  *out << "<StatusAndPath>" << std::endl;
666  *out << "<PathList>" << std::endl;
667  if (path.size() == 0) {
668  *out << "<HPath>" << "NONE" << "</HPath>" << std::endl;
669  test_status << " ME Does not exist ! " << std::endl;
670  } else {
671  std::vector<MonitorElement*> all_mes = dqm_store->getContents(path);
672  *out << "<HPath>" << path << "</HPath>" << std::endl;
673  for(std::vector<MonitorElement*>::iterator it=all_mes.begin(); it!=all_mes.end(); it++){
674  MonitorElement* me = (*it);
675  if (!me) continue;
676  std::string name = me->getName();
677 
678  std::vector<QReport*> q_reports = me->getQReports();
679  if (q_reports.size() == 0 && name.find("StripQualityFromCondDB") == std::string::npos) continue;
680  std::string full_path = path + "/" + name;
681  histoPlotter_->setNewPlot(full_path, opt, width, height);
682 
683  if (q_reports.size() != 0) {
684  test_status << " QTest Status for " << name << " : " << std::endl;
685  test_status << " ======================================================== " << std::endl;
686  for (std::vector<QReport*>::const_iterator it = q_reports.begin(); it != q_reports.end();
687  it++) {
688  int status = (*it)->getStatus();
689  if (status == dqm::qstatus::WARNING) test_status << " Warning ";
690  else if (status == dqm::qstatus::ERROR) test_status << " Error ";
691  else if (status == dqm::qstatus::STATUS_OK) test_status << " Ok ";
692  else if (status == dqm::qstatus::OTHER) test_status << " Other(" << status << ") ";
693  std::string mess_str = (*it)->getMessage();
694  test_status << " &lt;br/&gt;";
695  mess_str = mess_str.substr(mess_str.find(" Test")+5);
696  test_status << " QTest Name : " << mess_str.substr(0, mess_str.find(")")+1) << std::endl;
697  test_status << " &lt;br/&gt;";
698  test_status << " QTest Detail : " << mess_str.substr(mess_str.find(")")+2) << std::endl;
699  }
700  test_status << " ======================================================== " << std::endl;
701  }
702  *out << "<HName>" << name << "</HName>" << std::endl;
703  }
704  }
705  *out << "</PathList>" << std::endl;
706  *out << "<StatusList>" << std::endl;
707  *out << "<Status>" << test_status.str() << "</Status>" << std::endl;
708  *out << "</StatusList>" << std::endl;
709  *out << "</StatusAndPath>" << std::endl;
710 }
const std::string & getName(void) const
get name of ME
static const int OTHER
static const int WARNING
int path() const
Definition: HLTadd.h:3
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1299
tuple out
Definition: dbtoconf.py:99
std::vector< QReport * > getQReports(void) const
get map of QReports
std::string getItemValue(const std::multimap< std::string, std::string > &req_map, std::string item_name)
static const int STATUS_OK
void setNewPlot(std::string &path, std::string &option, int width, int height)
tuple status
Definition: ntuplemaker.py:245
static const int ERROR
void SiStripInformationExtractor::readSummaryHistoTree ( DQMStore dqm_store,
std::string &  str_name,
xgi::Output out 
)

Definition at line 532 of file SiStripInformationExtractor.cc.

References DQMStore::cd(), DQMStore::dirExists(), printSummaryHistoList(), and setPlainHeader().

Referenced by SiStripWebInterface::handleAnalyserRequest().

532  {
533  std::ostringstream sumtree;
534  std::string dname = "SiStrip/" + str_name;
535  if (dqm_store->dirExists(dname)) {
536  dqm_store->cd(dname);
537  sumtree << "<ul id=\"summary_histo_tree\" class=\"filetree\">" << std::endl;
538  printSummaryHistoList(dqm_store,sumtree);
539  sumtree <<"</ul>" << std::endl;
540  } else {
541  sumtree << " Desired Directory : " << std::endl;
542  sumtree << dname << std::endl;
543  sumtree << " does not exist !!!! " << std::endl;
544  }
546  *out << sumtree.str();
547  dqm_store->cd();
548 }
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
void printSummaryHistoList(DQMStore *dqm_store, std::ostringstream &str_val)
bool dirExists(const std::string &path) const
true if directory exists
Definition: DQMStore.cc:301
tuple out
Definition: dbtoconf.py:99
void SiStripInformationExtractor::selectColor ( std::string &  col,
int  status 
)
private

Definition at line 607 of file SiStripInformationExtractor.cc.

References dqm::qstatus::ERROR, dqm::qstatus::OTHER, dqm::qstatus::STATUS_OK, and dqm::qstatus::WARNING.

Referenced by selectColor().

607  {
608  if (status == dqm::qstatus::STATUS_OK) col = "#00ff00";
609  else if (status == dqm::qstatus::WARNING) col = "#ffff00";
610  else if (status == dqm::qstatus::ERROR) col = "#ff0000";
611  else if (status == dqm::qstatus::OTHER) col = "#ffa500";
612  else col = "#0000ff";
613 }
static const int OTHER
static const int WARNING
static const int STATUS_OK
tuple status
Definition: ntuplemaker.py:245
static const int ERROR
void SiStripInformationExtractor::selectColor ( std::string &  col,
std::vector< QReport * > &  reports 
)
private

Definition at line 617 of file SiStripInformationExtractor.cc.

References selectColor(), and ntuplemaker::status.

617  {
618  int istat = 999;
619  int status = 0;
620  for (std::vector<QReport*>::const_iterator it = reports.begin(); it != reports.end();
621  it++) {
622  status = (*it)->getStatus();
623  if (status > istat) istat = status;
624  }
625  selectColor(col, status);
626 }
void selectColor(std::string &col, int status)
tuple status
Definition: ntuplemaker.py:245
void SiStripInformationExtractor::selectImage ( std::string &  name,
int  status 
)
private

Definition at line 630 of file SiStripInformationExtractor.cc.

References dqm::qstatus::ERROR, dqm::qstatus::OTHER, dqm::qstatus::STATUS_OK, and dqm::qstatus::WARNING.

Referenced by printAlarmList(), and selectImage().

630  {
631  if (status == dqm::qstatus::STATUS_OK) name="images/LI_green.gif";
632  else if (status == dqm::qstatus::WARNING) name="images/LI_yellow.gif";
633  else if (status == dqm::qstatus::ERROR) name="images/LI_red.gif";
634  else if (status == dqm::qstatus::OTHER) name="images/LI_orange.gif";
635  else name="images/LI_blue.gif";
636 }
static const int OTHER
static const int WARNING
static const int STATUS_OK
tuple status
Definition: ntuplemaker.py:245
static const int ERROR
void SiStripInformationExtractor::selectImage ( std::string &  name,
std::vector< QReport * > &  reports 
)
private

Definition at line 640 of file SiStripInformationExtractor.cc.

References selectImage(), and ntuplemaker::status.

640  {
641  int istat = 999;
642  int status = 0;
643  for (std::vector<QReport*>::const_iterator it = reports.begin(); it != reports.end();
644  it++) {
645  status = (*it)->getStatus();
646  if (status > istat) istat = status;
647  }
648  selectImage(name, status);
649 }
void selectImage(std::string &name, int status)
tuple status
Definition: ntuplemaker.py:245
void SiStripInformationExtractor::setHTMLHeader ( xgi::Output out)
private

Definition at line 784 of file SiStripInformationExtractor.cc.

Referenced by readQTestSummary().

784  {
785  out->getHTTPResponseHeader().addHeader("Content-Type", "text/html");
786  out->getHTTPResponseHeader().addHeader("Pragma", "no-cache");
787  out->getHTTPResponseHeader().addHeader("Cache-Control", "no-store, no-cache, must-revalidate,max-age=0");
788  out->getHTTPResponseHeader().addHeader("Expires","Mon, 26 Jul 1997 05:00:00 GMT");
789 }
tuple out
Definition: dbtoconf.py:99
void SiStripInformationExtractor::setPlainHeader ( xgi::Output out)
private

Definition at line 804 of file SiStripInformationExtractor.cc.

Referenced by readAlarmTree(), readNonGeomHistoTree(), and readSummaryHistoTree().

804  {
805  out->getHTTPResponseHeader().addHeader("Content-Type", "text/plain");
806  out->getHTTPResponseHeader().addHeader("Pragma", "no-cache");
807  out->getHTTPResponseHeader().addHeader("Cache-Control", "no-store, no-cache, must-revalidate,max-age=0");
808  out->getHTTPResponseHeader().addHeader("Expires","Mon, 26 Jul 1997 05:00:00 GMT");
809 
810 }
tuple out
Definition: dbtoconf.py:99
void SiStripInformationExtractor::setXMLHeader ( xgi::Output out)
private

Definition at line 793 of file SiStripInformationExtractor.cc.

Referenced by getCondDBHistos(), getGlobalHistos(), getHistosFromPath(), getSingleModuleHistos(), getTrackerMapHistos(), readGlobalHistoList(), readLayoutNames(), readModuleAndHistoList(), and readStatusMessage().

793  {
794  out->getHTTPResponseHeader().addHeader("Content-Type", "text/xml");
795  out->getHTTPResponseHeader().addHeader("Pragma", "no-cache");
796  out->getHTTPResponseHeader().addHeader("Cache-Control", "no-store, no-cache, must-revalidate,max-age=0");
797  out->getHTTPResponseHeader().addHeader("Expires","Mon, 26 Jul 1997 05:00:00 GMT");
798  *out << "<?xml version=\"1.0\" ?>" << std::endl;
799 
800 }
tuple out
Definition: dbtoconf.py:99

Member Data Documentation

SiStripHistoPlotter* SiStripInformationExtractor::histoPlotter_
private
std::map<std::string, std::vector< std::string > > SiStripInformationExtractor::layoutMap
private
SiStripLayoutParser* SiStripInformationExtractor::layoutParser_
private
bool SiStripInformationExtractor::readReference_
private

Definition at line 92 of file SiStripInformationExtractor.h.

std::vector<std::string> SiStripInformationExtractor::subdetVec
private