CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
smproxy::SMPSWebPageHelper Class Reference

#include <SMPSWebPageHelper.h>

Inheritance diagram for smproxy::SMPSWebPageHelper:
stor::WebPageHelper< SMPSWebPageHelper >

Public Member Functions

void consumerStatisticsWebPage (xgi::Output *) const
 
void dataRetrieverWebPage (xgi::Output *) const
 
void defaultWebPage (xgi::Output *) const
 
void dqmEventStatisticsWebPage (xgi::Output *) const
 
 SMPSWebPageHelper (xdaq::ApplicationDescriptor *, StateMachinePtr)
 
- Public Member Functions inherited from stor::WebPageHelper< SMPSWebPageHelper >
void css (xgi::Input *in, xgi::Output *out)
 
 WebPageHelper (xdaq::ApplicationDescriptor *, const std::string &cvsVersion, SMPSWebPageHelper *callee, void(SMPSWebPageHelper::*addHyperLinks)(XHTMLMaker &, XHTMLMaker::Node *) const )
 

Private Types

typedef
stor::ConsumerWebPageHelper
< SMPSWebPageHelper,
EventQueueCollection,
StatisticsReporter
ConsumerWebPageHelper_t
 

Private Member Functions

void addDOMforConnectionInfo (stor::XHTMLMaker &, stor::XHTMLMaker::Node *parent, const DataRetrieverMonitorCollection::SummaryStats &) const
 
void addDOMforDQMEventServers (stor::XHTMLMaker &, stor::XHTMLMaker::Node *parent) const
 
void addDOMforEventServers (stor::XHTMLMaker &, stor::XHTMLMaker::Node *parent) const
 
virtual void addDOMforHyperLinks (stor::XHTMLMaker &, stor::XHTMLMaker::Node *parent) const
 
void addDOMforSMhost (stor::XHTMLMaker &, stor::XHTMLMaker::Node *tableRow, const std::string &sourceURL) const
 
void addDOMforThroughputPerEventType (stor::XHTMLMaker &, stor::XHTMLMaker::Node *parent, const DataRetrieverMonitorCollection::SummaryStats &) const
 
void addRowForEventServer (stor::XHTMLMaker &, stor::XHTMLMaker::Node *table, DataRetrieverMonitorCollection::EventTypePerConnectionStats const &) const
 
void addRowForEventType (stor::XHTMLMaker &, stor::XHTMLMaker::Node *table, DataRetrieverMonitorCollection::SummaryStats::EventTypeStats const &) const
 
void addSummaryRowForEventServer (stor::XHTMLMaker &, stor::XHTMLMaker::Node *table, DataRetrieverMonitorCollection::ConnectionStats::const_iterator) const
 
void addSummaryRowForThroughput (stor::XHTMLMaker &, stor::XHTMLMaker::Node *table, DataRetrieverMonitorCollection::SummaryStats const &) const
 
SMPSWebPageHelperoperator= (SMPSWebPageHelper const &)
 
 SMPSWebPageHelper (SMPSWebPageHelper const &)
 

Private Attributes

ConsumerWebPageHelper_t consumerWebPageHelper_
 
StateMachinePtr stateMachine_
 

Additional Inherited Members

- Protected Member Functions inherited from stor::WebPageHelper< SMPSWebPageHelper >
void addDOMforDQMEventStatistics (XHTMLMaker &maker, XHTMLMaker::Node *parent, DQMEventMonitorCollection const &) const
 
void addDOMforHyperLinks (XHTMLMaker &maker, XHTMLMaker::Node *parent) const
 
void addDOMforProcessedDQMEvents (XHTMLMaker &maker, XHTMLMaker::Node *parent, DQMEventMonitorCollection const &) const
 
void addDQMEventStats (XHTMLMaker &maker, XHTMLMaker::Node *table, DQMEventMonitorCollection::DQMEventStats const &, const MonitoredQuantity::DataSetType) const
 
void addDurationToTableHead (XHTMLMaker &maker, XHTMLMaker::Node *tableRow, const utils::Duration_t) const
 
void addRowForDQMEventBandwidth (XHTMLMaker &maker, XHTMLMaker::Node *table, DQMEventMonitorCollection::DQMEventStats const &, const MonitoredQuantity::DataSetType) const
 
void addRowForDQMEventsProcessed (XHTMLMaker &maker, XHTMLMaker::Node *table, DQMEventMonitorCollection::DQMEventStats const &, const MonitoredQuantity::DataSetType) const
 
void addRowForMaxDQMEventBandwidth (XHTMLMaker &maker, XHTMLMaker::Node *table, DQMEventMonitorCollection::DQMEventStats const &, const MonitoredQuantity::DataSetType) const
 
void addRowForMinDQMEventBandwidth (XHTMLMaker &maker, XHTMLMaker::Node *table, DQMEventMonitorCollection::DQMEventStats const &, const MonitoredQuantity::DataSetType) const
 
void addRowForTotalDQMEventVolume (XHTMLMaker &maker, XHTMLMaker::Node *table, DQMEventMonitorCollection::DQMEventStats const &, const MonitoredQuantity::DataSetType) const
 
std::string baseURL () const
 
XHTMLMaker::NodecreateWebPageBody (XHTMLMaker &, const std::string &pageTitle, const std::string &externallyVisibleState, const std::string &innerStateName, const std::string &errorMsg) const
 
- Protected Attributes inherited from stor::WebPageHelper< SMPSWebPageHelper >
std::map< unsigned int,
std::string > 
alarmColors_
 
xdaq::ApplicationDescriptor * appDescriptor_
 
XHTMLMaker::AttrMap rowAttr_
 
XHTMLMaker::AttrMap specialRowAttr_
 
XHTMLMaker::AttrMap tableAttr_
 
XHTMLMaker::AttrMap tableLabelAttr_
 
XHTMLMaker::AttrMap tableValueAttr_
 

Detailed Description

Helper class to handle SM proxy server web page requests

Author:
mommsen
Revision:
1.2
Date:
2011/03/07 15:41:54

Definition at line 23 of file SMPSWebPageHelper.h.

Member Typedef Documentation

Definition at line 157 of file SMPSWebPageHelper.h.

Constructor & Destructor Documentation

smproxy::SMPSWebPageHelper::SMPSWebPageHelper ( xdaq::ApplicationDescriptor *  appDesc,
StateMachinePtr  stateMachine 
)

Definition at line 16 of file SMPSWebPageHelper.cc.

19  :
21  stateMachine_(stateMachine),
23  { }
ConsumerWebPageHelper_t consumerWebPageHelper_
virtual void addDOMforHyperLinks(stor::XHTMLMaker &, stor::XHTMLMaker::Node *parent) const
smproxy::SMPSWebPageHelper::SMPSWebPageHelper ( SMPSWebPageHelper const &  )
private

