CMS 3D CMS Logo

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

Public Member Functions

void defaultWebPage (xgi::Input *in, xgi::Output *out)
 XDAQ web page. More...
 
 EcalBarrelMonitorXdaqClient (const edm::ParameterSet &ps)
 Constructor. More...
 
void publish (xdata::InfoSpace *)
 
virtual ~EcalBarrelMonitorXdaqClient ()
 Destructor. More...
 
- Public Member Functions inherited from EcalBarrelMonitorClient
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...
 
 EcalBarrelMonitorClient (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 ~EcalBarrelMonitorClient ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 32 of file EcalBarrelMonitorXdaqClient.cc.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 37 of file EcalBarrelMonitorXdaqClient.cc.

Referenced by defaultWebPage().

37 : EcalBarrelMonitorClient(ps), ModuleWeb("EcalBarrelMonitorXdaqClient") {};
EcalBarrelMonitorClient(const edm::ParameterSet &ps)
Constructor.
virtual EcalBarrelMonitorXdaqClient::~EcalBarrelMonitorXdaqClient ( )
inlinevirtual

Destructor.

Definition at line 40 of file EcalBarrelMonitorXdaqClient.cc.

40 {};

Member Function Documentation

void EcalBarrelMonitorXdaqClient::defaultWebPage ( xgi::Input in,
xgi::Output out 
)
inline

XDAQ web page.

Definition at line 43 of file EcalBarrelMonitorXdaqClient.cc.

References dtNoiseDBValidation_cfg::cerr, EcalBarrelMonitorClient::clients_, EcalBarrelMonitorClient::clientsNames_, alignCSCRings::e, EcalBarrelMonitorXdaqClient(), cppFunctionSkipper::exception, EcalBarrelMonitorClient::getRunType(), EcalBarrelMonitorClient::h_, cmsCodeRulesChecker::html, i, EcalBarrelMonitorClient::ievt_, input, j, mergeVDriftHistosByStation::name, nevt, getHLTPrescaleColumns::path, EcalBarrelMonitorClient::run_, EcalBarrelMonitorClient::runTypes_, and AlCaHLTBitMon_QueryRunRegistry::string.

43  {
44 
46  std::string mname;
47 
48  static bool autorefresh_ = false;
49 
50  try {
51 
52  cgicc::Cgicc cgi(in);
53 
54  if ( xgi::Utils::hasFormElement(cgi,"autorefresh") ) {
55  autorefresh_ = xgi::Utils::getFormElement(cgi, "autorefresh")->getIntegerValue() != 0;
56  }
57 
58  if ( xgi::Utils::hasFormElement(cgi,"module") ) {
59  mname = xgi::Utils::getFormElement(cgi, "module")->getValue();
60  }
61 
62  cgicc::CgiEnvironment cgie(in);
63  path = cgie.getPathInfo() + "?" + cgie.getQueryString();
64 
65  } catch (std::exception &e) {
66 
67  std::cerr << "Standard C++ exception : " << e.what() << std::endl;
68 
69  }
70 
71  *out << cgicc::HTMLDoctype(cgicc::HTMLDoctype::eStrict) << std::endl;
72  *out << cgicc::html().set("lang", "en").set("dir","ltr") << std::endl;
73 
74  *out << "<html>" << std::endl;
75 
76  *out << "<head>" << std::endl;
77 
78  *out << "<title>" << typeid(EcalBarrelMonitorXdaqClient).name()
79  << " MAIN</title>" << std::endl;
80 
81  if ( autorefresh_ ) {
82  *out << "<meta http-equiv=\"refresh\" content=\"3\">" << std::endl;
83  }
84 
85  *out << "</head>" << std::endl;
86 
87  *out << "<body>" << std::endl;
88 
89  *out << cgicc::form().set("method","GET").set("action", path )
90  << std::endl;
91  *out << cgicc::input().set("type","hidden").set("name","module").set("value", mname)
92  << std::endl;
93  *out << cgicc::input().set("type","hidden").set("name","autorefresh").set("value", autorefresh_?"0":"1")
94  << std::endl;
95  *out << cgicc::input().set("type","submit").set("value",autorefresh_?"Toggle AutoRefresh OFF":"Toggle AutoRefresh ON")
96  << std::endl;
97  *out << cgicc::form() << std::endl;
98 
99  *out << cgicc::h3( "EcalBarrelMonitorXdaqClient Status" ).set( "style", "font-family:arial" ) << std::endl;
100 
101  *out << "<table style=\"font-family: arial\"><tr><td>" << std::endl;
102 
103  *out << "<p style=\"font-family: arial\">"
104  << "<table border=1>"
105  << "<tr><th>Cycle</th><td align=right>" << ievt_;
106  int nevt = 0;
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;
112 
113  *out << "</td><td>" << std::endl;
114 
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>";
121  nevt = 0;
122  if ( h_ != 0 ) nevt = int( h_->GetBinContent(i+1) );
123  *out << "<td>" << runTypes_[i]
124  << "</td><td align=right>" << nevt << std::endl;
125  }
126  }
127  *out << "</td></table></p>" << std::endl;
128 
129  *out << "</td><tr><td colspan=2>" << std::endl;
130 
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++ ) {
135  if ( clients_[i] != 0 ) {
136  if ( i%2 == 0 ) *out << "<tr>";
137  *out << "<td>" << clientsNames_[i]
138  << "</td><td align=right>" << clients_[i]->getEvtPerJob()
139  << "</td><td align=right>" << clients_[i]->getEvtPerRun() << std::endl;
140  }
141  }
142  *out << "</td></table></p>" << std::endl;
143 
144  *out << "</td><tr><td>" << std::endl;
145 
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;
154 
155  *out << "</td><td colsapn=2>" << std::endl;
156 
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;
164 
165  *out << "</td><tr><td>" << std::endl;
166 
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;
174 
175  *out << "</td><td colspan=2>" << std::endl;
176 
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;
183 #endif
184 
185  *out << "</td><table>" << std::endl;
186 
187  *out << "</body>" << std::endl;
188 
189  *out << "</html>" << std::endl;
190 
191  };
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > clientsNames_
static std::string const input
Definition: EdmProvDump.cc:44
int j
Definition: DBlmapReader.cc:9
std::vector< EBClient * > clients_
tuple out
Definition: dbtoconf.py:99
std::vector< std::string > runTypes_
EcalBarrelMonitorXdaqClient(const edm::ParameterSet &ps)
Constructor.
void EcalBarrelMonitorXdaqClient::publish ( xdata::InfoSpace *  )
inline

Definition at line 193 of file EcalBarrelMonitorXdaqClient.cc.

193 {};