CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrigPrimTask.h
Go to the documentation of this file.
1 #ifndef TrigPrimTask_H
2 #define TrigPrimTask_H
3 
4 #include "DQWorkerTask.h"
5 
7 
9 
12 
13 namespace ecaldqm {
14 
15  class TrigPrimTask : public DQWorkerTask {
16  public:
17  TrigPrimTask();
19 
20  void addDependencies(DependencySet&) override;
21 
22  void beginRun(edm::Run const&, edm::EventSetup const&) override;
23  void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
24  void beginEvent(edm::Event const&, edm::EventSetup const&) override;
25 
26  bool analyze(void const*, Collections) override;
27 
30  template<typename DigiCollection> void runOnDigis(DigiCollection const&);
31 
32  enum Constants {
33  nBXBins = 15
34  };
35 
36  private:
37  void setParams(edm::ParameterSet const&) override;
38 
40 
41  bool runOnEmul_;
42 
43 /* std::string HLTCaloPath_; */
44 /* std::string HLTMuonPath_; */
45 /* bool HLTCaloBit_; */
46 /* bool HLTMuonBit_; */
47 
48  int bxBinEdges_[nBXBins + 1];
49  double bxBin_;
50 
51  std::map<uint32_t, unsigned> towerReadouts_;
52 
55 
56  };
57 
58  inline bool TrigPrimTask::analyze(void const* _p, Collections _collection){
59  switch(_collection){
60  case kTrigPrimDigi:
61  if(_p) runOnRealTPs(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
62  return true;
63  break;
64  case kTrigPrimEmulDigi:
65  if(_p && runOnEmul_) runOnEmulTPs(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
66  return runOnEmul_;
67  break;
68  case kEBDigi:
69  if(_p) runOnDigis(*static_cast<EBDigiCollection const*>(_p));
70  return true;
71  break;
72  case kEEDigi:
73  if(_p) runOnDigis(*static_cast<EEDigiCollection const*>(_p));
74  return true;
75  break;
76  default:
77  break;
78  }
79  return false;
80  }
81 
82 }
83 
84 #endif
85 
void beginEvent(edm::Event const &, edm::EventSetup const &) override
Definition: TrigPrimTask.cc:68
void setParams(edm::ParameterSet const &) override
Definition: TrigPrimTask.cc:32
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: TrigPrimTask.cc:51
edm::ESHandle< EcalTPGTowerStatus > TTStatusRcd
Definition: TrigPrimTask.h:53
std::map< uint32_t, unsigned > towerReadouts_
Definition: TrigPrimTask.h:51
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: TrigPrimTask.cc:61
void addDependencies(DependencySet &) override
Definition: TrigPrimTask.cc:45
void runOnEmulTPs(EcalTrigPrimDigiCollection const &)
void runOnDigis(DigiCollection const &)
EcalTrigPrimDigiCollection const * realTps_
Definition: TrigPrimTask.h:39
int bxBinEdges_[nBXBins+1]
Definition: TrigPrimTask.h:48
edm::ESHandle< EcalTPGStripStatus > StripStatusRcd
Definition: TrigPrimTask.h:54
void runOnRealTPs(EcalTrigPrimDigiCollection const &)
bool analyze(void const *, Collections) override
Definition: TrigPrimTask.h:58
Definition: Run.h:43