3 #include <boost/algorithm/string.hpp> 4 #include <boost/format.hpp> 5 #include <boost/algorithm/string/predicate.hpp> 19 const char* x = getenv(
"DQM2_SOCKET");
21 std::cerr <<
"Monitoring pipe: " << x << std::endl;
22 mstream_.connect(boost::asio::local::stream_protocol::endpoint(x));
24 std::cerr <<
"Monitoring file not found, disabling." << std::endl;
44 using std::chrono::duration_cast;
45 using std::chrono::milliseconds;
53 doc.put(
"cmssw_run",
run_);
54 doc.put(
"cmssw_lumi",
lumi_);
62 if ((lumi_last > 0) && (lumi_millis > 0)) {
63 doc.put(
"lumi_number", lumi_last);
64 doc.put(
"lumi_events", lumi_events);
65 doc.put(
"lumi_duration_ms", lumi_millis);
67 float rate = ((
float)lumi_events * 1000) / lumi_millis;
68 doc.put(
"events_rate", rate);
72 plumi.put(
"n", lumi_last);
73 plumi.put(
"nevents", lumi_events);
74 plumi.put(
"nmillis", lumi_millis);
75 plumi.put(
"rate", rate);
85 using std::chrono::duration_cast;
86 using std::chrono::milliseconds;
106 using std::chrono::duration_cast;
107 using std::chrono::milliseconds;
113 doc.put(
"update_timestamp",
std::time(
nullptr));
132 using std::chrono::duration_cast;
133 using std::chrono::milliseconds;
142 if (millis >= (25 * 1000)) {
LuminosityBlockID const & luminosityBlockID() const
void watchPreGlobalBeginLumi(PreGlobalBeginLumi::slot_type const &iSlot)
format
Some error handling for the usage.
void evEvent(StreamID const &)
boost::asio::local::stream_protocol::iostream mstream_
#define DEFINE_FWK_SERVICE(type)
LuminosityBlockNumber_t luminosityBlock() const
std::chrono::high_resolution_clock::time_point last_lumi_time_
DQMMonitoringService(const edm::ParameterSet &, edm::ActivityRegistry &)
void watchPreSourceEvent(PreSourceEvent::slot_type const &iSlot)
std::chrono::high_resolution_clock::time_point last_update_time_
void evLumi(GlobalContext const &)
void outputUpdate(ptree &doc)