test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 {
12  class OccupancyTask : public DQWorkerTask {
13  public:
14  OccupancyTask();
16 
17  bool filterRunType(short const*) override;
18 
19  void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
20 
21  bool analyze(void const*, Collections) override;
22 
24  template<typename DigiCollection> void runOnDigis(DigiCollection const&, Collections);
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) runOnRawData(*static_cast<EcalRawDataCollection const*>(_p));
39  return true;
40  case kEBDigi:
41  if(_p) runOnDigis(*static_cast<EBDigiCollection const*>(_p), _collection);
42  return true;
43  break;
44  case kEEDigi:
45  if(_p) runOnDigis(*static_cast<EEDigiCollection const*>(_p), _collection);
46  return true;
47  break;
48  case kTrigPrimDigi:
49  if(_p) runOnTPDigis(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
50  return true;
51  break;
52  case kEBRecHit:
53  case kEERecHit:
54  if(_p) runOnRecHits(*static_cast<EcalRecHitCollection const*>(_p), _collection);
55  return true;
56  break;
57  default:
58  break;
59  }
60 
61  return false;
62  }
63 }
64 
65 #endif
66 
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