CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
IntegrityTask.h
Go to the documentation of this file.
1 #ifndef IntegrityTask_H
2 #define IntegrityTask_H
3 
4 #include "DQWorkerTask.h"
5 
7 
10 
11 namespace ecaldqm {
12 
13  class IntegrityTask : public DQWorkerTask {
14  public:
15  IntegrityTask();
16  ~IntegrityTask() override {}
17 
18  void beginEvent(edm::Event const&, edm::EventSetup const&, bool const&, bool&) override;
19 
20  bool analyze(void const*, Collections) override;
21 
22  template <class C>
23  void runOnDetIdCollection(C const&, Collections);
25  };
26 
27  inline bool IntegrityTask::analyze(void const* _p, Collections _collection) {
28  switch (_collection) {
29  case kEBGainErrors:
30  case kEBChIdErrors:
32  if (_p)
33  runOnDetIdCollection(*static_cast<EBDetIdCollection const*>(_p), _collection);
34  return true;
35  case kEEGainErrors:
36  case kEEChIdErrors:
38  if (_p)
39  runOnDetIdCollection(*static_cast<EEDetIdCollection const*>(_p), _collection);
40  return true;
41  break;
42  case kTowerIdErrors:
43  case kBlockSizeErrors:
44  if (_p)
45  runOnElectronicsIdCollection(*static_cast<EcalElectronicsIdCollection const*>(_p), _collection);
46  return true;
47  break;
48  default:
49  break;
50  }
51 
52  return false;
53  }
54 
55 } // namespace ecaldqm
56 
57 #endif
void runOnDetIdCollection(C const &, Collections)
void runOnElectronicsIdCollection(EcalElectronicsIdCollection const &, Collections)
void beginEvent(edm::Event const &, edm::EventSetup const &, bool const &, bool &) override
Definition: IntegrityTask.cc:9
bool analyze(void const *, Collections) override
Definition: IntegrityTask.h:27