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 
16 
17 #include <bitset>
18 
19 namespace ecaldqm {
20  class ClusterTask : public DQWorkerTask {
21  public:
22  ClusterTask();
23  ~ClusterTask() override {}
24 
25  bool filterRunType(short const*) override;
26 
27  void addDependencies(DependencySet&) override;
28 
29  void beginEvent(edm::Event const&, edm::EventSetup const&) override;
30  void endEvent(edm::Event const&, edm::EventSetup const&) override;
31 
32  bool analyze(void const*, Collections) override;
33 
37 
38  void setTokens(edm::ConsumesCollector&) override;
39 
41 
42  private:
43  void setParams(edm::ParameterSet const&) override;
44 
47  // int ievt_;
48  // int massCalcPrescale_;
49  bool doExtra_;
52  std::vector<std::string> egTriggerAlgos_;
53  std::bitset<nTriggerTypes> triggered_;
55 
60  };
61 
62  inline bool ClusterTask::analyze(void const* _p, Collections _collection) {
63  switch (_collection) {
64  case kEBRecHit:
65  case kEERecHit:
66  if (_p)
67  runOnRecHits(*static_cast<EcalRecHitCollection const*>(_p), _collection);
68  return true;
69  break;
70  case kEBBasicCluster:
71  case kEEBasicCluster:
72  if (_p)
73  runOnBasicClusters(*static_cast<edm::View<reco::CaloCluster> const*>(_p), _collection);
74  return true;
75  break;
76  case kEBSuperCluster:
77  case kEESuperCluster:
78  if (_p)
79  runOnSuperClusters(*static_cast<reco::SuperClusterCollection const*>(_p), _collection);
80  return true;
81  break;
82  default:
83  break;
84  }
85 
86  return false;
87  }
88 
89 } // namespace ecaldqm
90 
91 #endif
void runOnBasicClusters(edm::View< reco::CaloCluster > const &, Collections)
Definition: ClusterTask.cc:214
void endEvent(edm::Event const &, edm::EventSetup const &) override
Definition: ClusterTask.cc:182
void addDependencies(DependencySet &) override
Definition: ClusterTask.cc:72
EcalRecHitCollection const * ebHits_
Definition: ClusterTask.h:45
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > L1GlobalTriggerReadoutRecordToken_
Definition: ClusterTask.h:58
void beginEvent(edm::Event const &, edm::EventSetup const &) override
Definition: ClusterTask.cc:77
std::vector< std::string > egTriggerAlgos_
Definition: ClusterTask.h:52
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
bool analyze(void const *, Collections) override
Definition: ClusterTask.h:62
float swissCrossMaxThreshold_
Definition: ClusterTask.h:51
unsigned trigTypeToME_[nTriggerTypes]
Definition: ClusterTask.h:54
bool filterRunType(short const *) override
Definition: ClusterTask.cc:189
EcalRecHitCollection const * eeHits_
Definition: ClusterTask.h:46
edm::EDGetTokenT< L1MuGMTReadoutCollection > L1MuGMTReadoutCollectionToken_
Definition: ClusterTask.h:59
void runOnRecHits(EcalRecHitCollection const &, Collections)
Definition: ClusterTask.cc:201
void setTokens(edm::ConsumesCollector &) override
Definition: ClusterTask.cc:506
void runOnSuperClusters(reco::SuperClusterCollection const &, Collections)
Definition: ClusterTask.cc:363
edm::InputTag L1GlobalTriggerReadoutRecordTag_
Definition: ClusterTask.h:56
std::bitset< nTriggerTypes > triggered_
Definition: ClusterTask.h:53
~ClusterTask() override
Definition: ClusterTask.h:23
edm::InputTag L1MuGMTReadoutCollectionTag_
Definition: ClusterTask.h:57
void setParams(edm::ParameterSet const &) override
Definition: ClusterTask.cc:37