XDAQ web page.
48 static bool autorefresh_ =
false;
54 if ( xgi::Utils::hasFormElement(cgi,
"autorefresh") ) {
55 autorefresh_ = xgi::Utils::getFormElement(cgi,
"autorefresh")->getIntegerValue() != 0;
58 if ( xgi::Utils::hasFormElement(cgi,
"module") ) {
59 mname = xgi::Utils::getFormElement(cgi,
"module")->getValue();
62 cgicc::CgiEnvironment cgie(
in);
63 path = cgie.getPathInfo() +
"?" + cgie.getQueryString();
67 std::cerr <<
"Standard C++ exception : " << e.what() << std::endl;
71 *
out << cgicc::HTMLDoctype(cgicc::HTMLDoctype::eStrict) << std::endl;
72 *
out <<
cgicc::html().set(
"lang",
"en").set(
"dir",
"ltr") << std::endl;
74 *
out <<
"<html>" << std::endl;
76 *
out <<
"<head>" << std::endl;
79 <<
" MAIN</title>" << std::endl;
82 *
out <<
"<meta http-equiv=\"refresh\" content=\"3\">" << std::endl;
85 *
out <<
"</head>" << std::endl;
87 *
out <<
"<body>" << std::endl;
89 *
out << cgicc::form().set(
"method",
"GET").set(
"action", path )
91 *
out <<
cgicc::input().set(
"type",
"hidden").set(
"name",
"module").set(
"value", mname)
93 *
out <<
cgicc::input().set(
"type",
"hidden").set(
"name",
"autorefresh").set(
"value", autorefresh_?
"0":
"1")
95 *
out <<
cgicc::input().set(
"type",
"submit").set(
"value",autorefresh_?
"Toggle AutoRefresh OFF":
"Toggle AutoRefresh ON")
97 *
out << cgicc::form() << std::endl;
99 *
out << cgicc::h3(
"EcalEndcapMonitorXdaqClient Status" ).set(
"style",
"font-family:arial" ) << std::endl;
101 *
out <<
"<table style=\"font-family: arial\"><tr><td>" << std::endl;
103 *
out <<
"<p style=\"font-family: arial\">"
104 <<
"<table border=1>"
105 <<
"<tr><th>Cycle</th><td align=right>" <<
ievt_;
107 if (
h_ != 0 ) nevt = int(
h_->GetEntries());
108 *
out <<
"<tr><th>Event</th><td align=right>" << nevt
109 <<
"</td><tr><th>Run</th><td align=right>" <<
run_
110 <<
"</td><tr><th>Run Type</th><td align=right> " << this->
getRunType()
111 <<
"</td></table></p>" << std::endl;
113 *
out <<
"</td><td>" << std::endl;
115 *
out <<
"<p style=\"font-family: arial\">"
116 <<
"<table border=1>"
117 <<
"<tr><th>Evt Type</th><th>Evt/Run</th><th>Evt Type</th><th>Evt/Run</th>" << std::endl;
118 for(
unsigned int i = 0,
j = 0;
i <
runTypes_.size();
i++ ) {
119 if ( strcmp(
runTypes_[
i].c_str(),
"UNKNOWN") != 0 ) {
120 if (
j++%2 == 0 ) *
out <<
"<tr>";
122 if (
h_ != 0 ) nevt = int(
h_->GetBinContent(
i+1) );
124 <<
"</td><td align=right>" << nevt << std::endl;
127 *
out <<
"</td></table></p>" << std::endl;
129 *
out <<
"</td><tr><td colspan=2>" << std::endl;
131 *
out <<
"<p style=\"font-family: arial\">"
132 <<
"<table border=1>"
133 <<
"<tr><th>Client</th><th>Cyc/Job</th><th>Cyc/Run</th><th>Client</th><th>Cyc/Job</th><th>Cyc/Run</th>" << std::endl;
134 for(
unsigned int i = 0;
i <
clients_.size();
i++ ) {
136 if (
i%2 == 0 ) *
out <<
"<tr>";
138 <<
"</td><td align=right>" <<
clients_[
i]->getEvtPerJob()
139 <<
"</td><td align=right>" <<
clients_[
i]->getEvtPerRun() << std::endl;
142 *
out <<
"</td></table></p>" << std::endl;
144 *
out <<
"</td><tr><td>" << std::endl;
146 #ifdef WITH_ECAL_COND_DB
147 *
out <<
"<p style=\"font-family: arial\">"
148 <<
"<table border=1>"
149 <<
"<tr><th colspan=2>RunIOV</th>"
150 <<
"<tr><td>Run Number</td><td align=right> " << runiov_.getRunNumber()
151 <<
"</td><tr><td>Run Start</td><td align=right> " << runiov_.getRunStart().str()
152 <<
"</td><tr><td>Run End</td><td align=right> " << runiov_.getRunEnd().str()
153 <<
"</td></table></p>" << std::endl;
155 *
out <<
"</td><td colsapn=2>" << std::endl;
157 *
out <<
"<p style=\"font-family: arial\">"
158 <<
"<table border=1>"
159 <<
"<tr><th colspan=2>RunTag</th>"
160 <<
"<tr><td>GeneralTag</td><td align=right> " << runiov_.getRunTag().getGeneralTag()
161 <<
"</td><tr><td>Location</td><td align=right> " << runiov_.getRunTag().getLocationDef().getLocation()
162 <<
"</td><tr><td>Run Type</td><td align=right> " << runiov_.getRunTag().getRunTypeDef().getRunType()
163 <<
"</td></table></p>" << std::endl;
165 *
out <<
"</td><tr><td>" << std::endl;
167 *
out <<
"<p style=\"font-family: arial\">"
168 <<
"<table border=1>"
169 <<
"<tr><th colspan=2>MonRunIOV</th>"
170 <<
"<tr><td>SubRun Number</td><td align=right> " << moniov_.getSubRunNumber()
171 <<
"</td><tr><td>SubRun Start</td><td align=right> " << moniov_.getSubRunStart().str()
172 <<
"</td><tr><td>SubRun End</td><td align=right> " << moniov_.getSubRunEnd().str()
173 <<
"</td></table></p>" << std::endl;
175 *
out <<
"</td><td colspan=2>" << std::endl;
177 *
out <<
"<p style=\"font-family: arial\">"
178 <<
"<table border=1>"
179 <<
"<tr><th colspan=2>MonRunTag</th>"
180 <<
"<tr><td>GeneralTag</td><td align=right> " << moniov_.getMonRunTag().getGeneralTag()
181 <<
"</td><tr><td>Monitoring Version</td><td align=right> " << moniov_.getMonRunTag().getMonVersionDef().getMonitoringVersion()
182 <<
"</td></table></p>" << std::endl;
185 *
out <<
"</td><table>" << std::endl;
187 *
out <<
"</body>" << std::endl;
189 *
out <<
"</html>" << std::endl;
std::vector< std::string > runTypes_
EcalEndcapMonitorXdaqClient(const edm::ParameterSet &ps)
Constructor.
static std::string const input
std::vector< std::string > clientsNames_
std::vector< EEClient * > clients_
const char * getRunType(void)