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 
18 
19 namespace ecaldqm {
20 
21  class TrigPrimTask : public DQWorkerTask {
22  public:
23  TrigPrimTask();
24  ~TrigPrimTask() override {}
25 
26  void addDependencies(DependencySet&) override;
27 
28  void beginRun(edm::Run const&, edm::EventSetup const&) override;
29  void beginEvent(edm::Event const&, edm::EventSetup const&, bool const&, bool&) override;
30 
31  bool analyze(void const*, Collections) override;
32 
35  template <typename DigiCollection>
36  void runOnDigis(DigiCollection const&);
37 
38  void setTokens(edm::ConsumesCollector&) override;
39 
40  enum Constants { nBXBins = 15 };
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::vector<int> bxBinEdges_;
55  std::vector<int> bxBinEdgesFine_;
56  double bxBin_;
57  double bxBinFine_;
58 
59  std::map<uint32_t, unsigned> towerReadouts_;
60 
65 
68  };
69 
70  inline bool TrigPrimTask::analyze(void const* _p, Collections _collection) {
71  switch (_collection) {
72  case kTrigPrimDigi:
73  if (_p)
74  runOnRealTPs(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
75  return true;
76  break;
77  case kTrigPrimEmulDigi:
78  if (_p && runOnEmul_)
79  runOnEmulTPs(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
80  return runOnEmul_;
81  break;
82  case kEBDigi:
83  if (_p)
84  runOnDigis(*static_cast<EBDigiCollection const*>(_p));
85  return true;
86  break;
87  case kEEDigi:
88  if (_p)
89  runOnDigis(*static_cast<EEDigiCollection const*>(_p));
90  return true;
91  break;
92  default:
93  break;
94  }
95  return false;
96  }
97 
98 } // namespace ecaldqm
99 
100 #endif
const EcalTPGTowerStatus * TTStatus
Definition: TrigPrimTask.h:63
void setParams(edm::ParameterSet const &) override
Definition: TrigPrimTask.cc:28
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: TrigPrimTask.cc:49
void beginEvent(edm::Event const &, edm::EventSetup const &, bool const &, bool &) override
Definition: TrigPrimTask.cc:57
edm::ESGetToken< EcalTPGTowerStatus, EcalTPGTowerStatusRcd > TTStatusRcd_
Definition: TrigPrimTask.h:61
std::vector< int > bxBinEdgesFine_
Definition: TrigPrimTask.h:55
std::map< uint32_t, unsigned > towerReadouts_
Definition: TrigPrimTask.h:59
edm::EDGetTokenT< TCDSRecord > lhcStatusInfoRecordToken_
Definition: TrigPrimTask.h:67
void addDependencies(DependencySet &) override
Definition: TrigPrimTask.cc:44
void runOnEmulTPs(EcalTrigPrimDigiCollection const &)
edm::ESGetToken< EcalTPGStripStatus, EcalTPGStripStatusRcd > StripStatusRcd_
Definition: TrigPrimTask.h:62
const EcalTPGStripStatus * StripStatus
Definition: TrigPrimTask.h:64
void runOnDigis(DigiCollection const &)
EcalTrigPrimDigiCollection const * realTps_
Definition: TrigPrimTask.h:45
~TrigPrimTask() override
Definition: TrigPrimTask.h:24
void setTokens(edm::ConsumesCollector &) override
std::vector< int > bxBinEdges_
Definition: TrigPrimTask.h:54
void runOnRealTPs(EcalTrigPrimDigiCollection const &)
bool analyze(void const *, Collections) override
Definition: TrigPrimTask.h:70
Definition: Run.h:45
edm::InputTag lhcStatusInfoCollectionTag_
Definition: TrigPrimTask.h:66