src
DataFormats
HGCalDigi
interface
HGCalElectronicsId.h
Go to the documentation of this file.
1
#ifndef DataFormats_HGCalDigis_HGCalElectronicsId_h
2
#define DataFormats_HGCalDigis_HGCalElectronicsId_h
3
4
#include <iostream>
5
#include <ostream>
6
#include <cstdint>
7
20
class
HGCalElectronicsId
{
21
public
:
22
enum
HGCalElectronicsIdMask
{
23
kFEDIDMask
= 0x3ff,
24
kCaptureBlockMask
= 0xf,
25
kECONDIdxMask
= 0xf,
26
kECONDeRxMask
= 0xf,
27
kHalfROCChannelMask
= 0x3f
28
};
29
enum
HGCalElectronicsIdShift
{
30
kFEDIDShift
= 18,
31
kCaptureBlockShift
= 14,
32
kECONDIdxShift
= 10,
33
kECONDeRxShift
= 6,
34
kHalfROCChannelShift
= 0
35
};
36
40
HGCalElectronicsId
() :
value_
(0) {}
41
HGCalElectronicsId
(uint16_t
fedid
, uint8_t captureblock, uint8_t econdidx, uint8_t econderx, uint8_t halfrocch);
42
HGCalElectronicsId
(uint32_t
value
) :
value_
(
value
) {}
43
HGCalElectronicsId
(
const
HGCalElectronicsId
&
o
) :
value_
(
o
.
value_
) {}
44
48
uint32_t
operator()
() {
return
value_
; }
49
uint32_t
raw
() {
return
value_
; }
50
uint16_t
fedId
();
51
uint8_t
captureBlock
();
52
uint8_t
econdIdx
();
53
uint8_t
econdeRx
();
54
uint8_t
halfrocChannel
();
55
56
void
print
(std::ostream&
out
=
std::cout
) {
57
out
<<
"Raw=0x"
<< std::hex <<
raw
() <<
std::dec
<< std::endl
58
<<
"\tFED-ID: "
<< (uint32_t)
fedId
() <<
" Capture Block: "
<< (uint32_t)
captureBlock
()
59
<<
" ECON-D idx: "
<< (uint32_t)
econdIdx
() <<
" eRx: "
<< (uint32_t)
econdeRx
()
60
<<
" 1/2 ROC ch.: "
<< (uint32_t)
halfrocChannel
() << std::endl;
61
}
62
63
private
:
64
// a 32-bit word
65
uint32_t
value_
;
66
};
67
68
#endif
HGCalElectronicsId::kECONDeRxMask
Definition:
HGCalElectronicsId.h:26
HGCalElectronicsId::econdeRx
uint8_t econdeRx()
Definition:
HGCalElectronicsId.cc:21
HGCalElectronicsId::kFEDIDShift
Definition:
HGCalElectronicsId.h:30
HGCalElectronicsId::kHalfROCChannelShift
Definition:
HGCalElectronicsId.h:34
HGCalElectronicsId::HGCalElectronicsIdMask
HGCalElectronicsIdMask
Definition:
HGCalElectronicsId.h:22
HGCalElectronicsId::operator()
uint32_t operator()()
getters
Definition:
HGCalElectronicsId.h:48
HGCalElectronicsId::HGCalElectronicsIdShift
HGCalElectronicsIdShift
Definition:
HGCalElectronicsId.h:29
HGCalElectronicsId::raw
uint32_t raw()
Definition:
HGCalElectronicsId.h:49
HGCalElectronicsId::kFEDIDMask
Definition:
HGCalElectronicsId.h:23
HGCalElectronicsId::fedId
uint16_t fedId()
Definition:
HGCalElectronicsId.cc:12
HGCalElectronicsId::kECONDIdxShift
Definition:
HGCalElectronicsId.h:32
EcalTangentSkim_cfg.o
o
Definition:
EcalTangentSkim_cfg.py:42
value
Definition:
value.py:1
HGCalElectronicsId
wrapper for a 32b data word identifying a readout channel in the raw data The format is the following...
Definition:
HGCalElectronicsId.h:20
HGCalElectronicsId::HGCalElectronicsId
HGCalElectronicsId()
CTOR.
Definition:
HGCalElectronicsId.h:40
HGCalElectronicsId::kCaptureBlockShift
Definition:
HGCalElectronicsId.h:31
PixelSLinkDataInputSource_cfi.fedid
fedid
Definition:
PixelSLinkDataInputSource_cfi.py:6
MillePedeFileConverter_cfg.out
out
Definition:
MillePedeFileConverter_cfg.py:31
HGCalElectronicsId::kECONDIdxMask
Definition:
HGCalElectronicsId.h:25
HGCalElectronicsId::econdIdx
uint8_t econdIdx()
Definition:
HGCalElectronicsId.cc:18
HGCalElectronicsId::kECONDeRxShift
Definition:
HGCalElectronicsId.h:33
HGCalElectronicsId::HGCalElectronicsId
HGCalElectronicsId(const HGCalElectronicsId &o)
Definition:
HGCalElectronicsId.h:43
HGCalElectronicsId::kHalfROCChannelMask
Definition:
HGCalElectronicsId.h:27
TauDecayModes.dec
dec
Definition:
TauDecayModes.py:142
HGCalElectronicsId::print
void print(std::ostream &out=std::cout)
Definition:
HGCalElectronicsId.h:56
HGCalElectronicsId::HGCalElectronicsId
HGCalElectronicsId(uint32_t value)
Definition:
HGCalElectronicsId.h:42
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
HGCalElectronicsId::value_
uint32_t value_
Definition:
HGCalElectronicsId.h:65
HGCalElectronicsId::kCaptureBlockMask
Definition:
HGCalElectronicsId.h:24
HGCalElectronicsId::halfrocChannel
uint8_t halfrocChannel()
Definition:
HGCalElectronicsId.cc:24
HGCalElectronicsId::captureBlock
uint8_t captureBlock()
Definition:
HGCalElectronicsId.cc:15
Generated for CMSSW Reference Manual by
1.8.14