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
58
|
#ifndef RawDataTask_H
#define RawDataTask_H
#include "DQWorkerTask.h"
#include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
#include "DataFormats/EcalRawData/interface/EcalRawDataCollections.h"
#include "DataFormats/Provenance/interface/RunID.h"
namespace ecaldqm {
class RawDataTask : public DQWorkerTask {
public:
RawDataTask();
~RawDataTask() override {}
void addDependencies(DependencySet&) override;
void beginRun(edm::Run const&, edm::EventSetup const&) override;
void beginEvent(edm::Event const&, edm::EventSetup const&, bool const&, bool&) override;
bool analyze(void const*, Collections) override;
void runOnSource(FEDRawDataCollection const&);
void runOnRawData(EcalRawDataCollection const&);
enum Constants { nEventTypes = 25 };
private:
edm::RunNumber_t runNumber_; // run number needed regardless of single-/multi-thread operation
int l1A_;
int orbit_;
int bx_;
short triggerType_;
int feL1Offset_;
};
inline bool RawDataTask::analyze(void const* _p, Collections _collection) {
switch (_collection) {
case kSource:
if (_p)
runOnSource(*static_cast<FEDRawDataCollection const*>(_p));
return true;
break;
case kEcalRawData:
if (_p)
runOnRawData(*static_cast<EcalRawDataCollection const*>(_p));
return true;
break;
default:
break;
}
return false;
}
} // namespace ecaldqm
#endif
|