CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PedestalTask.h
Go to the documentation of this file.
1 #ifndef PedestalTask_H
2 #define PedestalTask_H
3 
4 #include "DQWorkerTask.h"
5 
7 
9 
10 namespace ecaldqm {
11 
12  class PedestalTask : public DQWorkerTask {
13  public:
14  PedestalTask();
16 
17  bool filterRunType(short const*) override;
18 
19  bool analyze(void const*, Collections) override;
20 
21  template<typename DigiCollection> void runOnDigis(DigiCollection const&);
23 
24  private:
25  void setParams(edm::ParameterSet const&) override;
26 
27  std::map<int, unsigned> gainToME_;
28  std::map<int, unsigned> pnGainToME_;
29 
30  bool enable_[nDCC];
31  };
32 
33  inline bool PedestalTask::analyze(void const* _p, Collections _collection){
34  switch(_collection){
35  case kEBDigi:
36  if(_p) runOnDigis(*static_cast<EBDigiCollection const*>(_p));
37  return true;
38  break;
39  case kEEDigi:
40  if(_p) runOnDigis(*static_cast<EEDigiCollection const*>(_p));
41  return true;
42  break;
43  case kPnDiodeDigi:
44  if(_p) runOnPnDigis(*static_cast<EcalPnDiodeDigiCollection const*>(_p));
45  return true;
46  break;
47  default:
48  break;
49  }
50 
51  return false;
52  }
53 
54 }
55 
56 #endif
bool analyze(void const *, Collections) override
Definition: PedestalTask.h:33
bool filterRunType(short const *) override
Definition: PedestalTask.cc:52
void runOnDigis(DigiCollection const &)
Definition: PedestalTask.cc:71
std::map< int, unsigned > gainToME_
Definition: PedestalTask.h:27
std::map< int, unsigned > pnGainToME_
Definition: PedestalTask.h:28
void setParams(edm::ParameterSet const &) override
Definition: PedestalTask.cc:23
void runOnPnDigis(EcalPnDiodeDigiCollection const &)