CMS 3D CMS Logo

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

#include <WebGUI.h>

Inheritance diagram for evf::WebGUI:

Public Types

typedef xdata::UnsignedInteger32 Counter_t
 
typedef std::vector< std::pair
< std::string, Counter_t * > > 
CounterVec_t
 
typedef const std::string CString_t
 
typedef xgi::Input Input_t
 
typedef xgi::Output Output_t
 
typedef xdata::Serializable Param_t
 
typedef std::vector< std::pair
< std::string, Param_t * > > 
ParamVec_t
 
typedef std::vector< std::pair
< std::string, void * > > 
UpdateVec_t
 
typedef xgi::exception::Exception XgiException_t
 

Public Member Functions

void addDebugCounter (CString_t &name, Counter_t *counter)
 
void addDebugParam (CString_t &name, Param_t *param)
 
void addItemChangedListener (CString_t &name, xdata::ActionListener *l)
 
void addMonitorCounter (CString_t &name, Counter_t *counter)
 
void addMonitorParam (CString_t &name, Param_t *param)
 
void addStandardCounter (CString_t &name, Counter_t *counter)
 
void addStandardParam (CString_t &name, Param_t *param)
 
xdata::InfoSpace * appInfoSpace ()
 
void css (Input_t *in, Output_t *out) throw (XgiException_t)
 
void debugWebPage (Input_t *in, Output_t *out) throw (XgiException_t)
 
void defaultWebPage (Input_t *in, Output_t *out) throw (XgiException_t)
 
void exportParameters ()
 
void htmlHead (Input_t *in, Output_t *out, CString_t &pageTitle)
 
void htmlHeadline (Input_t *in, Output_t *out)
 
void htmlTable (Input_t *in, Output_t *out, CString_t &title, const ParamVec_t &params)
 
xdata::InfoSpace * monInfoSpace ()
 
void resetCounters ()
 
void setHyperDAQIcon (CString_t &icon)
 
void setLargeAppIcon (CString_t &icon)
 
void setSmallAppIcon (CString_t &icon)
 
void setSmallDbgIcon (CString_t &icon)
 
 WebGUI (xdaq::Application *app, StateMachine *fsm)
 
virtual ~WebGUI ()
 

Private Member Functions

void addCountersToParams ()
 
void addParamsToInfoSpace (const ParamVec_t &params, xdata::InfoSpace *infoSpace)
 
bool isMonitorParam (CString_t &name)
 
void updateParams ()
 

Private Attributes

xdaq::Application * app_
 
xdata::InfoSpace * appInfoSpace_
 
bool countersAddedToParams_
 
Css css_
 
CounterVec_t debugCounters_
 
ParamVec_t debugParams_
 
StateMachinefsm_
 
std::string hyperDAQIcon_
 
xdata::ActionListener * itemGroupListener_
 
std::string largeAppIcon_
 
Logger log_
 
xdata::InfoSpace * monInfoSpace_
 
CounterVec_t monitorCounters_
 
ParamVec_t monitorParams_
 
bool parametersExported_
 
std::string smallAppIcon_
 
std::string smallCtmIcon_
 
std::string smallDbgIcon_
 
std::string sourceId_
 
CounterVec_t standardCounters_
 
ParamVec_t standardParams_
 
std::string urn_
 

Detailed Description

Definition at line 27 of file WebGUI.h.

Member Typedef Documentation

typedef xdata::UnsignedInteger32 evf::WebGUI::Counter_t

Definition at line 34 of file WebGUI.h.

typedef std::vector<std::pair<std::string,Counter_t*> > evf::WebGUI::CounterVec_t

Definition at line 36 of file WebGUI.h.

typedef const std::string evf::WebGUI::CString_t

Definition at line 40 of file WebGUI.h.

Definition at line 38 of file WebGUI.h.

Definition at line 39 of file WebGUI.h.

typedef xdata::Serializable evf::WebGUI::Param_t

Definition at line 33 of file WebGUI.h.

typedef std::vector<std::pair<std::string,Param_t*> > evf::WebGUI::ParamVec_t

Definition at line 35 of file WebGUI.h.