Member Function Documentation

void smproxy::SMPSWebPageHelper::addDOMforConnectionInfo ( stor::XHTMLMaker maker,
stor::XHTMLMaker::Node parent,
const DataRetrieverMonitorCollection::SummaryStats summaryStats 
) const
private

Adds the connection info to the parent DOM element

Definition at line 159 of file SMPSWebPageHelper.cc.

References smproxy::DataRetrieverMonitorCollection::SummaryStats::activeSMs, stor::XHTMLMaker::addInt(), stor::XHTMLMaker::addNode(), stor::XHTMLMaker::addText(), smproxy::DataRetrieverMonitorCollection::SummaryStats::registeredSMs, and asciidump::table.

Referenced by defaultWebPage().

164  {
165  stor::XHTMLMaker::AttrMap colspanAttr;
166  colspanAttr[ "colspan" ] = "2";
167 
169  tableAttr[ "width" ] = "50%";
170 
171  stor::XHTMLMaker::AttrMap widthAttr;
172  widthAttr[ "width" ] = "70%";
173 
174  stor::XHTMLMaker::Node* table = maker.addNode("table", parent, tableAttr);
175 
176  stor::XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
177  stor::XHTMLMaker::Node* tableDiv = maker.addNode("th", tableRow, colspanAttr);
178  maker.addText(tableDiv, "Connection Information");
179 
180  // # of configured SMs
181  tableRow = maker.addNode("tr", table, rowAttr_);
182  tableDiv = maker.addNode("td", tableRow, widthAttr);
183  maker.addText(tableDiv, "# of configured StorageManagers");
184  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
185  const size_t configuredSMs = stateMachine_->getConfiguration()->
186  getDataRetrieverParams().smRegistrationList_.size();
187  maker.addInt(tableDiv, configuredSMs);
188 
189  // # of requested SMs connections
190  tableRow = maker.addNode("tr", table, rowAttr_);
191  tableDiv = maker.addNode("td", tableRow, widthAttr);
192  maker.addText(tableDiv, "# of requested SM connections");
193  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
194  maker.addInt(tableDiv, summaryStats.registeredSMs);
195 
196  // # of active SMs connections
197  tableRow = maker.addNode("tr", table, rowAttr_);
198  tableDiv = maker.addNode("td", tableRow, widthAttr);
199  maker.addText(tableDiv, "# of active SM connections");
200  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
201  maker.addInt(tableDiv, summaryStats.activeSMs);
202 
203  // # of connected event consumers
204  tableRow = maker.addNode("tr", table, rowAttr_);
205  tableDiv = maker.addNode("td", tableRow, widthAttr);
206  maker.addText(tableDiv, "# of connected event consumers");
207  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
209  stateMachine_->getRegistrationCollection()->
210  getEventConsumers(consumers);
211  maker.addInt(tableDiv, consumers.size());
212 
213  // # of connected DQM event (histogram) consumers
214  tableRow = maker.addNode("tr", table, rowAttr_);
215  tableDiv = maker.addNode("td", tableRow, widthAttr);
216  maker.addText(tableDiv, "# of connected histogram consumers");
217  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
219  stateMachine_->getRegistrationCollection()->
220  getDQMEventConsumers(dqmConsumers);
221  maker.addInt(tableDiv, dqmConsumers.size());
222  }
list table
Definition: asciidump.py:386
Node * addNode(const std::string &name, Node *parent, const AttrMap &attrs)
Definition: XHTMLMaker.cc:146
std::vector< EventConsRegPtr > ConsumerRegistrations
list parent
Definition: dbtoconf.py:74
void addText(Node *parent, const std::string &)
Definition: XHTMLMaker.cc:173
std::map< std::string, std::string > AttrMap
Definition: XHTMLMaker.h:36
void addInt(Node *parent, const int &)
Definition: XHTMLMaker.cc:184
std::vector< DQMEventConsRegPtr > DQMConsumerRegistrations
xercesc::DOMElement Node
Definition: XHTMLMaker.h:35
void smproxy::SMPSWebPageHelper::addDOMforDQMEventServers ( stor::XHTMLMaker maker,
stor::XHTMLMaker::Node parent 
) const
private

Adds the DQM event (histogram) servers to the parent DOM element

Definition at line 781 of file SMPSWebPageHelper.cc.

Referenced by dataRetrieverWebPage().

785  {
786  }
void smproxy::SMPSWebPageHelper::addDOMforEventServers ( stor::XHTMLMaker maker,
stor::XHTMLMaker::Node parent 
) const
private

Adds the event servers to the parent DOM element

Definition at line 509 of file SMPSWebPageHelper.cc.

References stor::XHTMLMaker::addNode(), and stor::XHTMLMaker::addText().

Referenced by dataRetrieverWebPage().

