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

L1Calo User Header class. More...

#include <ZdcL1CaloUserHeader.h>

Collaboration diagram for ZdcL1CaloUserHeader:

Public Member Functions

 ZdcL1CaloUserHeader (uint32_t header=0xf0000001)
 Constructor - default just sets word ID and number of header words. More...
 
uint32_t header () const
 Return packed header. More...
 
int words () const
 Return number of header words (should be one) More...
 
int jepCmm () const
 
int cpCmm () const
 
int jem () const
 
int cpm () const
 
int ppmLut () const
 
int ppmFadc () const
 
int lowerBound () const
 Return FADC lower bound. More...
 
void setJepCmm (int offset)
 
void setCpCmm (int offset)
 
void setJem (int offset)
 
void setCpm (int offset)
 
void setPpmLut (int offset)
 
void setPpmFadc (int offset)
 
void setLowerBound (int bound)
 Set FADC lower bound. More...
 
void setVersion (int minorVersion)
 Set version flag. More...
 

Static Public Member Functions

static bool isValid (uint32_t word)
 Test for valid header word. More...
 

Private Attributes

uint32_t m_header
 Packed Header. More...
 
bool m_version2
 Version flag. More...
 

Static Private Attributes

static const int s_wordIdBit = 28
 
static const int s_jepCmmBit = 24
 
static const int s_cpCmmBit = 20
 
static const int s_jemBit = 16
 
static const int s_cpmBit = 12
 
static const int s_ppmLutBit = 8
 
static const int s_ppmFadcBit = 4
 
static const int s_lowerBoundBit = 20
 
static const int s_ppmLutBitV2 = 9
 
static const int s_ppmFadcBitV2 = 4
 
static const uint32_t s_mask = 0xf
 Field mask. More...
 
static const uint32_t s_lowerBoundMask = 0xff
 
static const uint32_t s_ppmLutMaskV2 = 0x7
 
static const uint32_t s_ppmFadcMaskV2 = 0x1f
 
static const int s_version1 = 0x1001
 Version 1 minor format version number. More...
 

Detailed Description

L1Calo User Header class.

The User Header is the first word of the ROD data and contains Triggered slice offsets for all the sub-detector types.

Author
Peter Faulkner

Definition at line 20 of file ZdcL1CaloUserHeader.h.

Constructor & Destructor Documentation

◆ ZdcL1CaloUserHeader()

ZdcL1CaloUserHeader::ZdcL1CaloUserHeader ( uint32_t  header = 0xf0000001)

Constructor - default just sets word ID and number of header words.

Member Function Documentation

◆ cpCmm()

int ZdcL1CaloUserHeader::cpCmm ( ) const
inline

Definition at line 105 of file ZdcL1CaloUserHeader.h.

106 {
107  return (m_version2) ? (m_header >> s_cpmBit ) & s_mask
108  : (m_header >> s_cpCmmBit) & s_mask;
109 }

◆ cpm()

int ZdcL1CaloUserHeader::cpm ( ) const
inline

Definition at line 116 of file ZdcL1CaloUserHeader.h.

117 {
118  return (m_header >> s_cpmBit) & s_mask;
119 }

◆ header()

uint32_t ZdcL1CaloUserHeader::header ( ) const
inline

Return packed header.

Definition at line 89 of file ZdcL1CaloUserHeader.h.

90 {
91  return m_header;
92 }

◆ isValid()

static bool ZdcL1CaloUserHeader::isValid ( uint32_t  word)
static

Test for valid header word.

◆ jem()

int ZdcL1CaloUserHeader::jem ( ) const
inline

Definition at line 111 of file ZdcL1CaloUserHeader.h.

112 {
113  return (m_header >> s_jemBit) & s_mask;
114 }

◆ jepCmm()

int ZdcL1CaloUserHeader::jepCmm ( ) const
inline

Definition at line 99 of file ZdcL1CaloUserHeader.h.

100 {
101  return (m_version2) ? (m_header >> s_jemBit ) & s_mask
102  : (m_header >> s_jepCmmBit) & s_mask;
103 }

◆ lowerBound()

int ZdcL1CaloUserHeader::lowerBound ( ) const
inline

Return FADC lower bound.

Definition at line 133 of file ZdcL1CaloUserHeader.h.

134 {
136  : 0;
137 }

◆ ppmFadc()

int ZdcL1CaloUserHeader::ppmFadc ( ) const
inline

