CMS 3D CMS Logo

DQMMonitoringService.h
Go to the documentation of this file.
1 #ifndef DQMServices_StreamerIO_DQMMonitoringService_h
2 #define DQMServices_StreamerIO_DQMMonitoringService_h
3 
4 #include <chrono>
5 
6 #include <boost/asio.hpp>
7 #include <boost/property_tree/ptree.hpp>
8 
9 /*
10  * This service is very similar to the FastMonitoringService in the HLT,
11  * except that it is used for monitoring online DQM applications
12  */
13 
14 namespace edm {
15  class ActivityRegistry;
16  class GlobalContext;
17  class ParameterSet;
18  class StreamID;
19 } // namespace edm
20 
21 namespace dqmservices {
22 
24  public:
26  ~DQMMonitoringService() = default;
27 
28  void connect();
29  void keepAlive();
30 
31  void outputLumiUpdate();
32  void outputUpdate(boost::property_tree::ptree& doc);
33 
34  void evLumi(edm::GlobalContext const&);
35  void evEvent(edm::StreamID const&);
36 
37  void tryUpdate();
38 
39  private:
40  boost::asio::local::stream_protocol::iostream mstream_;
41 
42  // global number of events processed
43  long nevents_;
44 
45  // time point, number of events and lumi number at the time we switched to it
46  std::chrono::high_resolution_clock::time_point last_lumi_time_;
47  std::chrono::high_resolution_clock::time_point last_update_time_;
49  // last lumi (we report stats for it, after we switch to the next one)
50  unsigned long last_lumi_;
51 
52  unsigned long run_; // current run
53  unsigned long lumi_; // current lumi
54  };
55 
56 } // namespace dqmservices
57 
58 #endif // DQMServices_StreamerIO_DQMMonitoringService_h
void evEvent(edm::StreamID const &)
void evLumi(edm::GlobalContext const &)
boost::asio::local::stream_protocol::iostream mstream_
std::chrono::high_resolution_clock::time_point last_lumi_time_
HLT enums.
void outputUpdate(boost::property_tree::ptree &doc)
DQMMonitoringService(const edm::ParameterSet &, edm::ActivityRegistry &)
std::chrono::high_resolution_clock::time_point last_update_time_