#include <DQM/TrackerCommon/interface/CgiWriter.h>
Public Member Functions | |
CgiWriter (xgi::Output *the_out, std::string the_contextURL) | |
CgiWriter (xgi::Output *the_out, std::string the_contextURL) | |
void | output_finish () |
void | output_finish () |
void | output_head () |
void | output_head () |
void | output_preamble () |
void | output_preamble () |
~CgiWriter () | |
~CgiWriter () | |
Private Attributes | |
std::string | contextURL |
xgi::Output * | out |
xgi::Output * | out |
Definition at line 5 of file CgiWriter.h.
CgiWriter::CgiWriter | ( | xgi::Output * | the_out, | |
std::string | the_contextURL | |||
) | [inline] |
Definition at line 14 of file CgiWriter.h.
References contextURL, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), and out.
00015 { 00016 out = the_out; 00017 contextURL = the_contextURL; 00018 std::cout << "Created a CgiWriter! ContextURL=" << contextURL << std::endl; 00019 }
CgiWriter::~CgiWriter | ( | ) | [inline] |
CgiWriter::CgiWriter | ( | xgi::Output * | the_out, | |
std::string | the_contextURL | |||
) | [inline] |
Definition at line 14 of file CgiWriter.h.
References contextURL, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), and out.
00015 { 00016 out = the_out; 00017 contextURL = the_contextURL; 00018 std::cout << "Created a CgiWriter! ContextURL=" << contextURL << std::endl; 00019 }
CgiWriter::~CgiWriter | ( | ) | [inline] |
void CgiWriter::output_finish | ( | ) |
void CgiWriter::output_finish | ( | ) |
Definition at line 33 of file CgiWriter.cc.
References lat::endl(), and out.
Referenced by WebInterface::Default().
void CgiWriter::output_head | ( | ) |
void CgiWriter::output_head | ( | ) |
Definition at line 17 of file CgiWriter.cc.
References contextURL, lat::endl(), link(), and out.
Referenced by WebInterface::Default().
00018 { 00019 std::string js_file_url = contextURL + "/temporary/WebLib.js"; 00020 std::string css_file_url = contextURL + "/temporary/style.css"; 00021 00022 *out << cgicc::head() << std::endl; 00023 00024 *out << cgicc::script().set("src", js_file_url.c_str()) << cgicc::script() << std::endl; 00025 00026 *out << cgicc::link().set("type", "text/css").set("href", css_file_url.c_str()).set("rel", "stylesheet") << std::endl; 00027 00028 *out << cgicc::meta().set("https-equiv", "pragma").set("content", "no-cache") << std::endl; 00029 00030 *out << cgicc::head() << std::endl; 00031 }
void CgiWriter::output_preamble | ( | ) |
void CgiWriter::output_preamble | ( | ) |
Definition at line 3 of file CgiWriter.cc.
References lat::endl(), and out.
Referenced by WebInterface::Default().
00004 { 00005 out->getHTTPResponseHeader().addHeader("Content-Type", "text/html"); 00006 out->getHTTPResponseHeader().addHeader("Expires", "0"); 00007 out->getHTTPResponseHeader().addHeader("Cache-Control", "no-store, no-cache, must-revalidate, max-age=0"); 00008 out->getHTTPResponseHeader().addHeader("Cache-Control", "post-check=0, pre-check=0"); 00009 out->getHTTPResponseHeader().addHeader("Pragma", "no-cache"); 00010 00011 *out << cgicc::HTMLDoctype(cgicc::HTMLDoctype::eStrict) << std::endl; 00012 // This is here for the sake of producing correct html: 00013 // *out << cgicc::html() << std::endl; 00014 *out << cgicc::html().set("lang", "en").set("dir","ltr") << std::endl; 00015 }
std::string CgiWriter::contextURL [private] |
xgi::Output* CgiWriter::out [private] |
Definition at line 9 of file CgiWriter.h.
xgi::Output* CgiWriter::out [private] |
Definition at line 9 of file CgiWriter.h.
Referenced by CgiWriter(), output_finish(), output_head(), and output_preamble().