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&, bool const&, bool&) 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
ecaldqm::ClusterTask::TriggerTypes
TriggerTypes
Definition: ClusterTask.h:40
ecaldqm::ClusterTask::ebHits_
EcalRecHitCollection const * ebHits_
Definition: ClusterTask.h:45
ecaldqm
Definition: DQWorker.h:24
ecaldqm::ClusterTask::L1GlobalTriggerReadoutRecordToken_
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > L1GlobalTriggerReadoutRecordToken_
Definition: ClusterTask.h:58
ecaldqm::ClusterTask::ClusterTask
ClusterTask()
Definition: ClusterTask.cc:21
ecaldqm::kEBBasicCluster
Definition: Collections.h:40
ecaldqm::DependencySet
Definition: DQWorkerTask.h:44
ecaldqm::kEESuperCluster
Definition: Collections.h:43
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord >
ecaldqm::ClusterTask::setParams
void setParams(edm::ParameterSet const &) override
Definition: ClusterTask.cc:37
ecaldqm::ClusterTask
Definition: ClusterTask.h:20
edm::SortedCollection< EcalRecHit >
ecaldqm::ClusterTask::kRPCTrigger
Definition: ClusterTask.h:40
watchdog.const
const
Definition: watchdog.py:83
ecaldqm::ClusterTask::runOnBasicClusters
void runOnBasicClusters(edm::View< reco::CaloCluster > const &, Collections)
Definition: ClusterTask.cc:214
EcalRecHitCollections.h
ecaldqm::ClusterTask::nTriggerTypes
Definition: ClusterTask.h:40
L1MuRegionalCand.h
ecaldqm::ClusterTask::kEcalTrigger
Definition: ClusterTask.h:40
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:182
ecaldqm::DQWorkerTask
Definition: DQWorkerTask.h:71
ecaldqm::ClusterTask::addDependencies
void addDependencies(DependencySet &) override
Definition: ClusterTask.cc:72
ecaldqm::ClusterTask::egTriggerAlgos_
std::vector< std::string > egTriggerAlgos_
Definition: ClusterTask.h:52
ecaldqm::ClusterTask::runOnRecHits
void runOnRecHits(EcalRecHitCollection const &, Collections)
Definition: ClusterTask.cc:201
ecaldqm::ClusterTask::doExtra_
bool doExtra_
Definition: ClusterTask.h:49
ecaldqm::kEBRecHit
Definition: Collections.h:36
ecaldqm::ClusterTask::beginEvent
void beginEvent(edm::Event const &, edm::EventSetup const &, bool const &, bool &) override
Definition: ClusterTask.cc:77
ecaldqm::ClusterTask::filterRunType
bool filterRunType(short const *) override
Definition: ClusterTask.cc:189
ecaldqm::ClusterTask::analyze
bool analyze(void const *, Collections) override
Definition: ClusterTask.h:62
EDGetToken.h
edm::View
Definition: CaloClusterFwd.h:14
ecaldqm::ClusterTask::L1MuGMTReadoutCollectionToken_
edm::EDGetTokenT< L1MuGMTReadoutCollection > L1MuGMTReadoutCollectionToken_
Definition: ClusterTask.h:59
ecaldqm::ClusterTask::kDTTrigger
Definition: ClusterTask.h:40
edm::ParameterSet
Definition: ParameterSet.h:47
ecaldqm::ClusterTask::energyThreshold_
float energyThreshold_
Definition: ClusterTask.h:50
ecaldqm::ClusterTask::triggered_
std::bitset< nTriggerTypes > triggered_
Definition: ClusterTask.h:53
ecaldqm::ClusterTask::setTokens
void setTokens(edm::ConsumesCollector &) override
Definition: ClusterTask.cc:520
ecaldqm::Collections
Collections
Definition: Collections.h:8
ecaldqm::ClusterTask::L1GlobalTriggerReadoutRecordTag_
edm::InputTag L1GlobalTriggerReadoutRecordTag_
Definition: ClusterTask.h:56
edm::EventSetup
Definition: EventSetup.h:57
ecaldqm::ClusterTask::trigTypeToME_
unsigned trigTypeToME_[nTriggerTypes]
Definition: ClusterTask.h:54
ecaldqm::ClusterTask::~ClusterTask
~ClusterTask() override
Definition: ClusterTask.h:23
InputTag.h
ecaldqm::ClusterTask::swissCrossMaxThreshold_
float swissCrossMaxThreshold_
Definition: ClusterTask.h:51
ecaldqm::ClusterTask::eeHits_
EcalRecHitCollection const * eeHits_
Definition: ClusterTask.h:46
ecaldqm::kEERecHit
Definition: Collections.h:37
ecaldqm::kEBSuperCluster
Definition: Collections.h:42
SuperClusterFwd.h
ecaldqm::ClusterTask::L1MuGMTReadoutCollectionTag_
edm::InputTag L1MuGMTReadoutCollectionTag_
Definition: ClusterTask.h:57
DQWorkerTask.h
ecaldqm::ClusterTask::runOnSuperClusters
void runOnSuperClusters(reco::SuperClusterCollection const &, Collections)
Definition: ClusterTask.cc:363
ecaldqm::ClusterTask::kCSCTrigger
Definition: ClusterTask.h:40
View.h
ecaldqm::kEEBasicCluster
Definition: Collections.h:41
ecaldqm::ClusterTask::kHcalTrigger
Definition: ClusterTask.h:40
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
L1GlobalTriggerReadoutRecord.h
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
CaloCluster.h