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 
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
ecaldqm::PresampleTask::doPulseMaxCheck_
bool doPulseMaxCheck_
Definition: PresampleTask.h:32
EcalPedestals.h
ecaldqm
Definition: DQWorker.h:29
ESHandle.h
edm::Run
Definition: Run.h:45
ecaldqm::kEEDigi
Definition: Collections.h:26
ecaldqm::PresampleTask::runOnDigis
void runOnDigis(DigiCollection const &)
Definition: PresampleTask.cc:83
ecaldqm::PresampleTask::filterRunType
bool filterRunType(short const *) override
Definition: PresampleTask.cc:21
ecaldqm::PresampleTask::mePedestalByLS
MESet * mePedestalByLS
Definition: PresampleTask.h:35
EcalDataFrame.h
ecaldqm::DQWorkerTask
Definition: DQWorkerTask.h:71
ecaldqm::PresampleTask::pulseMaxPosition_
int pulseMaxPosition_
Definition: PresampleTask.h:33
ecaldqm::PresampleTask
Definition: PresampleTask.h:14
ecaldqm::PresampleTask::nSamples_
int nSamples_
Definition: PresampleTask.h:34
EcalDigiCollections.h
ecaldqm::PresampleTask::beginRun
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: PresampleTask.cc:33
ecaldqm::PresampleTask::Pedtoken_
edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > Pedtoken_
Definition: PresampleTask.h:31
ecaldqm::PresampleTask::FillPedestal
bool FillPedestal
Definition: PresampleTask.h:36
edm::ParameterSet
Definition: ParameterSet.h:47
ecaldqm::PresampleTask::analyze
bool analyze(void const *, Collections) override
Definition: PresampleTask.h:39
ecaldqm::PresampleTask::setParams
void setParams(edm::ParameterSet const &) override
Definition: PresampleTask.cc:14
ecaldqm::PresampleTask::PresampleTask
PresampleTask()
Definition: PresampleTask.cc:11
ecaldqm::Collections
Collections
Definition: Collections.h:8
edm::EventSetup
Definition: EventSetup.h:58
edm::ESGetToken
Definition: EventSetup.h:48
siStripShotFilter_cfi.DigiCollection
DigiCollection
Definition: siStripShotFilter_cfi.py:6
ecaldqm::kEBDigi
Definition: Collections.h:25
DQWorkerTask.h
ecaldqm::PresampleTask::~PresampleTask
~PresampleTask() override
Definition: PresampleTask.h:17
ecaldqm::PresampleTask::setTokens
void setTokens(edm::ConsumesCollector &) override
Definition: PresampleTask.cc:19
EcalPedestalsRcd.h
ConsumesCollector.h
ecaldqm::PresampleTask::beginEvent
void beginEvent(edm::Event const &, edm::EventSetup const &, bool const &, bool &) override
Definition: PresampleTask.cc:35
edm::Event
Definition: Event.h:73
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
ecaldqm::MESet
Definition: MESet.h:42