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
ecaldqm::TrigPrimTask::addDependencies
void addDependencies(DependencySet &) override
Definition: TrigPrimTask.cc:44
ecaldqm::TrigPrimTask::lhcStatusInfoRecordToken_
edm::EDGetTokenT< TCDSRecord > lhcStatusInfoRecordToken_
Definition: TrigPrimTask.h:62
ecaldqm
Definition: DQWorker.h:24
ESHandle.h
ecaldqm::DependencySet
Definition: DQWorkerTask.h:44
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
edm::EDGetTokenT< TCDSRecord >
ecaldqm::kEEDigi
Definition: Collections.h:26
ecaldqm::TrigPrimTask::towerReadouts_
std::map< uint32_t, unsigned > towerReadouts_
Definition: TrigPrimTask.h:56
ecaldqm::TrigPrimTask::Constants
Constants
Definition: TrigPrimTask.h:39
edm::SortedCollection
Definition: SortedCollection.h:49
ecaldqm::TrigPrimTask::setTokens
void setTokens(edm::ConsumesCollector &) override
Definition: TrigPrimTask.cc:183
ecaldqm::DQWorkerTask
Definition: DQWorkerTask.h:71
TCDSRecord.h
EcalDigiCollections.h
ecaldqm::TrigPrimTask::runOnRealTPs
void runOnRealTPs(EcalTrigPrimDigiCollection const &)
Definition: TrigPrimTask.cc:187
edm::ESHandle< EcalTPGTowerStatus >
EDGetToken.h
ecaldqm::TrigPrimTask::runOnEmulTPs
void runOnEmulTPs(EcalTrigPrimDigiCollection const &)
Definition: TrigPrimTask.cc:288
edm::ParameterSet
Definition: ParameterSet.h:36
ecaldqm::TrigPrimTask::runOnEmul_
bool runOnEmul_
Definition: TrigPrimTask.h:46
ecaldqm::TrigPrimTask::analyze
bool analyze(void const *, Collections) override
Definition: TrigPrimTask.h:66
ecaldqm::TrigPrimTask::setParams
void setParams(edm::ParameterSet const &) override
Definition: TrigPrimTask.cc:30
ecaldqm::TrigPrimTask::StripStatusRcd
edm::ESHandle< EcalTPGStripStatus > StripStatusRcd
Definition: TrigPrimTask.h:59
ecaldqm::Collections
Collections
Definition: Collections.h:8
ecaldqm::TrigPrimTask::lhcStatusInfoCollectionTag_
edm::InputTag lhcStatusInfoCollectionTag_
Definition: TrigPrimTask.h:61
edm::EventSetup
Definition: EventSetup.h:57
EcalTPGStripStatus.h
ecaldqm::kTrigPrimDigi
Definition: Collections.h:28
ecaldqm::TrigPrimTask::TrigPrimTask
TrigPrimTask()
Definition: TrigPrimTask.cc:16
ecaldqm::TrigPrimTask::bxBin_
double bxBin_
Definition: TrigPrimTask.h:54
EcalTPGTowerStatus.h
InputTag.h
ecaldqm::kTrigPrimEmulDigi
Definition: Collections.h:29
siStripShotFilter_cfi.DigiCollection
DigiCollection
Definition: siStripShotFilter_cfi.py:6
ecaldqm::kEBDigi
Definition: Collections.h:25
ecaldqm::TrigPrimTask::runOnDigis
void runOnDigis(DigiCollection const &)
Definition: TrigPrimTask.cc:176
ecaldqm::TrigPrimTask::beginRun
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: TrigPrimTask.cc:49
ecaldqm::TrigPrimTask::lhcStatusSet_
bool lhcStatusSet_
Definition: TrigPrimTask.h:63
DQWorkerTask.h
ecaldqm::TrigPrimTask::realTps_
EcalTrigPrimDigiCollection const * realTps_
Definition: TrigPrimTask.h:44
ecaldqm::TrigPrimTask::~TrigPrimTask
~TrigPrimTask() override
Definition: TrigPrimTask.h:22
ConsumesCollector.h
ecaldqm::TrigPrimTask::nBXBins
Definition: TrigPrimTask.h:39
ecaldqm::TrigPrimTask::beginEvent
void beginEvent(edm::Event const &, edm::EventSetup const &) override
Definition: TrigPrimTask.cc:67
ecaldqm::TrigPrimTask
Definition: TrigPrimTask.h:19
edm::Event
Definition: Event.h:73
ecaldqm::TrigPrimTask::bxBinEdges_
std::array< int, nBXBins+1 > bxBinEdges_
Definition: TrigPrimTask.h:53
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
ecaldqm::TrigPrimTask::TTStatusRcd
edm::ESHandle< EcalTPGTowerStatus > TTStatusRcd
Definition: TrigPrimTask.h:58
ecaldqm::TrigPrimTask::beginLuminosityBlock
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: TrigPrimTask.cc:57