-
Notifications
You must be signed in to change notification settings - Fork 4.2k
/
PresampleTask.h
51 lines (40 loc) · 1.21 KB
/
PresampleTask.h
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
#ifndef PresampleTask_H
#define PresampleTask_H
#include "DQWorkerTask.h"
#include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
#include "DataFormats/EcalDigi/interface/EcalDataFrame.h"
namespace ecaldqm {
class PresampleTask : public DQWorkerTask {
public:
PresampleTask();
~PresampleTask() override {}
bool filterRunType(short const*) override;
void beginEvent(edm::Event const&, edm::EventSetup const&, bool const&, bool&) override;
bool analyze(void const*, Collections) override;
template <typename DigiCollection>
void runOnDigis(DigiCollection const&);
private:
void setParams(edm::ParameterSet const&) override;
bool doPulseMaxCheck_;
int pulseMaxPosition_;
int nSamples_;
MESet* mePedestalByLS;
};
inline bool PresampleTask::analyze(void const* _p, Collections _collection) {
switch (_collection) {
case kEBDigi:
if (_p)
runOnDigis(*static_cast<EBDigiCollection const*>(_p));
return true;
case kEEDigi:
if (_p)
runOnDigis(*static_cast<EEDigiCollection const*>(_p));
return true;
break;
default:
break;
}
return false;
}
} // namespace ecaldqm
#endif