ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
ALFA_RawDataReadOut Class Reference

#include <ALFA_RawDataReadOut.h>

Inheritance diagram for ALFA_RawDataReadOut:
Collaboration diagram for ALFA_RawDataReadOut:

Public Member Functions

 ALFA_RawDataReadOut ()
 
 ~ALFA_RawDataReadOut ()
 
void decodeWord (uint32_t dataWord)
 
bool is_BOT () const
 
bool is_EOT () const
 
bool is_TDCt () const
 
uint16_t MBId () const
 
uint16_t SlotId () const
 
uint16_t LsbTdcId () const
 
uint16_t ecnt_BOT () const
 
uint16_t ecnt_EOT () const
 
uint16_t bcId () const
 
uint16_t WordId () const
 
uint16_t PMFId () const
 
uint16_t fiber () const
 
uint16_t ADC () const
 
const std::vector< bool > & pattern () const
 
uint16_t scaler () const
 
bool bit16 () const
 
bool error_bit17 () const
 
bool bit18 () const
 
bool isError () const
 
uint16_t bit26_27 () const
 
uint16_t bit24_27 () const
 
const std::vector< uint32_t > & HitChan () const
 

Protected Member Functions

constexpr std::pair< uint32_t, uint16_t > getBitsWord (const uint16_t bstart, const uint16_t bstop)
 
uint32_t getBits (std::pair< uint32_t, uint16_t > in)
 
uint32_t setBits (uint16_t nData, uint16_t *inputData, uint16_t *inputPos)
 
uint32_t setBits (uint16_t nData, uint32_t *inputData, uint16_t *inputPos)
 

Protected Attributes

uint32_t m_word
 

Private Member Functions

void setZero ()
 

Private Attributes

uint32_t m_dataWord
 
uint16_t m_wordHeader
 
uint16_t m_SlotId
 
uint16_t m_LsbTdcId
 
uint16_t m_ecnt_BOT
 
uint16_t m_ecnt_EOT
 
uint16_t m_bcId
 
uint16_t m_wcnt
 
uint16_t m_MBId
 
uint16_t m_bit26_27
 
uint16_t m_bit24_27
 
uint16_t m_WordId
 
uint16_t m_PMFId
 
uint16_t m_fiber
 
uint16_t m_ADC
 
std::vector< bool > m_pattern
 
uint16_t m_scaler
 
bool m_bit16
 
bool m_error_bit17
 
bool m_bit18
 
std::vector< uint32_t > m_MarocChan
 

Static Private Attributes

static constexpr uint16_t s_headerPos = 28
 
static constexpr uint16_t s_headerBits = 0xf
 
static constexpr uint16_t s_BOTvalue = 0xa
 
static constexpr uint16_t s_EOTvalue = 0xc
 
static constexpr uint16_t s_TSMvalue = 0x3
 

Detailed Description

Definition at line 26 of file ALFA_RawDataReadOut.h.

Constructor & Destructor Documentation

◆ ALFA_RawDataReadOut()

ALFA_RawDataReadOut::ALFA_RawDataReadOut ( )

Definition at line 7 of file ALFA_RawDataReadOut.cxx.

7  :
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 { }

◆ ~ALFA_RawDataReadOut()

ALFA_RawDataReadOut::~ALFA_RawDataReadOut ( )

Definition at line 30 of file ALFA_RawDataReadOut.cxx.

31 { }

Member Function Documentation

◆ ADC()

uint16_t ALFA_RawDataReadOut::ADC ( ) const
inline

Definition at line 111 of file ALFA_RawDataReadOut.h.

111 {return m_ADC;}

◆ bcId()

uint16_t ALFA_RawDataReadOut::bcId ( ) const
inline

Definition at line 107 of file ALFA_RawDataReadOut.h.

107 {return m_bcId;}

◆ bit16()

bool ALFA_RawDataReadOut::bit16 ( ) const
inline

