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