00001 #ifndef _SiPixelWebInterface_h_ 00002 #define _SiPixelWebInterface_h_ 00003 00004 #include "DQMServices/WebComponents/interface/WebInterface.h" 00005 #include "DQMServices/Core/interface/MonitorElement.h" 00006 #include "FWCore/Framework/interface/ESHandle.h" 00007 00008 class DQMStore; 00009 class SiPixelActionExecutor; 00010 class SiPixelInformationExtractor; 00011 class SiPixelEDAClient; 00012 00013 class SiPixelWebInterface 00014 { 00015 00016 public: 00017 00018 enum SiPixelActionType{NoAction = 0, 00019 Summary = 1, 00020 setupQTest = 2, 00021 QTestResult = 3, 00022 CreateTkMap = 4, 00023 PlotSingleModuleHistos = 5, 00024 PlotSingleHistogram = 6, 00025 PlotTkMapHistogram = 7, 00026 periodicTrackerMapUpdate = 8, 00027 PlotHistogramFromPath = 9, 00028 CreatePlots = 10, 00029 ComputeGlobalQualityFlag = 11, 00030 dumpModIds = 12, 00031 Occupancy = 13}; 00032 00033 SiPixelWebInterface(DQMStore* bei, 00034 bool offlineXMLfile); 00035 ~SiPixelWebInterface(); 00036 00037 void handleEDARequest(xgi::Input* in, 00038 xgi::Output* out, 00039 int niter); 00040 00041 SiPixelActionType getActionFlag() {return theActionFlag;} 00042 void setActionFlag(SiPixelActionType flag) {theActionFlag = flag;} 00043 void performAction(); 00044 00045 bool readConfiguration(int& tkmap_freq, 00046 int& summary_freq); 00047 00048 bool createTkMap(); 00049 void periodicTkMapUpdate( xgi::Output * out); 00050 00051 private: 00052 00053 std::string get_from_multimap(std::multimap<std::string, std::string> &mymap, std::string key); 00054 00055 SiPixelActionType theActionFlag; 00056 SiPixelActionExecutor* actionExecutor_; 00057 SiPixelInformationExtractor* infoExtractor_; 00058 00059 void returnReplyXml(xgi::Output * out, 00060 const std::string& name, 00061 const std::string& comment); 00062 00063 std::vector<std::string> tkMapOptions_; 00064 bool tkMapCreated; 00065 std::multimap<std::string, std::string> requestMap_; 00066 DQMStore* bei_; 00067 bool offlineXMLfile_; 00068 00069 protected: 00070 00071 }; 00072 00073 #endif