Definition at line 127 of file ZdcL1CaloUserHeader.h.

128 {
130  : (m_header >> s_ppmFadcBit ) & s_mask;
131 }

◆ ppmLut()

int ZdcL1CaloUserHeader::ppmLut ( ) const
inline

Definition at line 121 of file ZdcL1CaloUserHeader.h.

122 {
124  : (m_header >> s_ppmLutBit ) & s_mask;
125 }

◆ setCpCmm()

void ZdcL1CaloUserHeader::setCpCmm ( int  offset)
inline

Definition at line 144 of file ZdcL1CaloUserHeader.h.

145 {
146  if (!m_version2) m_header |= (s_mask & offset) << s_cpCmmBit;
147 }

◆ setCpm()

void ZdcL1CaloUserHeader::setCpm ( int  offset)
inline

Definition at line 154 of file ZdcL1CaloUserHeader.h.

155 {
156  m_header |= (s_mask & offset) << s_cpmBit;
157 }

◆ setJem()

void ZdcL1CaloUserHeader::setJem ( int  offset)
inline

Definition at line 149 of file ZdcL1CaloUserHeader.h.

150 {
151  m_header |= (s_mask & offset) << s_jemBit;
152 }

◆ setJepCmm()

void ZdcL1CaloUserHeader::setJepCmm ( int  offset)
inline

Definition at line 139 of file ZdcL1CaloUserHeader.h.

140 {
141  if (!m_version2) m_header |= (s_mask & offset) << s_jepCmmBit;
142 }

◆ setLowerBound()

void ZdcL1CaloUserHeader::setLowerBound ( int  bound)
inline

Set FADC lower bound.

Definition at line 171 of file ZdcL1CaloUserHeader.h.

172 {
174 }

◆ setPpmFadc()

void ZdcL1CaloUserHeader::setPpmFadc ( int  offset)
inline

Definition at line 165 of file ZdcL1CaloUserHeader.h.

166 {
168  : (s_mask & offset) << s_ppmFadcBit;
169 }

◆ setPpmLut()

void ZdcL1CaloUserHeader::setPpmLut ( int  offset)
inline

Definition at line 159 of file ZdcL1CaloUserHeader.h.

160 {
162  : (s_mask & offset) << s_ppmLutBit;
163 }

◆ setVersion()

void ZdcL1CaloUserHeader::setVersion ( int  minorVersion)
inline

Set version flag.

Definition at line 176 of file ZdcL1CaloUserHeader.h.

177 {
178  m_version2 = (minorVersion > s_version1);
179 }

◆ words()

int ZdcL1CaloUserHeader::words ( ) const
inline

Return number of header words (should be one)

Definition at line 94 of file ZdcL1CaloUserHeader.h.

95 {
96  return m_header & s_mask;
97 }

Member Data Documentation

◆ m_header

uint32_t ZdcL1CaloUserHeader::m_header
private

Packed Header.

Definition at line 83 of file ZdcL1CaloUserHeader.h.

◆ m_version2

bool ZdcL1CaloUserHeader::m_version2
private

Version flag.

Definition at line 85 of file ZdcL1CaloUserHeader.h.

◆ s_cpCmmBit

const int ZdcL1CaloUserHeader::s_cpCmmBit = 20
staticprivate

Definition at line 65 of file ZdcL1CaloUserHeader.h.

◆ s_cpmBit

const int ZdcL1CaloUserHeader::s_cpmBit = 12
staticprivate

Definition at line 67 of file ZdcL1CaloUserHeader.h.

◆ s_jemBit

const int ZdcL1CaloUserHeader::s_jemBit = 16
staticprivate

Definition at line 66 of file ZdcL1CaloUserHeader.h.

◆ s_jepCmmBit

const int ZdcL1CaloUserHeader::s_jepCmmBit = 24
staticprivate

Definition at line 64 of file ZdcL1CaloUserHeader.h.

◆ s_lowerBoundBit

const int ZdcL1CaloUserHeader::s_lowerBoundBit = 20
staticprivate

Definition at line 71 of file ZdcL1CaloUserHeader.h.

◆ s_lowerBoundMask

const uint32_t ZdcL1CaloUserHeader::s_lowerBoundMask = 0xff
staticprivate

Definition at line 77 of file ZdcL1CaloUserHeader.h.

◆ s_mask

