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_;
46  };
47 
48  inline bool LaserTask::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 kEBDigi:
55  if(_p) runOnDigis(*static_cast<EBDigiCollection const*>(_p));
56  return true;
57  break;
58  case kEEDigi:
59  if(_p) runOnDigis(*static_cast<EEDigiCollection const*>(_p));
60  return true;
61  break;
62  case kPnDiodeDigi:
63  if(_p) runOnPnDigis(*static_cast<EcalPnDiodeDigiCollection const*>(_p));
64  return true;
65  break;
68  if(_p) runOnUncalibRecHits(*static_cast<EcalUncalibratedRecHitCollection const*>(_p));
69  return true;
70  break;
71  default:
72  break;
73  }
74 
75  return false;
76  }
77 }
78 
79 #endif
unsigned rtHalf_[nDCC]
Definition: LaserTask.h:41
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: LaserTask.cc:69
bool analyze(void const *, Collections) override
Definition: LaserTask.h:48
std::map< int, unsigned > wlToME_
Definition: LaserTask.h:37
bool filterRunType(short const *) override
Definition: LaserTask.cc:51
std::map< uint32_t, float > pnAmp_
Definition: LaserTask.h:42
void runOnPnDigis(EcalPnDiodeDigiCollection const &)
Definition: LaserTask.cc:213
void runOnDigis(DigiCollection const &)
Definition: LaserTask.cc:108
void runOnRawData(EcalRawDataCollection const &)
Definition: LaserTask.cc:87
unsigned wavelength_[nDCC]
Definition: LaserTask.h:40
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: LaserTask.cc:75
void setParams(edm::ParameterSet const &) override
Definition: LaserTask.cc:22
void runOnUncalibRecHits(EcalUncalibratedRecHitCollection const &)
Definition: LaserTask.cc:257
void addDependencies(DependencySet &) override
Definition: LaserTask.cc:41
bool enable_[nDCC]
Definition: LaserTask.h:39
void beginEvent(edm::Event const &, edm::EventSetup const &) override
Definition: LaserTask.cc:81
Definition: Run.h:41