CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  private:
35  void setParams(edm::ParameterSet const&);
36 
37  std::map<int, unsigned> wlToME_;
38 
39  bool enable_[nEEDCC];
40  unsigned wavelength_[nEEDCC];
41  unsigned rtHalf_[nEEDCC];
42  std::map<unsigned, float> pnAmp_;
43 
44  int emptyLS_;
46  };
47 
48  inline bool LedTask::analyze(void const* _p, Collections _collection){
49  switch(_collection){
50  case kEcalRawData:
51  if(_p) runOnRawData(*static_cast<EcalRawDataCollection const*>(_p));
52  return true;
53  break;
54  case kEEDigi:
55  if(_p) runOnDigis(*static_cast<EEDigiCollection const*>(_p));
56  return true;
57  break;
58  case kPnDiodeDigi:
59  if(_p) runOnPnDigis(*static_cast<EcalPnDiodeDigiCollection const*>(_p));
60  return true;
61  break;
63  if(_p) runOnUncalibRecHits(*static_cast<EcalUncalibratedRecHitCollection const*>(_p));
64  return true;
65  break;
66  default:
67  break;
68  }
69 
70  return false;
71  }
72 
73 }
74 
75 #endif
bool enable_[nEEDCC]
Definition: LedTask.h:39
void setParams(edm::ParameterSet const &)
Definition: LedTask.cc:22
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:81
void runOnDigis(EEDigiCollection const &)
Definition: LedTask.cc:114
void runOnUncalibRecHits(EcalUncalibratedRecHitCollection const &)
Definition: LedTask.cc:265
unsigned rtHalf_[nEEDCC]
Definition: LedTask.h:41
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: LedTask.cc:69
void runOnRawData(EcalRawDataCollection const &)
Definition: LedTask.cc:87
int emptyLSLimit_
Definition: LedTask.h:45
unsigned wavelength_[nEEDCC]
Definition: LedTask.h:40
std::map< unsigned, float > pnAmp_
Definition: LedTask.h:42
std::map< int, unsigned > wlToME_
Definition: LedTask.h:37
bool filterRunType(short const *) override
Definition: LedTask.cc:49
bool analyze(void const *, Collections) override
Definition: LedTask.h:48
Definition: Run.h:41
void runOnPnDigis(EcalPnDiodeDigiCollection const &)
Definition: LedTask.cc:224