Definition at line 114 of file ALFA_RawDataReadOut.h.

114 {return m_bit16;}

◆ bit18()

bool ALFA_RawDataReadOut::bit18 ( ) const
inline

Definition at line 116 of file ALFA_RawDataReadOut.h.

116 {return m_bit18;}

◆ bit24_27()

uint16_t ALFA_RawDataReadOut::bit24_27 ( ) const
inline

Definition at line 119 of file ALFA_RawDataReadOut.h.

119 {return m_bit24_27;}

◆ bit26_27()

uint16_t ALFA_RawDataReadOut::bit26_27 ( ) const
inline

Definition at line 118 of file ALFA_RawDataReadOut.h.

118 {return m_bit26_27;}

◆ decodeWord()

void ALFA_RawDataReadOut::decodeWord ( uint32_t  dataWord)

Definition at line 33 of file ALFA_RawDataReadOut.cxx.

35 {
36 
37  // Zero all the decoded quantities
38  setZero();
39  m_dataWord = dataWord;
40  m_word = dataWord;
42 
43  if (is_TDCt()) // TDC single measurement
44  {
45  m_bit18 = (bool) getBits(getBitsWord(18,18));
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 }

◆ ecnt_BOT()

uint16_t ALFA_RawDataReadOut::ecnt_BOT ( ) const
inline

Definition at line 105 of file ALFA_RawDataReadOut.h.

105 {return m_ecnt_BOT;}

◆ ecnt_EOT()

uint16_t ALFA_RawDataReadOut::ecnt_EOT ( ) const
inline

Definition at line 106 of file ALFA_RawDataReadOut.h.

106 {return m_ecnt_EOT;}

◆ error_bit17()

bool ALFA_RawDataReadOut::error_bit17 ( ) const
inline

Definition at line 115 of file ALFA_RawDataReadOut.h.

115 {return m_error_bit17;}

◆ fiber()

uint16_t ALFA_RawDataReadOut::fiber ( ) const
inline

Definition at line 110 of file ALFA_RawDataReadOut.h.

110 {return m_fiber;}

◆ getBits()

uint32_t ALFA_ReadOut::getBits ( std::pair< uint32_t, uint16_t >  in)
inlineprotectedinherited

Definition at line 29 of file ALFA_ReadOut.h.

29  {
30  return (m_word >> in.second) & (in.first|1);
31  }

◆ getBitsWord()

constexpr std::pair<uint32_t, uint16_t> ALFA_ReadOut::getBitsWord ( const uint16_t  bstart,
const uint16_t  bstop 
)
inlineconstexprprotectedinherited

Definition at line 21 of file ALFA_ReadOut.h.

21  {
22  uint32_t word = 0;
23  for (uint16_t i = bstop; i<bstart ; i++ )
24  word = ((word | 1)<<1);
25  return std::make_pair(word, bstop);
26  }

◆ HitChan()

const std::vector<uint32_t>& ALFA_RawDataReadOut::HitChan ( ) const
inline

Definition at line 121 of file ALFA_RawDataReadOut.h.

121 {return m_MarocChan;}

◆ is_BOT()

bool ALFA_RawDataReadOut::is_BOT ( ) const
inline

Definition at line 93 of file ALFA_RawDataReadOut.h.

93 {return (m_wordHeader == s_BOTvalue);};

◆ is_EOT()

bool ALFA_RawDataReadOut::is_EOT ( ) const
inline

Definition at line 95 of file ALFA_RawDataReadOut.h.

95 {return (m_wordHeader == s_EOTvalue);};

◆ is_TDCt()

bool ALFA_RawDataReadOut::is_TDCt ( ) const
inline

Definition at line 97 of file ALFA_RawDataReadOut.h.

97 {return (m_wordHeader == s_TSMvalue);};

◆ isError()

bool ALFA_RawDataReadOut::isError ( ) const
inline

Definition at line 117 of file ALFA_RawDataReadOut.h.

117 {return m_error_bit17;}

◆ LsbTdcId()

uint16_t ALFA_RawDataReadOut::LsbTdcId ( ) const
inline

Definition at line 104 of file ALFA_RawDataReadOut.h.

104 {return m_LsbTdcId;}

◆ MBId()

uint16_t ALFA_RawDataReadOut::MBId ( ) const
inline

Definition at line 101 of file ALFA_RawDataReadOut.h.

101 {return m_MBId;}

◆ pattern()

const std::vector<bool>& ALFA_RawDataReadOut::pattern ( ) const
inline

Definition at line 112 of file ALFA_RawDataReadOut.h.

112 {return m_pattern;}

◆ PMFId()

uint16_t ALFA_RawDataReadOut::PMFId ( ) const
inline

Definition at line 109 of file ALFA_RawDataReadOut.h.

109 {return m_PMFId;}

◆ scaler()

uint16_t ALFA_RawDataReadOut::scaler ( ) const
inline

Definition at line 113 of file ALFA_RawDataReadOut.h.

113 {return m_scaler;}

◆ setBits() [1/2]

uint32_t ALFA_ReadOut::setBits ( uint16_t  nData,
uint16_t *  inputData,
uint16_t *  inputPos 
)
protectedinherited

◆ setBits() [2/2]

uint32_t ALFA_ReadOut::setBits ( uint16_t  nData,
uint32_t *  inputData,
uint16_t *  inputPos 
)
protectedinherited

◆ setZero()

void ALFA_RawDataReadOut::setZero ( )
private

Definition at line 85 of file ALFA_RawDataReadOut.cxx.

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 }

