CMS 3D CMS Logo

TimingTask.h
Go to the documentation of this file.
1 #ifndef TimingTask_H
2 #define TimingTask_H
3 
4 #include "DQWorkerTask.h"
5 
7 
8 namespace ecaldqm {
9 
10  class TimingTask : public DQWorkerTask {
11  public:
12  TimingTask();
14 
15  bool filterRunType(short const*) override;
16 
17  bool analyze(void const*, Collections) override;
18 
21 
22  enum Constants {
23  nBXBins = 15
24  };
25 
26  private:
27  void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
28  void beginEvent(edm::Event const&, edm::EventSetup const&) override;
29  void setParams(edm::ParameterSet const&) override;
30 
31  std::array<int,nBXBins+1> bxBinEdges_;
32  double bxBin_;
33 
38 
40  };
41 
42  inline bool TimingTask::analyze(void const* _p, Collections _collection){
43  switch(_collection){
44  case kEBRecHit:
45  case kEERecHit:
46  if(_p) runOnRecHits(*static_cast<EcalRecHitCollection const*>(_p), _collection);
47  return true;
48  break;
49  case kEBUncalibRecHit:
50  case kEEUncalibRecHit:
51  if(_p) runOnUncalibRecHits(*static_cast<EcalUncalibratedRecHitCollection const*>(_p));
52  return true;
53  break;
54  default:
55  break;
56  }
57  return false;
58  }
59 
60 }
61 
62 #endif
63 
void beginEvent(edm::Event const &, edm::EventSetup const &) override
Definition: TimingTask.cc:62
std::array< int, nBXBins+1 > bxBinEdges_
Definition: TimingTask.h:31
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: TimingTask.cc:51
void setParams(edm::ParameterSet const &) override
Definition: TimingTask.cc:27
void runOnRecHits(EcalRecHitCollection const &, Collections)
Definition: TimingTask.cc:70
void runOnUncalibRecHits(EcalUncalibratedRecHitCollection const &)
Definition: TimingTask.cc:126
float energyThresholdEE_
Definition: TimingTask.h:37
MESet * meTimeMapByLS
Definition: TimingTask.h:39
float energyThresholdEB_
Definition: TimingTask.h:36
bool analyze(void const *, Collections) override
Definition: TimingTask.h:42
bool filterRunType(short const *) override
Definition: TimingTask.cc:36