ATLAS Offline Software
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
LVL1BS::JemJetElement Class Reference

JEM jet element dataword class. More...

#include <JemJetElement.h>

Collaboration diagram for LVL1BS::JemJetElement:

Public Member Functions

 JemJetElement (uint32_t word)
 
 JemJetElement (int chan, int emDat, int hadDat, int emParErr, int hadParErr, int linkErr)
 
int channel () const
 
int emData () const
 
int hadData () const
 
int emParity () const
 
int hadParity () const
 
int linkError () const
 
int pair () const
 
int pin () const
 
int wordId () const
 
uint32_t data () const
 

Private Attributes

uint32_t m_data
 Jet element data. More...
 

Static Private Attributes

static const int s_emDataBit = 0
 
static const int s_emParityBit = 9
 
static const int s_hadDataBit = 10
 
static const int s_hadParityBit = 19
 
static const int s_linkErrorBit = 20
 
static const int s_pairBit = 23
 
static const int s_pinBit = 25
 
static const int s_wordIdBit = 30
 
static const int s_jeWordId = 0x1
 
static const int s_pairsPerPin = 3
 
static const int s_pairOffset = 1
 
static const uint32_t s_emDataMask = 0x1ff
 
static const uint32_t s_emParityMask = 0x1
 
static const uint32_t s_hadDataMask = 0x1ff
 
static const uint32_t s_hadParityMask = 0x1
 
static const uint32_t s_linkErrorMask = 0x3
 
static const uint32_t s_pairMask = 0x3
 
static const uint32_t s_pinMask = 0x1f
 
static const uint32_t s_wordIdMask = 0x3
 

Detailed Description

JEM jet element dataword class.

Based on "ATLAS Level-1 Calorimeter Trigger Read-out Driver" Version 1.06d

Author
Peter Faulkner

Definition at line 20 of file JemJetElement.h.

Constructor & Destructor Documentation

◆ JemJetElement() [1/2]

LVL1BS::JemJetElement::JemJetElement ( uint32_t  word)

Definition at line 32 of file JemJetElement.cxx.

32  : m_data(word)
33 {
34 }

◆ JemJetElement() [2/2]

LVL1BS::JemJetElement::JemJetElement ( int  chan,
int  emDat,
int  hadDat,
int  emParErr,
int  hadParErr,
int  linkErr 
)

Definition at line 36 of file JemJetElement.cxx.

39 {
40  uint32_t word = 0;
41  word |= (emDat & s_emDataMask) << s_emDataBit;
42  word |= (emParErr & s_emParityMask) << s_emParityBit;
43  word |= (hadDat & s_hadDataMask) << s_hadDataBit;
44  word |= (hadParErr & s_hadParityMask) << s_hadParityBit;
45  word |= (linkErr & s_linkErrorMask) << s_linkErrorBit;
46  if (word) {
47  word |= ((chan % s_pairsPerPin + s_pairOffset) & s_pairMask) << s_pairBit;
48  word |= ((chan / s_pairsPerPin) & s_pinMask) << s_pinBit;
49  word |= (s_jeWordId & s_wordIdMask) << s_wordIdBit;
50  }
51  m_data = word;
52 }

Member Function Documentation

◆ channel()

int LVL1BS::JemJetElement::channel ( ) const
inline

Definition at line 66 of file JemJetElement.h.

67 {
68  return s_pairsPerPin * pin() + pair() - s_pairOffset;
69 }

◆ data()

uint32_t LVL1BS::JemJetElement::data ( ) const
inline

Definition at line 111 of file JemJetElement.h.

112 {
113  return m_data;
114 }

◆ emData()

int LVL1BS::JemJetElement::emData ( ) const
inline

Definition at line 71 of file JemJetElement.h.

72 {
73  return (m_data >> s_emDataBit) & s_emDataMask;
74 }

◆ emParity()

int LVL1BS::JemJetElement::emParity ( ) const
inline

Definition at line 81 of file JemJetElement.h.

82 {
83  return (m_data >> s_emParityBit) & s_emParityMask;
84 }

◆ hadData()

int LVL1BS::JemJetElement::hadData ( ) const
inline

Definition at line 76 of file JemJetElement.h.

77 {
78  return (m_data >> s_hadDataBit) & s_hadDataMask;
79 }

◆ hadParity()

int LVL1BS::JemJetElement::hadParity ( ) const
inline

Definition at line 86 of file JemJetElement.h.

87 {
89 }

◆ linkError()

int LVL1BS::JemJetElement::linkError ( ) const
inline

Definition at line 91 of file JemJetElement.h.

92 {
94 }

◆ pair()

int LVL1BS::JemJetElement::pair ( ) const
inline

Definition at line 96 of file JemJetElement.h.

97 {
98  return (m_data >> s_pairBit) & s_pairMask;
99 }

◆ pin()

int LVL1BS::JemJetElement::pin ( ) const
inline

Definition at line 101 of file JemJetElement.h.

102 {
103  return (m_data >> s_pinBit) & s_pinMask;
104 }

◆ wordId()

int LVL1BS::JemJetElement::wordId ( ) const
inline

Definition at line 106 of file JemJetElement.h.

107 {
108  return (m_data >> s_wordIdBit) & s_wordIdMask;
109 }

Member Data Documentation

◆ m_data

uint32_t LVL1BS::JemJetElement::m_data
private

Jet element data.

Definition at line 62 of file JemJetElement.h.

◆ s_emDataBit

