ATLAS Offline Software
ForwardDetectors
ALFA
ALFA_EventCnv
ALFA_RawDataByteStreamCnv
src
ALFA_RawDataReadOut.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
ALFA_RawDataByteStreamCnv/ALFA_RawDataReadOut.h
"
6
7
ALFA_RawDataReadOut::ALFA_RawDataReadOut
() :
8
m_dataWord(0),
9
m_wordHeader(0),
10
m_SlotId(0),
11
m_LsbTdcId(0),
12
m_ecnt_BOT(0),
13
m_ecnt_EOT(0),
14
m_bcId(0),
15
m_wcnt(0),
16
m_MBId(0),
17
m_bit26_27(0),
18
m_bit24_27(0),
19
m_WordId(0),
20
m_PMFId(0),
21
m_fiber(0),
22
m_ADC(0),
23
m_pattern(),
24
m_scaler(0),
25
m_bit16(0),
26
m_error_bit17(0),
27
m_bit18(0)
28
{ }
29
30
ALFA_RawDataReadOut::~ALFA_RawDataReadOut
()
31
{ }
32
33
void
ALFA_RawDataReadOut::decodeWord
(
uint32_t
dataWord)
34
35
{
36
37
// Zero all the decoded quantities
38
setZero
();
39
m_dataWord
= dataWord;
40
m_word
= dataWord;
41
m_wordHeader
= (dataWord>>
s_headerPos
)&
s_headerBits
;
42
43
if
(
is_TDCt
())
// TDC single measurement
44
{
45
m_bit18
= (
bool
)
getBits
(
getBitsWord
(18,18));
46
m_error_bit17
= (
bool
)
getBits
(
getBitsWord
(17,17));
47
m_WordId
=
getBits
(
getBitsWord
(25,24));
48
m_PMFId
=
getBits
(
getBitsWord
(23,19));
49
m_bit16
= (
bool
)
getBits
(
getBitsWord
(16,16));
50
m_bit26_27
=
getBits
(
getBitsWord
(27,26));
51
m_fiber
=
getBits
(
getBitsWord
(15,0));
52
m_ADC
=
getBits
(
getBitsWord
(11,0));
// PMF24: Word 2 -> ADC 1, Word 3 -> ADC 2
53
54
for
(
int
i
= 15;
i
> -1;
i
--)
// PMF 24 Word 0 bits from 15 to 0 contain trigger information (current and previous 3 bunch crossings)
55
{
56
if
(
getBits
(
getBitsWord
(
i
,
i
)))
m_pattern
.push_back(
true
);
57
else
m_pattern
.push_back(
false
);
58
}
59
60
m_scaler
=
getBits
(
getBitsWord
(15,0));
// PMF 24 Word 1
61
m_MBId
=
getBits
(
getBitsWord
(7,0));
// PMF0 - WordId 0 -> position from 1-15
62
}
63
64
65
else
if
(
is_BOT
())
// Beginning of TDC
66
{
67
// One header bit is used for TDC numbers > 15
68
m_SlotId
=
getBits
(
getBitsWord
(28,24));
69
m_ecnt_BOT
=
getBits
(
getBitsWord
(23,12));
70
m_bcId
=
getBits
(
getBitsWord
(11,0));
71
}
72
else
if
(
is_EOT
())
// End of TDC
73
{
74
m_LsbTdcId
=
getBits
(
getBitsWord
(25,24));
75
m_ecnt_EOT
=
getBits
(
getBitsWord
(23,12));
76
m_wcnt
=
getBits
(
getBitsWord
(11,0));
77
m_bit24_27
=
getBits
(
getBitsWord
(27,24));
78
}
79
80
81
82
}
83
84
85
void
ALFA_RawDataReadOut::setZero
()
86
{
87
m_SlotId
= 0;
88
m_LsbTdcId
= 0;
89
m_ecnt_BOT
= 0;
90
m_ecnt_EOT
= 0;
91
m_bcId
= 0;
92
m_wcnt
= 0;
93
m_WordId
= 0;
94
m_PMFId
=0;
95
m_fiber
=0;
96
m_ADC
=0;
97
m_pattern
.clear();
98
m_scaler
=0;
99
m_bit16
=
false
;
100
m_error_bit17
=
false
;
101
m_bit18
=
false
;
102
m_MBId
= 0;
103
m_bit26_27
=0;
104
m_bit24_27
=0;
105
}
106
107
//-------------------------------------------------------------------------
ALFA_RawDataReadOut::is_EOT
bool is_EOT() const
Definition:
ALFA_RawDataReadOut.h:95
ALFA_RawDataReadOut::m_WordId
uint16_t m_WordId
Definition:
ALFA_RawDataReadOut.h:52
ALFA_RawDataReadOut::m_wcnt
uint16_t m_wcnt
Definition:
ALFA_RawDataReadOut.h:43
ALFA_RawDataReadOut::m_ecnt_EOT
uint16_t m_ecnt_EOT
Definition:
ALFA_RawDataReadOut.h:39
xAOD::uint32_t
setEventNumber uint32_t
Definition:
EventInfo_v1.cxx:127
ALFA_RawDataReadOut::m_scaler
uint16_t m_scaler
Definition:
ALFA_RawDataReadOut.h:57
ALFA_RawDataReadOut::m_error_bit17
bool m_error_bit17
Definition:
ALFA_RawDataReadOut.h:59
ALFA_RawDataReadOut::~ALFA_RawDataReadOut
~ALFA_RawDataReadOut()
Definition:
ALFA_RawDataReadOut.cxx:30
ALFA_RawDataReadOut::setZero
void setZero()
Definition:
ALFA_RawDataReadOut.cxx:85
ALFA_ReadOut::m_word
uint32_t m_word
Definition:
ALFA_ReadOut.h:40
ALFA_RawDataReadOut::m_LsbTdcId
uint16_t m_LsbTdcId
Definition:
ALFA_RawDataReadOut.h:37
ALFA_RawDataReadOut::s_headerBits
static constexpr uint16_t s_headerBits
Definition:
ALFA_RawDataReadOut.h:69
ALFA_RawDataReadOut::m_ADC
uint16_t m_ADC
Definition:
ALFA_RawDataReadOut.h:55
ALFA_RawDataReadOut::decodeWord
void decodeWord(uint32_t dataWord)
Definition:
ALFA_RawDataReadOut.cxx:33
ALFA_RawDataReadOut::ALFA_RawDataReadOut
ALFA_RawDataReadOut()
Definition:
ALFA_RawDataReadOut.cxx:7
ALFA_RawDataReadOut::m_bit18
bool m_bit18
Definition:
ALFA_RawDataReadOut.h:60
ALFA_RawDataReadOut::m_dataWord
uint32_t m_dataWord
Definition:
ALFA_RawDataReadOut.h:31
lumiFormat.i
int i
Definition:
lumiFormat.py:85
ALFA_RawDataReadOut::m_pattern
std::vector< bool > m_pattern
Definition:
ALFA_RawDataReadOut.h:56
ALFA_RawDataReadOut::m_bit16
bool m_bit16
Definition:
ALFA_RawDataReadOut.h:58
ALFA_RawDataReadOut::s_headerPos
static constexpr uint16_t s_headerPos
Definition:
ALFA_RawDataReadOut.h:68
ALFA_RawDataReadOut::m_bcId
uint16_t m_bcId
Definition:
ALFA_RawDataReadOut.h:40
ALFA_RawDataReadOut::m_fiber
uint16_t m_fiber
Definition:
ALFA_RawDataReadOut.h:54
ALFA_RawDataReadOut::m_PMFId
uint16_t m_PMFId
Definition:
ALFA_RawDataReadOut.h:53
ALFA_RawDataReadOut::m_wordHeader
uint16_t m_wordHeader
Definition:
ALFA_RawDataReadOut.h:33
ALFA_RawDataReadOut::m_ecnt_BOT
uint16_t m_ecnt_BOT
Definition:
ALFA_RawDataReadOut.h:38
ALFA_RawDataReadOut::m_SlotId
uint16_t m_SlotId
Definition:
ALFA_RawDataReadOut.h:36
ALFA_RawDataReadOut::m_bit26_27
uint16_t m_bit26_27
Definition:
ALFA_RawDataReadOut.h:49
ALFA_ReadOut::getBitsWord
constexpr std::pair< uint32_t, uint16_t > getBitsWord(const uint16_t bstart, const uint16_t bstop)
Definition:
ALFA_ReadOut.h:21
ALFA_ReadOut::getBits
uint32_t getBits(std::pair< uint32_t, uint16_t > in)
Definition:
ALFA_ReadOut.h:29
ALFA_RawDataReadOut::m_MBId
uint16_t m_MBId
Definition:
ALFA_RawDataReadOut.h:47
ALFA_RawDataReadOut::is_TDCt
bool is_TDCt() const
Definition:
ALFA_RawDataReadOut.h:97
ALFA_RawDataReadOut::is_BOT
bool is_BOT() const
Definition:
ALFA_RawDataReadOut.h:93
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition:
TrigDecision_v1.cxx:60
ALFA_RawDataReadOut.h
ALFA_RawDataReadOut::m_bit24_27
uint16_t m_bit24_27
Definition:
ALFA_RawDataReadOut.h:50
Generated on Thu Nov 7 2024 21:09:49 for ATLAS Offline Software by
1.8.18