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
ecaldqm
Definition: DQWorker.h:24
ecaldqm::OccupancyTask::~OccupancyTask
~OccupancyTask() override
Definition: OccupancyTask.h:14
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
ecaldqm::kEEDigi
Definition: Collections.h:26
edm::SortedCollection
Definition: SortedCollection.h:49
ecaldqm::kEcalRawData
Definition: Collections.h:10
EcalRecHitCollections.h
EcalRawDataCollections.h
ecaldqm::DQWorkerTask
Definition: DQWorkerTask.h:71
ecaldqm::OccupancyTask::runOnDigis
void runOnDigis(DigiCollection const &, Collections)
Definition: OccupancyTask.cc:43
EcalDigiCollections.h
ecaldqm::kEBRecHit
Definition: Collections.h:36
ecaldqm::OccupancyTask::recHitThreshold_
float recHitThreshold_
Definition: OccupancyTask.h:31
ecaldqm::OccupancyTask
Definition: OccupancyTask.h:11
ecaldqm::OccupancyTask::tpThreshold_
float tpThreshold_
Definition: OccupancyTask.h:32
ecaldqm::OccupancyTask::setParams
void setParams(edm::ParameterSet const &) override
Definition: OccupancyTask.cc:11
edm::ParameterSet
Definition: ParameterSet.h:36
ecaldqm::OccupancyTask::runOnRawData
void runOnRawData(EcalRawDataCollection const &)
Definition: OccupancyTask.cc:35
ecaldqm::Collections
Collections
Definition: Collections.h:8
edm::EventSetup
Definition: EventSetup.h:57
ecaldqm::kTrigPrimDigi
Definition: Collections.h:28
ecaldqm::OccupancyTask::runOnTPDigis
void runOnTPDigis(EcalTrigPrimDigiCollection const &)
Definition: OccupancyTask.cc:68
ecaldqm::OccupancyTask::OccupancyTask
OccupancyTask()
Definition: OccupancyTask.cc:9
ecaldqm::kEERecHit
Definition: Collections.h:37
siStripShotFilter_cfi.DigiCollection
DigiCollection
Definition: siStripShotFilter_cfi.py:6
ecaldqm::kEBDigi
Definition: Collections.h:25
DQWorkerTask.h
ecaldqm::OccupancyTask::filterRunType
bool filterRunType(short const *) override
Definition: OccupancyTask.cc:16
ecaldqm::OccupancyTask::analyze
bool analyze(void const *, Collections) override
Definition: OccupancyTask.h:35
ecaldqm::OccupancyTask::runOnRecHits
void runOnRecHits(EcalRecHitCollection const &, Collections)
Definition: OccupancyTask.cc:104
ecaldqm::OccupancyTask::beginLuminosityBlock
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: OccupancyTask.cc:28