CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ModuleWeb.cc
Go to the documentation of this file.
4 
5 #include "xgi/Input.h"
6 #include "xgi/Output.h"
7 #include "xgi/Utils.h"
8 
9 #include <string>
10 
11 
12 namespace evf{
13 
14 ModuleWeb::ModuleWeb(const std::string &moduleName) : moduleName_(moduleName)
15 {
17  edm::Service<ModuleWebRegistry>()->registerWeb(moduleName_, this);
18 }
19 
21 {
22  using std::endl;
23  std::string path;
24  std::string urn;
25  std::string mname;
26  try
27  {
28  cgicc::Cgicc cgi(in);
29  if ( xgi::Utils::hasFormElement(cgi,"module") )
30  mname = xgi::Utils::getFormElement(cgi, "module")->getValue();
31  cgicc::CgiEnvironment cgie(in);
32  urn = cgie.getReferrer();
33  path = cgie.getPathInfo() + "?" + cgie.getQueryString();
34 
35  }
36  catch (const std::exception & e)
37  {
38  // don't care if it did not work
39  }
40 
41 
42  *out << "<html>" << endl;
43  *out << "<head>" << endl;
44 
45  *out << "<STYLE type=\"text/css\"> #T1 {border-width: 2px; border: solid blue; text-align: center} </STYLE> "
46  << endl;
47  *out << "<link type=\"text/css\" rel=\"stylesheet\"";
48  *out << " href=\"/" << urn
49  << "/styles.css\"/>" << endl;
50 
51  *out << "<title>" << moduleName_
52  << " MAIN</title>" << endl;
53 
54  *out << "</head>" << endl;
55  *out << "<body onload=\"loadXMLDoc()\">" << endl;
56  *out << "<table border=\"0\" width=\"100%\">" << endl;
57  *out << "<tr>" << endl;
58  *out << " <td align=\"left\">" << endl;
59  *out << " <img" << endl;
60  *out << " align=\"middle\"" << endl;
61  *out << " src=\"/evf/images/epicon.jpg\"" << endl;
62  *out << " alt=\"main\"" << endl;
63  *out << " width=\"64\"" << endl;
64  *out << " height=\"64\"" << endl;
65  *out << " border=\"\"/>" << endl;
66  *out << " <b>" << endl;
67  *out << "<title>" << moduleName_
68  << " MAIN</title>" << endl;
69  *out << " </b>" << endl;
70  *out << " </td>" << endl;
71  *out << " <td width=\"32\">" << endl;
72  *out << " <a href=\"/urn:xdaq-application:lid=3\">" << endl;
73  *out << " <img" << endl;
74  *out << " align=\"middle\"" << endl;
75  *out << " src=\"/hyperdaq/images/HyperDAQ.jpg\"" << endl;
76  *out << " alt=\"HyperDAQ\"" << endl;
77  *out << " width=\"32\"" << endl;
78  *out << " height=\"32\"" << endl;
79  *out << " border=\"\"/>" << endl;
80  *out << " </a>" << endl;
81  *out << " </td>" << endl;
82  *out << " <td width=\"32\">" << endl;
83  *out << " </td>" << endl;
84  *out << " <td width=\"32\">" << endl;
85  *out << " <a href=\"/" << urn
86  << "\">" << endl;
87  *out << " <img" << endl;
88  *out << " align=\"middle\"" << endl;
89  *out << " src=\"/evf/images/epicon.jpg\"" << endl;
90  *out << " alt=\"main\"" << endl;
91  *out << " width=\"32\"" << endl;
92  *out << " height=\"32\"" << endl;
93  *out << " border=\"\"/>" << endl;
94  *out << " </a>" << endl;
95  *out << " </td>" << endl;
96  *out << "</tr>" << endl;
97  *out << "</table>" << endl;
98 
99  *out << "<hr/>" << endl;
100 
101  *out << "</body>" << endl;
102  *out << "</html>" << endl;
103 }
104 } //end namespace evf
#define Input(cl)
Definition: vmac.h:189
int path() const
Definition: HLTadd.h:3
ModuleWeb(const std::string &)
Definition: ModuleWeb.cc:14
std::string moduleName_
Definition: ModuleWeb.h:23
tuple out
Definition: dbtoconf.py:99
virtual void defaultWebPage(xgi::Input *in, xgi::Output *out)
Definition: ModuleWeb.cc:20
#define Output(cl)
Definition: vmac.h:193