CMS 3D CMS Logo

LedTask.h
Go to the documentation of this file.
1 #ifndef LedTask_H
2 #define LedTask_H
3 
4 #include "DQWorkerTask.h"
5 
7 
11 
12 namespace ecaldqm {
13 
14  class LedTask : public DQWorkerTask {
15  public:
16  LedTask();
17  ~LedTask() override {}
18 
19  void addDependencies(DependencySet&) override;
20 
21  bool filterRunType(short const*) override;
22 
23  void beginRun(edm::Run const&, edm::EventSetup const&) override;
24  void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
25  void beginEvent(edm::Event const&, edm::EventSetup const&, bool const&, bool&) override;
26 
27  bool analyze(void const*, Collections) override;
28 
30  void runOnDigis(EEDigiCollection const&);
33 
34  void endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
35 
36  private:
37  void setParams(edm::ParameterSet const&) override;
38 
39  std::map<int, unsigned> wlToME_;
40 
41  bool enable_[nEEDCC];
42  unsigned wavelength_[nEEDCC];
43  unsigned rtHalf_[nEEDCC];
44  std::map<unsigned, float> pnAmp_;
45 
46  int emptyLS_;
48  int isemptyLS;
49  };
50 
51  inline bool LedTask::analyze(void const* _p, Collections _collection) {
52  switch (_collection) {
53  case kEcalRawData:
54  if (_p)
55  runOnRawData(*static_cast<EcalRawDataCollection const*>(_p));
56  return true;
57  break;
58  case kEEDigi:
59  if (_p)
60  runOnDigis(*static_cast<EEDigiCollection const*>(_p));
61  return true;
62  break;
63  case kPnDiodeDigi:
64  if (_p)
65  runOnPnDigis(*static_cast<EcalPnDiodeDigiCollection const*>(_p));
66  return true;
67  break;
69  if (_p)
70  runOnUncalibRecHits(*static_cast<EcalUncalibratedRecHitCollection const*>(_p));
71  return true;
72  break;
73  default:
74  break;
75  }
76 
77  return false;
78  }
79 
80 } // namespace ecaldqm
81 
82 #endif
ecaldqm::LedTask
Definition: LedTask.h:14
ecaldqm
Definition: DQWorker.h:29
ecaldqm::LedTask::rtHalf_
unsigned rtHalf_[nEEDCC]
Definition: LedTask.h:43
ecaldqm::LedTask::isemptyLS
int isemptyLS
Definition: LedTask.h:48
ecaldqm::DependencySet
Definition: DQWorkerTask.h:44
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
ecaldqm::kEEDigi
Definition: Collections.h:26
ecaldqm::LedTask::runOnRawData
void runOnRawData(EcalRawDataCollection const &)
Definition: LedTask.cc:66
edm::SortedCollection
Definition: SortedCollection.h:49
ecaldqm::LedTask::enable_
bool enable_[nEEDCC]
Definition: LedTask.h:41
ecaldqm::LedTask::wlToME_
std::map< int, unsigned > wlToME_
Definition: LedTask.h:39
ecaldqm::kEcalRawData
Definition: Collections.h:10
ecaldqm::kEELaserLedUncalibRecHit
Definition: Collections.h:33
EcalRecHitCollections.h
ecaldqm::LedTask::runOnPnDigis
void runOnPnDigis(EcalPnDiodeDigiCollection const &)
Definition: LedTask.cc:238
EcalRawDataCollections.h
ecaldqm::LedTask::LedTask
LedTask()
Definition: LedTask.cc:9
ecaldqm::LedTask::endLuminosityBlock
void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: LedTask.cc:336
ecaldqm::DQWorkerTask
Definition: DQWorkerTask.h:71
ecaldqm::LedTask::pnAmp_
std::map< unsigned, float > pnAmp_
Definition: LedTask.h:44
EcalDigiCollections.h
ecaldqm::LedTask::emptyLSLimit_
int emptyLSLimit_
Definition: LedTask.h:47
ecaldqm::LedTask::runOnDigis
void runOnDigis(EEDigiCollection const &)
Definition: LedTask.cc:112
ecaldqm::LedTask::beginLuminosityBlock
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: LedTask.cc:58
ecaldqm::nEEDCC
Definition: EcalDQMCommonUtils.h:93
ecaldqm::LedTask::runOnUncalibRecHits
void runOnUncalibRecHits(EcalUncalibratedRecHitCollection const &)
Definition: LedTask.cc:281
edm::ParameterSet
Definition: ParameterSet.h:47
ecaldqm::LedTask::setParams
void setParams(edm::ParameterSet const &) override
Definition: LedTask.cc:15
EEDigiCollection
Definition: EcalDigiCollections.h:69
ecaldqm::Collections
Collections
Definition: Collections.h:8
ecaldqm::kPnDiodeDigi
Definition: Collections.h:27
edm::EventSetup
Definition: EventSetup.h:58
ecaldqm::LedTask::addDependencies
void addDependencies(DependencySet &) override
Definition: LedTask.cc:33
ecaldqm::LedTask::beginRun
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: LedTask.cc:56
ecaldqm::LedTask::beginEvent
void beginEvent(edm::Event const &, edm::EventSetup const &, bool const &, bool &) override
Definition: LedTask.cc:64
DQWorkerTask.h
ecaldqm::LedTask::filterRunType
bool filterRunType(short const *) override
Definition: LedTask.cc:39
edm::Event
Definition: Event.h:73
ecaldqm::LedTask::wavelength_
unsigned wavelength_[nEEDCC]
Definition: LedTask.h:42
ecaldqm::LedTask::analyze
bool analyze(void const *, Collections) override
Definition: LedTask.h:51
EcalDQMCommonUtils.h
ecaldqm::LedTask::~LedTask
~LedTask() override
Definition: LedTask.h:17
ecaldqm::LedTask::emptyLS_
int emptyLS_
Definition: LedTask.h:46