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
ecaldqm::ClusterTask::menuRcd
edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd > menuRcd
Definition: ClusterTask.h:62
L1GtTriggerMenu.h
ecaldqm::ClusterTask::TriggerTypes
TriggerTypes
Definition: ClusterTask.h:42
ecaldqm::ClusterTask::ebHits_
EcalRecHitCollection const * ebHits_
Definition: ClusterTask.h:47
ecaldqm
Definition: DQWorker.h:37
ecaldqm::ClusterTask::L1GlobalTriggerReadoutRecordToken_
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > L1GlobalTriggerReadoutRecordToken_
Definition: ClusterTask.h:60
ecaldqm::ClusterTask::ClusterTask
ClusterTask()
Definition: ClusterTask.cc:18
ESHandle.h
ecaldqm::kEBBasicCluster
Definition: Collections.h:40
ecaldqm::DependencySet
Definition: DQWorkerTask.h:44
ecaldqm::kEESuperCluster
Definition: Collections.h:43
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord >
L1GtTriggerMenuRcd.h
ecaldqm::ClusterTask::setParams
void setParams(edm::ParameterSet const &) override
Definition: ClusterTask.cc:34
ecaldqm::ClusterTask
Definition: ClusterTask.h:22
edm::SortedCollection< EcalRecHit >
ecaldqm::ClusterTask::kRPCTrigger
Definition: ClusterTask.h:42
watchdog.const
const
Definition: watchdog.py:83
ecaldqm::ClusterTask::runOnBasicClusters
void runOnBasicClusters(edm::View< reco::CaloCluster > const &, Collections)
Definition: ClusterTask.cc:210
EcalRecHitCollections.h
ecaldqm::ClusterTask::nTriggerTypes
Definition: ClusterTask.h:42
L1MuRegionalCand.h
ecaldqm::ClusterTask::kEcalTrigger
Definition: ClusterTask.h:42
reco::SuperClusterCollection
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
Definition: SuperClusterFwd.h:9
ecaldqm::ClusterTask::endEvent
void endEvent(edm::Event const &, edm::EventSetup const &) override
Definition: ClusterTask.cc:178
ecaldqm::DQWorkerTask
Definition: DQWorkerTask.h:71
ecaldqm::ClusterTask::addDependencies
void addDependencies(DependencySet &) override
Definition: ClusterTask.cc:69
ecaldqm::ClusterTask::egTriggerAlgos_
std::vector< std::string > egTriggerAlgos_
Definition: ClusterTask.h:54
ecaldqm::ClusterTask::runOnRecHits
void runOnRecHits(EcalRecHitCollection const &, Collections)
Definition: ClusterTask.cc:197
ecaldqm::ClusterTask::doExtra_
bool doExtra_
Definition: ClusterTask.h:51
ecaldqm::kEBRecHit
Definition: Collections.h:36
ecaldqm::ClusterTask::beginEvent
void beginEvent(edm::Event const &, edm::EventSetup const &, bool const &, bool &) override
Definition: ClusterTask.cc:74
ecaldqm::ClusterTask::filterRunType
bool filterRunType(short const *) override
Definition: ClusterTask.cc:185
ecaldqm::ClusterTask::analyze
bool analyze(void const *, Collections) override
Definition: ClusterTask.h:65
EDGetToken.h
edm::View
Definition: CaloClusterFwd.h:14
ecaldqm::ClusterTask::L1MuGMTReadoutCollectionToken_
edm::EDGetTokenT< L1MuGMTReadoutCollection > L1MuGMTReadoutCollectionToken_
Definition: ClusterTask.h:61
ecaldqm::ClusterTask::kDTTrigger
Definition: ClusterTask.h:42
edm::ParameterSet
Definition: ParameterSet.h:47
ecaldqm::ClusterTask::energyThreshold_
float energyThreshold_
Definition: ClusterTask.h:52
ecaldqm::ClusterTask::triggered_
std::bitset< nTriggerTypes > triggered_
Definition: ClusterTask.h:55
ecaldqm::ClusterTask::setTokens
void setTokens(edm::ConsumesCollector &) override
Definition: ClusterTask.cc:516
ecaldqm::Collections
Collections
Definition: Collections.h:8
ecaldqm::ClusterTask::L1GlobalTriggerReadoutRecordTag_
edm::InputTag L1GlobalTriggerReadoutRecordTag_
Definition: ClusterTask.h:58
edm::EventSetup
Definition: EventSetup.h:58
ecaldqm::ClusterTask::trigTypeToME_
unsigned trigTypeToME_[nTriggerTypes]
Definition: ClusterTask.h:56
edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd >
ecaldqm::ClusterTask::~ClusterTask
~ClusterTask() override
Definition: ClusterTask.h:25
InputTag.h
ecaldqm::ClusterTask::swissCrossMaxThreshold_
float swissCrossMaxThreshold_
Definition: ClusterTask.h:53
ecaldqm::ClusterTask::eeHits_
EcalRecHitCollection const * eeHits_
Definition: ClusterTask.h:48
ecaldqm::kEERecHit
Definition: Collections.h:37
ecaldqm::kEBSuperCluster
Definition: Collections.h:42
SuperClusterFwd.h
ecaldqm::ClusterTask::L1MuGMTReadoutCollectionTag_
edm::InputTag L1MuGMTReadoutCollectionTag_
Definition: ClusterTask.h:59
DQWorkerTask.h
ecaldqm::ClusterTask::runOnSuperClusters
void runOnSuperClusters(reco::SuperClusterCollection const &, Collections)
Definition: ClusterTask.cc:359
ecaldqm::ClusterTask::kCSCTrigger
Definition: ClusterTask.h:42
View.h
ecaldqm::kEEBasicCluster
Definition: Collections.h:41
ecaldqm::ClusterTask::kHcalTrigger
Definition: ClusterTask.h:42
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
L1GlobalTriggerReadoutRecord.h
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
CaloCluster.h