typedef std::vector<std::pair<std::string,void*> > evf::WebGUI::UpdateVec_t

Definition at line 37 of file WebGUI.h.

typedef xgi::exception::Exception evf::WebGUI::XgiException_t

Definition at line 41 of file WebGUI.h.

Constructor & Destructor Documentation

WebGUI::WebGUI ( xdaq::Application *  app,
StateMachine fsm 
)

Definition at line 32 of file WebGUI.cc.

References app_, appInfoSpace(), appInfoSpace_, css(), debugWebPage(), defaultWebPage(), itemGroupListener_, largeAppIcon_, monInfoSpace(), monInfoSpace_, sourceId_, and urn_.

33  : app_(app)
34  , fsm_(fsm)
35  , log_(app->getApplicationContext()->getLogger())
36  , appInfoSpace_(0)
37  , monInfoSpace_(0)
39  , parametersExported_(false)
40  , countersAddedToParams_(false)
41  , largeAppIcon_("/evf/images/rbicon.jpg")
42  , smallAppIcon_("/evf/images/rbicon.jpg")
43  , smallDbgIcon_("/evf/images/bugicon.jpg")
44  , smallCtmIcon_("/evf/images/spoticon.jpg")
45  , hyperDAQIcon_("/hyperdaq/images/HyperDAQ.jpg")
46 {
47  // initialize application information
48  string appClass=app_->getApplicationDescriptor()->getClassName();
49  unsigned int instance=app_->getApplicationDescriptor()->getInstance();
50  stringstream oss;
51  oss<<appClass<<instance;
52 
53  sourceId_=oss.str();
54  urn_ ="/"+app_->getApplicationDescriptor()->getURN();
55 
56  std::stringstream oss2;
57  oss2<<"urn:xdaq-monitorable-"<<appClass;
58  string monInfoSpaceName=oss2.str();
59  toolbox::net::URN urn = app_->createQualifiedInfoSpace(monInfoSpaceName);
60 
61  appInfoSpace_=app_->getApplicationInfoSpace();
62  monInfoSpace_=xdata::getInfoSpaceFactory()->get(urn.toString());
63  app_->getApplicationDescriptor()->setAttribute("icon",largeAppIcon_);
64 
65  // bind xgi callbacks
66  xgi::bind(this,&WebGUI::defaultWebPage,"defaultWebPage");
67  xgi::bind(this,&WebGUI::debugWebPage, "debugWebPage");
68  xgi::bind(this,&WebGUI::css, "styles.css");
69 
70  // set itemGroupListener
71  itemGroupListener_ = dynamic_cast<xdata::ActionListener*>(app_);
72  if (0!=itemGroupListener_) {
73  appInfoSpace()->addGroupRetrieveListener(itemGroupListener_);
74  monInfoSpace()->addGroupRetrieveListener(itemGroupListener_);
75  }
76 }
StateMachine * fsm_
Definition: WebGUI.h:102
bool parametersExported_
Definition: WebGUI.h:121
std::string smallAppIcon_
Definition: WebGUI.h:125
bool countersAddedToParams_
Definition: WebGUI.h:122
xdata::InfoSpace * appInfoSpace_
Definition: WebGUI.h:109
std::string sourceId_
Definition: WebGUI.h:106
xdaq::Application * app_
Definition: WebGUI.h:101
xdata::InfoSpace * monInfoSpace_
Definition: WebGUI.h:110
xdata::InfoSpace * appInfoSpace()
Definition: WebGUI.h:71
xdata::InfoSpace * monInfoSpace()
Definition: WebGUI.h:72
Logger log_
Definition: WebGUI.h:104
void debugWebPage(Input_t *in, Output_t *out)
Definition: WebGUI.cc:110
std::string urn_
Definition: WebGUI.h:107
void defaultWebPage(Input_t *in, Output_t *out)
Definition: WebGUI.cc:91
std::string largeAppIcon_
Definition: WebGUI.h:124
std::string smallCtmIcon_
Definition: WebGUI.h:127
std::string hyperDAQIcon_
Definition: WebGUI.h:128
xdata::ActionListener * itemGroupListener_
Definition: WebGUI.h:112
std::string smallDbgIcon_
Definition: WebGUI.h:126
void css(Input_t *in, Output_t *out)
Definition: WebGUI.cc:127
WebGUI::~WebGUI ( )
virtual

