CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Public Attributes
DDHtmlFormatter Class Reference

#include <DDHtmlFormatter.h>

Public Types

typedef std::map< std::string, std::set< std::string > > ns_type
 

Public Member Functions

DDHtmlFormatter br ()
 
DDHtmlFormatter color (int red, int green, int blue)
 
 DDHtmlFormatter ()
 
 DDHtmlFormatter (const DDHtmlFormatter &f)
 
DDHtmlFormatter footer ()
 
DDHtmlFormatter h1 (const std::string &content)
 
DDHtmlFormatter h2 (const std::string &content)
 
DDHtmlFormatter h3 (const std::string &content)
 
DDHtmlFormatter header (const std::string &text, const std::string &style="../../style.css")
 
DDHtmlFormatter li (const std::string &content)
 
DDHtmlFormatter link (const std::string &url, const std::string &text, const std::string &target="_self")
 
std::string lnk (const std::string &url, const std::string &text, const std::string &target="_self")
 
DDHtmlFormatteroperator= (const DDHtmlFormatter &)=delete
 
DDHtmlFormatter p (const std::string &content)
 
void pre ()
 
DDHtmlFormatter table (int border=0)
 
DDHtmlFormatter tableEnd ()
 
DDHtmlFormatter td (const std::string &content)
 
DDHtmlFormatter tr ()
 
DDHtmlFormatter trEnd ()
 
DDHtmlFormatter ul ()
 
DDHtmlFormatter ulEnd ()
 

Public Attributes

std::stringstream os_
 

Detailed Description

Definition at line 17 of file DDHtmlFormatter.h.

Member Typedef Documentation

◆ ns_type

typedef std::map<std::string, std::set<std::string> > DDHtmlFormatter::ns_type

Definition at line 19 of file DDHtmlFormatter.h.

Constructor & Destructor Documentation

◆ DDHtmlFormatter() [1/2]

DDHtmlFormatter::DDHtmlFormatter ( )
inlineexplicit

Definition at line 21 of file DDHtmlFormatter.h.

21 {}

◆ DDHtmlFormatter() [2/2]

DDHtmlFormatter::DDHtmlFormatter ( const DDHtmlFormatter f)
inline

Definition at line 22 of file DDHtmlFormatter.h.

22 : os_(f.os_.str()) {}

Member Function Documentation

◆ br()

DDHtmlFormatter DDHtmlFormatter::br ( )
inline

Definition at line 27 of file DDHtmlFormatter.h.

27  {
28  pre();
29  os_ << "<br>" << std::endl;
30  return *this;
31  }

References os_, and pre().

Referenced by DDHtmlLpDetails::details(), and DDHtmlMaDetails::details().

◆ color()

DDHtmlFormatter DDHtmlFormatter::color ( int  red,
int  green,
int  blue 
)
inline

Definition at line 99 of file DDHtmlFormatter.h.

99 { return *this; };

◆ footer()

DDHtmlFormatter DDHtmlFormatter::footer ( )

Definition at line 62 of file DDHtmlFormatter.cc.

62  {
63  pre();
64  os_ << "</body></html>" << endl;
65  return *this;
66 }

Referenced by DDHtmlLpDetails::details().

◆ h1()

DDHtmlFormatter DDHtmlFormatter::h1 ( const std::string &  content)
inline

Definition at line 54 of file DDHtmlFormatter.h.

54  {
55  pre();
56  os_ << "<h1>" << content << "</h1>" << std::endl;
57  return *this;
58  }

References Skims_PA_cff::content, os_, and pre().

◆ h2()

DDHtmlFormatter DDHtmlFormatter::h2 ( const std::string &  content)
inline

Definition at line 59 of file DDHtmlFormatter.h.

59  {
60  pre();
61  os_ << "<h2>" << content << "</h2>" << std::endl;
62  return *this;
63  }

References Skims_PA_cff::content, os_, and pre().

Referenced by DDHtmlLpDetails::details(), DDHtmlMaDetails::details(), and DDHtmlRoDetails::details().

◆ h3()

DDHtmlFormatter DDHtmlFormatter::h3 ( const std::string &  content)
inline

Definition at line 64 of file DDHtmlFormatter.h.

64  {
65  pre();
66  os_ << "<h3>" << content << "</h3>" << std::endl;
67  return *this;
68  }

References Skims_PA_cff::content, os_, and pre().

Referenced by DDHtmlLpDetails::details(), DDHtmlMaDetails::details(), DDHtmlSoDetails::details(), DDHtmlRoDetails::details(), and DDHtmlSpDetails::details().

◆ header()

DDHtmlFormatter DDHtmlFormatter::header ( const std::string &  text,
const std::string &  style = "../../style.css" 
)

Definition at line 40 of file DDHtmlFormatter.cc.

40  {
41  pre();
42  os_ << "<html>\n<head>\n<title>" << title << "</title>" << endl;
43  os_ << "<link rel=\"stylesheet\" type=\"text/css\" href=\"" << style << "\">" << endl;
44  //os_ << "</head>\n<body>" << endl;
45  return *this;
46 }

References overlapproblemtsosanalyzer_cfi::title.

Referenced by DDHtmlLpDetails::details(), DDHtmlMaDetails::details(), DDHtmlSoDetails::details(), DDHtmlRoDetails::details(), and DDHtmlSpDetails::details().

◆ li()

DDHtmlFormatter DDHtmlFormatter::li ( const std::string &  content)
inline

Definition at line 43 of file DDHtmlFormatter.h.

43  {
44  pre();
45  os_ << "<li>" << content << "</li>" << std::endl;
46  return *this;
47  }

References Skims_PA_cff::content, os_, and pre().

◆ link()

