CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LaserTask.h
Go to the documentation of this file.
1 #ifndef LaserTask_H
2 #define LaserTask_H
3 
4 #include "DQWorkerTask.h"
5 
7 
11 
12 namespace ecaldqm {
13 
14  class LaserTask : public DQWorkerTask {
15  public:
16  LaserTask();
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  template<typename DigiCollection> void runOnDigis(DigiCollection const&);
33 
34  private:
35  void setParams(edm::ParameterSet const&) override;
36 
37  std::map<int, unsigned> wlToME_;
38 
39  bool enable_[nDCC];
40  unsigned wavelength_[nDCC];
41  unsigned rtHalf_[nDCC];
42  std::map<uint32_t, float> pnAmp_;
43 
44  int emptyLS_;
47  };
48 
49  inline bool LaserTask::analyze(void const* _p, Collections _collection){
50  switch(_collection){
51  case kEcalRawData:
52  if(_p) runOnRawData(*static_cast<EcalRawDataCollection const*>(_p));
53  return true;
54  break;
55  case kEBDigi:
56  if(_p) runOnDigis(*static_cast<EBDigiCollection const*>(_p));
57  return true;
58  break;
59  case kEEDigi:
60  if(_p) runOnDigis(*static_cast<EEDigiCollection const*>(_p));
61  return true;
62  break;
63  case kPnDiodeDigi:
64  if(_p) runOnPnDigis(*static_cast<EcalPnDiodeDigiCollection const*>(_p));
65  return true;
66  break;
69  if(_p) runOnUncalibRecHits(*static_cast<EcalUncalibratedRecHitCollection const*>(_p));
70  return true;
71  break;
72  default:
73  break;
74  }
75 
76  return false;
77  }
78 }
79 
80 #endif
unsigned rtHalf_[nDCC]
Definition: LaserTask.h:41
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: LaserTask.cc:72
bool analyze(void const *, Collections) override
Definition: LaserTask.h:49
std::map< int, unsigned > wlToME_
Definition: LaserTask.h:37
bool filterRunType(short const *) override
Definition: LaserTask.cc:54
std::map< uint32_t, float > pnAmp_
Definition: LaserTask.h:42
void runOnPnDigis(EcalPnDiodeDigiCollection const &)
Definition: LaserTask.cc:231
void runOnDigis(DigiCollection const &)
Definition: LaserTask.cc:111
void runOnRawData(EcalRawDataCollection const &)
Definition: LaserTask.cc:90
unsigned wavelength_[nDCC]
Definition: LaserTask.h:40
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: LaserTask.cc:78
void setParams(edm::ParameterSet const &) override
Definition: LaserTask.cc:23
void runOnUncalibRecHits(EcalUncalibratedRecHitCollection const &)
Definition: LaserTask.cc:275
void addDependencies(DependencySet &) override
Definition: LaserTask.cc:44
bool enable_[nDCC]
Definition: LaserTask.h:39
void beginEvent(edm::Event const &, edm::EventSetup const &) override
Definition: LaserTask.cc:84
Definition: Run.h:41