ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
TrigT1CaloByteStream
src
JemJetElement.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef TRIGT1CALOBYTESTREAM_JEMJETELEMENT_H
6
#define TRIGT1CALOBYTESTREAM_JEMJETELEMENT_H
7
8
#include <stdint.h>
9
10
namespace
LVL1BS
{
11
19
20
class
JemJetElement
{
21
22
public
:
23
JemJetElement
(uint32_t word);
24
JemJetElement
(
int
chan,
int
emDat,
int
hadDat,
25
int
emParErr,
int
hadParErr,
int
linkErr);
26
27
// Return jet element data
28
int
channel
()
const
;
29
int
emData
()
const
;
30
int
hadData
()
const
;
31
int
emParity
()
const
;
32
int
hadParity
()
const
;
33
int
linkError
()
const
;
34
int
pair
()
const
;
35
int
pin
()
const
;
36
int
wordId
()
const
;
37
uint32_t
data
()
const
;
38
39
private
:
40
// Jet Element data word bit positions and masks
41
static
const
int
s_emDataBit
= 0;
42
static
const
int
s_emParityBit
= 9;
43
static
const
int
s_hadDataBit
= 10;
44
static
const
int
s_hadParityBit
= 19;
45
static
const
int
s_linkErrorBit
= 20;
46
static
const
int
s_pairBit
= 23;
47
static
const
int
s_pinBit
= 25;
48
static
const
int
s_wordIdBit
= 30;
49
static
const
int
s_jeWordId
= 0x1;
50
static
const
int
s_pairsPerPin
= 3;
51
static
const
int
s_pairOffset
= 1;
52
static
const
uint32_t
s_emDataMask
= 0x1ff;
53
static
const
uint32_t
s_emParityMask
= 0x1;
54
static
const
uint32_t
s_hadDataMask
= 0x1ff;
55
static
const
uint32_t
s_hadParityMask
= 0x1;
56
static
const
uint32_t
s_linkErrorMask
= 0x3;
57
static
const
uint32_t
s_pairMask
= 0x3;
58
static
const
uint32_t
s_pinMask
= 0x1f;
59
static
const
uint32_t
s_wordIdMask
= 0x3;
60
62
uint32_t
m_data
;
63
64
};
65
66
inline
int
JemJetElement::channel
()
const
67
{
68
return
s_pairsPerPin
*
pin
() +
pair
() -
s_pairOffset
;
69
}
70
71
inline
int
JemJetElement::emData
()
const
72
{
73
return
(
m_data
>>
s_emDataBit
) &
s_emDataMask
;
74
}
75
76
inline
int
JemJetElement::hadData
()
const
77
{
78
return
(
m_data
>>
s_hadDataBit
) &
s_hadDataMask
;
79
}
80
81
inline
int
JemJetElement::emParity
()
const
82
{
83
return
(
m_data
>>
s_emParityBit
) &
s_emParityMask
;
84
}
85
86
inline
int
JemJetElement::hadParity
()
const
87
{
88
return
(
m_data
>>
s_hadParityBit
) &
s_hadParityMask
;
89
}
90
91
inline
int
JemJetElement::linkError
()
const
92
{
93
return
(
m_data
>>
s_linkErrorBit
) &
s_linkErrorMask
;
94
}
95
96
inline
int
JemJetElement::pair
()
const
97
{
98
return
(
m_data
>>
s_pairBit
) &
s_pairMask
;
99
}
100
101
inline
int
JemJetElement::pin
()
const
102
{
103
return
(
m_data
>>
s_pinBit
) &
s_pinMask
;
104
}
105
106
inline
int
JemJetElement::wordId
()
const
107
{
108
return
(
m_data
>>
s_wordIdBit
) &
s_wordIdMask
;
109
}
110
111
inline
uint32_t
JemJetElement::data
()
const
112
{
113
return
m_data
;
114
}
115
116
}
// end namespace
117
118
#endif
LVL1BS::JemJetElement::s_hadParityMask
static const uint32_t s_hadParityMask
Definition
JemJetElement.h:55
LVL1BS::JemJetElement::s_emParityMask
static const uint32_t s_emParityMask
Definition
JemJetElement.h:53
LVL1BS::JemJetElement::s_hadDataBit
static const int s_hadDataBit
Definition
JemJetElement.h:43
LVL1BS::JemJetElement::s_jeWordId
static const int s_jeWordId
Definition
JemJetElement.h:49
LVL1BS::JemJetElement::emData
int emData() const
Definition
JemJetElement.h:71
LVL1BS::JemJetElement::data
uint32_t data() const
Definition
JemJetElement.h:111
LVL1BS::JemJetElement::s_emParityBit
static const int s_emParityBit
Definition
JemJetElement.h:42
LVL1BS::JemJetElement::s_pairOffset
static const int s_pairOffset
Definition
JemJetElement.h:51
LVL1BS::JemJetElement::wordId
int wordId() const
Definition
JemJetElement.h:106
LVL1BS::JemJetElement::hadData
int hadData() const
Definition
JemJetElement.h:76
LVL1BS::JemJetElement::m_data
uint32_t m_data
Jet element data.
Definition
JemJetElement.h:62
LVL1BS::JemJetElement::pin
int pin() const
Definition
JemJetElement.h:101
LVL1BS::JemJetElement::s_linkErrorMask
static const uint32_t s_linkErrorMask
Definition
JemJetElement.h:56
LVL1BS::JemJetElement::s_emDataMask
static const uint32_t s_emDataMask
Definition
JemJetElement.h:52
LVL1BS::JemJetElement::linkError
int linkError() const
Definition
JemJetElement.h:91
LVL1BS::JemJetElement::s_linkErrorBit
static const int s_linkErrorBit
Definition
JemJetElement.h:45
LVL1BS::JemJetElement::s_pairMask
static const uint32_t s_pairMask
Definition
JemJetElement.h:57
LVL1BS::JemJetElement::s_pairBit
static const int s_pairBit
Definition
JemJetElement.h:46
LVL1BS::JemJetElement::s_hadParityBit
static const int s_hadParityBit
Definition
JemJetElement.h:44
LVL1BS::JemJetElement::s_pairsPerPin
static const int s_pairsPerPin
Definition
JemJetElement.h:50
LVL1BS::JemJetElement::s_wordIdMask
static const uint32_t s_wordIdMask
Definition
JemJetElement.h:59
LVL1BS::JemJetElement::s_wordIdBit
static const int s_wordIdBit
Definition
JemJetElement.h:48
LVL1BS::JemJetElement::emParity
int emParity() const
Definition
JemJetElement.h:81
LVL1BS::JemJetElement::hadParity
int hadParity() const
Definition
JemJetElement.h:86
LVL1BS::JemJetElement::s_pinBit
static const int s_pinBit
Definition
JemJetElement.h:47
LVL1BS::JemJetElement::pair
int pair() const
Definition
JemJetElement.h:96
LVL1BS::JemJetElement::channel
int channel() const
Definition
JemJetElement.h:66
LVL1BS::JemJetElement::s_pinMask
static const uint32_t s_pinMask
Definition
JemJetElement.h:58
LVL1BS::JemJetElement::JemJetElement
JemJetElement(uint32_t word)
Definition
JemJetElement.cxx:32
LVL1BS::JemJetElement::s_emDataBit
static const int s_emDataBit
Definition
JemJetElement.h:41
LVL1BS::JemJetElement::s_hadDataMask
static const uint32_t s_hadDataMask
Definition
JemJetElement.h:54
LVL1BS
Definition
ZdcModifySlices.h:10
Generated on
for ATLAS Offline Software by
1.17.0