CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
EcalEndcapMonitorXdaqClient Class Reference
Inheritance diagram for EcalEndcapMonitorXdaqClient:
EcalEndcapMonitorClient evf::ModuleWeb edm::EDAnalyzer

Public Member Functions

void defaultWebPage (xgi::Input *in, xgi::Output *out)
 XDAQ web page. More...
 
 EcalEndcapMonitorXdaqClient (const edm::ParameterSet &ps)
 Constructor. More...
 
void publish (xdata::InfoSpace *)
 
virtual ~EcalEndcapMonitorXdaqClient ()
 Destructor. More...
 
- Public Member Functions inherited from EcalEndcapMonitorClient
void analyze (void)
 Analyze. More...
 
void analyze (const edm::Event &e, const edm::EventSetup &c)
 
void beginJob (void)
 BeginJob. More...
 
void beginLuminosityBlock (const edm::LuminosityBlock &l, const edm::EventSetup &c)
 BeginLumiBlock. More...
 
void beginRun (void)
 BeginRun. More...
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 
void beginRunDb (void)
 BeginRunDB. More...
 
void cleanup (void)
 Cleanup. More...
 
 EcalEndcapMonitorClient (const edm::ParameterSet &ps)
 Constructor. More...
 
void endJob (void)
 EndJob. More...
 
void endLuminosityBlock (const edm::LuminosityBlock &l, const edm::EventSetup &c)
 EndLumiBlock. More...
 
void endRun (void)
 EndRun. More...
 
void endRun (const edm::Run &r, const edm::EventSetup &c)
 
void endRunDb (void)
 EndRunDB. More...
 
const char * getRunType (void)
 
void reset (void)
 Reset. More...
 
void setup (void)
 Setup. More...
 
void softReset (bool flag)
 SoftReset. More...
 
void writeDb (void)
 WriteDB. More...
 
virtual ~EcalEndcapMonitorClient ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from evf::ModuleWeb
 ModuleWeb (const std::string &)
 
virtual void publishToXmas (xdata::InfoSpace *)
 
virtual ~ModuleWeb ()
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 
- Protected Attributes inherited from evf::ModuleWeb
std::string moduleName_
 

Detailed Description

Definition at line 34 of file EcalEndcapMonitorXdaqClient.cc.

Constructor & Destructor Documentation

EcalEndcapMonitorXdaqClient::EcalEndcapMonitorXdaqClient ( const edm::ParameterSet ps)
inline

Constructor.

Definition at line 39 of file EcalEndcapMonitorXdaqClient.cc.

Referenced by defaultWebPage().

39 : EcalEndcapMonitorClient(ps), ModuleWeb("EcalEndcapMonitorXdaqClient") {};
EcalEndcapMonitorClient(const edm::ParameterSet &ps)
Constructor.
ModuleWeb(const std::string &)
Definition: ModuleWeb.cc:14
virtual EcalEndcapMonitorXdaqClient::~EcalEndcapMonitorXdaqClient ( )
inlinevirtual

Destructor.

Definition at line 42 of file EcalEndcapMonitorXdaqClient.cc.

42 {};

Member Function Documentation

void EcalEndcapMonitorXdaqClient::defaultWebPage ( xgi::Input in,
xgi::Output out 
)
inlinevirtual

XDAQ web page.

Reimplemented from evf::ModuleWeb.

Definition at line 45 of file EcalEndcapMonitorXdaqClient.cc.

References ExpressReco_HICollisions_FallBack::cerr, EcalEndcapMonitorClient::clients_, EcalEndcapMonitorClient::clientsNames_, ExpressReco_HICollisions_FallBack::e, EcalEndcapMonitorXdaqClient(), cmsCodeRules.cppFunctionSkipper::exception, EcalEndcapMonitorClient::getRunType(), EcalEndcapMonitorClient::h_, cmsCodeRulesChecker::html, i, EcalEndcapMonitorClient::ievt_, collect_tpl::input, j, AlCaRecoCosmics_cfg::name, path(), EcalEndcapMonitorClient::run_, and EcalEndcapMonitorClient::runTypes_.

