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() {}
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&) 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  private:
36  void setParams(edm::ParameterSet const&) override;
37 
38  std::map<int, unsigned> wlToME_;
39 
40  bool enable_[nEEDCC];
41  unsigned wavelength_[nEEDCC];
42  unsigned rtHalf_[nEEDCC];
43  std::map<unsigned, float> pnAmp_;
44 
45  int emptyLS_;
47  int isemptyLS;
48  };
49 
50  inline bool LedTask::analyze(void const* _p, Collections _collection){
51  switch(_collection){
52  case kEcalRawData:
53  if(_p) runOnRawData(*static_cast<EcalRawDataCollection const*>(_p));
54  return true;
55  break;
56  case kEEDigi:
57  if(_p) runOnDigis(*static_cast<EEDigiCollection const*>(_p));
58  return true;
59  break;
60  case kPnDiodeDigi:
61  if(_p) runOnPnDigis(*static_cast<EcalPnDiodeDigiCollection const*>(_p));
62  return true;
63  break;
65  if(_p) runOnUncalibRecHits(*static_cast<EcalUncalibratedRecHitCollection const*>(_p));
66  return true;
67  break;
68  default:
69  break;
70  }
71 
72  return false;
73  }
74 
75 }
76 
77 #endif
bool enable_[nEEDCC]
Definition: LedTask.h:40
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: LedTask.cc:75
void addDependencies(DependencySet &) override
Definition: LedTask.cc:41
void beginEvent(edm::Event const &, edm::EventSetup const &) override
Definition: LedTask.cc:82
void runOnDigis(EEDigiCollection const &)
Definition: LedTask.cc:136
void runOnUncalibRecHits(EcalUncalibratedRecHitCollection const &)
Definition: LedTask.cc:290
unsigned rtHalf_[nEEDCC]
Definition: LedTask.h:42
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: LedTask.cc:69
void runOnRawData(EcalRawDataCollection const &)
Definition: LedTask.cc:88
void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: LedTask.cc:340
int emptyLSLimit_
Definition: LedTask.h:46
unsigned wavelength_[nEEDCC]
Definition: LedTask.h:41
std::map< unsigned, float > pnAmp_
Definition: LedTask.h:43
std::map< int, unsigned > wlToME_
Definition: LedTask.h:38
bool filterRunType(short const *) override
Definition: LedTask.cc:49
void setParams(edm::ParameterSet const &) override
Definition: LedTask.cc:22
bool analyze(void const *, Collections) override
Definition: LedTask.h:50
Definition: Run.h:45
void runOnPnDigis(EcalPnDiodeDigiCollection const &)
Definition: LedTask.cc:249