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  enum Wavelength{
39  };
40 
41  private:
42  void setParams(edm::ParameterSet const&) override;
43 
44  std::map<int, unsigned> wlToME_;
45 
46  bool enable_[nDCC];
47  unsigned wavelength_[nDCC];
48  unsigned rtHalf_[nDCC];
49  std::map<uint32_t, float> pnAmp_;
50 
51  int emptyLS_;
54  };
55 
56  inline bool LaserTask::analyze(void const* _p, Collections _collection){
57  switch(_collection){
58  case kEcalRawData:
59  if(_p) runOnRawData(*static_cast<EcalRawDataCollection const*>(_p));
60  return true;
61  break;
62  case kEBDigi:
63  if(_p) runOnDigis(*static_cast<EBDigiCollection const*>(_p));
64  return true;
65  break;
66  case kEEDigi:
67  if(_p) runOnDigis(*static_cast<EEDigiCollection const*>(_p));
68  return true;
69  break;
70  case kPnDiodeDigi:
71  if(_p) runOnPnDigis(*static_cast<EcalPnDiodeDigiCollection const*>(_p));
72  return true;
73  break;
76  if(_p) runOnUncalibRecHits(*static_cast<EcalUncalibratedRecHitCollection const*>(_p));
77  return true;
78  break;
79  default:
80  break;
81  }
82 
83  return false;
84  }
85 }
86 
87 #endif
unsigned rtHalf_[nDCC]
Definition: LaserTask.h:48
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: LaserTask.cc:72
bool analyze(void const *, Collections) override
Definition: LaserTask.h:56
std::map< int, unsigned > wlToME_
Definition: LaserTask.h:44
bool filterRunType(short const *) override
Definition: LaserTask.cc:54
std::map< uint32_t, float > pnAmp_
Definition: LaserTask.h:49
void runOnPnDigis(EcalPnDiodeDigiCollection const &)
Definition: LaserTask.cc:257
void runOnDigis(DigiCollection const &)
Definition: LaserTask.cc:137
void runOnRawData(EcalRawDataCollection const &)
Definition: LaserTask.cc:90
unsigned wavelength_[nDCC]
Definition: LaserTask.h:47
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:301
void addDependencies(DependencySet &) override
Definition: LaserTask.cc:44
bool enable_[nDCC]
Definition: LaserTask.h:46
void beginEvent(edm::Event const &, edm::EventSetup const &) override
Definition: LaserTask.cc:84
Definition: Run.h:41