const uint32_t ZdcL1CaloUserHeader::s_mask = 0xf
staticprivate

Field mask.

Definition at line 75 of file ZdcL1CaloUserHeader.h.

◆ s_ppmFadcBit

const int ZdcL1CaloUserHeader::s_ppmFadcBit = 4
staticprivate

Definition at line 69 of file ZdcL1CaloUserHeader.h.

◆ s_ppmFadcBitV2

const int ZdcL1CaloUserHeader::s_ppmFadcBitV2 = 4
staticprivate

Definition at line 73 of file ZdcL1CaloUserHeader.h.

◆ s_ppmFadcMaskV2

const uint32_t ZdcL1CaloUserHeader::s_ppmFadcMaskV2 = 0x1f
staticprivate

Definition at line 79 of file ZdcL1CaloUserHeader.h.

◆ s_ppmLutBit

const int ZdcL1CaloUserHeader::s_ppmLutBit = 8
staticprivate

Definition at line 68 of file ZdcL1CaloUserHeader.h.

◆ s_ppmLutBitV2

const int ZdcL1CaloUserHeader::s_ppmLutBitV2 = 9
staticprivate

Definition at line 72 of file ZdcL1CaloUserHeader.h.

◆ s_ppmLutMaskV2

const uint32_t ZdcL1CaloUserHeader::s_ppmLutMaskV2 = 0x7
staticprivate

Definition at line 78 of file ZdcL1CaloUserHeader.h.

◆ s_version1

const int ZdcL1CaloUserHeader::s_version1 = 0x1001
staticprivate

Version 1 minor format version number.

Definition at line 81 of file ZdcL1CaloUserHeader.h.

◆ s_wordIdBit

const int ZdcL1CaloUserHeader::s_wordIdBit = 28
staticprivate

Definition at line 63 of file ZdcL1CaloUserHeader.h.


The documentation for this class was generated from the following file:
ZdcL1CaloUserHeader::s_mask
static const uint32_t s_mask
Field mask.
Definition: ZdcL1CaloUserHeader.h:75
ZdcL1CaloUserHeader::s_jepCmmBit
static const int s_jepCmmBit
Definition: ZdcL1CaloUserHeader.h:64
ZdcL1CaloUserHeader::s_jemBit
static const int s_jemBit
Definition: ZdcL1CaloUserHeader.h:66
ZdcL1CaloUserHeader::s_cpCmmBit
static const int s_cpCmmBit
Definition: ZdcL1CaloUserHeader.h:65
ZdcL1CaloUserHeader::s_lowerBoundBit
static const int s_lowerBoundBit
Definition: ZdcL1CaloUserHeader.h:71
ZdcL1CaloUserHeader::s_cpmBit
static const int s_cpmBit
Definition: ZdcL1CaloUserHeader.h:67
ZdcL1CaloUserHeader::s_ppmFadcBit
static const int s_ppmFadcBit
Definition: ZdcL1CaloUserHeader.h:69
ZdcL1CaloUserHeader::s_ppmLutBitV2
static const int s_ppmLutBitV2
Definition: ZdcL1CaloUserHeader.h:72
ZdcL1CaloUserHeader::m_header
uint32_t m_header
Packed Header.
Definition: ZdcL1CaloUserHeader.h:83
ZdcL1CaloUserHeader::s_ppmLutBit
static const int s_ppmLutBit
Definition: ZdcL1CaloUserHeader.h:68
ZdcL1CaloUserHeader::s_ppmFadcBitV2
static const int s_ppmFadcBitV2
Definition: ZdcL1CaloUserHeader.h:73
ZdcL1CaloUserHeader::s_version1
static const int s_version1
Version 1 minor format version number.
Definition: ZdcL1CaloUserHeader.h:81
ZdcL1CaloUserHeader::s_ppmLutMaskV2
static const uint32_t s_ppmLutMaskV2
Definition: ZdcL1CaloUserHeader.h:78
ZdcL1CaloUserHeader::s_ppmFadcMaskV2
static const uint32_t s_ppmFadcMaskV2
Definition: ZdcL1CaloUserHeader.h:79
ZdcL1CaloUserHeader::m_version2
bool m_version2
Version flag.
Definition: ZdcL1CaloUserHeader.h:85
ZdcL1CaloUserHeader::s_lowerBoundMask
static const uint32_t s_lowerBoundMask
Definition: ZdcL1CaloUserHeader.h:77
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71