513  {
514  stor::XHTMLMaker::AttrMap colspanAttr;
515  colspanAttr[ "colspan" ] = "14";
516 
518 
519  stor::XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
520  stor::XHTMLMaker::Node* tableDiv = maker.addNode("th", tableRow, colspanAttr);
521  maker.addText(tableDiv, "Event Servers");
522 
523  stor::XHTMLMaker::AttrMap rowspanAttr;
524  rowspanAttr[ "rowspan" ] = "2";
525 
526  stor::XHTMLMaker::AttrMap subColspanAttr;
527  subColspanAttr[ "colspan" ] = "2";
528 
529  stor::XHTMLMaker::AttrMap noWrapAttr;
530  noWrapAttr[ "style" ] = "white-space: nowrap;";
531 
532  // Header
533  tableRow = maker.addNode("tr", table, specialRowAttr_);
534  tableDiv = maker.addNode("th", tableRow, rowspanAttr);
535  maker.addText(tableDiv, "Hostname");
536  tableDiv = maker.addNode("th", tableRow, rowspanAttr);
537  maker.addText(tableDiv, "Status");
538  tableDiv = maker.addNode("th", tableRow, rowspanAttr);
539  maker.addText(tableDiv, "Requested Event Type");
540  tableDiv = maker.addNode("th", tableRow, rowspanAttr);
541  maker.addText(tableDiv, "Max Request Rate (Hz)");
542  tableDiv = maker.addNode("th", tableRow, subColspanAttr);
543  maker.addText(tableDiv, "Event Rate (Hz)");
544  tableDiv = maker.addNode("th", tableRow, subColspanAttr);
545  maker.addText(tableDiv, "Average Event Size (kB)");
546  tableDiv = maker.addNode("th", tableRow, subColspanAttr);
547  maker.addText(tableDiv, "Bandwidth (kB/s)");
548  tableDiv = maker.addNode("th", tableRow, subColspanAttr);
549  maker.addText(tableDiv, "Corrupted Events");
550  tableDiv = maker.addNode("th", tableRow, subColspanAttr);
551  maker.addText(tableDiv, "Corrupted Event Rate (Hz)");
552 
553  tableRow = maker.addNode("tr", table, specialRowAttr_);
554  tableDiv = maker.addNode("th", tableRow);
555  maker.addText(tableDiv, "overall");
556  tableDiv = maker.addNode("th", tableRow, noWrapAttr);
557  maker.addText(tableDiv, "last 60 s");
558  tableDiv = maker.addNode("th", tableRow);
559  maker.addText(tableDiv, "overall");
560  tableDiv = maker.addNode("th", tableRow, noWrapAttr);
561  maker.addText(tableDiv, "last 60 s");
562  tableDiv = maker.addNode("th", tableRow);
563  maker.addText(tableDiv, "overall");
564  tableDiv = maker.addNode("th", tableRow, noWrapAttr);
565  maker.addText(tableDiv, "last 60 s");
566  tableDiv = maker.addNode("th", tableRow);
567  maker.addText(tableDiv, "overall");
568  tableDiv = maker.addNode("th", tableRow, noWrapAttr);
569  maker.addText(tableDiv, "last 60 s");
570  tableDiv = maker.addNode("th", tableRow);
571  maker.addText(tableDiv, "overall");
572  tableDiv = maker.addNode("th", tableRow, noWrapAttr);
573  maker.addText(tableDiv, "last 60 s");
574 
576  stateMachine_->getStatisticsReporter()->getDataRetrieverMonitorCollection()
577  .getStatsByEventTypesPerConnection(eventTypePerConnectionStats);
578 
580  stateMachine_->getStatisticsReporter()->getDataRetrieverMonitorCollection()
581  .getStatsByConnection(connectionStats);
582 
583  if ( eventTypePerConnectionStats.empty() )
584  {
585  stor::XHTMLMaker::AttrMap messageAttr = colspanAttr;
586  messageAttr[ "align" ] = "center";
587 
588  tableRow = maker.addNode("tr", table, rowAttr_);
589  tableDiv = maker.addNode("td", tableRow, messageAttr);
590  maker.addText(tableDiv, "Not registered to any event servers yet");
591  return;
592  }
593 
594  bool evenRow = false;
595 
596  for (DataRetrieverMonitorCollection::EventTypePerConnectionStatList::const_iterator
597  it = eventTypePerConnectionStats.begin(), itEnd = eventTypePerConnectionStats.end();
598  it != itEnd; ++it)
599  {
601  if( evenRow )
602  {
603  rowAttr[ "style" ] = "background-color:#e0e0e0;";
604  evenRow = false;
605  }
606  else
607  {
608  evenRow = true;
609  }
610  stor::XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr);
611  addRowForEventServer(maker, tableRow, *it);
612 
613  const std::string currentSourceURL = it->regPtr->sourceURL();
614 
615  if ( (it+1) == eventTypePerConnectionStats.end() ||
616  (it+1)->regPtr->sourceURL() != currentSourceURL )
617  {
618  addSummaryRowForEventServer(maker, table,
619  connectionStats.find(currentSourceURL));
620  }
621  }
622  }
list table
Definition: asciidump.py:386
Node * addNode(const std::string &name, Node *parent, const AttrMap &attrs)
Definition: XHTMLMaker.cc:146
std::map< std::string, EventStats > ConnectionStats
list parent
Definition: dbtoconf.py:74
void addText(Node *parent, const std::string &)
Definition: XHTMLMaker.cc:173
std::vector< EventTypePerConnectionStats > EventTypePerConnectionStatList
std::map< std::string, std::string > AttrMap
Definition: XHTMLMaker.h:36
void addSummaryRowForEventServer(stor::XHTMLMaker &, stor::XHTMLMaker::Node *table, DataRetrieverMonitorCollection::ConnectionStats::const_iterator) const
xercesc::DOMElement Node
Definition: XHTMLMaker.h:35
void addRowForEventServer(stor::XHTMLMaker &, stor::XHTMLMaker::Node *table, DataRetrieverMonitorCollection::EventTypePerConnectionStats const &) const
void smproxy::SMPSWebPageHelper::addDOMforHyperLinks ( stor::XHTMLMaker maker,
stor::XHTMLMaker::Node parent 
) const
privatevirtual

Adds the links for the other hyperdaq webpages

Definition at line 119 of file SMPSWebPageHelper.cc.

References stor::XHTMLMaker::addNode(), stor::XHTMLMaker::addText(), and link().

Referenced by dataRetrieverWebPage(), defaultWebPage(), and dqmEventStatisticsWebPage().

123  {
124  std::string url = appDescriptor_->getContextDescriptor()->getURL()
125  + "/" + appDescriptor_->getURN();
126 
127  stor::XHTMLMaker::AttrMap linkAttr;
129 
130  maker.addNode("hr", parent);
131 
132  linkAttr[ "href" ] = url;
133  link = maker.addNode("a", parent, linkAttr);
134  maker.addText(link, "Main web page");
135 
136  maker.addNode("hr", parent);
137 
138  linkAttr[ "href" ] = url + "/dataRetriever";
139  link = maker.addNode("a", parent, linkAttr);
140  maker.addText(link, "Data retriever web page");
141 
142  maker.addNode("hr", parent);
143 
144  linkAttr[ "href" ] = url + "/dqmEventStatistics";
145  link = maker.addNode("a", parent, linkAttr);
146  maker.addText(link, "DQM event processor statistics");
147 
148  maker.addNode("hr", parent);
149 
150  linkAttr[ "href" ] = url + "/consumerStatistics";
151  link = maker.addNode("a", parent, linkAttr);
152  maker.addText(link, "Consumer Statistics");
153 
154  maker.addNode("hr", parent);
155  }
Node * addNode(const std::string &name, Node *parent, const AttrMap &attrs)
Definition: XHTMLMaker.cc:146
xdaq::ApplicationDescriptor * appDescriptor_
list parent
Definition: dbtoconf.py:74
void addText(Node *parent, const std::string &)
Definition: XHTMLMaker.cc:173
std::string link(std::string &nm, std::string &ns)
Definition: hierarchy.cc:47
std::map< std::string, std::string > AttrMap
Definition: XHTMLMaker.h:36
xercesc::DOMElement Node
Definition: XHTMLMaker.h:35
void smproxy::SMPSWebPageHelper::addDOMforSMhost ( stor::XHTMLMaker maker,
stor::XHTMLMaker::Node tableRow,
const std::string &  sourceURL 
) const
private

Adds a table cell for the SM host

Definition at line 759 of file SMPSWebPageHelper.cc.

References stor::XHTMLMaker::addNode(), stor::XHTMLMaker::addText(), and link().

