CMS 3D CMS Logo

OccupancyTask.h
Go to the documentation of this file.
1 #ifndef OccupancyTask_H
2 #define OccupancyTask_H
3 
4 #include "DQWorkerTask.h"
5 
9 
10 namespace ecaldqm {
11  class OccupancyTask : public DQWorkerTask {
12  public:
13  OccupancyTask();
14  ~OccupancyTask() override {}
15 
16  bool filterRunType(short const*) override;
17 
18  void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
19 
20  bool analyze(void const*, Collections) override;
21 
23  template <typename DigiCollection>
27 
28  private:
29  void setParams(edm::ParameterSet const&) override;
30 
32  float tpThreshold_;
33  };
34 
35  inline bool OccupancyTask::analyze(void const* _p, Collections _collection) {
36  switch (_collection) {
37  case kEcalRawData:
38  if (_p)
39  runOnRawData(*static_cast<EcalRawDataCollection const*>(_p));
40  return true;
41  case kEBDigi:
42  if (_p)
43  runOnDigis(*static_cast<EBDigiCollection const*>(_p), _collection);
44  return true;
45  break;
46  case kEEDigi:
47  if (_p)
48  runOnDigis(*static_cast<EEDigiCollection const*>(_p), _collection);
49  return true;
50  break;
51  case kTrigPrimDigi:
52  if (_p)
53  runOnTPDigis(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
54  return true;
55  break;
56  case kEBRecHit:
57  case kEERecHit:
58  if (_p)
59  runOnRecHits(*static_cast<EcalRecHitCollection const*>(_p), _collection);
60  return true;
61  break;
62  default:
63  break;
64  }
65 
66  return false;
67  }
68 } // namespace ecaldqm
69 
70 #endif
void runOnRecHits(EcalRecHitCollection const &, Collections)
void runOnRawData(EcalRawDataCollection const &)
void runOnDigis(DigiCollection const &, Collections)
bool analyze(void const *, Collections) override
Definition: OccupancyTask.h:35
void runOnTPDigis(EcalTrigPrimDigiCollection const &)
void setParams(edm::ParameterSet const &) override
bool filterRunType(short const *) override
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override