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