764  {
765  stor::XHTMLMaker::Node* tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
766  std::string::size_type startPos = sourceURL.find("//");
767  if ( startPos == std::string::npos )
768  startPos = 0;
769  else
770  startPos += 2;
771  const std::string::size_type endPos = sourceURL.find('.');
772  const std::string hostname = sourceURL.substr(startPos,(endPos-startPos));
773  stor::XHTMLMaker::AttrMap linkAttr;
774  linkAttr[ "href" ] = sourceURL + "/consumerStatistics";
775  stor::XHTMLMaker::Node* link = maker.addNode("a", tableDiv, linkAttr);
776  maker.addText(link, hostname);
777  }
Node * addNode(const std::string &name, Node *parent, const AttrMap &attrs)
Definition: XHTMLMaker.cc:146
void addText(Node *parent, const std::string &)
Definition: XHTMLMaker.cc:173
uint16_t size_type
std::string link(std::string &nm, std::string &ns)
Definition: hierarchy.cc:47
std::map< std::string, std::string > AttrMap
Definition: XHTMLMaker.h:36
xercesc::DOMElement Node
Definition: XHTMLMaker.h:35
void smproxy::SMPSWebPageHelper::addDOMforThroughputPerEventType ( stor::XHTMLMaker maker,
stor::XHTMLMaker::Node parent,
const DataRetrieverMonitorCollection::SummaryStats summaryStats 
) const
private

Adds the summary throuphput per event type to the parent DOM element

Definition at line 226 of file SMPSWebPageHelper.cc.

References stor::XHTMLMaker::addNode(), stor::XHTMLMaker::addText(), smproxy::DataRetrieverMonitorCollection::SummaryStats::eventTypeStats, and asciidump::table.

Referenced by defaultWebPage().

231  {
232  stor::XHTMLMaker::AttrMap colspanAttr;
233  colspanAttr[ "colspan" ] = "13";
234 
235  stor::XHTMLMaker::AttrMap subColspanAttr;
236 
237  stor::XHTMLMaker::AttrMap rowspanAttr;
238  rowspanAttr[ "rowspan" ] = "3";
239  rowspanAttr[ "width" ] = "30%";
240 
241  stor::XHTMLMaker::AttrMap noWrapAttr;
242  noWrapAttr[ "style" ] = "white-space: nowrap;";
243 
245  stor::XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
246  stor::XHTMLMaker::Node* tableDiv = maker.addNode("th", tableRow, colspanAttr);
247  maker.addText(tableDiv, "Throughput");
248 
249  tableRow = maker.addNode("tr", table, rowAttr_);
250  tableDiv = maker.addNode("th", tableRow, rowspanAttr);
251  maker.addText(tableDiv, "Requested Event Type");
252  subColspanAttr[ "colspan" ] = "2";
253  tableDiv = maker.addNode("th", tableRow, subColspanAttr);
254  maker.addText(tableDiv, "");
255  subColspanAttr[ "colspan" ] = "6";
256  tableDiv = maker.addNode("th", tableRow, subColspanAttr);
257  maker.addText(tableDiv, "Input");
258  tableDiv = maker.addNode("th", tableRow, subColspanAttr);
259  maker.addText(tableDiv, "Output");
260 
261  subColspanAttr[ "colspan" ] = "2";
262  tableRow = maker.addNode("tr", table, rowAttr_);
263  tableDiv = maker.addNode("th", tableRow, subColspanAttr);
264  maker.addText(tableDiv, "Average Event Size (kB)");
265  tableDiv = maker.addNode("th", tableRow, subColspanAttr);
266  maker.addText(tableDiv, "Event Rate (Hz)");
267  tableDiv = maker.addNode("th", tableRow, subColspanAttr);
268  maker.addText(tableDiv, "Bandwidth (kB/s)");
269  tableDiv = maker.addNode("th", tableRow, subColspanAttr);
270  maker.addText(tableDiv, "Corrupted Event Rate (Hz)");
271  tableDiv = maker.addNode("th", tableRow, subColspanAttr);
272  maker.addText(tableDiv, "Event Rate (Hz)");
273  tableDiv = maker.addNode("th", tableRow, subColspanAttr);
274  maker.addText(tableDiv, "Bandwidth (kB/s)");
275 
276  tableRow = maker.addNode("tr", table, rowAttr_);
277  tableDiv = maker.addNode("th", tableRow);
278  maker.addText(tableDiv, "overall");
279  tableDiv = maker.addNode("th", tableRow, noWrapAttr);
280  maker.addText(tableDiv, "last 60 s");
281  tableDiv = maker.addNode("th", tableRow);
282  maker.addText(tableDiv, "overall");
283  tableDiv = maker.addNode("th", tableRow, noWrapAttr);
284  maker.addText(tableDiv, "last 60 s");
285  tableDiv = maker.addNode("th", tableRow);
286  maker.addText(tableDiv, "overall");
287  tableDiv = maker.addNode("th", tableRow, noWrapAttr);
288  maker.addText(tableDiv, "last 60 s");
289  tableDiv = maker.addNode("th", tableRow);
290  maker.addText(tableDiv, "overall");
291  tableDiv = maker.addNode("th", tableRow, noWrapAttr);
292  maker.addText(tableDiv, "last 60 s");
293  tableDiv = maker.addNode("th", tableRow);
294  maker.addText(tableDiv, "overall");
295  tableDiv = maker.addNode("th", tableRow, noWrapAttr);
296  maker.addText(tableDiv, "last 60 s");
297  tableDiv = maker.addNode("th", tableRow);
298  maker.addText(tableDiv, "overall");
299  tableDiv = maker.addNode("th", tableRow, noWrapAttr);
300  maker.addText(tableDiv, "last 60 s");
301 
302  if ( summaryStats.eventTypeStats.empty() )
303  {
304  stor::XHTMLMaker::AttrMap messageAttr = colspanAttr;
305  messageAttr[ "align" ] = "center";
306 
307  stor::XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
308  stor::XHTMLMaker::Node* tableDiv = maker.addNode("td", tableRow, messageAttr);
309  maker.addText(tableDiv, "No data flowing, yet.");
310  return;
311  }
312 
313  bool evenRow = false;
314 
315  for (DataRetrieverMonitorCollection::SummaryStats::EventTypeStatList::const_iterator
316  it = summaryStats.eventTypeStats.begin(), itEnd = summaryStats.eventTypeStats.end();
317  it != itEnd; ++it)
318  {
320  if( evenRow )
321  {
322  rowAttr[ "style" ] = "background-color:#e0e0e0;";
323  evenRow = false;
324  }
325  else
326  {
327  evenRow = true;
328  }
329  stor::XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr);
330  addRowForEventType(maker, tableRow, *it);
331  }
332 
333  addSummaryRowForThroughput(maker, table, summaryStats);
334  }
list table
Definition: asciidump.py:386
Node * addNode(const std::string &name, Node *parent, const AttrMap &attrs)
Definition: XHTMLMaker.cc:146
list parent
Definition: dbtoconf.py:74
void addText(Node *parent, const std::string &)
Definition: XHTMLMaker.cc:173
void addSummaryRowForThroughput(stor::XHTMLMaker &, stor::XHTMLMaker::Node *table, DataRetrieverMonitorCollection::SummaryStats const &) const
std::map< std::string, std::string > AttrMap
Definition: XHTMLMaker.h:36
xercesc::DOMElement Node
Definition: XHTMLMaker.h:35
void addRowForEventType(stor::XHTMLMaker &, stor::XHTMLMaker::Node *table, DataRetrieverMonitorCollection::SummaryStats::EventTypeStats const &) const
void smproxy::SMPSWebPageHelper::addRowForEventServer ( stor::XHTMLMaker maker,
stor::XHTMLMaker::Node table,
DataRetrieverMonitorCollection::EventTypePerConnectionStats const &  stats 
) const
private

