CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PresampleTask.h
Go to the documentation of this file.
1 #ifndef PresampleTask_H
2 #define PresampleTask_H
3 
4 #include "DQWorkerTask.h"
5 
12 
13 namespace ecaldqm {
14  class PresampleTask : public DQWorkerTask {
15  public:
16  PresampleTask();
17  ~PresampleTask() override {}
18 
19  bool filterRunType(short const*) override;
20 
21  void beginRun(edm::Run const&, edm::EventSetup const&) override;
22  void beginEvent(edm::Event const&, edm::EventSetup const&, bool const&, bool&) override;
23  bool analyze(void const*, Collections) override;
24 
25  template <typename DigiCollection>
26  void runOnDigis(DigiCollection const&);
27  void setTokens(edm::ConsumesCollector&) override;
28 
29  private:
30  void setParams(edm::ParameterSet const&) override;
34  int nSamples_;
36  bool FillPedestal = false;
37  };
38 
39  inline bool PresampleTask::analyze(void const* _p, Collections _collection) {
40  switch (_collection) {
41  case kEBDigi:
42  if (_p)
43  runOnDigis(*static_cast<EBDigiCollection const*>(_p));
44  return true;
45  case kEEDigi:
46  if (_p)
47  runOnDigis(*static_cast<EEDigiCollection const*>(_p));
48  return true;
49  break;
50  default:
51  break;
52  }
53 
54  return false;
55  }
56 } // namespace ecaldqm
57 
58 #endif
void beginRun(edm::Run const &, edm::EventSetup const &) override
void beginEvent(edm::Event const &, edm::EventSetup const &, bool const &, bool &) override
void runOnDigis(DigiCollection const &)
void setParams(edm::ParameterSet const &) override
void setTokens(edm::ConsumesCollector &) override
bool analyze(void const *, Collections) override
Definition: PresampleTask.h:39
edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > Pedtoken_
Definition: PresampleTask.h:31
bool filterRunType(short const *) override
Definition: Run.h:45