45  {
46 
47  std::string path;
48  std::string mname;
49 
50  static bool autorefresh_ = false;
51 
52  try {
53 
54  cgicc::Cgicc cgi(in);
55 
56  if ( xgi::Utils::hasFormElement(cgi,"autorefresh") ) {
57  autorefresh_ = xgi::Utils::getFormElement(cgi, "autorefresh")->getIntegerValue() != 0;
58  }
59 
60  if ( xgi::Utils::hasFormElement(cgi,"module") ) {
61  mname = xgi::Utils::getFormElement(cgi, "module")->getValue();
62  }
63 
64  cgicc::CgiEnvironment cgie(in);
65  path = cgie.getPathInfo() + "?" + cgie.getQueryString();
66 
67  } catch (std::exception &e) {
68 
69  std::cerr << "Standard C++ exception : " << e.what() << std::endl;
70 
71  }
72 
73  *out << cgicc::HTMLDoctype(cgicc::HTMLDoctype::eStrict) << std::endl;
74  *out << cgicc::html().set("lang", "en").set("dir","ltr") << std::endl;
75 
76  *out << "<html>" << std::endl;
77 
78  *out << "<head>" << std::endl;
79 
80  *out << "<title>" << typeid(EcalEndcapMonitorXdaqClient).name()
81  << " MAIN</title>" << std::endl;
82 
83  if ( autorefresh_ ) {
84  *out << "<meta http-equiv=\"refresh\" content=\"3\">" << std::endl;
85  }
86 
87  *out << "</head>" << std::endl;
88 
89  *out << "<body>" << std::endl;
90 
91  *out << cgicc::form().set("method","GET").set("action", path )
92  << std::endl;
93  *out << cgicc::input().set("type","hidden").set("name","module").set("value", mname)
94  << std::endl;
95  *out << cgicc::input().set("type","hidden").set("name","autorefresh").set("value", autorefresh_?"0":"1")
96  << std::endl;
97  *out << cgicc::input().set("type","submit").set("value",autorefresh_?"Toggle AutoRefresh OFF":"Toggle AutoRefresh ON")
98  << std::endl;
99  *out << cgicc::form() << std::endl;
100 
101  *out << cgicc::h3( "EcalEndcapMonitorXdaqClient Status" ).set( "style", "font-family:arial" ) << std::endl;
102 
103  *out << "<table style=\"font-family: arial\"><tr><td>" << std::endl;
104 
105  *out << "<p style=\"font-family: arial\">"
106  << "<table border=1>"
107  << "<tr><th>Cycle</th><td align=right>" << ievt_;
108  int nevt = 0;
109  if ( h_ != 0 ) nevt = int( h_->GetEntries());
110  *out << "<tr><th>Event</th><td align=right>" << nevt
111  << "</td><tr><th>Run</th><td align=right>" << run_
112  << "</td><tr><th>Run Type</th><td align=right> " << this->getRunType()
113  << "</td></table></p>" << std::endl;
114 
115  *out << "</td><td>" << std::endl;
116 
117  *out << "<p style=\"font-family: arial\">"
118  << "<table border=1>"
119  << "<tr><th>Evt Type</th><th>Evt/Run</th><th>Evt Type</th><th>Evt/Run</th>" << std::endl;
120  for( unsigned int i = 0, j = 0; i < runTypes_.size(); i++ ) {
121  if ( strcmp(runTypes_[i].c_str(), "UNKNOWN") != 0 ) {
122  if ( j++%2 == 0 ) *out << "<tr>";
123  nevt = 0;
124  if ( h_ != 0 ) nevt = int( h_->GetBinContent(i+1) );
125  *out << "<td>" << runTypes_[i]
126  << "</td><td align=right>" << nevt << std::endl;
127  }
128  }
129  *out << "</td></table></p>" << std::endl;
130 
131  *out << "</td><tr><td colspan=2>" << std::endl;
132 
133  *out << "<p style=\"font-family: arial\">"
134  << "<table border=1>"
135  << "<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;
136  for( unsigned int i = 0; i < clients_.size(); i++ ) {
137  if ( clients_[i] != 0 ) {
138  if ( i%2 == 0 ) *out << "<tr>";
139  *out << "<td>" << clientsNames_[i]
140  << "</td><td align=right>" << clients_[i]->getEvtPerJob()
141  << "</td><td align=right>" << clients_[i]->getEvtPerRun() << std::endl;
142  }
143  }
144  *out << "</td></table></p>" << std::endl;
145 
146  *out << "</td><tr><td>" << std::endl;
147 
148 #ifdef WITH_ECAL_COND_DB
149  *out << "<p style=\"font-family: arial\">"
150  << "<table border=1>"
151  << "<tr><th colspan=2>RunIOV</th>"
152  << "<tr><td>Run Number</td><td align=right> " << runiov_.getRunNumber()
153  << "</td><tr><td>Run Start</td><td align=right> " << runiov_.getRunStart().str()
154  << "</td><tr><td>Run End</td><td align=right> " << runiov_.getRunEnd().str()
155  << "</td></table></p>" << std::endl;
156 
157  *out << "</td><td colsapn=2>" << std::endl;
158 
159  *out << "<p style=\"font-family: arial\">"
160  << "<table border=1>"
161  << "<tr><th colspan=2>RunTag</th>"
162  << "<tr><td>GeneralTag</td><td align=right> " << runiov_.getRunTag().getGeneralTag()
163  << "</td><tr><td>Location</td><td align=right> " << runiov_.getRunTag().getLocationDef().getLocation()
164  << "</td><tr><td>Run Type</td><td align=right> " << runiov_.getRunTag().getRunTypeDef().getRunType()
165  << "</td></table></p>" << std::endl;
166 
167  *out << "</td><tr><td>" << std::endl;
168 
169  *out << "<p style=\"font-family: arial\">"
170  << "<table border=1>"
171  << "<tr><th colspan=2>MonRunIOV</th>"
172  << "<tr><td>SubRun Number</td><td align=right> " << moniov_.getSubRunNumber()
173  << "</td><tr><td>SubRun Start</td><td align=right> " << moniov_.getSubRunStart().str()
174  << "</td><tr><td>SubRun End</td><td align=right> " << moniov_.getSubRunEnd().str()
175  << "</td></table></p>" << std::endl;
176 
177  *out << "</td><td colspan=2>" << std::endl;
178 
179  *out << "<p style=\"font-family: arial\">"
180  << "<table border=1>"
181  << "<tr><th colspan=2>MonRunTag</th>"
182  << "<tr><td>GeneralTag</td><td align=right> " << moniov_.getMonRunTag().getGeneralTag()
183  << "</td><tr><td>Monitoring Version</td><td align=right> " << moniov_.getMonRunTag().getMonVersionDef().getMonitoringVersion()
184  << "</td></table></p>" << std::endl;
185 #endif
186 
187  *out << "</td><table>" << std::endl;
188 
189  *out << "</body>" << std::endl;
190 
191  *out << "</html>" << std::endl;
192 
193  };
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > runTypes_
EcalEndcapMonitorXdaqClient(const edm::ParameterSet &ps)
Constructor.
int path() const
Definition: HLTadd.h:3
std::vector< std::string > clientsNames_
int j
Definition: DBlmapReader.cc:9
tuple input
Definition: collect_tpl.py:10
tuple out
Definition: dbtoconf.py:99
std::vector< EEClient * > clients_
void EcalEndcapMonitorXdaqClient::publish ( xdata::InfoSpace *  )
inlinevirtual

Implements evf::ModuleWeb.

Definition at line 195 of file EcalEndcapMonitorXdaqClient.cc.

195 {};