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();
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> void runOnDigis(DigiCollection const&);
35 
36  void setTokens(edm::ConsumesCollector&) override;
37 
38  enum Constants {
39  nBXBins = 15
40  };
41 
42  private:
43  void setParams(edm::ParameterSet const&) override;
44 
46 
47  bool runOnEmul_;
48 
49 /* std::string HLTCaloPath_; */
50 /* std::string HLTMuonPath_; */
51 /* bool HLTCaloBit_; */
52 /* bool HLTMuonBit_; */
53 
54  std::array<int,nBXBins+1> bxBinEdges_;
55  double bxBin_;
56 
57  std::map<uint32_t, unsigned> towerReadouts_;
58 
61 
65 
66  };
67 
68  inline bool TrigPrimTask::analyze(void const* _p, Collections _collection){
69  switch(_collection){
70  case kTrigPrimDigi:
71  if(_p) runOnRealTPs(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
72  return true;
73  break;
74  case kTrigPrimEmulDigi:
75  if(_p && runOnEmul_) runOnEmulTPs(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
76  return runOnEmul_;
77  break;
78  case kEBDigi:
79  if(_p) runOnDigis(*static_cast<EBDigiCollection const*>(_p));
80  return true;
81  break;
82  case kEEDigi:
83  if(_p) runOnDigis(*static_cast<EEDigiCollection const*>(_p));
84  return true;
85  break;
86  default:
87  break;
88  }
89  return false;
90  }
91 
92 }
93 
94 #endif
95 
void beginEvent(edm::Event const &, edm::EventSetup const &) override
Definition: TrigPrimTask.cc:76
void setParams(edm::ParameterSet const &) override
Definition: TrigPrimTask.cc:34
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: TrigPrimTask.cc:54
edm::ESHandle< EcalTPGTowerStatus > TTStatusRcd
Definition: TrigPrimTask.h:59
std::map< uint32_t, unsigned > towerReadouts_
Definition: TrigPrimTask.h:57
edm::EDGetTokenT< TCDSRecord > lhcStatusInfoRecordToken_
Definition: TrigPrimTask.h:63
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: TrigPrimTask.cc:64
void addDependencies(DependencySet &) override
Definition: TrigPrimTask.cc:48
void runOnEmulTPs(EcalTrigPrimDigiCollection const &)
void runOnDigis(DigiCollection const &)
EcalTrigPrimDigiCollection const * realTps_
Definition: TrigPrimTask.h:45
void setTokens(edm::ConsumesCollector &) override
edm::ESHandle< EcalTPGStripStatus > StripStatusRcd
Definition: TrigPrimTask.h:60
void runOnRealTPs(EcalTrigPrimDigiCollection const &)
bool analyze(void const *, Collections) override
Definition: TrigPrimTask.h:68
std::array< int, nBXBins+1 > bxBinEdges_
Definition: TrigPrimTask.h:54
Definition: Run.h:44
edm::InputTag lhcStatusInfoCollectionTag_
Definition: TrigPrimTask.h:62