CMS 3D CMS Logo

TestPulseTask.h
Go to the documentation of this file.
1 #ifndef TestPulseTask_H
2 #define TestPulseTask_H
3 
4 #include "DQWorkerTask.h"
5 
7 
11 
12 namespace ecaldqm {
13 
14  class TestPulseTask : public DQWorkerTask {
15  public:
16  TestPulseTask();
17  ~TestPulseTask() override {}
18 
19  bool filterRunType(short const*) override;
20 
21  void addDependencies(DependencySet&) override;
22 
23  bool analyze(void const*, Collections) override;
24 
26  template <typename DigiCollection>
27  void runOnDigis(DigiCollection const&);
30 
31  private:
32  void setParams(edm::ParameterSet const&) override;
33 
34  std::map<int, unsigned> gainToME_;
35  std::map<int, unsigned> pnGainToME_;
36 
37  bool enable_[nDCC];
38  int gain_[nDCC];
39  };
40 
41  inline bool TestPulseTask::analyze(void const* _p, Collections _collection) {
42  switch (_collection) {
43  case kEcalRawData:
44  if (_p)
45  runOnRawData(*static_cast<EcalRawDataCollection const*>(_p));
46  return true;
47  break;
48  case kEBDigi:
49  if (_p)
50  runOnDigis(*static_cast<EBDigiCollection const*>(_p));
51  return true;
52  break;
53  case kEEDigi:
54  if (_p)
55  runOnDigis(*static_cast<EEDigiCollection const*>(_p));
56  return true;
57  break;
58  case kPnDiodeDigi:
59  if (_p)
60  runOnPnDigis(*static_cast<EcalPnDiodeDigiCollection const*>(_p));
61  return true;
62  break;
65  if (_p)
66  runOnUncalibRecHits(*static_cast<EcalUncalibratedRecHitCollection const*>(_p));
67  return true;
68  break;
69  default:
70  break;
71  }
72  return false;
73  }
74 
75 } // namespace ecaldqm
76 
77 #endif
std::map< int, unsigned > gainToME_
Definition: TestPulseTask.h:34
std::map< int, unsigned > pnGainToME_
Definition: TestPulseTask.h:35
bool filterRunType(short const *) override
void setParams(edm::ParameterSet const &) override
void runOnDigis(DigiCollection const &)
void runOnPnDigis(EcalPnDiodeDigiCollection const &)
bool analyze(void const *, Collections) override
Definition: TestPulseTask.h:41
void addDependencies(DependencySet &) override
void runOnUncalibRecHits(EcalUncalibratedRecHitCollection const &)
void runOnRawData(EcalRawDataCollection const &)