CMS 3D CMS Logo

PresampleTask.h
Go to the documentation of this file.
1 #ifndef PresampleTask_H
2 #define PresampleTask_H
3 
4 #include "DQWorkerTask.h"
5 
8 
9 namespace ecaldqm {
10  class PresampleTask : public DQWorkerTask {
11  public:
12  PresampleTask();
13  ~PresampleTask() override {}
14 
15  bool filterRunType(short const*) override;
16 
17  bool analyze(void const*, Collections) override;
18 
19  template <typename DigiCollection>
20  void runOnDigis(DigiCollection const&);
21 
22  private:
23  void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
24  void setParams(edm::ParameterSet const&) override;
25 
28  int nSamples_;
30  };
31 
32  inline bool PresampleTask::analyze(void const* _p, Collections _collection) {
33  switch (_collection) {
34  case kEBDigi:
35  if (_p)
36  runOnDigis(*static_cast<EBDigiCollection const*>(_p));
37  return true;
38  case kEEDigi:
39  if (_p)
40  runOnDigis(*static_cast<EEDigiCollection const*>(_p));
41  return true;
42  break;
43  default:
44  break;
45  }
46 
47  return false;
48  }
49 } // namespace ecaldqm
50 
51 #endif
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
void runOnDigis(DigiCollection const &)
void setParams(edm::ParameterSet const &) override
bool analyze(void const *, Collections) override
Definition: PresampleTask.h:32
bool filterRunType(short const *) override