DDHtmlFormatter DDHtmlFormatter::link ( const std::string &  url,
const std::string &  text,
const std::string &  target = "_self" 
)

Definition at line 48 of file DDHtmlFormatter.cc.

48  {
49  pre();
50  os_ << lnk(url, txt, target) << endl;
51  return *this;
52 }

References filterCSVwithJSON::target, and relmon_authenticated_wget::url.

Referenced by DDHtmlLpDetails::details(), and DDHtmlMaDetails::details().

◆ lnk()

string DDHtmlFormatter::lnk ( const std::string &  url,
const std::string &  text,
const std::string &  target = "_self" 
)

Definition at line 54 of file DDHtmlFormatter.cc.

54  {
55  string result;
56  result = string("<a href=\"") + url;
57  result += string("\" target=\"") + target;
58  result += string("\">") + txt + string("</a>");
59  return result;
60 }

References mps_fire::result, AlCaHLTBitMon_QueryRunRegistry::string, filterCSVwithJSON::target, and relmon_authenticated_wget::url.

Referenced by DDHtmlLpDetails::details(), and DDHtmlMaDetails::details().

◆ operator=()

DDHtmlFormatter& DDHtmlFormatter::operator= ( const DDHtmlFormatter )
delete

◆ p()

DDHtmlFormatter DDHtmlFormatter::p ( const std::string &  content)
inline

Definition at line 32 of file DDHtmlFormatter.h.

32  {
33  pre();
34  os_ << "<p>" << std::endl << content << std::endl << "</p>" << std::endl;
35  return *this;
36  }

References Skims_PA_cff::content, os_, and pre().

Referenced by DDHtmlMaDetails::details(), and Electron.Electron::ptErr().

◆ pre()

void DDHtmlFormatter::pre ( )
inline

Definition at line 101 of file DDHtmlFormatter.h.

101 { os_.str(""); }

References os_.

Referenced by br(), h1(), h2(), h3(), li(), p(), table(), tableEnd(), td(), tr(), trEnd(), ul(), and ulEnd().

◆ table()

DDHtmlFormatter DDHtmlFormatter::table ( int  border = 0)
inline

Definition at line 73 of file DDHtmlFormatter.h.

73  {
74  pre();
75  os_ << "<table border=\"" << border << "\">" << std::endl;
76  return *this;
77  }

References os_, and pre().

Referenced by DDHtmlLpDetails::details(), and DDHtmlMaDetails::details().

◆ tableEnd()

DDHtmlFormatter DDHtmlFormatter::tableEnd ( )
inline

Definition at line 78 of file DDHtmlFormatter.h.

78  {
79  pre();
80  os_ << "</table>" << std::endl;
81  return *this;
82  }

References os_, and pre().

Referenced by DDHtmlLpDetails::details(), and DDHtmlMaDetails::details().

◆ td()

DDHtmlFormatter DDHtmlFormatter::td ( const std::string &  content)
inline

Definition at line 93 of file DDHtmlFormatter.h.

93  {
94  pre();
95  os_ << " <td>" << content << std::endl << " </td>" << std::endl;
96  return *this;
97  }

References Skims_PA_cff::content, os_, and pre().

Referenced by DDHtmlLpDetails::details(), and DDHtmlMaDetails::details().

◆ tr()

DDHtmlFormatter DDHtmlFormatter::tr ( )
inline

Definition at line 83 of file DDHtmlFormatter.h.

83  {
84  pre();
85  os_ << " <tr>" << std::endl;
86  return *this;
87  }

References os_, and pre().

Referenced by DDHtmlLpDetails::details(), and DDHtmlMaDetails::details().

◆ trEnd()

DDHtmlFormatter DDHtmlFormatter::trEnd ( )
inline

Definition at line 88 of file DDHtmlFormatter.h.

88  {
89  pre();
90  os_ << " </tr>" << std::endl;
91  return *this;
92  }

References os_, and pre().

Referenced by DDHtmlLpDetails::details(), and DDHtmlMaDetails::details().

◆ ul()

DDHtmlFormatter DDHtmlFormatter::ul ( )
inline

Definition at line 38 of file DDHtmlFormatter.h.

38  {
39  pre();
40  os_ << "<ul>" << std::endl;
41  return *this;
42  }

References os_, and pre().

◆ ulEnd()

DDHtmlFormatter DDHtmlFormatter::ulEnd ( )
inline

Definition at line 48 of file DDHtmlFormatter.h.

48  {
49  pre();
50  os_ << "</ul>" << std::endl;
51  return *this;
52  }

References os_, and pre().

Member Data Documentation

◆ os_

std::stringstream DDHtmlFormatter::os_
mutable

Definition at line 104 of file DDHtmlFormatter.h.

Referenced by br(), h1(), h2(), h3(), li(), p(), pre(), table(), tableEnd(), td(), tr(), trEnd(), ul(), and ulEnd().

relmon_authenticated_wget.url
url
Definition: relmon_authenticated_wget.py:22
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
DDHtmlFormatter::lnk
std::string lnk(const std::string &url, const std::string &text, const std::string &target="_self")
Definition: DDHtmlFormatter.cc:54
DDHtmlFormatter::pre
void pre()
Definition: DDHtmlFormatter.h:101
DDHtmlFormatter::os_
std::stringstream os_
Definition: DDHtmlFormatter.h:104
style
Definition: style.py:1
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Skims_PA_cff.content
content
Definition: Skims_PA_cff.py:19
overlapproblemtsosanalyzer_cfi.title
title
Definition: overlapproblemtsosanalyzer_cfi.py:7
filterCSVwithJSON.target
target
Definition: filterCSVwithJSON.py:32
mps_fire.result
result
Definition: mps_fire.py:303