◆ SlotId()

uint16_t ALFA_RawDataReadOut::SlotId ( ) const
inline

Definition at line 103 of file ALFA_RawDataReadOut.h.

103 {return m_SlotId;}

◆ WordId()

uint16_t ALFA_RawDataReadOut::WordId ( ) const
inline

Definition at line 108 of file ALFA_RawDataReadOut.h.

108 {return m_WordId;}

Member Data Documentation

◆ m_ADC

uint16_t ALFA_RawDataReadOut::m_ADC
private

Definition at line 55 of file ALFA_RawDataReadOut.h.

◆ m_bcId

uint16_t ALFA_RawDataReadOut::m_bcId
private

Definition at line 40 of file ALFA_RawDataReadOut.h.

◆ m_bit16

bool ALFA_RawDataReadOut::m_bit16
private

Definition at line 58 of file ALFA_RawDataReadOut.h.

◆ m_bit18

bool ALFA_RawDataReadOut::m_bit18
private

Definition at line 60 of file ALFA_RawDataReadOut.h.

◆ m_bit24_27

uint16_t ALFA_RawDataReadOut::m_bit24_27
private

Definition at line 50 of file ALFA_RawDataReadOut.h.

◆ m_bit26_27

uint16_t ALFA_RawDataReadOut::m_bit26_27
private

Definition at line 49 of file ALFA_RawDataReadOut.h.

◆ m_dataWord

uint32_t ALFA_RawDataReadOut::m_dataWord
private

Definition at line 31 of file ALFA_RawDataReadOut.h.

◆ m_ecnt_BOT

uint16_t ALFA_RawDataReadOut::m_ecnt_BOT
private

Definition at line 38 of file ALFA_RawDataReadOut.h.

◆ m_ecnt_EOT

uint16_t ALFA_RawDataReadOut::m_ecnt_EOT
private

Definition at line 39 of file ALFA_RawDataReadOut.h.

◆ m_error_bit17

bool ALFA_RawDataReadOut::m_error_bit17
private

Definition at line 59 of file ALFA_RawDataReadOut.h.

◆ m_fiber

uint16_t ALFA_RawDataReadOut::m_fiber
private

Definition at line 54 of file ALFA_RawDataReadOut.h.

