CMS 3D CMS Logo

TrigPrimTask.h
Go to the documentation of this file.
1 #ifndef TrigPrimTask_H
2 #define TrigPrimTask_H
3 
4 #include "DQWorkerTask.h"
5 
8 
13 
16 
17 namespace ecaldqm {
18 
19  class TrigPrimTask : public DQWorkerTask {
20  public:
21  TrigPrimTask();
22  ~TrigPrimTask() override {}
23 
24  void addDependencies(DependencySet&) override;
25 
26  void beginRun(edm::Run const&, edm::EventSetup const&) override;
27  void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
28  void beginEvent(edm::Event const&, edm::EventSetup const&) override;
29 
30  bool analyze(void const*, Collections) override;
31 
34  template <typename DigiCollection>
35  void runOnDigis(DigiCollection const&);
36 
37  void setTokens(edm::ConsumesCollector&) override;
38 
39  enum Constants { nBXBins = 15 };
40 
41  private:
42  void setParams(edm::ParameterSet const&) override;
43 
45 
46  bool runOnEmul_;
47 
48  /* std::string HLTCaloPath_; */
49  /* std::string HLTMuonPath_; */
50  /* bool HLTCaloBit_; */
51  /* bool HLTMuonBit_; */
52 
53  std::array<int, nBXBins + 1> bxBinEdges_;
54  double bxBin_;
55 
56  std::map<uint32_t, unsigned> towerReadouts_;
57 
60 
64  };
65 
66  inline bool TrigPrimTask::analyze(void const* _p, Collections _collection) {
67  switch (_collection) {
68  case kTrigPrimDigi:
69  if (_p)
70  runOnRealTPs(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
71  return true;
72  break;
73  case kTrigPrimEmulDigi:
74  if (_p && runOnEmul_)
75  runOnEmulTPs(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
76  return runOnEmul_;
77  break;
78  case kEBDigi:
79  if (_p)
80  runOnDigis(*static_cast<EBDigiCollection const*>(_p));
81  return true;
82  break;
83  case kEEDigi:
84  if (_p)
85  runOnDigis(*static_cast<EEDigiCollection const*>(_p));
86  return true;
87  break;
88  default:
89  break;
90  }
91  return false;
92  }
93 
94 } // namespace ecaldqm
95 
96 #endif
void beginEvent(edm::Event const &, edm::EventSetup const &) override
Definition: TrigPrimTask.cc:66
void setParams(edm::ParameterSet const &) override
Definition: TrigPrimTask.cc:30
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: TrigPrimTask.cc:48
edm::ESHandle< EcalTPGTowerStatus > TTStatusRcd
Definition: TrigPrimTask.h:58
std::map< uint32_t, unsigned > towerReadouts_
Definition: TrigPrimTask.h:56
edm::EDGetTokenT< TCDSRecord > lhcStatusInfoRecordToken_
Definition: TrigPrimTask.h:62
std::array< int, nBXBins+1 > bxBinEdges_
Definition: TrigPrimTask.h:53
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: TrigPrimTask.cc:56
void addDependencies(DependencySet &) override
Definition: TrigPrimTask.cc:43
void runOnEmulTPs(EcalTrigPrimDigiCollection const &)
void runOnDigis(DigiCollection const &)
EcalTrigPrimDigiCollection const * realTps_
Definition: TrigPrimTask.h:44
~TrigPrimTask() override
Definition: TrigPrimTask.h:22
void setTokens(edm::ConsumesCollector &) override
edm::ESHandle< EcalTPGStripStatus > StripStatusRcd
Definition: TrigPrimTask.h:59
void runOnRealTPs(EcalTrigPrimDigiCollection const &)
bool analyze(void const *, Collections) override
Definition: TrigPrimTask.h:66
Definition: Run.h:45
edm::InputTag lhcStatusInfoCollectionTag_
Definition: TrigPrimTask.h:61