CMS 3D CMS Logo

ClusterTask.h
Go to the documentation of this file.
1 #ifndef ClusterTask_H
2 #define ClusterTask_H
3 
4 #include "DQWorkerTask.h"
5 
10 
13 
19 #include <bitset>
20 
21 namespace ecaldqm {
22  class ClusterTask : public DQWorkerTask {
23  public:
24  ClusterTask();
25  ~ClusterTask() override {}
26 
27  bool filterRunType(short const*) override;
28 
29  void addDependencies(DependencySet&) override;
30 
31  void beginEvent(edm::Event const&, edm::EventSetup const&, bool const&, bool&) override;
32  void endEvent(edm::Event const&, edm::EventSetup const&) override;
33 
34  bool analyze(void const*, Collections) override;
35 
39 
40  void setTokens(edm::ConsumesCollector&) override;
41 
43 
44  private:
45  void setParams(edm::ParameterSet const&) override;
46 
49  // int ievt_;
50  // int massCalcPrescale_;
51  bool doExtra_;
54  std::vector<std::string> egTriggerAlgos_;
55  std::bitset<nTriggerTypes> triggered_;
57 
63  };
64 
65  inline bool ClusterTask::analyze(void const* _p, Collections _collection) {
66  switch (_collection) {
67  case kEBRecHit:
68  case kEERecHit:
69  if (_p)
70  runOnRecHits(*static_cast<EcalRecHitCollection const*>(_p), _collection);
71  return true;
72  break;
73  case kEBBasicCluster:
74  case kEEBasicCluster:
75  if (_p)
76  runOnBasicClusters(*static_cast<edm::View<reco::CaloCluster> const*>(_p), _collection);
77  return true;
78  break;
79  case kEBSuperCluster:
80  case kEESuperCluster:
81  if (_p)
82  runOnSuperClusters(*static_cast<reco::SuperClusterCollection const*>(_p), _collection);
83  return true;
84  break;
85  default:
86  break;
87  }
88 
89  return false;
90  }
91 
92 } // namespace ecaldqm
93 
94 #endif
void runOnBasicClusters(edm::View< reco::CaloCluster > const &, Collections)
Definition: ClusterTask.cc:210
void endEvent(edm::Event const &, edm::EventSetup const &) override
Definition: ClusterTask.cc:178
void addDependencies(DependencySet &) override
Definition: ClusterTask.cc:69
EcalRecHitCollection const * ebHits_
Definition: ClusterTask.h:47
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > L1GlobalTriggerReadoutRecordToken_
Definition: ClusterTask.h:60
std::vector< std::string > egTriggerAlgos_
Definition: ClusterTask.h:54
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
bool analyze(void const *, Collections) override
Definition: ClusterTask.h:65
float swissCrossMaxThreshold_
Definition: ClusterTask.h:53
unsigned trigTypeToME_[nTriggerTypes]
Definition: ClusterTask.h:56
bool filterRunType(short const *) override
Definition: ClusterTask.cc:185
void beginEvent(edm::Event const &, edm::EventSetup const &, bool const &, bool &) override
Definition: ClusterTask.cc:74
EcalRecHitCollection const * eeHits_
Definition: ClusterTask.h:48
edm::EDGetTokenT< L1MuGMTReadoutCollection > L1MuGMTReadoutCollectionToken_
Definition: ClusterTask.h:61
void runOnRecHits(EcalRecHitCollection const &, Collections)
Definition: ClusterTask.cc:197
void setTokens(edm::ConsumesCollector &) override
Definition: ClusterTask.cc:518
void runOnSuperClusters(reco::SuperClusterCollection const &, Collections)
Definition: ClusterTask.cc:359
edm::InputTag L1GlobalTriggerReadoutRecordTag_
Definition: ClusterTask.h:58
std::bitset< nTriggerTypes > triggered_
Definition: ClusterTask.h:55
~ClusterTask() override
Definition: ClusterTask.h:25
edm::InputTag L1MuGMTReadoutCollectionTag_
Definition: ClusterTask.h:59
void setParams(edm::ParameterSet const &) override
Definition: ClusterTask.cc:34
edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd > menuRcd
Definition: ClusterTask.h:62