1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
#ifndef IntegrityTask_H
#define IntegrityTask_H
#include "DQWorkerTask.h"
#include "DQM/EcalCommon/interface/EcalDQMCommonUtils.h"
#include "DataFormats/DetId/interface/DetIdCollection.h"
#include "DataFormats/EcalDetId/interface/EcalDetIdCollections.h"
namespace ecaldqm {
class IntegrityTask : public DQWorkerTask {
public:
IntegrityTask();
~IntegrityTask() override {}
void beginEvent(edm::Event const&, edm::EventSetup const&, bool const&, bool&) override;
bool analyze(void const*, Collections) override;
template <class C>
void runOnDetIdCollection(C const&, Collections);
void runOnElectronicsIdCollection(EcalElectronicsIdCollection const&, Collections);
};
inline bool IntegrityTask::analyze(void const* _p, Collections _collection) {
switch (_collection) {
case kEBGainErrors:
case kEBChIdErrors:
case kEBGainSwitchErrors:
if (_p)
runOnDetIdCollection(*static_cast<EBDetIdCollection const*>(_p), _collection);
return true;
case kEEGainErrors:
case kEEChIdErrors:
case kEEGainSwitchErrors:
if (_p)
runOnDetIdCollection(*static_cast<EEDetIdCollection const*>(_p), _collection);
return true;
break;
case kTowerIdErrors:
case kBlockSizeErrors:
if (_p)
runOnElectronicsIdCollection(*static_cast<EcalElectronicsIdCollection const*>(_p), _collection);
return true;
break;
default:
break;
}
return false;
}
} // namespace ecaldqm
#endif
|