CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TestPulseTask.h
Go to the documentation of this file.
1 #ifndef TestPulseTask_H
2 #define TestPulseTask_H
3 
5 
8 
9 namespace ecaldqm {
10 
11  class TestPulseTask : public DQWorkerTask {
12  public:
15 
16  void bookMEs() override;
17 
18  bool filterRunType(const std::vector<short>&) override;
19 
20  void beginRun(const edm::Run&, const edm::EventSetup&) override;
21  void endEvent(const edm::Event&, const edm::EventSetup&) override;
22 
23  void analyze(const void*, Collections) override;
24 
25  void runOnDigis(const EcalDigiCollection&);
28 
29  enum Constants {
30  nGain = 3,
31  nPNGain = 2
32  };
33 
34  enum MESets{
37  kAmplitude = kShape + nGain, // profile2d
38  kPNOccupancy = kAmplitude + nGain, // profile2d
39  kPNAmplitude = kPNOccupancy + nPNGain, // profile2d
40  nMESets = kPNAmplitude + nPNGain
41  };
42 
43  static void setMEData(std::vector<MEData>&);
44 
45  protected:
46  bool enable_[54];
47  int gain_[54];
48  std::vector<int> MGPAGains_;
49  std::vector<int> MGPAGainsPN_;
50  };
51 
52  inline void TestPulseTask::analyze(const void* _p, Collections _collection){
53  switch(_collection){
54  case kEBDigi:
55  case kEEDigi:
56  runOnDigis(*static_cast<const EcalDigiCollection*>(_p));
57  break;
58  case kPnDiodeDigi:
59  runOnPnDigis(*static_cast<const EcalPnDiodeDigiCollection*>(_p));
60  break;
61  case kEBUncalibRecHit:
62  case kEEUncalibRecHit:
63  runOnUncalibRecHits(*static_cast<const EcalUncalibratedRecHitCollection*>(_p));
64  break;
65  default:
66  break;
67  }
68  }
69 
70 }
71 
72 #endif
void analyze(const void *, Collections) override
Definition: TestPulseTask.h:52
std::vector< int > MGPAGains_
Definition: TestPulseTask.h:48
static void setMEData(std::vector< MEData > &)
void beginRun(const edm::Run &, const edm::EventSetup &) override
void endEvent(const edm::Event &, const edm::EventSetup &) override
TestPulseTask(const edm::ParameterSet &, const edm::ParameterSet &)
void runOnPnDigis(const EcalPnDiodeDigiCollection &)
void runOnDigis(const EcalDigiCollection &)
std::vector< int > MGPAGainsPN_
Definition: TestPulseTask.h:49
bool filterRunType(const std::vector< short > &) override
void runOnUncalibRecHits(const EcalUncalibratedRecHitCollection &)
void bookMEs() override
Definition: Run.h:41