◆ m_LsbTdcId

uint16_t ALFA_RawDataReadOut::m_LsbTdcId
private

Definition at line 37 of file ALFA_RawDataReadOut.h.

◆ m_MarocChan

std::vector<uint32_t> ALFA_RawDataReadOut::m_MarocChan
private

Definition at line 62 of file ALFA_RawDataReadOut.h.

◆ m_MBId

uint16_t ALFA_RawDataReadOut::m_MBId
private

Definition at line 47 of file ALFA_RawDataReadOut.h.

◆ m_pattern

std::vector<bool> ALFA_RawDataReadOut::m_pattern
private

Definition at line 56 of file ALFA_RawDataReadOut.h.

◆ m_PMFId

uint16_t ALFA_RawDataReadOut::m_PMFId
private

Definition at line 53 of file ALFA_RawDataReadOut.h.

◆ m_scaler

uint16_t ALFA_RawDataReadOut::m_scaler
private

Definition at line 57 of file ALFA_RawDataReadOut.h.

◆ m_SlotId

uint16_t ALFA_RawDataReadOut::m_SlotId
private

Definition at line 36 of file ALFA_RawDataReadOut.h.

◆ m_wcnt

uint16_t ALFA_RawDataReadOut::m_wcnt
private

Definition at line 43 of file ALFA_RawDataReadOut.h.

◆ m_word

uint32_t ALFA_ReadOut::m_word
protectedinherited

Definition at line 40 of file ALFA_ReadOut.h.

◆ m_wordHeader

uint16_t ALFA_RawDataReadOut::m_wordHeader
private

Definition at line 33 of file ALFA_RawDataReadOut.h.

◆ m_WordId

uint16_t ALFA_RawDataReadOut::m_WordId
private

Definition at line 52 of file ALFA_RawDataReadOut.h.

◆ s_BOTvalue

constexpr uint16_t ALFA_RawDataReadOut::s_BOTvalue = 0xa
staticconstexprprivate

Definition at line 72 of file ALFA_RawDataReadOut.h.

◆ s_EOTvalue

constexpr uint16_t ALFA_RawDataReadOut::s_EOTvalue = 0xc
staticconstexprprivate

Definition at line 75 of file ALFA_RawDataReadOut.h.

◆ s_headerBits

constexpr uint16_t ALFA_RawDataReadOut::s_headerBits = 0xf
staticconstexprprivate

Definition at line 69 of file ALFA_RawDataReadOut.h.

◆ s_headerPos

constexpr uint16_t ALFA_RawDataReadOut::s_headerPos = 28
staticconstexprprivate

Definition at line 68 of file ALFA_RawDataReadOut.h.

◆ s_TSMvalue

constexpr uint16_t ALFA_RawDataReadOut::s_TSMvalue = 0x3
staticconstexprprivate

Definition at line 78 of file ALFA_RawDataReadOut.h.


The documentation for this class was generated from the following files:
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_MarocChan
std::vector< uint32_t > m_MarocChan
Definition: ALFA_RawDataReadOut.h:62
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::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::m_bit18
bool m_bit18
Definition: ALFA_RawDataReadOut.h:60
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
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::s_EOTvalue
static constexpr uint16_t s_EOTvalue
Definition: ALFA_RawDataReadOut.h:75
ALFA_RawDataReadOut::m_bit26_27
uint16_t m_bit26_27
Definition: ALFA_RawDataReadOut.h:49
ALFA_RawDataReadOut::s_TSMvalue
static constexpr uint16_t s_TSMvalue
Definition: ALFA_RawDataReadOut.h:78
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::m_bit24_27
uint16_t m_bit24_27
Definition: ALFA_RawDataReadOut.h:50
ALFA_RawDataReadOut::s_BOTvalue
static constexpr uint16_t s_BOTvalue
Definition: ALFA_RawDataReadOut.h:72