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
ecaldqm::kEBTestPulseUncalibRecHit
Definition: Collections.h:34
ecaldqm::TestPulseTask::setParams
void setParams(edm::ParameterSet const &) override
Definition: TestPulseTask.cc:20
ecaldqm::TestPulseTask::runOnUncalibRecHits
void runOnUncalibRecHits(EcalUncalibratedRecHitCollection const &)
Definition: TestPulseTask.cc:174
ecaldqm
Definition: DQWorker.h:37
ecaldqm::TestPulseTask::gain_
int gain_[nDCC]
Definition: TestPulseTask.h:38
ecaldqm::DependencySet
Definition: DQWorkerTask.h:44
ecaldqm::kEEDigi
Definition: Collections.h:26
ecaldqm::TestPulseTask::runOnPnDigis
void runOnPnDigis(EcalPnDiodeDigiCollection const &)
Definition: TestPulseTask.cc:125
edm::SortedCollection
Definition: SortedCollection.h:49
ecaldqm::kEcalRawData
Definition: Collections.h:10
EcalRecHitCollections.h
ecaldqm::kEETestPulseUncalibRecHit
Definition: Collections.h:35
EcalRawDataCollections.h
ecaldqm::TestPulseTask::addDependencies
void addDependencies(DependencySet &) override
Definition: TestPulseTask.cc:49
ecaldqm::DQWorkerTask
Definition: DQWorkerTask.h:71
EcalDigiCollections.h
ecaldqm::TestPulseTask::runOnDigis
void runOnDigis(DigiCollection const &)
Definition: TestPulseTask.cc:96
edm::ParameterSet
Definition: ParameterSet.h:47
ecaldqm::TestPulseTask::TestPulseTask
TestPulseTask()
Definition: TestPulseTask.cc:15
ecaldqm::TestPulseTask::analyze
bool analyze(void const *, Collections) override
Definition: TestPulseTask.h:41
ecaldqm::Collections
Collections
Definition: Collections.h:8
ecaldqm::kPnDiodeDigi
Definition: Collections.h:27
ecaldqm::TestPulseTask::enable_
bool enable_[nDCC]
Definition: TestPulseTask.h:37
ecaldqm::TestPulseTask::runOnRawData
void runOnRawData(EcalRawDataCollection const &)
Definition: TestPulseTask.cc:68
ecaldqm::TestPulseTask::filterRunType
bool filterRunType(short const *) override
Definition: TestPulseTask.cc:54
ecaldqm::TestPulseTask::~TestPulseTask
~TestPulseTask() override
Definition: TestPulseTask.h:17
ecaldqm::TestPulseTask
Definition: TestPulseTask.h:14
siStripShotFilter_cfi.DigiCollection
DigiCollection
Definition: siStripShotFilter_cfi.py:6
ecaldqm::kEBDigi
Definition: Collections.h:25
DQWorkerTask.h
ecaldqm::nDCC
Definition: EcalDQMCommonUtils.h:91
EcalDQMCommonUtils.h
ecaldqm::TestPulseTask::pnGainToME_
std::map< int, unsigned > pnGainToME_
Definition: TestPulseTask.h:35
ecaldqm::TestPulseTask::gainToME_
std::map< int, unsigned > gainToME_
Definition: TestPulseTask.h:34