Definition at line 80 of file WebGUI.cc.

81 {
82 
83 }

Member Function Documentation

void WebGUI::addCountersToParams ( )
private

Definition at line 291 of file WebGUI.cc.

References countersAddedToParams_, debugCounters_, debugParams_, first, i, monitorCounters_, monitorParams_, edm::second(), standardCounters_, and standardParams_.

Referenced by exportParameters().

292 {
293  if (countersAddedToParams_) return;
294 
295  // standard counters
296  for (unsigned int i=0;i<standardCounters_.size();i++) {
297  standardParams_.push_back(make_pair(standardCounters_[i].first,
299  }
300  // monitor counters
301  for (unsigned int i=0;i<monitorCounters_.size();i++) {
302  monitorParams_.push_back(make_pair(monitorCounters_[i].first,
304  }
305  // debug counters
306  for (unsigned int i=0;i<debugCounters_.size();i++) {
307  debugParams_.push_back(make_pair(debugCounters_[i].first,
309  }
311 }
int i
Definition: DBlmapReader.cc:9
CounterVec_t standardCounters_
Definition: WebGUI.h:117
CounterVec_t monitorCounters_
Definition: WebGUI.h:118
bool countersAddedToParams_
Definition: WebGUI.h:122
ParamVec_t standardParams_
Definition: WebGUI.h:114
U second(std::pair< T, U > const &p)
bool first
Definition: L1TdeRCT.cc:79
ParamVec_t monitorParams_
Definition: WebGUI.h:115
CounterVec_t debugCounters_
Definition: WebGUI.h:119
ParamVec_t debugParams_
Definition: WebGUI.h:116
void WebGUI::addDebugCounter ( CString_t name,
Counter_t counter 
)

Definition at line 189 of file WebGUI.cc.

References countersAddedToParams_, debugCounters_, log_, and sourceId_.

Referenced by evf::FUResourceBroker::exportParameters().

190 {
192  LOG4CPLUS_ERROR(log_,"can't add debug counter '"<<name
193  <<"' to WebGUI of "<<sourceId_);
194  }
195  debugCounters_.push_back(make_pair(name,counter));
196 }
bool countersAddedToParams_
Definition: WebGUI.h:122
std::string sourceId_
Definition: WebGUI.h:106
Logger log_
Definition: WebGUI.h:104
CounterVec_t debugCounters_
Definition: WebGUI.h:119
void WebGUI::addDebugParam ( CString_t name,
Param_t param 
)

Definition at line 156 of file WebGUI.cc.

References debugParams_, log_, and parametersExported_.

157 {
158  if (parametersExported_) {
159  LOG4CPLUS_ERROR(log_,"Failed to add debug parameter '"<<name<<"'.");
160  return;
161  }
162  debugParams_.push_back(make_pair(name,param));
163 }
bool parametersExported_
Definition: WebGUI.h:121
Logger log_
Definition: WebGUI.h:104
ParamVec_t debugParams_
Definition: WebGUI.h:116
void WebGUI::addItemChangedListener ( CString_t name,
xdata::ActionListener *  l 
)

Definition at line 238 of file WebGUI.cc.

References appInfoSpace(), edm::hlt::Exception, isMonitorParam(), log_, monInfoSpace(), and parametersExported_.

Referenced by evf::FUResourceBroker::exportParameters(), and evf::BU::exportParameters().

239 {
240  if (!parametersExported_) {
241  LOG4CPLUS_ERROR(log_,"Can't add ItemChangedListener for parameter '"<<name
242  <<"' before WebGUI::exportParameters() is called.");
243  return;
244  }
245 
246  try {
247  appInfoSpace()->addItemChangedListener(name,l);
248  }
249  catch (xcept::Exception) {
250  LOG4CPLUS_ERROR(log_,"failed to add ItemChangedListener to "
251  <<"application infospace for parameter '"<<name<<"'.");
252  }
253 
254  if (isMonitorParam(name)) {
255  try {
256  monInfoSpace()->addItemChangedListener(name,l);
257  }
258  catch (xcept::Exception) {
259  LOG4CPLUS_ERROR(log_,"failed to add ItemChangedListener to "
260  <<"monitor infospace for parameter '"<<name<<"'.");
261  }
262  }
263 
264 }
bool parametersExported_
Definition: WebGUI.h:121
xdata::InfoSpace * appInfoSpace()
Definition: WebGUI.h:71
xdata::InfoSpace * monInfoSpace()
Definition: WebGUI.h:72
Logger log_
Definition: WebGUI.h:104
bool isMonitorParam(CString_t &name)
Definition: WebGUI.cc:315
void WebGUI::addMonitorCounter ( CString_t name,
Counter_t counter 
)

Definition at line 178 of file WebGUI.cc.

References countersAddedToParams_, log_, monitorCounters_, and sourceId_.

Referenced by evf::FUResourceBroker::exportParameters(), and evf::BU::exportParameters().

179 {
181  LOG4CPLUS_ERROR(log_,"can't add monitor counter '"<<name
182  <<"' to WebGUI of "<<sourceId_);
183  }
184  monitorCounters_.push_back(make_pair(name,counter));
185 }
CounterVec_t monitorCounters_
Definition: WebGUI.h:118
bool countersAddedToParams_
Definition: WebGUI.h:122
std::string sourceId_
Definition: WebGUI.h:106
Logger log_
Definition: WebGUI.h:104
void WebGUI::addMonitorParam ( CString_t name,
Param_t param 
)

Definition at line 145 of file WebGUI.cc.

References log_, monitorParams_, and parametersExported_.

Referenced by evf::FUResourceBroker::exportParameters(), and evf::BU::exportParameters().

146 {
147  if (parametersExported_) {
148  LOG4CPLUS_ERROR(log_,"Failed to add monitor parameter '"<<name<<"'.");
149  return;
150  }
151  monitorParams_.push_back(make_pair(name,param));
152 }
bool parametersExported_
Definition: WebGUI.h:121
ParamVec_t monitorParams_
Definition: WebGUI.h:115
Logger log_
Definition: WebGUI.h:104
void WebGUI::addParamsToInfoSpace ( const ParamVec_t params,
xdata::InfoSpace *  infoSpace 
)
private

Definition at line 272 of file WebGUI.cc.

References ExpressReco_HICollisions_FallBack::e, edm::hlt::Exception, i, log_, AlCaRecoCosmics_cfg::name, and relativeConstraints::value.

Referenced by exportParameters().

274 {
275  for (unsigned int i=0;i<params.size();i++) {
276  string name =params[i].first;
277  Param_t* value=params[i].second;
278  try {
279  infoSpace->fireItemAvailable(name,value);
280  }
281  catch (xcept::Exception &e) {
282  LOG4CPLUS_ERROR(log_,"Can't add parameter '"<<name<<"' to info space '"
283  <<infoSpace->name()<<"': "
284  <<xcept::stdformat_exception_history(e));
285  }
286  }
287 }
int i
Definition: DBlmapReader.cc:9
xdata::Serializable Param_t
Definition: WebGUI.h:33
Logger log_
Definition: WebGUI.h:104
void WebGUI::addStandardCounter ( CString_t name,
Counter_t counter 
)

Definition at line 167 of file WebGUI.cc.

References countersAddedToParams_, log_, sourceId_, and standardCounters_.

168 {
170  LOG4CPLUS_ERROR(log_,"can't add standard counter '"<<name
171  <<"' to WebGUI of "<<sourceId_);
172  }
173  standardCounters_.push_back(make_pair(name,counter));
174 }
CounterVec_t standardCounters_
Definition: WebGUI.h:117
bool countersAddedToParams_
Definition: WebGUI.h:122
std::string sourceId_
Definition: WebGUI.h:106
Logger log_
Definition: WebGUI.h:104
void WebGUI::addStandardParam ( CString_t name,
Param_t param 
)

Definition at line 134 of file WebGUI.cc.

References log_, parametersExported_, and standardParams_.

Referenced by evf::FUResourceBroker::exportParameters(), and evf::BU::exportParameters().

135 {
136  if (parametersExported_) {
137  LOG4CPLUS_ERROR(log_,"Failed to add standard parameter '"<<name<<"'.");
138  return;
139  }
140  standardParams_.push_back(make_pair(name,param));
141 }
bool parametersExported_
Definition: WebGUI.h:121
ParamVec_t standardParams_
Definition: WebGUI.h:114
Logger log_
Definition: WebGUI.h:104
xdata::InfoSpace* evf::WebGUI::appInfoSpace ( )
inline

Definition at line 71 of file WebGUI.h.

References appInfoSpace_.

Referenced by addItemChangedListener(), exportParameters(), updateParams(), and WebGUI().

71 { return appInfoSpace_; }
xdata::InfoSpace * appInfoSpace_
Definition: WebGUI.h:109
void WebGUI::css ( Input_t in,
Output_t out 
)
throw (XgiException_t
)

Definition at line 127 of file WebGUI.cc.

References recoMuon::in, and dbtoconf::out.

Referenced by WebGUI().

128 {
129  css_.css(in,out);
130 }
Css css_
Definition: WebGUI.h:103
void css(xgi::Input *in, xgi::Output *out)
Definition: Css.h:15
tuple out
Definition: dbtoconf.py:99
void WebGUI::debugWebPage ( Input_t in,
Output_t out 
)
throw (XgiException_t
)

Definition at line 110 of file WebGUI.cc.

References recoMuon::in, and dbtoconf::out.

Referenced by WebGUI().

111 {
112  updateParams();
113 
114  *out<<"<html>"<<endl;
115  htmlHead(in,out,sourceId_+" [DEBUG]");
116  *out<<body()<<endl;
118  *out<<"<table cellpadding=\"25\"><tr valign=\"top\"><td>"<<endl;
119  htmlTable(in,out,"Debug Parameters",debugParams_);
120  *out<<"</td></tr></table>"<<endl;
121  *out<<body()<<endl<<"</html>"<<endl;
122  return;
123 }
void htmlTable(Input_t *in, Output_t *out, CString_t &title, const ParamVec_t &params)
Definition: WebGUI.cc:335
void updateParams()
Definition: WebGUI.cc:325
void htmlHead(Input_t *in, Output_t *out, CString_t &pageTitle)
Definition: WebGUI.cc:365
std::string sourceId_
Definition: WebGUI.h:106
tuple out
Definition: dbtoconf.py:99
void htmlHeadline(Input_t *in, Output_t *out)
Definition: WebGUI.cc:375
ParamVec_t debugParams_
Definition: WebGUI.h:116
void WebGUI::defaultWebPage ( Input_t in,
Output_t out 
)
throw (XgiException_t
)

Definition at line 91 of file WebGUI.cc.

References recoMuon::in, and dbtoconf::out.

Referenced by WebGUI().

92 {
93  updateParams();
94 
95  *out<<"<html>"<<endl;
97  *out<<body()<<endl;
99  *out<<"<table cellpadding=\"25\"><tr valign=\"top\"><td>"<<endl;
100  htmlTable(in,out,"Standard Parameters",standardParams_);
101  *out<<"</td><td>"<<endl;
102  htmlTable(in,out,"Monitored Parameters",monitorParams_);
103  *out<<"</td></tr></table>"<<endl;
104  *out<<body()<<endl<<"</html>"<<endl;
105  return;
106 }
void htmlTable(Input_t *in, Output_t *out, CString_t &title, const ParamVec_t &params)
Definition: WebGUI.cc:335
void updateParams()
Definition: WebGUI.cc:325
void htmlHead(Input_t *in, Output_t *out, CString_t &pageTitle)
Definition: WebGUI.cc:365
ParamVec_t standardParams_
Definition: WebGUI.h:114
std::string sourceId_
Definition: WebGUI.h:106
ParamVec_t monitorParams_
Definition: WebGUI.h:115
tuple out
Definition: dbtoconf.py:99
void htmlHeadline(Input_t *in, Output_t *out)
Definition: WebGUI.cc:375
void WebGUI::exportParameters ( )

Definition at line 200 of file WebGUI.cc.

References addCountersToParams(), addParamsToInfoSpace(), appInfoSpace(), countersAddedToParams_, debugParams_, monInfoSpace(), monitorParams_, parametersExported_, and standardParams_.

Referenced by evf::FUResourceBroker::exportParameters(), and evf::BU::exportParameters().

201 {
202  if (parametersExported_) return;
203 
205 
209 
211 
212  parametersExported_=true;
213 }
bool parametersExported_
Definition: WebGUI.h:121
void addCountersToParams()
Definition: WebGUI.cc:291
bool countersAddedToParams_
Definition: WebGUI.h:122
ParamVec_t standardParams_
Definition: WebGUI.h:114
ParamVec_t monitorParams_
Definition: WebGUI.h:115
xdata::InfoSpace * appInfoSpace()
Definition: WebGUI.h:71
xdata::InfoSpace * monInfoSpace()
Definition: WebGUI.h:72
void addParamsToInfoSpace(const ParamVec_t &params, xdata::InfoSpace *infoSpace)
Definition: WebGUI.cc:272
ParamVec_t debugParams_
Definition: WebGUI.h:116
void WebGUI::htmlHead ( Input_t in,
Output_t out,
CString_t pageTitle 
)

Definition at line 365 of file WebGUI.cc.

References link(), indexGen::title, and urn_.

366 {
367  *out<<head()<<endl<<cgicc::link().set("type","text/css")
368  .set("rel","stylesheet")
369  .set("href",urn_+"/styles.css")
370  <<endl<<title(pageTitle.c_str())<<endl<<head()<<endl;
371 }
std::string link(std::string &nm, std::string &ns)
Definition: hierarchy.cc:47
tuple out
Definition: dbtoconf.py:99
std::string urn_
Definition: WebGUI.h:107
void WebGUI::htmlHeadline ( Input_t in,
Output_t out 
)

Definition at line 375 of file WebGUI.cc.

References a, b, fsm_, hyperDAQIcon_, BuildWebpage::img, largeAppIcon_, smallAppIcon_, smallCtmIcon_, smallDbgIcon_, sourceId_, evf::StateMachine::stateName(), asciidump::table, and urn_.

376 {
377  string stateName=fsm_->stateName()->toString();
378 
379  *out<<table().set("border","0").set("width","100%")<<endl
380  <<tr()<<td().set("align","left")<<endl
381  <<img().set("align","middle").set("src",largeAppIcon_)
382  .set("alt","main") .set("width","64")
383  .set("height","64") .set("border","")
384  <<endl
385  <<b()<<sourceId_<<" "<<stateName<<b()<<endl
386  <<td()<<endl
387  <<td().set("width","32")<<endl
388  <<a().set("href","/urn:xdaq-application:lid=3")
389  <<img().set("align","middle").set("src",hyperDAQIcon_)
390  .set("alt","HyperDAQ").set("width","32")
391  .set("height","32") .set("border","")
392  <<a()
393  <<td()<<endl
394  <<td().set("width","32")<<td()
395  <<td().set("width","32")
396  <<a().set("href",urn_+"/defaultWebPage")
397  <<img().set("align","middle").set("src",smallAppIcon_)
398  .set("alt","Debug") .set("width","32")
399  .set("height","32") .set("border","")
400  <<a()
401  <<td()<<endl
402  <<td().set("width","32")<<td()
403  <<td().set("width","32")
404  <<a().set("href",urn_+"/debugWebPage")
405  <<img().set("align","middle").set("src",smallDbgIcon_)
406  .set("alt","Debug") .set("width","32")
407  .set("height","32") .set("border","")
408  <<a()
409  <<td()<<endl
410  <<td().set("width","32")<<td()
411  <<td().set("width","32")
412  <<a().set("href",urn_+"/customWebPage")
413  <<img().set("align","middle").set("src",smallCtmIcon_)
414  .set("alt","Debug") .set("width","32")
415  .set("height","32") .set("border","")
416  <<a()
417  <<td()<<tr()<<table()<<endl;
418  *out<<hr()<<endl;
419 }
list table
Definition: asciidump.py:386
StateMachine * fsm_
Definition: WebGUI.h:102
std::string smallAppIcon_
Definition: WebGUI.h:125
std::string sourceId_
Definition: WebGUI.h:106
tuple out
Definition: dbtoconf.py:99
xdata::String * stateName()
Definition: StateMachine.h:69
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
std::string urn_
Definition: WebGUI.h:107
std::string largeAppIcon_
Definition: WebGUI.h:124
std::string smallCtmIcon_
Definition: WebGUI.h:127
std::string hyperDAQIcon_
Definition: WebGUI.h:128
std::string smallDbgIcon_
Definition: WebGUI.h:126
void WebGUI::htmlTable ( Input_t in,
Output_t out,
CString_t title,
const ParamVec_t params 
)

Definition at line 335 of file WebGUI.cc.

References ExpressReco_HICollisions_FallBack::e, edm::hlt::Exception, first, i, and asciidump::table.

337 {
338  *out<<table().set("frame","void").set("rules","rows")
339  .set("class","modules").set("width","300")<<endl
340  <<tr()<<th(title).set("colspan","2")<<tr()<<endl
341  <<tr()
342  <<th("Parameter").set("align","left")
343  <<th("Value").set("align","right")
344  <<tr()
345  <<endl;
346 
347  for (unsigned int i=0;i<params.size();i++) {
348  string valueAsString;
349  try {
350  valueAsString = params[i].second->toString();
351  }
352  catch (xcept::Exception& e) {
353  valueAsString = e.what();
354  }
355  *out<<tr()
356  <<td(params[i].first).set("align","left")
357  <<td(valueAsString).set("align","right")
358  <<tr()<<endl;
359  }
360  *out<<table()<<endl;
361 }
list table
Definition: asciidump.py:386
int i
Definition: DBlmapReader.cc:9
bool first
Definition: L1TdeRCT.cc:79
tuple out
Definition: dbtoconf.py:99
bool WebGUI::isMonitorParam ( CString_t name)
private

Definition at line 315 of file WebGUI.cc.

References monitorParams_.

Referenced by addItemChangedListener().

316 {
317  ParamVec_t::const_iterator it;
318  for (it=monitorParams_.begin();it!=monitorParams_.end();++it)
319  if (it->first==name) return true;
320  return false;
321 }
ParamVec_t monitorParams_
Definition: WebGUI.h:115
xdata::InfoSpace* evf::WebGUI::monInfoSpace ( )
inline
void WebGUI::resetCounters ( )

Definition at line 217 of file WebGUI.cc.

References cmsDriverOptions::counter, debugCounters_, i, monitorCounters_, and standardCounters_.

Referenced by evf::FUResourceBroker::reset(), and evf::BU::reset().

218 {
219  // standard counters
220  for (unsigned int i=0;i<standardCounters_.size();i++) {
222  *counter=0;
223  }
224  // monitor counters
225  for (unsigned int i=0;i<monitorCounters_.size();i++) {
227  *counter=0;
228  }
229  // debug counters
230  for (unsigned int i=0;i<debugCounters_.size();i++) {
232  *counter=0;
233  }
234 }
xdata::UnsignedInteger32 Counter_t
Definition: WebGUI.h:34
int i
Definition: DBlmapReader.cc:9
CounterVec_t standardCounters_
Definition: WebGUI.h:117
CounterVec_t monitorCounters_
Definition: WebGUI.h:118
CounterVec_t debugCounters_
Definition: WebGUI.h:119
void evf::WebGUI::setHyperDAQIcon ( CString_t icon)
inline

Definition at line 77 of file WebGUI.h.

References hyperDAQIcon_.

77 { hyperDAQIcon_=icon; }
std::string hyperDAQIcon_
Definition: WebGUI.h:128
void evf::WebGUI::setLargeAppIcon ( CString_t icon)
inline

Definition at line 74 of file WebGUI.h.

References largeAppIcon_.

Referenced by evf::BU::BU().

74 { largeAppIcon_=icon; }
std::string largeAppIcon_
Definition: WebGUI.h:124
void evf::WebGUI::setSmallAppIcon ( CString_t icon)
inline

Definition at line 75 of file WebGUI.h.

References smallAppIcon_.

Referenced by evf::BU::BU().

75 { smallAppIcon_=icon; }
std::string smallAppIcon_
Definition: WebGUI.h:125
void evf::WebGUI::setSmallDbgIcon ( CString_t icon)
inline

Definition at line 76 of file WebGUI.h.

References smallDbgIcon_.

76 { smallDbgIcon_=icon; }
std::string smallDbgIcon_
Definition: WebGUI.h:126
void WebGUI::updateParams ( )
private

Definition at line 325 of file WebGUI.cc.

References appInfoSpace(), and itemGroupListener_.

326 {
327  if (0!=itemGroupListener_) {
328  std::list<std::string> emptyList;
329  appInfoSpace()->fireItemGroupRetrieve(emptyList,itemGroupListener_);
330  }
331 }
xdata::InfoSpace * appInfoSpace()
Definition: WebGUI.h:71
xdata::ActionListener * itemGroupListener_
Definition: WebGUI.h:112

Member Data Documentation

xdaq::Application* evf::WebGUI::app_
private

Definition at line 101 of file WebGUI.h.

Referenced by WebGUI().

xdata::InfoSpace* evf::WebGUI::appInfoSpace_
private

Definition at line 109 of file WebGUI.h.

Referenced by appInfoSpace(), and WebGUI().

bool evf::WebGUI::countersAddedToParams_
private
Css evf::WebGUI::css_
private

Definition at line 103 of file WebGUI.h.

CounterVec_t evf::WebGUI::debugCounters_
private

Definition at line 119 of file WebGUI.h.

Referenced by addCountersToParams(), addDebugCounter(), and resetCounters().

ParamVec_t evf::WebGUI::debugParams_
private

Definition at line 116 of file WebGUI.h.

Referenced by addCountersToParams(), addDebugParam(), and exportParameters().

StateMachine* evf::WebGUI::fsm_
private

Definition at line 102 of file WebGUI.h.

Referenced by htmlHeadline().

std::string evf::WebGUI::hyperDAQIcon_
private

Definition at line 128 of file WebGUI.h.

Referenced by htmlHeadline(), and setHyperDAQIcon().

xdata::ActionListener* evf::WebGUI::itemGroupListener_
private

Definition at line 112 of file WebGUI.h.

Referenced by updateParams(), and WebGUI().

std::string evf::WebGUI::largeAppIcon_
private

Definition at line 124 of file WebGUI.h.

Referenced by htmlHeadline(), setLargeAppIcon(), and WebGUI().

Logger evf::WebGUI::log_
private
xdata::InfoSpace* evf::WebGUI::monInfoSpace_
private

Definition at line 110 of file WebGUI.h.

Referenced by monInfoSpace(), and WebGUI().

CounterVec_t evf::WebGUI::monitorCounters_
private

Definition at line 118 of file WebGUI.h.

Referenced by addCountersToParams(), addMonitorCounter(), and resetCounters().

ParamVec_t evf::WebGUI::monitorParams_
private

Definition at line 115 of file WebGUI.h.

Referenced by addCountersToParams(), addMonitorParam(), exportParameters(), and isMonitorParam().

bool evf::WebGUI::parametersExported_
private
std::string evf::WebGUI::smallAppIcon_
private

Definition at line 125 of file WebGUI.h.

Referenced by htmlHeadline(), and setSmallAppIcon().

std::string evf::WebGUI::smallCtmIcon_
private

Definition at line 127 of file WebGUI.h.

Referenced by htmlHeadline().

std::string evf::WebGUI::smallDbgIcon_
private

Definition at line 126 of file WebGUI.h.

Referenced by htmlHeadline(), and setSmallDbgIcon().

std::string evf::WebGUI::sourceId_
private
CounterVec_t evf::WebGUI::standardCounters_
private

Definition at line 117 of file WebGUI.h.

Referenced by addCountersToParams(), addStandardCounter(), and resetCounters().

ParamVec_t evf::WebGUI::standardParams_
private

Definition at line 114 of file WebGUI.h.

Referenced by addCountersToParams(), addStandardParam(), and exportParameters().

std::string evf::WebGUI::urn_
private

Definition at line 107 of file WebGUI.h.

Referenced by htmlHead(), htmlHeadline(), and WebGUI().