EventFilter
ESDigiToRaw
interface
ESDataFormatter.h
Go to the documentation of this file.
1
#ifndef ESDATAFORMATTER_H
2
#define ESDATAFORMATTER_H
3
4
#include <iostream>
5
#include <vector>
6
#include <bitset>
7
#include <sstream>
8
#include <map>
9
10
#include "
DataFormats/EcalDigi/interface/EcalDigiCollections.h
"
11
#include "
DataFormats/EcalDigi/interface/ESDataFrame.h
"
12
#include "
DataFormats/FEDRawData/interface/FEDRawDataCollection.h
"
13
#include "
DataFormats/FEDRawData/interface/FEDRawData.h
"
14
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
15
16
class
ESDataFormatter
{
17
public
:
18
struct
Meta_Data
{
19
int
run_number
= 0;
20
int
orbit_number
= 0;
21
int
bx
= 0;
22
int
lv1
= 0;
23
int
kchip_bc
= 0;
24
int
kchip_ec
= 0;
25
Meta_Data
() =
default
;
26
Meta_Data
(
int
r
,
int
o
,
int
b
,
int
l
,
int
k_bc,
int
k_ec)
27
:
run_number
(
r
),
orbit_number
(
o
),
bx
(
b
),
lv1
(
l
),
kchip_bc
(k_bc),
kchip_ec
(k_ec){};
28
};
29
30
typedef
std::vector<ESDataFrame>
DetDigis
;
31
typedef
std::map<int, DetDigis>
Digis
;
32
33
typedef
uint8_t
Word8
;
34
typedef
uint16_t
Word16
;
35
typedef
uint32_t
Word32
;
36
typedef
uint64_t
Word64
;
37
38
ESDataFormatter
(
const
edm::ParameterSet
& ps)
39
:
pset_
(ps),
40
trgtype_
(0),
41
debug_
(
pset_
.getUntrackedParameter<
bool
>(
"debugMode"
,
false
)),
42
printInHex_
(
pset_
.getUntrackedParameter<
bool
>(
"printInHex"
,
false
)){};
43
virtual
~ESDataFormatter
(){};
44
45
virtual
void
DigiToRaw
(
int
fedId
,
Digis
& digis,
FEDRawData
&
fedRawData
,
const
Meta_Data& meta_data)
const
= 0;
46
47
protected
:
48
const
edm::ParameterSet
pset_
;
49
const
int
trgtype_
;
50
const
bool
debug_
;
51
const
bool
printInHex_
;
52
53
int
formatMajor_
;
54
int
formatMinor_
;
55
56
std::string
print
(
const
Word64
&
word
)
const
;
57
std::string
print
(
const
Word16
&
word
)
const
;
58
};
59
60
#endif
ESDataFormatter::Meta_Data::Meta_Data
Meta_Data()=default
ESDataFormatter::Word32
uint32_t Word32
Definition:
ESDataFormatter.h:35
ESDataFormatter::Word8
uint8_t Word8
Definition:
ESDataFormatter.h:33
funct::false
false
Definition:
Factorize.h:29
FEDRawDataCollection.h
ESDataFrame.h
ESDataFormatter::Digis
std::map< int, DetDigis > Digis
Definition:
ESDataFormatter.h:31
ESDataFormatter::Meta_Data::bx
int bx
Definition:
ESDataFormatter.h:21
ESDataFormatter::Meta_Data::orbit_number
int orbit_number
Definition:
ESDataFormatter.h:20
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
ESDataFormatter::Word64
uint64_t Word64
Definition:
ESDataFormatter.h:36
ParameterSet.h
word
uint64_t word
Definition:
CTPPSTotemDataFormatter.cc:29
ESDataFormatter::Meta_Data::kchip_bc
int kchip_bc
Definition:
ESDataFormatter.h:23
EcalTangentSkim_cfg.o
o
Definition:
EcalTangentSkim_cfg.py:42
ESDataFormatter::Meta_Data::kchip_ec
int kchip_ec
Definition:
ESDataFormatter.h:24
FEDRawData
Definition:
FEDRawData.h:19
ESDataFormatter::trgtype_
const int trgtype_
Definition:
ESDataFormatter.h:49
ESDataFormatter::ESDataFormatter
ESDataFormatter(const edm::ParameterSet &ps)
Definition:
ESDataFormatter.h:38
ESDataFormatter::printInHex_
const bool printInHex_
Definition:
ESDataFormatter.h:51
EcalDigiCollections.h
cmsLHEtoEOSManager.l
l
Definition:
cmsLHEtoEOSManager.py:212
ESDataFormatter::Meta_Data::lv1
int lv1
Definition:
ESDataFormatter.h:22
ESDataFormatter
Definition:
ESDataFormatter.h:16
l1t_dqm_sourceclient-live_cfg.fedRawData
fedRawData
Definition:
l1t_dqm_sourceclient-live_cfg.py:189
electrons_cff.bool
bool
Definition:
electrons_cff.py:381
alignCSCRings.r
r
Definition:
alignCSCRings.py:93
cond::uint64_t
unsigned long long uint64_t
Definition:
Time.h:13
ESDataFormatter::pset_
const edm::ParameterSet pset_
Definition:
ESDataFormatter.h:48
ESDataFormatter::Word16
uint16_t Word16
Definition:
ESDataFormatter.h:34
ESDataFormatter::Meta_Data::Meta_Data
Meta_Data(int r, int o, int b, int l, int k_bc, int k_ec)
Definition:
ESDataFormatter.h:26
b
double b
Definition:
hdecay.h:118
ESDataFormatter::Meta_Data
Definition:
ESDataFormatter.h:18
ESDataFormatter::print
std::string print(const Word64 &word) const
Definition:
ESDataFormatter.cc:11
ESDataFormatter::Meta_Data::run_number
int run_number
Definition:
ESDataFormatter.h:19
ESDataFormatter::debug_
const bool debug_
Definition:
ESDataFormatter.h:50
FEDRawData.h
l1tstage2_dqm_sourceclient-live_cfg.fedId
fedId
Definition:
l1tstage2_dqm_sourceclient-live_cfg.py:89
ESDataFormatter::DigiToRaw
virtual void DigiToRaw(int fedId, Digis &digis, FEDRawData &fedRawData, const Meta_Data &meta_data) const =0
edm::ParameterSet
Definition:
ParameterSet.h:47
ESDataFormatter::formatMinor_
int formatMinor_
Definition:
ESDataFormatter.h:54
ESDataFormatter::~ESDataFormatter
virtual ~ESDataFormatter()
Definition:
ESDataFormatter.h:43
ESDataFormatter::formatMajor_
int formatMajor_
Definition:
ESDataFormatter.h:53
ESDataFormatter::DetDigis
std::vector< ESDataFrame > DetDigis
Definition:
ESDataFormatter.h:30
Generated for CMSSW Reference Manual by
1.8.14