4 #include <fmt/printf.h> 6 #include <boost/algorithm/string.hpp> 7 #include <boost/algorithm/string/predicate.hpp> 19 const char*
x = std::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;
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;
72 plumi.put(
"n", lumi_last);
73 plumi.put(
"nevents", lumi_events);
74 plumi.put(
"nmillis", lumi_millis);
75 plumi.put(
"rate",
rate);
78 doc.add_child(fmt::sprintf(
"extra.lumi_stats.%d", hkey), plumi);
85 using std::chrono::duration_cast;
86 using std::chrono::milliseconds;
106 using std::chrono::duration_cast;
107 using std::chrono::milliseconds;
134 using std::chrono::duration_cast;
135 using std::chrono::milliseconds;
145 if (millis >= (25 * 1000)) {
LuminosityBlockNumber_t luminosityBlock() const
void watchPreGlobalBeginLumi(PreGlobalBeginLumi::slot_type const &iSlot)
void evEvent(StreamID const &)
LuminosityBlockID const & luminosityBlockID() const
boost::asio::local::stream_protocol::iostream mstream_
#define DEFINE_FWK_SERVICE(type)
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)