ATLAS Offline Software
ALFA_RawDataReadOut_charge.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
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_FiberFirmwareId(0),
18  m_PMFId(0),
19  m_ChannelNumId(0),
20  m_ChargeChanId(0),
21  m_bit12(0),
22  m_bit24_27(0),
23  m_bit27_24(0),
24  m_ChargeChan()
25 { }
26 
28 { }
29 
31 
32 {
33 
34  // Zero all the decoded quantities
35  setZero();
36  m_dataWord = dataWord;
37  m_word = dataWord;
39 
40  if (is_TDCch()) // TDC single measurement
41  {
42 
43  m_PMFId = getBits(getBitsWord(23,19));
45  m_bit12 = (bool) getBits(getBitsWord(12,12));
47 
48  m_MBId = getBits(getBitsWord(7,0)); // PMF0 - PMFId 0 -> position from 1-15
49  m_FiberFirmwareId = getBits(getBitsWord(15,8)); // PMF0 - PMFId 0
50 
51  m_bit27_24 = getBits(getBitsWord(27,24));
52 
53  }
54 
55 
56  else if (is_BOT()) // Beginning of TDC
57  {
58  // One header bit is used for TDC numbers > 15
59  m_SlotId = getBits(getBitsWord(28,24));
60  m_ecnt_BOT = getBits(getBitsWord(23,12));
61  m_bcId = getBits(getBitsWord(11,0));
62  }
63  else if (is_EOT()) // End of TDC
64  {
65  m_LsbTdcId = getBits(getBitsWord(25,24));
66  m_ecnt_EOT = getBits(getBitsWord(23,12));
67  m_wcnt = getBits(getBitsWord(11,0));
68  m_bit24_27 = getBits(getBitsWord(27,24));
69  }
70 
71 
72 
73 }
74 
75 
77 {
78  m_SlotId = 0;
79  m_LsbTdcId = 0;
80  m_ecnt_BOT = 0;
81  m_ecnt_EOT = 0;
82  m_bcId = 0;
83  m_wcnt = 0;
84  m_PMFId = 0;
87  m_ChargeChanId =0;
88  m_bit12=false;
89  m_MBId = 0;
90  m_bit24_27=0;
91  m_bit27_24=0;
92 
93 }
94 
95 //-------------------------------------------------------------------------
ALFA_RawDataReadOut_charge::is_EOT
bool is_EOT() const
Definition: ALFA_RawDataReadOut_charge.h:96
ALFA_RawDataReadOut_charge::m_PMFId
uint16_t m_PMFId
Definition: ALFA_RawDataReadOut_charge.h:52
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
ALFA_RawDataReadOut_charge::m_ecnt_EOT
uint16_t m_ecnt_EOT
Definition: ALFA_RawDataReadOut_charge.h:41
ALFA_RawDataReadOut_charge::s_headerBits
static constexpr uint16_t s_headerBits
Definition: ALFA_RawDataReadOut_charge.h:69
ALFA_RawDataReadOut_charge::s_headerPos
static constexpr uint16_t s_headerPos
Definition: ALFA_RawDataReadOut_charge.h:68
ALFA_RawDataReadOut_charge.h
ALFA_RawDataReadOut_charge::is_TDCch
bool is_TDCch() const
Definition: ALFA_RawDataReadOut_charge.h:98
ALFA_RawDataReadOut_charge::m_SlotId
uint16_t m_SlotId
Definition: ALFA_RawDataReadOut_charge.h:38
ALFA_RawDataReadOut_charge::m_bit27_24
uint16_t m_bit27_24
Definition: ALFA_RawDataReadOut_charge.h:59
ALFA_RawDataReadOut_charge::m_dataWord
uint32_t m_dataWord
Definition: ALFA_RawDataReadOut_charge.h:33
ALFA_ReadOut::m_word
uint32_t m_word
Definition: ALFA_ReadOut.h:40
ALFA_RawDataReadOut_charge::~ALFA_RawDataReadOut_charge
~ALFA_RawDataReadOut_charge()
Definition: ALFA_RawDataReadOut_charge.cxx:27
ALFA_RawDataReadOut_charge::m_FiberFirmwareId
uint16_t m_FiberFirmwareId
Definition: ALFA_RawDataReadOut_charge.h:50
ALFA_RawDataReadOut_charge::m_bit24_27
uint16_t m_bit24_27
Definition: ALFA_RawDataReadOut_charge.h:58
ALFA_RawDataReadOut_charge::m_LsbTdcId
uint16_t m_LsbTdcId
Definition: ALFA_RawDataReadOut_charge.h:39
ALFA_RawDataReadOut_charge::m_wcnt
uint16_t m_wcnt
Definition: ALFA_RawDataReadOut_charge.h:45
ALFA_RawDataReadOut_charge::m_ChargeChanId
uint16_t m_ChargeChanId
Definition: ALFA_RawDataReadOut_charge.h:54
ALFA_RawDataReadOut_charge::setZero
void setZero()
Definition: ALFA_RawDataReadOut_charge.cxx:76
ALFA_RawDataReadOut_charge::m_ChannelNumId
uint16_t m_ChannelNumId
Definition: ALFA_RawDataReadOut_charge.h:53
ALFA_RawDataReadOut_charge::m_MBId
uint16_t m_MBId
Definition: ALFA_RawDataReadOut_charge.h:49
ALFA_RawDataReadOut_charge::m_bcId
uint16_t m_bcId
Definition: ALFA_RawDataReadOut_charge.h:42
ALFA_RawDataReadOut_charge::m_bit12
bool m_bit12
Definition: ALFA_RawDataReadOut_charge.h:56
ALFA_RawDataReadOut_charge::m_ecnt_BOT
uint16_t m_ecnt_BOT
Definition: ALFA_RawDataReadOut_charge.h:40
ALFA_RawDataReadOut_charge::m_wordHeader
uint16_t m_wordHeader
Definition: ALFA_RawDataReadOut_charge.h:35
ALFA_RawDataReadOut_charge::ALFA_RawDataReadOut_charge
ALFA_RawDataReadOut_charge()
Definition: ALFA_RawDataReadOut_charge.cxx:7
ALFA_RawDataReadOut_charge::decodeWord
void decodeWord(uint32_t dataWord)
Definition: ALFA_RawDataReadOut_charge.cxx:30
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
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
ALFA_RawDataReadOut_charge::is_BOT
bool is_BOT() const
Definition: ALFA_RawDataReadOut_charge.h:94