const int LVL1BS::JemJetElement::s_emDataBit = 0
staticprivate

Definition at line 41 of file JemJetElement.h.

◆ s_emDataMask

const uint32_t LVL1BS::JemJetElement::s_emDataMask = 0x1ff
staticprivate

Definition at line 52 of file JemJetElement.h.

◆ s_emParityBit

const int LVL1BS::JemJetElement::s_emParityBit = 9
staticprivate

Definition at line 42 of file JemJetElement.h.

◆ s_emParityMask

const uint32_t LVL1BS::JemJetElement::s_emParityMask = 0x1
staticprivate

Definition at line 53 of file JemJetElement.h.

◆ s_hadDataBit

const int LVL1BS::JemJetElement::s_hadDataBit = 10
staticprivate

Definition at line 43 of file JemJetElement.h.

◆ s_hadDataMask

const uint32_t LVL1BS::JemJetElement::s_hadDataMask = 0x1ff
staticprivate

Definition at line 54 of file JemJetElement.h.

◆ s_hadParityBit

const int LVL1BS::JemJetElement::s_hadParityBit = 19
staticprivate

Definition at line 44 of file JemJetElement.h.

◆ s_hadParityMask

const uint32_t LVL1BS::JemJetElement::s_hadParityMask = 0x1
staticprivate

Definition at line 55 of file JemJetElement.h.

◆ s_jeWordId

const int LVL1BS::JemJetElement::s_jeWordId = 0x1
staticprivate

Definition at line 49 of file JemJetElement.h.

◆ s_linkErrorBit

const int LVL1BS::JemJetElement::s_linkErrorBit = 20
staticprivate

Definition at line 45 of file JemJetElement.h.

◆ s_linkErrorMask

const uint32_t LVL1BS::JemJetElement::s_linkErrorMask = 0x3
staticprivate

Definition at line 56 of file JemJetElement.h.

◆ s_pairBit

const int LVL1BS::JemJetElement::s_pairBit = 23
staticprivate

Definition at line 46 of file JemJetElement.h.

◆ s_pairMask

const uint32_t LVL1BS::JemJetElement::s_pairMask = 0x3
staticprivate

Definition at line 57 of file JemJetElement.h.

◆ s_pairOffset

const int LVL1BS::JemJetElement::s_pairOffset = 1
staticprivate

Definition at line 51 of file JemJetElement.h.

◆ s_pairsPerPin

const int LVL1BS::JemJetElement::s_pairsPerPin = 3
staticprivate

Definition at line 50 of file JemJetElement.h.

◆ s_pinBit

const int LVL1BS::JemJetElement::s_pinBit = 25
staticprivate

Definition at line 47 of file JemJetElement.h.

◆ s_pinMask

const uint32_t LVL1BS::JemJetElement::s_pinMask = 0x1f
staticprivate

Definition at line 58 of file JemJetElement.h.

◆ s_wordIdBit

const int LVL1BS::JemJetElement::s_wordIdBit = 30
staticprivate

Definition at line 48 of file JemJetElement.h.

◆ s_wordIdMask

const uint32_t LVL1BS::JemJetElement::s_wordIdMask = 0x3
staticprivate

Definition at line 59 of file JemJetElement.h.


The documentation for this class was generated from the following files:
LVL1BS::JemJetElement::s_emDataBit
static const int s_emDataBit
Definition: JemJetElement.h:41
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
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1BS::JemJetElement::pin
int pin() const
Definition: JemJetElement.h:101
LVL1BS::JemJetElement::s_hadDataMask
static const uint32_t s_hadDataMask
Definition: JemJetElement.h:54
LVL1BS::JemJetElement::s_hadParityMask
static const uint32_t s_hadParityMask
Definition: JemJetElement.h:55
LVL1BS::JemJetElement::s_pairOffset
static const int s_pairOffset
Definition: JemJetElement.h:51
LVL1BS::JemJetElement::m_data
uint32_t m_data
Jet element data.
Definition: JemJetElement.h:62
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
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::s_linkErrorBit
static const int s_linkErrorBit
Definition: JemJetElement.h:45
LVL1BS::JemJetElement::s_wordIdBit
static const int s_wordIdBit
Definition: JemJetElement.h:48
LVL1BS::JemJetElement::s_wordIdMask
static const uint32_t s_wordIdMask
Definition: JemJetElement.h:59
LVL1BS::JemJetElement::s_emParityBit
static const int s_emParityBit
Definition: JemJetElement.h:42
LVL1BS::JemJetElement::s_emDataMask
static const uint32_t s_emDataMask
Definition: JemJetElement.h:52
LVL1BS::JemJetElement::s_pinMask
static const uint32_t s_pinMask
Definition: JemJetElement.h:58
LVL1BS::JemJetElement::s_emParityMask
static const uint32_t s_emParityMask
Definition: JemJetElement.h:53
LVL1BS::JemJetElement::s_hadParityBit
static const int s_hadParityBit
Definition: JemJetElement.h:44
LVL1BS::JemJetElement::s_linkErrorMask
static const uint32_t s_linkErrorMask
Definition: JemJetElement.h:56
LVL1BS::JemJetElement::s_pairsPerPin
static const int s_pairsPerPin
Definition: JemJetElement.h:50
LVL1BS::JemJetElement::s_pinBit
static const int s_pinBit
Definition: JemJetElement.h:47
LVL1BS::JemJetElement::pair
int pair() const
Definition: JemJetElement.h:96