Adds a table row for each event server

Definition at line 626 of file SMPSWebPageHelper.cc.

References stor::XHTMLMaker::addDouble(), stor::XHTMLMaker::addNode(), stor::XHTMLMaker::addText(), smproxy::DataRetrieverMonitorCollection::CONNECTED, smproxy::DataRetrieverMonitorCollection::EventTypePerConnectionStats::connectionStatus, smproxy::DataRetrieverMonitorCollection::EventStats::corruptedEventsStats, stor::utils::durationToSeconds(), smproxy::DataRetrieverMonitorCollection::EventTypePerConnectionStats::eventStats, stor::MonitoredQuantity::FULL, stor::MonitoredQuantity::Stats::getSampleRate(), stor::MonitoredQuantity::Stats::getValueAverage(), stor::MonitoredQuantity::Stats::getValueRate(), stor::MonitoredQuantity::Stats::getValueSum(), MergeJob_cfg::interval, stor::MonitoredQuantity::RECENT, smproxy::DataRetrieverMonitorCollection::EventTypePerConnectionStats::regPtr, smproxy::DataRetrieverMonitorCollection::EventStats::sizeStats, and ntuplemaker::status.

631  {
632  stor::XHTMLMaker::Node* tableDiv;
633 
634  // Hostname
635  addDOMforSMhost(maker, tableRow, stats.regPtr->sourceURL());
636 
637  // Status
638  if ( stats.connectionStatus == DataRetrieverMonitorCollection::CONNECTED )
639  {
640  tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
641  maker.addText(tableDiv, "Connected");
642  }
643  else
644  {
646  statusAttr[ "style" ] = "color:brown;";
647  tableDiv = maker.addNode("td", tableRow, statusAttr);
648  std::ostringstream status;
649  status << stats.connectionStatus;
650  maker.addText(tableDiv, status.str());
651  }
652 
653  // Requested event type
654  tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
655  stor::XHTMLMaker::Node* pre = maker.addNode("pre", tableDiv);
656  std::ostringstream eventType;
657  stats.regPtr->eventType(eventType);
658  maker.addText(pre, eventType.str());
659 
660  // Max request rate
661  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
663  stats.regPtr->minEventRequestInterval();
664  if ( interval.is_not_a_date_time() )
665  maker.addText(tableDiv, "unlimited");
666  else
667  maker.addDouble(tableDiv, 1 / stor::utils::durationToSeconds(interval), 1);
668 
669  // Event rate
670  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
671  maker.addDouble(tableDiv, stats.eventStats.sizeStats.getSampleRate(stor::MonitoredQuantity::FULL));
672  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
673  maker.addDouble(tableDiv, stats.eventStats.sizeStats.getSampleRate(stor::MonitoredQuantity::RECENT));
674 
675  // Average event size
676  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
677  maker.addDouble(tableDiv, stats.eventStats.sizeStats.getValueAverage(stor::MonitoredQuantity::FULL));
678  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
679  maker.addDouble(tableDiv, stats.eventStats.sizeStats.getValueAverage(stor::MonitoredQuantity::RECENT));
680 
681  // Bandwidth
682  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
683  maker.addDouble(tableDiv, stats.eventStats.sizeStats.getValueRate(stor::MonitoredQuantity::FULL));
684  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
685  maker.addDouble(tableDiv, stats.eventStats.sizeStats.getValueRate(stor::MonitoredQuantity::RECENT));
686 
687  // Corrupted events counts
688  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
689  maker.addDouble(tableDiv,
690  stats.eventStats.corruptedEventsStats.getValueSum(stor::MonitoredQuantity::FULL), 0);
691  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
692  maker.addDouble(tableDiv,
693  stats.eventStats.corruptedEventsStats.getValueSum(stor::MonitoredQuantity::RECENT), 0);
694 
695  // Corrupted event rate
696  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
697  maker.addDouble(tableDiv,
698  stats.eventStats.corruptedEventsStats.getValueRate(stor::MonitoredQuantity::FULL));
699  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
700  maker.addDouble(tableDiv,
701  stats.eventStats.corruptedEventsStats.getValueRate(stor::MonitoredQuantity::RECENT));
702  }
Node * addNode(const std::string &name, Node *parent, const AttrMap &attrs)
Definition: XHTMLMaker.cc:146
void addDouble(Node *parent, const double &value, const unsigned int &precision=2)
Definition: XHTMLMaker.cc:254
void addText(Node *parent, const std::string &)
Definition: XHTMLMaker.cc:173
tuple interval
Definition: MergeJob_cfg.py:20
boost::posix_time::time_duration Duration_t
Definition: Utils.h:41
std::map< std::string, std::string > AttrMap
Definition: XHTMLMaker.h:36
void addDOMforSMhost(stor::XHTMLMaker &, stor::XHTMLMaker::Node *tableRow, const std::string &sourceURL) const
double durationToSeconds(Duration_t const &)
Definition: Utils.h:147
xercesc::DOMElement Node
Definition: XHTMLMaker.h:35
tuple status
Definition: ntuplemaker.py:245
void smproxy::SMPSWebPageHelper::addRowForEventType ( stor::XHTMLMaker maker,
stor::XHTMLMaker::Node table,
DataRetrieverMonitorCollection::SummaryStats::EventTypeStats const &  stats 
) const
private

Adds a table row for each event type

Definition at line 338 of file SMPSWebPageHelper.cc.

References stor::XHTMLMaker::addDouble(), stor::XHTMLMaker::addNode(), stor::XHTMLMaker::addText(), stor::MonitoredQuantity::FULL, stor::MonitoredQuantity::Stats::getSampleRate(), stor::ConsumerMonitorCollection::getServed(), stor::MonitoredQuantity::Stats::getValueRate(), stor::MonitoredQuantity::RECENT, and query::result.

