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

L1Calo User Header class. More...

#include <ZdcUserHeader.h>

Collaboration diagram for ZdcUserHeader:

Public Member Functions

 ZdcUserHeader (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 ppmLut () const
 
int ppmFadc () const
 
int lowerBound () const
 Return FADC lower bound. More...
 
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_ppmLutBit = 8
 ZdcUserHeader. More...
 
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

This is a modifyed version to be used only by ZDC

TRY_LINK_LVL1

Marco Leite

Definition at line 24 of file ZdcUserHeader.h.

Constructor & Destructor Documentation

◆ ZdcUserHeader()

ZdcUserHeader::ZdcUserHeader ( uint32_t  header = 0xf0000001)

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

Definition at line 36 of file ZdcUserHeader.cxx.

36  : m_header(header),
37  m_version2(true)
38 {
39 }

Member Function Documentation

◆ header()

uint32_t ZdcUserHeader::header ( ) const
inline

Return packed header.

Definition at line 81 of file ZdcUserHeader.h.

82 {
83  return m_header;
84 }

◆ isValid()

bool ZdcUserHeader::isValid ( uint32_t  word)
static

Test for valid header word.

Definition at line 43 of file ZdcUserHeader.cxx.

44 {
45  return ((word >> s_wordIdBit) & s_mask) == s_mask;
46 }

◆ lowerBound()

int ZdcUserHeader::lowerBound ( ) const
inline

Return FADC lower bound.

Definition at line 104 of file ZdcUserHeader.h.

105 {
107  : 0;
108 }

◆ ppmFadc()

int ZdcUserHeader::ppmFadc ( ) const
inline

Definition at line 98 of file ZdcUserHeader.h.

99 {
101  : (m_header >> s_ppmFadcBit ) & s_mask;
102 }

◆ ppmLut()

int ZdcUserHeader::ppmLut ( ) const
inline

Definition at line 92 of file ZdcUserHeader.h.

93 {
95  : (m_header >> s_ppmLutBit ) & s_mask;
96 }

◆ setLowerBound()

void ZdcUserHeader::setLowerBound ( int  bound)
inline

Set FADC lower bound.

Definition at line 122 of file ZdcUserHeader.h.

123 {
125 }

◆ setPpmFadc()

void ZdcUserHeader::setPpmFadc ( int  offset)
inline

Definition at line 116 of file ZdcUserHeader.h.

117 {
119  : (s_mask & offset) << s_ppmFadcBit;
120 }

◆ setPpmLut()

void ZdcUserHeader::setPpmLut ( int  offset)
inline

Definition at line 110 of file ZdcUserHeader.h.

111 {
113  : (s_mask & offset) << s_ppmLutBit;
114 }

◆ setVersion()

void ZdcUserHeader::setVersion ( int  minorVersion)
inline

Set version flag.

Definition at line 127 of file ZdcUserHeader.h.

128 {
129  m_version2 = (minorVersion > s_version1);
130 }

◆ words()

int ZdcUserHeader::words ( ) const
inline

Return number of header words (should be one)

Definition at line 86 of file ZdcUserHeader.h.

87 {
88  return m_header & s_mask;
89 }

Member Data Documentation

◆ m_header

uint32_t ZdcUserHeader::m_header
private

Packed Header.

Definition at line 75 of file ZdcUserHeader.h.

◆ m_version2

bool ZdcUserHeader::m_version2
private

Version flag.

Definition at line 77 of file ZdcUserHeader.h.

◆ s_lowerBoundBit

const int ZdcUserHeader::s_lowerBoundBit = 20
staticprivate

Definition at line 63 of file ZdcUserHeader.h.

◆ s_lowerBoundMask

const uint32_t ZdcUserHeader::s_lowerBoundMask = 0xff
staticprivate

Definition at line 69 of file ZdcUserHeader.h.

◆ s_mask

const uint32_t ZdcUserHeader::s_mask = 0xf
staticprivate

Field mask.

Definition at line 67 of file ZdcUserHeader.h.

◆ s_ppmFadcBit

const int ZdcUserHeader::s_ppmFadcBit = 4
staticprivate

Definition at line 61 of file ZdcUserHeader.h.

◆ s_ppmFadcBitV2

const int ZdcUserHeader::s_ppmFadcBitV2 = 4
staticprivate

Definition at line 65 of file ZdcUserHeader.h.

◆ s_ppmFadcMaskV2

const uint32_t ZdcUserHeader::s_ppmFadcMaskV2 = 0x1f
staticprivate

Definition at line 71 of file ZdcUserHeader.h.

◆ s_ppmLutBit

const int ZdcUserHeader::s_ppmLutBit = 8
staticprivate

ZdcUserHeader.

This should be called ZdcRodHeader..

TRY_LINK_LVL1

Marco Leite

Definition at line 60 of file ZdcUserHeader.h.

◆ s_ppmLutBitV2

const int ZdcUserHeader::s_ppmLutBitV2 = 9
staticprivate

Definition at line 64 of file ZdcUserHeader.h.

◆ s_ppmLutMaskV2

const uint32_t ZdcUserHeader::s_ppmLutMaskV2 = 0x7
staticprivate

Definition at line 70 of file ZdcUserHeader.h.

◆ s_version1

const int ZdcUserHeader::s_version1 = 0x1001
staticprivate

Version 1 minor format version number.

Definition at line 73 of file ZdcUserHeader.h.

◆ s_wordIdBit

const int ZdcUserHeader::s_wordIdBit = 28
staticprivate

Definition at line 59 of file ZdcUserHeader.h.


The documentation for this class was generated from the following files:
ZdcUserHeader::s_version1
static const int s_version1
Version 1 minor format version number.
Definition: ZdcUserHeader.h:73
ZdcUserHeader::s_lowerBoundMask
static const uint32_t s_lowerBoundMask
Definition: ZdcUserHeader.h:69
header
Definition: hcg.cxx:526
ZdcUserHeader::s_ppmFadcMaskV2
static const uint32_t s_ppmFadcMaskV2
Definition: ZdcUserHeader.h:71
ZdcUserHeader::s_mask
static const uint32_t s_mask
Field mask.
Definition: ZdcUserHeader.h:67
ZdcUserHeader::s_ppmFadcBit
static const int s_ppmFadcBit
Definition: ZdcUserHeader.h:61
ZdcUserHeader::s_ppmFadcBitV2
static const int s_ppmFadcBitV2
Definition: ZdcUserHeader.h:65
ZdcUserHeader::m_version2
bool m_version2
Version flag.
Definition: ZdcUserHeader.h:77
ZdcUserHeader::s_ppmLutBit
static const int s_ppmLutBit
ZdcUserHeader.
Definition: ZdcUserHeader.h:60
ZdcUserHeader::s_wordIdBit
static const int s_wordIdBit
Definition: ZdcUserHeader.h:59
ZdcUserHeader::m_header
uint32_t m_header
Packed Header.
Definition: ZdcUserHeader.h:75
ZdcUserHeader::s_lowerBoundBit
static const int s_lowerBoundBit
Definition: ZdcUserHeader.h:63
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
ZdcUserHeader::s_ppmLutBitV2
static const int s_ppmLutBitV2
Definition: ZdcUserHeader.h:64
ZdcUserHeader::s_ppmLutMaskV2
static const uint32_t s_ppmLutMaskV2
Definition: ZdcUserHeader.h:70