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  bool analyze(void const*, Collections) override;
20 
22  template<typename DigiCollection> void runOnDigis(DigiCollection const&, Collections);
25 
26  private:
27  void setParams(edm::ParameterSet const&) override;
28 
30  float tpThreshold_;
31  };
32 
33  inline bool OccupancyTask::analyze(void const* _p, Collections _collection){
34  switch(_collection){
35  case kEcalRawData:
36  if(_p) runOnRawData(*static_cast<EcalRawDataCollection const*>(_p));
37  return true;
38  case kEBDigi:
39  if(_p) runOnDigis(*static_cast<EBDigiCollection const*>(_p), _collection);
40  return true;
41  break;
42  case kEEDigi:
43  if(_p) runOnDigis(*static_cast<EEDigiCollection const*>(_p), _collection);
44  return true;
45  break;
46  case kTrigPrimDigi:
47  if(_p) runOnTPDigis(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
48  return true;
49  break;
50  case kEBRecHit:
51  case kEERecHit:
52  if(_p) runOnRecHits(*static_cast<EcalRecHitCollection const*>(_p), _collection);
53  return true;
54  break;
55  default:
56  break;
57  }
58 
59  return false;
60  }
61 }
62 
63 #endif
64 
void runOnRecHits(EcalRecHitCollection const &, Collections)
void runOnRawData(EcalRawDataCollection const &)
void runOnDigis(DigiCollection const &, Collections)
bool analyze(void const *, Collections) override
Definition: OccupancyTask.h:33
void runOnTPDigis(EcalTrigPrimDigiCollection const &)
void setParams(edm::ParameterSet const &) override
bool filterRunType(short const *) override