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
ecaldqm::TrigPrimTask::addDependencies
void addDependencies(DependencySet &) override
Definition: TrigPrimTask.cc:44
ecaldqm::TrigPrimTask::beginEvent
void beginEvent(edm::Event const &, edm::EventSetup const &, bool const &, bool &) override
Definition: TrigPrimTask.cc:57
ecaldqm::TrigPrimTask::bxBinEdges_
std::vector< int > bxBinEdges_
Definition: TrigPrimTask.h:54
ecaldqm::TrigPrimTask::lhcStatusInfoRecordToken_
edm::EDGetTokenT< TCDSRecord > lhcStatusInfoRecordToken_
Definition: TrigPrimTask.h:67
ecaldqm
Definition: DQWorker.h:37
EcalTPGStripStatusRcd.h
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:59
ecaldqm::TrigPrimTask::bxBinEdgesFine_
std::vector< int > bxBinEdgesFine_
Definition: TrigPrimTask.h:55
ecaldqm::TrigPrimTask::Constants
Constants
Definition: TrigPrimTask.h:40
edm::SortedCollection
Definition: SortedCollection.h:49
ecaldqm::TrigPrimTask::bxBinFine_
double bxBinFine_
Definition: TrigPrimTask.h:57
ecaldqm::TrigPrimTask::StripStatus
const EcalTPGStripStatus * StripStatus
Definition: TrigPrimTask.h:64
ecaldqm::TrigPrimTask::TTStatus
const EcalTPGTowerStatus * TTStatus
Definition: TrigPrimTask.h:63
ecaldqm::TrigPrimTask::setTokens
void setTokens(edm::ConsumesCollector &) override
Definition: TrigPrimTask.cc:179
ecaldqm::DQWorkerTask
Definition: DQWorkerTask.h:71
TCDSRecord.h
EcalDigiCollections.h
ecaldqm::TrigPrimTask::runOnRealTPs
void runOnRealTPs(EcalTrigPrimDigiCollection const &)
Definition: TrigPrimTask.cc:185
EDGetToken.h
ecaldqm::TrigPrimTask::TTStatusRcd_
edm::ESGetToken< EcalTPGTowerStatus, EcalTPGTowerStatusRcd > TTStatusRcd_
Definition: TrigPrimTask.h:61
ecaldqm::TrigPrimTask::runOnEmulTPs
void runOnEmulTPs(EcalTrigPrimDigiCollection const &)
Definition: TrigPrimTask.cc:284
edm::ParameterSet
Definition: ParameterSet.h:47
ecaldqm::TrigPrimTask::runOnEmul_
bool runOnEmul_
Definition: TrigPrimTask.h:47
ecaldqm::TrigPrimTask::analyze
bool analyze(void const *, Collections) override
Definition: TrigPrimTask.h:70
ecaldqm::TrigPrimTask::setParams
void setParams(edm::ParameterSet const &) override
Definition: TrigPrimTask.cc:28
ecaldqm::Collections
Collections
Definition: Collections.h:8
ecaldqm::TrigPrimTask::lhcStatusInfoCollectionTag_
edm::InputTag lhcStatusInfoCollectionTag_
Definition: TrigPrimTask.h:66
edm::EventSetup
Definition: EventSetup.h:58
EcalTPGStripStatus.h
ecaldqm::kTrigPrimDigi
Definition: Collections.h:28
ecaldqm::TrigPrimTask::TrigPrimTask
TrigPrimTask()
Definition: TrigPrimTask.cc:13
ecaldqm::TrigPrimTask::bxBin_
double bxBin_
Definition: TrigPrimTask.h:56
EcalTPGTowerStatus.h
edm::ESGetToken< EcalTPGTowerStatus, EcalTPGTowerStatusRcd >
InputTag.h
ecaldqm::kTrigPrimEmulDigi
Definition: Collections.h:29
siStripShotFilter_cfi.DigiCollection
DigiCollection
Definition: siStripShotFilter_cfi.py:6
EcalTPGTowerStatus
Definition: EcalTPGTowerStatus.h:9
ecaldqm::kEBDigi
Definition: Collections.h:25
ecaldqm::TrigPrimTask::StripStatusRcd_
edm::ESGetToken< EcalTPGStripStatus, EcalTPGStripStatusRcd > StripStatusRcd_
Definition: TrigPrimTask.h:62
ecaldqm::TrigPrimTask::runOnDigis
void runOnDigis(DigiCollection const &)
Definition: TrigPrimTask.cc:172
ecaldqm::TrigPrimTask::beginRun
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: TrigPrimTask.cc:49
DQWorkerTask.h
ecaldqm::TrigPrimTask::realTps_
EcalTrigPrimDigiCollection const * realTps_
Definition: TrigPrimTask.h:45
EcalTPGTowerStatusRcd.h
ecaldqm::TrigPrimTask::~TrigPrimTask
~TrigPrimTask() override
Definition: TrigPrimTask.h:24
EcalTPGStripStatus
Definition: EcalTPGStripStatus.h:9
ConsumesCollector.h
ecaldqm::TrigPrimTask::nBXBins
Definition: TrigPrimTask.h:40
ecaldqm::TrigPrimTask
Definition: TrigPrimTask.h:21
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:45