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  bool analyze(void const*, Collections) override;
23 
24  void beginRun(edm::Run const&, edm::EventSetup const&) override;
25  void beginEvent(edm::Event const&, edm::EventSetup const&) override;
26 
29  template<typename DigiCollection> void runOnDigis(DigiCollection const&);
30 
31  enum Constants {
32  nBXBins = 15
33  };
34 
35  private:
36  void setParams(edm::ParameterSet const&) override;
37 
39 
40  bool runOnEmul_;
41 
42 /* std::string HLTCaloPath_; */
43 /* std::string HLTMuonPath_; */
44 /* bool HLTCaloBit_; */
45 /* bool HLTMuonBit_; */
46 
47  int bxBinEdges_[nBXBins + 1];
48  double bxBin_;
49 
50  std::map<uint32_t, unsigned> towerReadouts_;
51 
54 
55  };
56 
57  inline bool TrigPrimTask::analyze(void const* _p, Collections _collection){
58  switch(_collection){
59  case kTrigPrimDigi:
60  if(_p) runOnRealTPs(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
61  return true;
62  break;
63  case kTrigPrimEmulDigi:
64  if(_p && runOnEmul_) runOnEmulTPs(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
65  return runOnEmul_;
66  break;
67  case kEBDigi:
68  if(_p) runOnDigis(*static_cast<EBDigiCollection const*>(_p));
69  return true;
70  break;
71  case kEEDigi:
72  if(_p) runOnDigis(*static_cast<EEDigiCollection const*>(_p));
73  return true;
74  break;
75  default:
76  break;
77  }
78  return false;
79  }
80 
81 }
82 
83 #endif
84 
void beginEvent(edm::Event const &, edm::EventSetup const &) override
Definition: TrigPrimTask.cc:61
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:52
std::map< uint32_t, unsigned > towerReadouts_
Definition: TrigPrimTask.h:50
void addDependencies(DependencySet &) override
Definition: TrigPrimTask.cc:45
void runOnEmulTPs(EcalTrigPrimDigiCollection const &)
void runOnDigis(DigiCollection const &)
EcalTrigPrimDigiCollection const * realTps_
Definition: TrigPrimTask.h:38
int bxBinEdges_[nBXBins+1]
Definition: TrigPrimTask.h:47
edm::ESHandle< EcalTPGStripStatus > StripStatusRcd
Definition: TrigPrimTask.h:53
void runOnRealTPs(EcalTrigPrimDigiCollection const &)
bool analyze(void const *, Collections) override
Definition: TrigPrimTask.h:57
Definition: Run.h:43