343  {
344  // Event type
345  stor::XHTMLMaker::Node* tableDiv = maker.addNode("td", tableRow);
346  stor::XHTMLMaker::Node* pre = maker.addNode("pre", tableDiv);
347  std::ostringstream eventType;
348  stats.first->eventType(eventType);
349  maker.addText(pre, eventType.str());
350 
351  // Average event size
352  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
353  maker.addDouble(tableDiv, stats.second.sizeStats.getValueAverage(stor::MonitoredQuantity::FULL));
354  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
355  maker.addDouble(tableDiv, stats.second.sizeStats.getValueAverage(stor::MonitoredQuantity::RECENT));
356 
357  // Input event rate
358  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
359  maker.addDouble(tableDiv, stats.second.sizeStats.getSampleRate(stor::MonitoredQuantity::FULL));
360  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
361  maker.addDouble(tableDiv, stats.second.sizeStats.getSampleRate(stor::MonitoredQuantity::RECENT));
362 
363  // Input bandwidth
364  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
365  maker.addDouble(tableDiv, stats.second.sizeStats.getValueRate(stor::MonitoredQuantity::FULL));
366  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
367  maker.addDouble(tableDiv, stats.second.sizeStats.getValueRate(stor::MonitoredQuantity::RECENT));
368 
369  // Input corrupted events rate
370  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
371  maker.addDouble(tableDiv,
372  stats.second.corruptedEventsStats.getSampleRate(stor::MonitoredQuantity::FULL));
373  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
374  maker.addDouble(tableDiv,
375  stats.second.corruptedEventsStats.getSampleRate(stor::MonitoredQuantity::RECENT));
376 
377  // Get statistics for consumers requesting this event type
378  stor::QueueIDs queueIDs;
379  bool isEventConsumer =
380  stateMachine_->getDataManager()->getQueueIDsFromDataEventRetrievers(
381  boost::dynamic_pointer_cast<stor::EventConsumerRegistrationInfo>(stats.first),
382  queueIDs
383  );
384  if ( ! isEventConsumer)
385  {
386  stateMachine_->getDataManager()->getQueueIDsFromDQMEventRetrievers(
387  boost::dynamic_pointer_cast<stor::DQMEventConsumerRegistrationInfo>(stats.first),
388  queueIDs
389  );
390  }
391 
392  if ( queueIDs.empty() )
393  {
394  stor::XHTMLMaker::AttrMap noConsumersAttr = tableLabelAttr_;
395  noConsumersAttr[ "colspan" ] = "4";
396  tableDiv = maker.addNode("td", tableRow, noConsumersAttr);
397  maker.addText(tableDiv, "no consumers connected");
398  return;
399  }
400 
402  stateMachine_->getStatisticsReporter()->getEventConsumerMonitorCollection();
404  stateMachine_->getStatisticsReporter()->getDQMConsumerMonitorCollection();
406  isEventConsumer ?
407  static_cast<const stor::ConsumerMonitorCollection&>(ecmc) :
408  static_cast<const stor::ConsumerMonitorCollection&>(dcmc);
409 
410  double rateOverall = 0;
411  double rateRecent = 0;
412  double bandwidthOverall = 0;
413  double bandwidthRecent = 0;
414 
415  for ( stor::QueueIDs::const_iterator it = queueIDs.begin(),
416  itEnd = queueIDs.end(); it != itEnd; ++it)
417  {
419  if ( cmc.getServed(*it, result) )
420  {
421  rateOverall += result.getSampleRate(stor::MonitoredQuantity::FULL);
422  rateRecent += result.getSampleRate(stor::MonitoredQuantity::RECENT);
423  bandwidthOverall += result.getValueRate(stor::MonitoredQuantity::FULL) / 1024;
424  bandwidthRecent += result.getValueRate(stor::MonitoredQuantity::RECENT) / 1024;
425  }
426  }
427 
428  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
429  maker.addDouble(tableDiv, rateOverall);
430  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
431  maker.addDouble(tableDiv, rateRecent);
432  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
433  maker.addDouble(tableDiv, bandwidthOverall);
434  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
435  maker.addDouble(tableDiv, bandwidthRecent);
436  }
double getValueRate(DataSetType t=FULL) const
Node * addNode(const std::string &name, Node *parent, const AttrMap &attrs)
Definition: XHTMLMaker.cc:146
void addDouble(Node *parent, const double &value, const unsigned int &precision=2)
Definition: XHTMLMaker.cc:254
bool getServed(const QueueID &qid, MonitoredQuantity::Stats &result) const
void addText(Node *parent, const std::string &)
Definition: XHTMLMaker.cc:173
std::vector< QueueID > QueueIDs
Definition: QueueID.h:80
tuple result
Definition: query.py:137
std::map< std::string, std::string > AttrMap
Definition: XHTMLMaker.h:36
double getSampleRate(DataSetType t=FULL) const
xercesc::DOMElement Node
Definition: XHTMLMaker.h:35
void smproxy::SMPSWebPageHelper::addSummaryRowForEventServer ( stor::XHTMLMaker maker,
stor::XHTMLMaker::Node table,
DataRetrieverMonitorCollection::ConnectionStats::const_iterator  pos 
) const
private

Adds a summary table row for each event server

Definition at line 706 of file SMPSWebPageHelper.cc.

References stor::XHTMLMaker::addDouble(), stor::XHTMLMaker::addNode(), stor::MonitoredQuantity::FULL, and stor::MonitoredQuantity::RECENT.

