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 
5 
9 
10 namespace ecaldqm {
11 
12  class LedTask : public DQWorkerTask {
13  public:
15  ~LedTask();
16 
17  bool filterRunType(const std::vector<short>&) override;
18 
19  void bookMEs() override;
20 
21  void beginRun(const edm::Run &, const edm::EventSetup &) override;
22  void endEvent(const edm::Event &, const edm::EventSetup &) override;
23 
24  void analyze(const void*, Collections) override;
25 
27  void runOnDigis(const EcalDigiCollection&);
30 
31  enum Constants {
32  nWL = 2,
33  nPNGain = 2
34  };
35 
36  enum MESets {
37  kAmplitudeSummary, // profile2d
38  kAmplitude = kAmplitudeSummary + nWL, // profile2d
41  kTiming = kShape + nWL, // profile2d
42  kAOverP = kTiming + nWL, // profile2d
43  kPNAmplitude = kAOverP + nWL, // profile2d
44  kPNOccupancy = kPNAmplitude + nWL * nPNGain, // profile2d
46  };
47 
48  static void setMEData(std::vector<MEData>&);
49 
50  private:
51  std::vector<int> ledWavelengths_;
52  std::vector<int> MGPAGainsPN_;
53 
56  std::map<int, std::vector<float> > pnAmp_;
57  };
58 
59  inline void LedTask::analyze(const void* _p, Collections _collection){
60  switch(_collection){
61  case kEcalRawData:
62  runOnRawData(*static_cast<const EcalRawDataCollection*>(_p));
63  break;
64  case kEEDigi:
65  runOnDigis(*static_cast<const EcalDigiCollection*>(_p));
66  break;
67  case kPnDiodeDigi:
68  runOnPnDigis(*static_cast<const EcalPnDiodeDigiCollection*>(_p));
69  break;
70  case kEBUncalibRecHit:
71  case kEEUncalibRecHit:
72  runOnUncalibRecHits(*static_cast<const EcalUncalibratedRecHitCollection*>(_p));
73  break;
74  default:
75  break;
76  }
77  }
78 
79 }
80 
81 #endif
void beginRun(const edm::Run &, const edm::EventSetup &) override
Definition: LedTask.cc:94
int wavelength_[BinService::nDCC]
Definition: LedTask.h:55
void bookMEs() override
Definition: LedTask.cc:71
void runOnRawData(const EcalRawDataCollection &)
Definition: LedTask.cc:130
std::map< int, std::vector< float > > pnAmp_
Definition: LedTask.h:56
std::vector< int > ledWavelengths_
Definition: LedTask.h:51
void runOnUncalibRecHits(const EcalUncalibratedRecHitCollection &)
Definition: LedTask.cc:214
void endEvent(const edm::Event &, const edm::EventSetup &) override
Definition: LedTask.cc:104
static void setMEData(std::vector< MEData > &)
Definition: LedTask.cc:271
bool filterRunType(const std::vector< short > &) override
Definition: LedTask.cc:114
LedTask(const edm::ParameterSet &, const edm::ParameterSet &)
Definition: LedTask.cc:10
void runOnPnDigis(const EcalPnDiodeDigiCollection &)
Definition: LedTask.cc:171
void analyze(const void *, Collections) override
Definition: LedTask.h:59
bool enable_[BinService::nDCC]
Definition: LedTask.h:54
void runOnDigis(const EcalDigiCollection &)
Definition: LedTask.cc:144
std::vector< int > MGPAGainsPN_
Definition: LedTask.h:52
Definition: Run.h:41