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
21
class
HGCalElectronicsId
{
22
public
:
23
enum
HGCalElectronicsIdMask
{
24
kZsideMask
= 0x1,
25
kLocalFEDIDMask
= 0x3ff,
26
kCaptureBlockMask
= 0xf,
27
kECONDIdxMask
= 0xf,
28
kECONDeRxMask
= 0xf,
29
kHalfROCChannelMask
= 0x3f
30
};
31
enum
HGCalElectronicsIdShift
{
32
kZsideShift
= 28,
33
kLocalFEDIDShift
= 18,
34
kCaptureBlockShift
= 14,
35
kECONDIdxShift
= 10,
36
kECONDeRxShift
= 6,
37
kHalfROCChannelShift
= 0
38
};
39
43
HGCalElectronicsId
() :
value_
(0) {}
44
explicit
HGCalElectronicsId
(
45
bool
zside
, uint16_t localfedid, uint8_t captureblock, uint8_t econdidx, uint8_t econderx, uint8_t halfrocch);
46
explicit
HGCalElectronicsId
(uint32_t
value
) :
value_
(
value
) {}
47
52
uint32_t
operator()
()
const
{
return
value_
; }
53
bool
operator<
(
const
HGCalElectronicsId
& oth)
const
{
return
value_
< oth.
value_
; }
54
bool
operator==
(
const
HGCalElectronicsId
& oth)
const
{
return
value_
== oth.
value_
; }
55
uint32_t
raw
()
const
{
return
value_
; }
56
bool
zSide
()
const
;
57
uint16_t
localFEDId
()
const
;
58
uint8_t
captureBlock
()
const
;
59
uint8_t
econdIdx
()
const
;
60
uint8_t
econdeRx
()
const
;
61
uint8_t
halfrocChannel
()
const
;
62
uint8_t
rocChannel
()
const
;
63
uint8_t
cmWord
()
const
;
64
bool
isCM
()
const
;
65
void
print
(std::ostream&
out
=
std::cout
)
const
{
66
out
<<
"Raw=0x"
<< std::hex <<
raw
() <<
std::dec
<< std::endl
67
<<
"\tLocal FED-ID: "
<< (uint32_t)
localFEDId
() <<
" Capture Block: "
<< (uint32_t)
captureBlock
()
68
<<
" ECON-D idx: "
<< (uint32_t)
econdIdx
() <<
" eRx: "
<< (uint32_t)
econdeRx
()
69
<<
" 1/2 ROC ch.: "
<< (uint32_t)
halfrocChannel
() <<
" isCM="
<<
isCM
() <<
" zSide="
<<
zSide
() << std::endl;
70
}
71
72
private
:
73
// a 32-bit word
74
uint32_t
value_
;
75
};
76
77
#endif
HGCalElectronicsId::kECONDeRxMask
Definition:
HGCalElectronicsId.h:28
HGCalElectronicsId::raw
uint32_t raw() const
Definition:
HGCalElectronicsId.h:55
HGCalElectronicsId::cmWord
uint8_t cmWord() const
Definition:
HGCalElectronicsId.cc:36
HGCalElectronicsId::halfrocChannel
uint8_t halfrocChannel() const
Definition:
HGCalElectronicsId.cc:33
HGCalElectronicsId::rocChannel
uint8_t rocChannel() const
Definition:
HGCalElectronicsId.cc:39
HGCalElectronicsId::kHalfROCChannelShift
Definition:
HGCalElectronicsId.h:37
HGCalElectronicsId::HGCalElectronicsIdMask
HGCalElectronicsIdMask
Definition:
HGCalElectronicsId.h:23
HGCalElectronicsId::kLocalFEDIDShift
Definition:
HGCalElectronicsId.h:33
HGCalElectronicsId::kZsideShift
Definition:
HGCalElectronicsId.h:32
HGCalElectronicsId::econdIdx
uint8_t econdIdx() const
Definition:
HGCalElectronicsId.cc:27
HGCalElectronicsId::HGCalElectronicsIdShift
HGCalElectronicsIdShift
Definition:
HGCalElectronicsId.h:31
HGCalElectronicsId::captureBlock
uint8_t captureBlock() const
Definition:
HGCalElectronicsId.cc:24
HGCalElectronicsId::operator<
bool operator<(const HGCalElectronicsId &oth) const
Definition:
HGCalElectronicsId.h:53
HGCalElectronicsId::print
void print(std::ostream &out=std::cout) const
Definition:
HGCalElectronicsId.h:65
HGCalElectronicsId::localFEDId
uint16_t localFEDId() const
Definition:
HGCalElectronicsId.cc:12
HGCalElectronicsId::zSide
bool zSide() const
Definition:
HGCalElectronicsId.cc:15
ecaldqm::zside
int zside(DetId const &)
Definition:
EcalDQMCommonUtils.cc:189
HGCalElectronicsId::kECONDIdxShift
Definition:
HGCalElectronicsId.h:35
HGCalElectronicsId::isCM
bool isCM() const
Definition:
HGCalElectronicsId.cc:18
HGCalElectronicsId::operator==
bool operator==(const HGCalElectronicsId &oth) const
Definition:
HGCalElectronicsId.h:54
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:21
HGCalElectronicsId::HGCalElectronicsId
HGCalElectronicsId()
CTOR.
Definition:
HGCalElectronicsId.h:43
HGCalElectronicsId::kCaptureBlockShift
Definition:
HGCalElectronicsId.h:34
MillePedeFileConverter_cfg.out
out
Definition:
MillePedeFileConverter_cfg.py:31
HGCalElectronicsId::kECONDIdxMask
Definition:
HGCalElectronicsId.h:27
HGCalElectronicsId::kECONDeRxShift
Definition:
HGCalElectronicsId.h:36
HGCalElectronicsId::kHalfROCChannelMask
Definition:
HGCalElectronicsId.h:29
TauDecayModes.dec
dec
Definition:
TauDecayModes.py:142
HGCalElectronicsId::HGCalElectronicsId
HGCalElectronicsId(uint32_t value)
Definition:
HGCalElectronicsId.h:46
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
HGCalElectronicsId::operator()
uint32_t operator()() const
getters
Definition:
HGCalElectronicsId.h:52
HGCalElectronicsId::value_
uint32_t value_
Definition:
HGCalElectronicsId.h:74
HGCalElectronicsId::kCaptureBlockMask
Definition:
HGCalElectronicsId.h:26
HGCalElectronicsId::econdeRx
uint8_t econdeRx() const
Definition:
HGCalElectronicsId.cc:30
HGCalElectronicsId::kLocalFEDIDMask
Definition:
HGCalElectronicsId.h:25
HGCalElectronicsId::kZsideMask
Definition:
HGCalElectronicsId.h:24
Generated for CMSSW Reference Manual by
1.8.14