711  {
712  stor::XHTMLMaker::Node* tableRow = maker.addNode("tr", table, specialRowAttr_);
713 
714  // Hostname
715  addDOMforSMhost(maker, tableRow, pos->first);
716 
717  // Status, requst type, and max request rate not filled
718  stor::XHTMLMaker::Node* tableDiv = maker.addNode("td", tableRow);
719  tableDiv = maker.addNode("td", tableRow);
720  tableDiv = maker.addNode("td", tableRow);
721 
722  // Event rate
723  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
724  maker.addDouble(tableDiv, pos->second.sizeStats.getSampleRate(stor::MonitoredQuantity::FULL));
725  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
726  maker.addDouble(tableDiv, pos->second.sizeStats.getSampleRate(stor::MonitoredQuantity::RECENT));
727 
728  // Average event size
729  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
730  maker.addDouble(tableDiv, pos->second.sizeStats.getValueAverage(stor::MonitoredQuantity::FULL));
731  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
732  maker.addDouble(tableDiv, pos->second.sizeStats.getValueAverage(stor::MonitoredQuantity::RECENT));
733 
734  // Bandwidth
735  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
736  maker.addDouble(tableDiv, pos->second.sizeStats.getValueRate(stor::MonitoredQuantity::FULL));
737  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
738  maker.addDouble(tableDiv, pos->second.sizeStats.getValueRate(stor::MonitoredQuantity::RECENT));
739 
740  // Corrupted events counts
741  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
742  maker.addDouble(tableDiv,
743  pos->second.corruptedEventsStats.getValueSum(stor::MonitoredQuantity::FULL), 0);
744  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
745  maker.addDouble(tableDiv,
746  pos->second.corruptedEventsStats.getValueSum(stor::MonitoredQuantity::RECENT), 0);
747 
748  // Corrupted event rate
749  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
750  maker.addDouble(tableDiv,
751  pos->second.corruptedEventsStats.getValueRate(stor::MonitoredQuantity::FULL));
752  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
753  maker.addDouble(tableDiv,
754  pos->second.corruptedEventsStats.getValueRate(stor::MonitoredQuantity::RECENT));
755  }
list table
Definition: asciidump.py:386
Node * addNode(const std::string &name, Node *parent, const AttrMap &attrs)
Definition: XHTMLMaker.cc:146
void addDouble(Node *parent, const double &value, const unsigned int &precision=2)
Definition: XHTMLMaker.cc:254
void addDOMforSMhost(stor::XHTMLMaker &, stor::XHTMLMaker::Node *tableRow, const std::string &sourceURL) const
xercesc::DOMElement Node
Definition: XHTMLMaker.h:35
void smproxy::SMPSWebPageHelper::addSummaryRowForThroughput ( stor::XHTMLMaker maker,
stor::XHTMLMaker::Node table,
DataRetrieverMonitorCollection::SummaryStats const &  summaryStats 
) const
private

Adds a table row for the summary throughput

Definition at line 440 of file SMPSWebPageHelper.cc.

References stor::XHTMLMaker::addDouble(), stor::XHTMLMaker::addNode(), stor::XHTMLMaker::addText(), smproxy::DataRetrieverMonitorCollection::EventStats::corruptedEventsStats, stor::MonitoredQuantity::FULL, stor::MonitoredQuantity::Stats::getSampleRate(), stor::ConsumerMonitorCollection::getTotalStats(), stor::MonitoredQuantity::Stats::getValueAverage(), stor::MonitoredQuantity::Stats::getValueRate(), stor::MonitoredQuantity::RECENT, stor::ConsumerMonitorCollection::TotalStats::servedStats, smproxy::DataRetrieverMonitorCollection::EventStats::sizeStats, and smproxy::DataRetrieverMonitorCollection::SummaryStats::totals.

445  {
446  stor::XHTMLMaker::Node* tableRow = maker.addNode("tr", table, specialRowAttr_);
447  stor::XHTMLMaker::Node* tableDiv = maker.addNode("td", tableRow);
448  maker.addText(tableDiv, "Total");
449 
450  // Average event size
451  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
452  maker.addDouble(tableDiv, summaryStats.totals.sizeStats.getValueAverage(stor::MonitoredQuantity::FULL));
453  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
454  maker.addDouble(tableDiv, summaryStats.totals.sizeStats.getValueAverage(stor::MonitoredQuantity::RECENT));
455 
456  // Input event rate
457  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
458  maker.addDouble(tableDiv, summaryStats.totals.sizeStats.getSampleRate(stor::MonitoredQuantity::FULL));
459  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
460  maker.addDouble(tableDiv, summaryStats.totals.sizeStats.getSampleRate(stor::MonitoredQuantity::RECENT));
461 
462  // Input bandwidth
463  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
464  maker.addDouble(tableDiv, summaryStats.totals.sizeStats.getValueRate(stor::MonitoredQuantity::FULL));
465  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
466  maker.addDouble(tableDiv, summaryStats.totals.sizeStats.getValueRate(stor::MonitoredQuantity::RECENT));
467 
468  // Input corrupted events rate
469  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
470  maker.addDouble(tableDiv, summaryStats.totals.corruptedEventsStats.getValueRate(stor::MonitoredQuantity::FULL));
471  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
472  maker.addDouble(tableDiv, summaryStats.totals.corruptedEventsStats.getValueRate(stor::MonitoredQuantity::RECENT));
473 
475  stateMachine_->getStatisticsReporter()->getEventConsumerMonitorCollection();
477  stateMachine_->getStatisticsReporter()->getDQMConsumerMonitorCollection();
478  stor::ConsumerMonitorCollection::TotalStats ecmcStats, dcmcStats;
479  ecmc.getTotalStats(ecmcStats);
480  dcmc.getTotalStats(dcmcStats);
481 
482  // Output event rate
483  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
484  maker.addDouble(tableDiv,
487  );
488  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
489  maker.addDouble(tableDiv,
492  );
493 
494  // Output bandwidth
495  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
496  maker.addDouble(tableDiv,
499  );
500  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
501  maker.addDouble(tableDiv,
504  );
505  }
double getValueRate(DataSetType t=FULL) const
list table
Definition: asciidump.py:386
Node * addNode(const std::string &name, Node *parent, const AttrMap &attrs)
Definition: XHTMLMaker.cc:146
void addDouble(Node *parent, const double &value, const unsigned int &precision=2)
Definition: XHTMLMaker.cc:254
void addText(Node *parent, const std::string &)
Definition: XHTMLMaker.cc:173
double getSampleRate(DataSetType t=FULL) const
xercesc::DOMElement Node
Definition: XHTMLMaker.h:35
void smproxy::SMPSWebPageHelper::consumerStatisticsWebPage ( xgi::Output out) const

Generates consumer statistics page

Definition at line 80 of file SMPSWebPageHelper.cc.

References stor::ConsumerWebPageHelper< WebPageHelper_t, EventQueueCollection_t, StatisticsReporter_t >::consumerStatistics(), consumerWebPageHelper_, and stateMachine_.

81  {
83  stateMachine_->getExternallyVisibleStateName(),
84  stateMachine_->getStateName(),
85  stateMachine_->getReasonForFailed(),
86  stateMachine_->getStatisticsReporter(),
87  stateMachine_->getRegistrationCollection(),
88  stateMachine_->getEventQueueCollection(),
89  stateMachine_->getDQMEventQueueCollection()
90  );
91  }
ConsumerWebPageHelper_t consumerWebPageHelper_
tuple out
Definition: dbtoconf.py:99
void consumerStatistics(xgi::Output *, const std::string &externallyVisibleState, const std::string &innerStateName, const std::string &errorMsg, boost::shared_ptr< StatisticsReporter_t >, RegistrationCollectionPtr, boost::shared_ptr< EventQueueCollection_t >, DQMEventQueueCollectionPtr) const
void smproxy::SMPSWebPageHelper::dataRetrieverWebPage ( xgi::Output out) const

Generates the data retriever web page

Definition at line 55 of file SMPSWebPageHelper.cc.

