![]() |
![]() |
00001 #include <iostream> 00002 #include <map> 00003 00004 #include "DQMServices/WebComponents/interface/CgiReader.h" 00005 #include "DQMServices/WebComponents/interface/ContentViewer.h" 00006 #include "DQMServices/WebComponents/interface/Button.h" 00007 #include "DQMServices/WebComponents/interface/GifDisplay.h" 00008 #include "DQMServices/WebComponents/interface/HTMLLink.h" 00009 #include "DQMServices/WebComponents/interface/WebPage.h" 00010 00011 #include "DQM/SiPixelHistoricInfoClient/interface/SiPixelHistoricInfoWebInterface.h" 00012 00013 00014 SiPixelHistoricInfoWebInterface::SiPixelHistoricInfoWebInterface(std::string theContextURL, 00015 std::string theApplicationURL, 00016 DQMOldReceiver** _mui_p) 00017 : WebInterface(theContextURL, theApplicationURL, _mui_p) { 00018 ContentViewer* cv = new ContentViewer(getApplicationURL(),"20px","10px"); 00019 Button* sb = new Button(getApplicationURL(),"300px","10px","SaveToFile","Save To File"); 00020 Button* wb = new Button(getApplicationURL(),"300px","30px","WriteToDB","Write To DB"); 00021 GifDisplay* gd = new GifDisplay(getApplicationURL(),"20px","200px","500px","700px","Gif Display"); 00022 HTMLLink *hl = new HTMLLink(getApplicationURL(),"50px","50px","SiPixelHistoricInfoWebInterface", 00023 "/temporary/Online.html"); 00024 page_p = new WebPage(getApplicationURL()); 00025 page_p->add("cntViewer", cv); 00026 page_p->add("svButton", sb); 00027 page_p->add("wrtButton", wb); 00028 page_p->add("gifDisplay", gd); 00029 page_p->add("htmlLink", hl); 00030 } 00031 00032 00033 SiPixelHistoricInfoWebInterface::~SiPixelHistoricInfoWebInterface() {} 00034 00035 00036 void SiPixelHistoricInfoWebInterface::handleCustomRequest(xgi::Input* in, xgi::Output* out) 00037 throw (xgi::exception::Exception) { 00038 CgiReader reader(in); 00039 reader.read_form(request_multimap); 00040 std::string requestID = get_from_multimap(request_multimap,"RequestID"); 00041 if (requestID=="SaveToFile") savetoFile_ = true; 00042 if (requestID=="WriteToDB") writetoDB_ = true; 00043 } 00044 00045 00046 void SiPixelHistoricInfoWebInterface::handleEDARequest(xgi::Input* in, xgi::Output* out) { 00047 CgiReader reader(in); 00048 reader.read_form(request_multimap); 00049 std::string requestID = get_from_multimap(request_multimap,"RequestID"); 00050 if (requestID=="SaveToFile") savetoFile_ = true; 00051 if (requestID=="WriteToDB") writetoDB_ = true; 00052 }