CMS 3D CMS Logo

LedTask.h
Go to the documentation of this file.
1 #ifndef LedTask_H
2 #define LedTask_H
3 
4 #include "DQWorkerTask.h"
5 
7 
11 
12 namespace ecaldqm {
13 
14  class LedTask : public DQWorkerTask {
15  public:
16  LedTask();
17  ~LedTask() override {}
18 
19  void addDependencies(DependencySet&) override;
20 
21  bool filterRunType(short const*) override;
22 
23  void beginRun(edm::Run const&, edm::EventSetup const&) override;
24  void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
25  void beginEvent(edm::Event const&, edm::EventSetup const&, bool const&, bool&) override;
26 
27  bool analyze(void const*, Collections) override;
28 
30  void runOnDigis(EEDigiCollection const&);
33 
34  void endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
35 
36  private:
37  void setParams(edm::ParameterSet const&) override;
38 
39  std::map<int, unsigned> wlToME_;
40 
41  bool enable_[nEEDCC];
42  unsigned wavelength_[nEEDCC];
43  unsigned rtHalf_[nEEDCC];
44  std::map<unsigned, float> pnAmp_;
45 
46  int emptyLS_;
48  int isemptyLS;
49  };
50 
51  inline bool LedTask::analyze(void const* _p, Collections _collection) {
52  switch (_collection) {
53  case kEcalRawData:
54  if (_p)
55  runOnRawData(*static_cast<EcalRawDataCollection const*>(_p));
56  return true;
57  break;
58  case kEEDigi:
59  if (_p)
60  runOnDigis(*static_cast<EEDigiCollection const*>(_p));
61  return true;
62  break;
63  case kPnDiodeDigi:
64  if (_p)
65  runOnPnDigis(*static_cast<EcalPnDiodeDigiCollection const*>(_p));
66  return true;
67  break;
69  if (_p)
70  runOnUncalibRecHits(*static_cast<EcalUncalibratedRecHitCollection const*>(_p));
71  return true;
72  break;
73  default:
74  break;
75  }
76 
77  return false;
78  }
79 
80 } // namespace ecaldqm
81 
82 #endif
bool enable_[nEEDCC]
Definition: LedTask.h:41
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: LedTask.cc:58
void addDependencies(DependencySet &) override
Definition: LedTask.cc:33
~LedTask() override
Definition: LedTask.h:17
void runOnDigis(EEDigiCollection const &)
Definition: LedTask.cc:112
void runOnUncalibRecHits(EcalUncalibratedRecHitCollection const &)
Definition: LedTask.cc:281
unsigned rtHalf_[nEEDCC]
Definition: LedTask.h:43
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: LedTask.cc:56
void runOnRawData(EcalRawDataCollection const &)
Definition: LedTask.cc:66
void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: LedTask.cc:336
int emptyLSLimit_
Definition: LedTask.h:47
unsigned wavelength_[nEEDCC]
Definition: LedTask.h:42
std::map< unsigned, float > pnAmp_
Definition: LedTask.h:44
std::map< int, unsigned > wlToME_
Definition: LedTask.h:39
bool filterRunType(short const *) override
Definition: LedTask.cc:39
void setParams(edm::ParameterSet const &) override
Definition: LedTask.cc:15
bool analyze(void const *, Collections) override
Definition: LedTask.h:51
Definition: Run.h:45
void runOnPnDigis(EcalPnDiodeDigiCollection const &)
Definition: LedTask.cc:238
void beginEvent(edm::Event const &, edm::EventSetup const &, bool const &, bool &) override
Definition: LedTask.cc:64