References addDOMforDQMEventServers(), addDOMforEventServers(), addDOMforHyperLinks(), stor::XHTMLMaker::addNode(), stor::WebPageHelper< SMPSWebPageHelper >::createWebPageBody(), stor::XHTMLMaker::out(), and stateMachine_.

56  {
57  stor::XHTMLMonitor theMonitor;
59 
61  "Data Retrieval",
62  stateMachine_->getExternallyVisibleStateName(),
63  stateMachine_->getStateName(),
64  stateMachine_->getReasonForFailed()
65  );
66 
67  addDOMforEventServers(maker, body);
68 
69  maker.addNode("hr", body);
70 
71  addDOMforDQMEventServers(maker, body);
72 
73  addDOMforHyperLinks(maker, body);
74 
75  // Dump the webpage to the output stream
76  maker.out(*out);
77  }
Node * addNode(const std::string &name, Node *parent, const AttrMap &attrs)
Definition: XHTMLMaker.cc:146
void addDOMforDQMEventServers(stor::XHTMLMaker &, stor::XHTMLMaker::Node *parent) const
edm::serviceregistry::AllArgsMaker< DTDataMonitorInterface, DTDataIntegrityTask > maker
Definition: plugins.cc:60
tuple out
Definition: dbtoconf.py:99
virtual void addDOMforHyperLinks(stor::XHTMLMaker &, stor::XHTMLMaker::Node *parent) const
xercesc::DOMElement Node
Definition: XHTMLMaker.h:35
XHTMLMaker::Node * createWebPageBody(XHTMLMaker &, const std::string &pageTitle, const std::string &externallyVisibleState, const std::string &innerStateName, const std::string &errorMsg) const
void addDOMforEventServers(stor::XHTMLMaker &, stor::XHTMLMaker::Node *parent) const
void smproxy::SMPSWebPageHelper::defaultWebPage ( xgi::Output out) const

Generates the default web page

Definition at line 26 of file SMPSWebPageHelper.cc.

References addDOMforConnectionInfo(), addDOMforHyperLinks(), addDOMforThroughputPerEventType(), stor::XHTMLMaker::addNode(), stor::WebPageHelper< SMPSWebPageHelper >::createWebPageBody(), stor::XHTMLMaker::out(), and stateMachine_.

27  {
28  stor::XHTMLMonitor theMonitor;
30 
32  "Main",
33  stateMachine_->getExternallyVisibleStateName(),
34  stateMachine_->getStateName(),
35  stateMachine_->getReasonForFailed()
36  );
37 
38  DataRetrieverMonitorCollection::SummaryStats summaryStats;
39  stateMachine_->getStatisticsReporter()->
40  getDataRetrieverMonitorCollection().getSummaryStats(summaryStats);
41 
42  addDOMforConnectionInfo(maker, body, summaryStats);
43 
44  maker.addNode("br", body);
45 
46  addDOMforThroughputPerEventType(maker, body, summaryStats);
47 
48  addDOMforHyperLinks(maker, body);
49 
50  // Dump the webpage to the output stream
51  maker.out(*out);
52  }
Node * addNode(const std::string &name, Node *parent, const AttrMap &attrs)
Definition: XHTMLMaker.cc:146
edm::serviceregistry::AllArgsMaker< DTDataMonitorInterface, DTDataIntegrityTask > maker
Definition: plugins.cc:60
tuple out
Definition: dbtoconf.py:99
void addDOMforConnectionInfo(stor::XHTMLMaker &, stor::XHTMLMaker::Node *parent, const DataRetrieverMonitorCollection::SummaryStats &) const
virtual void addDOMforHyperLinks(stor::XHTMLMaker &, stor::XHTMLMaker::Node *parent) const
void addDOMforThroughputPerEventType(stor::XHTMLMaker &, stor::XHTMLMaker::Node *parent, const DataRetrieverMonitorCollection::SummaryStats &) const
xercesc::DOMElement Node
Definition: XHTMLMaker.h:35
XHTMLMaker::Node * createWebPageBody(XHTMLMaker &, const std::string &pageTitle, const std::string &externallyVisibleState, const std::string &innerStateName, const std::string &errorMsg) const
void smproxy::SMPSWebPageHelper::dqmEventStatisticsWebPage ( xgi::Output out) const

Generates the data retriever web page

Definition at line 94 of file SMPSWebPageHelper.cc.

References stor::WebPageHelper< SMPSWebPageHelper >::addDOMforDQMEventStatistics(), addDOMforHyperLinks(), stor::WebPageHelper< SMPSWebPageHelper >::addDOMforProcessedDQMEvents(), stor::WebPageHelper< SMPSWebPageHelper >::createWebPageBody(), stor::XHTMLMaker::out(), and stateMachine_.

95  {
96  stor::XHTMLMonitor theMonitor;
98 
100  "DQM Event Processor",
101  stateMachine_->getExternallyVisibleStateName(),
102  stateMachine_->getStateName(),
103  stateMachine_->getReasonForFailed()
104  );
105 
106  const stor::DQMEventMonitorCollection& demc =
107  stateMachine_->getStatisticsReporter()->getDQMEventMonitorCollection();
108  addDOMforProcessedDQMEvents(maker, body, demc);
109  addDOMforDQMEventStatistics(maker, body, demc);
110 
111  addDOMforHyperLinks(maker, body);
112 
113  // Dump the webpage to the output stream
114  maker.out(*out);
115  }
void addDOMforDQMEventStatistics(XHTMLMaker &maker, XHTMLMaker::Node *parent, DQMEventMonitorCollection const &) const
edm::serviceregistry::AllArgsMaker< DTDataMonitorInterface, DTDataIntegrityTask > maker
Definition: plugins.cc:60
void addDOMforProcessedDQMEvents(XHTMLMaker &maker, XHTMLMaker::Node *parent, DQMEventMonitorCollection const &) const
tuple out
Definition: dbtoconf.py:99
virtual void addDOMforHyperLinks(stor::XHTMLMaker &, stor::XHTMLMaker::Node *parent) const
xercesc::DOMElement Node
Definition: XHTMLMaker.h:35
XHTMLMaker::Node * createWebPageBody(XHTMLMaker &, const std::string &pageTitle, const std::string &externallyVisibleState, const std::string &innerStateName, const std::string &errorMsg) const
SMPSWebPageHelper& smproxy::SMPSWebPageHelper::operator= ( SMPSWebPageHelper const &  )
private

Member Data Documentation

ConsumerWebPageHelper_t smproxy::SMPSWebPageHelper::consumerWebPageHelper_
private

Definition at line 158 of file SMPSWebPageHelper.h.

Referenced by consumerStatisticsWebPage().

StateMachinePtr smproxy::SMPSWebPageHelper::stateMachine_
private