CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_8_patch3/src/DQM/TrackerCommon/interface/WebInterface.h

Go to the documentation of this file.
00001 #ifndef _DQM_TrackerCommon_WebInterface_h_
00002 #define _DQM_TrackerCommon_WebInterface_h_
00003 
00004 #include "xgi/Method.h"
00005 #include "xdata/UnsignedLong.h"
00006 #include "cgicc/HTMLClasses.h"
00007 
00008 #include "xdaq/Application.h"
00009 #include "xgi/Utils.h"
00010 #include "xgi/Method.h"
00011 
00012 #include "DQM/TrackerCommon/interface/WebPage.h"
00013 #include "DQM/TrackerCommon/interface/MessageDispatcher.h"
00014 #include "DQM/TrackerCommon/interface/ME_MAP.h"
00015 
00016 #include <string>
00017 #include <map>
00018 
00019 class DQMStore;
00020 
00021 class WebInterface
00022 {
00023 
00024  private:
00025 
00026   std::string exeURL;
00027   std::string appURL;
00028   std::multimap<std::string, std::string> conf_map;
00029 
00030   MessageDispatcher msg_dispatcher;
00031 
00032  protected:
00033 
00034   DQMStore* dqmStore_;
00035   WebPage * page_p;
00036 
00037  public:
00038   
00039   WebInterface(std::string _exeURL, std::string _appURL);
00040   virtual ~WebInterface() 
00041     {
00042     }
00043 
00044   std::string getContextURL()     { return exeURL; }
00045   std::string getApplicationURL() { return appURL; }
00046 
00047   void handleRequest        (xgi::Input * in, xgi::Output * out ) throw (xgi::exception::Exception);
00048   void handleStandardRequest(xgi::Input * in, xgi::Output * out ) throw (xgi::exception::Exception);
00049 
00050   virtual void handleCustomRequest(xgi::Input * in, xgi::Output * out ) throw (xgi::exception::Exception)
00051     {
00052     };
00053 
00055   virtual void Default(xgi::Input * in, xgi::Output * out ) throw (xgi::exception::Exception);
00056 
00058   void Configure(xgi::Input * in, xgi::Output * out) throw (xgi::exception::Exception);
00059   
00061   void Open(xgi::Input * in, xgi::Output * out) throw (xgi::exception::Exception);
00062 //  void Subscribe(xgi::Input * in, xgi::Output * out) throw (xgi::exception::Exception);
00063 //  void Unsubscribe(xgi::Input * in, xgi::Output * out) throw (xgi::exception::Exception);
00064 
00066   void printNavigatorXML(std::string directory, xgi::Output * out);
00067   
00069   void ContentsOpen(xgi::Input * in, xgi::Output * out) throw (xgi::exception::Exception);
00070   void printContentViewerXML(std::string current, xgi::Output * out);
00071 
00073   void printMessagesXML(xgi::Output *out);
00074 
00076   void DrawGif(xgi::Input * in, xgi::Output * out) throw (xgi::exception::Exception);
00077   void printMap(ME_MAP view_map, std::string id);
00078 
00080   void add(std::string, WebElement *);
00081 
00083   void sendMessage(std::string the_title, std::string the_text, MessageType the_type);
00084 
00085   std::string get_from_multimap(std::multimap<std::string, std::string> &mymap, std::string key);
00086 
00087 };
00088 
00089 #endif