CMS 3D CMS Logo

EcalMonitorPrescaler.h
Go to the documentation of this file.
1 #ifndef EcalMonitorPrescaler_H
2 #define EcalMonitorPrescaler_H
3 
6 
7 #include <utility>
8 #include <atomic>
9 
10 namespace ecaldqm {
12 
13  struct PrescaleCounter {
15  for (unsigned iP(0); iP != nPrescalers; ++iP)
16  counters_[iP] = 0;
17  }
18  mutable std::atomic<unsigned> counters_[nPrescalers];
19  };
20 } // namespace ecaldqm
21 
22 class EcalMonitorPrescaler : public edm::global::EDFilter<edm::RunCache<ecaldqm::PrescaleCounter>> {
23 public:
25  ~EcalMonitorPrescaler() override;
26 
27  std::shared_ptr<ecaldqm::PrescaleCounter> globalBeginRun(edm::Run const &, edm::EventSetup const &) const override;
28  bool filter(edm::StreamID, edm::Event &, edm::EventSetup const &) const override;
29  void globalEndRun(edm::Run const &, edm::EventSetup const &) const override;
30 
31 private:
32  static const uint32_t filterBits_[ecaldqm::nPrescalers];
33 
35 
37 };
38 
39 #endif // EcalMonitorPrescaler_H
std::atomic< unsigned > counters_[nPrescalers]
std::shared_ptr< ecaldqm::PrescaleCounter > globalBeginRun(edm::Run const &, edm::EventSetup const &) const override
bool filter(edm::StreamID, edm::Event &, edm::EventSetup const &) const override
EcalMonitorPrescaler(edm::ParameterSet const &)
edm::EDGetTokenT< EcalRawDataCollection > EcalRawDataCollection_
void globalEndRun(edm::Run const &, edm::EventSetup const &) const override
unsigned prescalers_[ecaldqm::nPrescalers]
static const uint32_t filterBits_[ecaldqm::nPrescalers]
Definition: Run.h:45