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
|
#ifndef ESDIGITORAW_H
#define ESDIGITORAW_H
#include <memory>
#include <iostream>
#include <string>
#include <fstream>
#include "DataFormats/Common/interface/Handle.h"
#include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/global/EDProducer.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/ParameterSet/interface/FileInPath.h"
#include "EventFilter/ESDigiToRaw/interface/ESDataFormatter.h"
class ESDigiToRaw : public edm::global::EDProducer<> {
public:
ESDigiToRaw(const edm::ParameterSet& ps);
~ESDigiToRaw() override;
void produce(edm::StreamID, edm::Event& e, const edm::EventSetup& es) const override;
typedef uint32_t Word32;
typedef uint64_t Word64;
static constexpr unsigned int LHC_BX_RANGE = 3564;
static constexpr unsigned int KCHIP_BC_RANGE = 4096;
static constexpr unsigned int KCHIP_EC_RANGE = 256;
private:
int fedId_[2][2][40][40];
const ESDataFormatter* ESDataFormatter_;
const std::string label_;
const std::string instanceName_;
const edm::EDGetTokenT<ESDigiCollection> ESDigiToken_;
const edm::FileInPath lookup_;
const bool debug_;
const int formatMajor_;
const int formatMinor_;
};
#endif
|