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
explicit
HGCalElectronicsId
(
42
uint16_t
fedid
, uint8_t captureblock, uint8_t econdidx, uint8_t econderx, uint8_t halfrocch);
43
explicit
HGCalElectronicsId
(uint32_t
value
) :
value_
(
value
) {}
44
HGCalElectronicsId
(
const
HGCalElectronicsId
&
o
) :
value_
(
o
.
value_
) {}
45
49
uint32_t
operator()
()
const
{
return
value_
; }
50
bool
operator<
(
const
HGCalElectronicsId
& oth)
const
{
return
value_
< oth.
value_
; }
51
uint32_t
raw
()
const
{
return
value_
; }
52
uint16_t
fedId
()
const
;
53
uint8_t
captureBlock
()
const
;
54
uint8_t
econdIdx
()
const
;
55
uint8_t
econdeRx
()
const
;
56
uint8_t
halfrocChannel
()
const
;
57
58
void
print
(std::ostream&
out
=
std::cout
)
const
{
59
out
<<
"Raw=0x"
<< std::hex <<
raw
() <<
std::dec
<< std::endl
60
<<
"\tFED-ID: "
<< (uint32_t)
fedId
() <<
" Capture Block: "
<< (uint32_t)
captureBlock
()
61
<<
" ECON-D idx: "
<< (uint32_t)
econdIdx
() <<
" eRx: "
<< (uint32_t)
econdeRx
()
62
<<
" 1/2 ROC ch.: "
<< (uint32_t)
halfrocChannel
() << std::endl;
63
}
64
65
private
:
66
// a 32-bit word
67
uint32_t
value_
;
68
};
69
70
#endif
HGCalElectronicsId::kECONDeRxMask
Definition:
HGCalElectronicsId.h:26
HGCalElectronicsId::raw
uint32_t raw() const
Definition:
HGCalElectronicsId.h:51
HGCalElectronicsId::halfrocChannel
uint8_t halfrocChannel() const
Definition:
HGCalElectronicsId.cc:24
HGCalElectronicsId::kFEDIDShift
Definition:
HGCalElectronicsId.h:30
HGCalElectronicsId::kHalfROCChannelShift
Definition:
HGCalElectronicsId.h:34
HGCalElectronicsId::HGCalElectronicsIdMask
HGCalElectronicsIdMask
Definition:
HGCalElectronicsId.h:22
HGCalElectronicsId::fedId
uint16_t fedId() const
Definition:
HGCalElectronicsId.cc:12
HGCalElectronicsId::econdIdx
uint8_t econdIdx() const
Definition:
HGCalElectronicsId.cc:18
HGCalElectronicsId::HGCalElectronicsIdShift
HGCalElectronicsIdShift
Definition:
HGCalElectronicsId.h:29
HGCalElectronicsId::captureBlock
uint8_t captureBlock() const
Definition:
HGCalElectronicsId.cc:15
HGCalElectronicsId::operator<
bool operator<(const HGCalElectronicsId &oth) const
Definition:
HGCalElectronicsId.h:50
HGCalElectronicsId::kFEDIDMask
Definition:
HGCalElectronicsId.h:23
HGCalElectronicsId::print
void print(std::ostream &out=std::cout) const
Definition:
HGCalElectronicsId.h:58
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::kECONDeRxShift
Definition:
HGCalElectronicsId.h:33
HGCalElectronicsId::HGCalElectronicsId
HGCalElectronicsId(const HGCalElectronicsId &o)
Definition:
HGCalElectronicsId.h:44
HGCalElectronicsId::kHalfROCChannelMask
Definition:
HGCalElectronicsId.h:27
TauDecayModes.dec
dec
Definition:
TauDecayModes.py:142
HGCalElectronicsId::HGCalElectronicsId
HGCalElectronicsId(uint32_t value)
Definition:
HGCalElectronicsId.h:43
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
HGCalElectronicsId::operator()
uint32_t operator()() const
getters
Definition:
HGCalElectronicsId.h:49
HGCalElectronicsId::value_
uint32_t value_
Definition:
HGCalElectronicsId.h:67
HGCalElectronicsId::kCaptureBlockMask
Definition:
HGCalElectronicsId.h:24
HGCalElectronicsId::econdeRx
uint8_t econdeRx() const
Definition:
HGCalElectronicsId.cc:21
Generated for CMSSW Reference Manual by
1.8.14