CMS 3D CMS Logo

ThroughputService.h
Go to the documentation of this file.
1 #ifndef ThroughputService_h
2 #define ThroughputService_h
3 
4 // C++ headers
5 #include <atomic>
6 #include <chrono>
7 #include <functional>
8 #include <string>
9 
10 // TBB headers
11 #include <tbb/concurrent_vector.h>
12 
13 // ROOT headers
14 #include <TH1F.h>
15 
16 // CMSSW headers
29 
31 public:
33 
35  ~ThroughputService() = default;
36 
37 private:
38  void preallocate(edm::service::SystemBounds const& bounds);
39  void preGlobalBeginRun(edm::GlobalContext const& gc);
40  void preSourceEvent(edm::StreamID sid);
41  void postEvent(edm::StreamContext const& sc);
42  void postEndJob();
43 
44 public:
45  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
46 
47 private:
50 
51  std::chrono::system_clock::time_point m_startup;
52 
53  // event time buffer
54  const uint32_t m_resolution;
55  std::atomic<uint32_t> m_counter;
56  tbb::concurrent_vector<std::chrono::system_clock::time_point> m_events;
58 
59  // DQM related data members
61  const bool m_dqm_bynproc;
63  const double m_time_range;
64  const double m_time_resolution;
65 };
66 
67 #endif // ! ThroughputService_h
ConfigurationDescriptions.h
ThroughputService::m_time_range
const double m_time_range
Definition: ThroughputService.h:63
edm::StreamID
Definition: StreamID.h:30
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
MessageLogger.h
ThroughputService::m_sourced_events
dqm::reco::MonitorElement * m_sourced_events
Definition: ThroughputService.h:48
ThroughputService::m_resolution
const uint32_t m_resolution
Definition: ThroughputService.h:54
RunLumiEventNumber.h
ThroughputService::postEvent
void postEvent(edm::StreamContext const &sc)
Definition: ThroughputService.cc:103
ThroughputService::postEndJob
void postEndJob()
Definition: ThroughputService.cc:115
ThroughputService::preGlobalBeginRun
void preGlobalBeginRun(edm::GlobalContext const &gc)
Definition: ThroughputService.cc:62
ThroughputService::m_retired_events
dqm::reco::MonitorElement * m_retired_events
Definition: ThroughputService.h:49
ThroughputService::m_dqm_path
std::string m_dqm_path
Definition: ThroughputService.h:62
ThroughputService
Definition: ThroughputService.h:30
ThroughputService::preSourceEvent
void preSourceEvent(edm::StreamID sid)
Definition: ThroughputService.cc:95
ModuleDescription.h
ActivityRegistry.h
ThroughputService::m_print_event_summary
bool m_print_event_summary
Definition: ThroughputService.h:57
ThroughputService::m_events
tbb::concurrent_vector< std::chrono::system_clock::time_point > m_events
Definition: ThroughputService.h:56
dqm::legacy::DQMStore
Definition: DQMStore.h:727
edm::StreamContext
Definition: StreamContext.h:31
Service.h
EventID.h
edm::ActivityRegistry
Definition: ActivityRegistry.h:133
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ThroughputService::DQMStore
dqm::reco::DQMStore DQMStore
Definition: ThroughputService.h:32
edm::GlobalContext
Definition: GlobalContext.h:29
edm::service::SystemBounds
Definition: SystemBounds.h:29
edm::ParameterSet
Definition: ParameterSet.h:47
GlobalContext.h
Timestamp.h
ThroughputService::m_enable_dqm
bool m_enable_dqm
Definition: ThroughputService.h:60
ThroughputService::m_counter
std::atomic< uint32_t > m_counter
Definition: ThroughputService.h:55
ThroughputService::~ThroughputService
~ThroughputService()=default
ThroughputService::m_time_resolution
const double m_time_resolution
Definition: ThroughputService.h:64
ThroughputService::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: ThroughputService.cc:17
ThroughputService::m_dqm_bynproc
const bool m_dqm_bynproc
Definition: ThroughputService.h:61
ThroughputService::m_startup
std::chrono::system_clock::time_point m_startup
Definition: ThroughputService.h:51
ThroughputService::preallocate
void preallocate(edm::service::SystemBounds const &bounds)
Definition: ThroughputService.cc:53
ParameterSet.h
ThroughputService::ThroughputService
ThroughputService(const edm::ParameterSet &, edm::ActivityRegistry &)
Definition: ThroughputService.cc:33
StreamContext.h
SystemBounds.h