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 setEventTime(const edm::TimeValue_t& iTime);
33  void setTokens(edm::ConsumesCollector&) override;
34 
35  private:
36  void setParams(edm::ParameterSet const&) override;
38  bool FillLaser = false;
40  float tpThreshold_;
42  };
43 
44  inline bool OccupancyTask::analyze(void const* _p, Collections _collection) {
45  switch (_collection) {
46  case kEcalRawData:
47  if (_p)
48  runOnRawData(*static_cast<EcalRawDataCollection const*>(_p));
49  return true;
50  case kEBDigi:
51  if (_p)
52  runOnDigis(*static_cast<EBDigiCollection const*>(_p), _collection);
53  return true;
54  break;
55  case kEEDigi:
56  if (_p)
57  runOnDigis(*static_cast<EEDigiCollection const*>(_p), _collection);
58  return true;
59  break;
60  case kTrigPrimDigi:
61  if (_p)
62  runOnTPDigis(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
63  return true;
64  break;
65  case kEBRecHit:
66  case kEERecHit:
67  if (_p)
68  runOnRecHits(*static_cast<EcalRecHitCollection const*>(_p), _collection);
69  return true;
70  break;
71  default:
72  break;
73  }
74 
75  return false;
76  }
77 } // namespace ecaldqm
78 
79 #endif
ecaldqm
Definition: DQWorker.h:29
ESHandle.h
ecaldqm::OccupancyTask::~OccupancyTask
~OccupancyTask() override
Definition: OccupancyTask.h:19
ecaldqm::OccupancyTask::setTokens
void setTokens(edm::ConsumesCollector &) override
Definition: OccupancyTask.cc:15
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:29
ecaldqm::DQWorkerTask
Definition: DQWorkerTask.h:71
ecaldqm::OccupancyTask::runOnDigis
void runOnDigis(DigiCollection const &, Collections)
Definition: OccupancyTask.cc:73
EcalLaserDbService.h
EcalDigiCollections.h
ecaldqm::kEBRecHit
Definition: Collections.h:36
ecaldqm::OccupancyTask::recHitThreshold_
float recHitThreshold_
Definition: OccupancyTask.h:39
ecaldqm::OccupancyTask
Definition: OccupancyTask.h:16
ecaldqm::OccupancyTask::lasertoken_
edm::ESGetToken< EcalLaserDbService, EcalLaserDbRecord > lasertoken_
Definition: OccupancyTask.h:37
ecaldqm::OccupancyTask::tpThreshold_
float tpThreshold_
Definition: OccupancyTask.h:40
ecaldqm::OccupancyTask::setParams
void setParams(edm::ParameterSet const &) override
Definition: OccupancyTask.cc:10
edm::ParameterSet
Definition: ParameterSet.h:47
Timestamp.h
ecaldqm::OccupancyTask::runOnRawData
void runOnRawData(EcalRawDataCollection const &)
Definition: OccupancyTask.cc:65
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:98
ecaldqm::OccupancyTask::OccupancyTask
OccupancyTask()
Definition: OccupancyTask.cc:8
ecaldqm::kEERecHit
Definition: Collections.h:37
ecaldqm::OccupancyTask::setEventTime
void setEventTime(const edm::TimeValue_t &iTime)
Definition: OccupancyTask.cc:30
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:17
ConsumesCollector.h
ecaldqm::OccupancyTask::analyze
bool analyze(void const *, Collections) override
Definition: OccupancyTask.h:44
ecaldqm::OccupancyTask::FillLaser
bool FillLaser
Definition: OccupancyTask.h:38
ecaldqm::OccupancyTask::m_iTime
edm::TimeValue_t m_iTime
Definition: OccupancyTask.h:41
edm::Event
Definition: Event.h:73
ecaldqm::OccupancyTask::runOnRecHits
void runOnRecHits(EcalRecHitCollection const &, Collections)
Definition: OccupancyTask.cc:134
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