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 
14 
15 namespace ecaldqm {
16  class OccupancyTask : public DQWorkerTask {
17  public:
18  OccupancyTask();
19  ~OccupancyTask() override {}
20 
21  bool filterRunType(short const*) override;
22 
23  void beginEvent(edm::Event const&, edm::EventSetup const&, bool const&, bool&) override;
24  void beginRun(edm::Run const&, edm::EventSetup const&) override;
25  bool analyze(void const*, Collections) override;
26 
28  template <typename DigiCollection>
32  void setTokens(edm::ConsumesCollector&) override;
33 
34  private:
35  void setParams(edm::ParameterSet const&) override;
37  bool FillLaser = false;
39  float tpThreshold_;
41  };
42 
43  inline bool OccupancyTask::analyze(void const* _p, Collections _collection) {
44  switch (_collection) {
45  case kEcalRawData:
46  if (_p)
47  runOnRawData(*static_cast<EcalRawDataCollection const*>(_p));
48  return true;
49  case kEBDigi:
50  if (_p)
51  runOnDigis(*static_cast<EBDigiCollection const*>(_p), _collection);
52  return true;
53  break;
54  case kEEDigi:
55  if (_p)
56  runOnDigis(*static_cast<EEDigiCollection const*>(_p), _collection);
57  return true;
58  break;
59  case kTrigPrimDigi:
60  if (_p)
61  runOnTPDigis(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
62  return true;
63  break;
64  case kEBRecHit:
65  case kEERecHit:
66  if (_p)
67  runOnRecHits(*static_cast<EcalRecHitCollection const*>(_p), _collection);
68  return true;
69  break;
70  default:
71  break;
72  }
73 
74  return false;
75  }
76 } // namespace ecaldqm
77 
78 #endif
ecaldqm
Definition: DQWorker.h:37
ESHandle.h
ecaldqm::OccupancyTask::~OccupancyTask
~OccupancyTask() override
Definition: OccupancyTask.h:19
ecaldqm::OccupancyTask::setTokens
void setTokens(edm::ConsumesCollector &) override
Definition: OccupancyTask.cc:16
edm::Run
Definition: Run.h:45
ecaldqm::kEEDigi
Definition: Collections.h:26
edm::SortedCollection
Definition: SortedCollection.h:49
ecaldqm::kEcalRawData
Definition: Collections.h:10
EcalRecHitCollections.h
EcalRawDataCollections.h
ecaldqm::OccupancyTask::beginRun
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: OccupancyTask.cc:30
ecaldqm::DQWorkerTask
Definition: DQWorkerTask.h:71
ecaldqm::OccupancyTask::runOnDigis
void runOnDigis(DigiCollection const &, Collections)
Definition: OccupancyTask.cc:74
EcalLaserDbService.h
EcalDigiCollections.h
ecaldqm::kEBRecHit
Definition: Collections.h:36
ecaldqm::OccupancyTask::recHitThreshold_
float recHitThreshold_
Definition: OccupancyTask.h:38
ecaldqm::OccupancyTask
Definition: OccupancyTask.h:16
ecaldqm::OccupancyTask::lasertoken_
edm::ESGetToken< EcalLaserDbService, EcalLaserDbRecord > lasertoken_
Definition: OccupancyTask.h:36
ecaldqm::OccupancyTask::tpThreshold_
float tpThreshold_
Definition: OccupancyTask.h:39
ecaldqm::OccupancyTask::setParams
void setParams(edm::ParameterSet const &) override
Definition: OccupancyTask.cc:11
edm::ParameterSet
Definition: ParameterSet.h:47
Timestamp.h
ecaldqm::OccupancyTask::runOnRawData
void runOnRawData(EcalRawDataCollection const &)
Definition: OccupancyTask.cc:66
ecaldqm::Collections
Collections
Definition: Collections.h:8
edm::EventSetup
Definition: EventSetup.h:58
ecaldqm::kTrigPrimDigi
Definition: Collections.h:28
edm::ESGetToken< EcalLaserDbService, EcalLaserDbRecord >
ecaldqm::OccupancyTask::runOnTPDigis
void runOnTPDigis(EcalTrigPrimDigiCollection const &)
Definition: OccupancyTask.cc:99
ecaldqm::OccupancyTask::OccupancyTask
OccupancyTask()
Definition: OccupancyTask.cc:9
ecaldqm::kEERecHit
Definition: Collections.h:37
EcalLaserDbRecord.h
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:18
ConsumesCollector.h
ecaldqm::OccupancyTask::analyze
bool analyze(void const *, Collections) override
Definition: OccupancyTask.h:43
ecaldqm::OccupancyTask::FillLaser
bool FillLaser
Definition: OccupancyTask.h:37
ecaldqm::OccupancyTask::m_iTime
edm::TimeValue_t m_iTime
Definition: OccupancyTask.h:40
edm::Event
Definition: Event.h:73
ecaldqm::OccupancyTask::runOnRecHits
void runOnRecHits(EcalRecHitCollection const &, Collections)
Definition: OccupancyTask.cc:135
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
edm::TimeValue_t
unsigned long long TimeValue_t
Definition: Timestamp.h:28
ecaldqm::OccupancyTask::beginEvent
void beginEvent(edm::Event const &, edm::EventSetup const &, bool const &, bool &) override
Definition: OccupancyTask.cc:31