CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrigPrimTask.h
Go to the documentation of this file.
1 #ifndef TrigPrimTask_H
2 #define TrigPrimTask_H
3 
4 #include "DQWorkerTask.h"
5 
7 
8 namespace ecaldqm {
9 
10  class TrigPrimTask : public DQWorkerTask {
11  public:
12  TrigPrimTask();
14 
15  void addDependencies(DependencySet&) override;
16 
17  bool analyze(void const*, Collections) override;
18 
19  void beginEvent(edm::Event const&, edm::EventSetup const&) override;
20 
23  template<typename DigiCollection> void runOnDigis(DigiCollection const&);
24 
25  enum Constants {
26  nBXBins = 15
27  };
28 
29  private:
30  void setParams(edm::ParameterSet const&) override;
31 
33 
34  bool runOnEmul_;
35 
36 /* std::string HLTCaloPath_; */
37 /* std::string HLTMuonPath_; */
38 /* bool HLTCaloBit_; */
39 /* bool HLTMuonBit_; */
40 
41  int bxBinEdges_[nBXBins + 1];
42  double bxBin_;
43 
44  std::map<uint32_t, unsigned> towerReadouts_;
45  };
46 
47  inline bool TrigPrimTask::analyze(void const* _p, Collections _collection){
48  switch(_collection){
49  case kTrigPrimDigi:
50  if(_p) runOnRealTPs(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
51  return true;
52  break;
53  case kTrigPrimEmulDigi:
54  if(_p && runOnEmul_) runOnEmulTPs(*static_cast<EcalTrigPrimDigiCollection const*>(_p));
55  return runOnEmul_;
56  break;
57  case kEBDigi:
58  if(_p) runOnDigis(*static_cast<EBDigiCollection const*>(_p));
59  return true;
60  break;
61  case kEEDigi:
62  if(_p) runOnDigis(*static_cast<EEDigiCollection const*>(_p));
63  return true;
64  break;
65  default:
66  break;
67  }
68  return false;
69  }
70 
71 }
72 
73 #endif
74 
void beginEvent(edm::Event const &, edm::EventSetup const &) override
Definition: TrigPrimTask.cc:55
void setParams(edm::ParameterSet const &) override
Definition: TrigPrimTask.cc:36
std::map< uint32_t, unsigned > towerReadouts_
Definition: TrigPrimTask.h:44
void addDependencies(DependencySet &) override
Definition: TrigPrimTask.cc:49
void runOnEmulTPs(EcalTrigPrimDigiCollection const &)
void runOnDigis(DigiCollection const &)
EcalTrigPrimDigiCollection const * realTps_
Definition: TrigPrimTask.h:32
int bxBinEdges_[nBXBins+1]
Definition: TrigPrimTask.h:41
void runOnRealTPs(EcalTrigPrimDigiCollection const &)
bool analyze(void const *, Collections) override
Definition: TrigPrimTask.h:47