ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1::CPMRoI Class Reference

CPM RoI data. More...

#include <CPMRoI.h>

Collaboration diagram for LVL1::CPMRoI:

Public Member Functions

 CPMRoI ()
 CPMRoI (uint32_t roiWord)
 CPMRoI (int crate, int cpm, int chip, int location, int hits, int error)
 ~CPMRoI ()
int crate () const
 Return crate number (0-1)
int cpm () const
 Return CPM number (1-14)
int chip () const
 Return CP chip number (0-7)
int location () const
 Return location (RoI local coords) (0-7)
int hits () const
 Return hit thresholds map.
int error () const
 Return error flags (bit 0 Saturation, bit 1 Parity)
uint32_t roiWord () const
 Return packed RoI word.
bool setRoiWord (uint32_t roiWord)
 Set RoI word with ID check.

Private Member Functions

int parity () const
 Return parity error flag (0/1)
int saturation () const
 Return saturation flag (0/1)

Private Attributes

uint32_t m_roiWord
 RoI word.

Static Private Attributes

static const int s_wordIdVal = 0x0
 RoI word ID.
static const int s_wordIdBit = 30
static const int s_crateBit = 28
static const int s_cpmBit = 24
static const int s_chipBit = 21
static const int s_locationBit = 18
static const int s_parityBit = 17
static const int s_saturationBit = 16
static const int s_hitsBit = 0
static const int s_wordIdMask = 0x3
static const int s_crateMask = 0x3
static const int s_cpmMask = 0xf
static const int s_chipMask = 0x7
static const int s_locationMask = 0x7
static const int s_parityMask = 0x1
static const int s_saturationMask = 0x1
static const int s_hitsMask = 0xffff

Detailed Description

CPM RoI data.

Contains a Cluster Processor Module RoI word. Used in analysis of RoI readout.

Author
Peter Faulkner

Definition at line 20 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h.

Constructor & Destructor Documentation

◆ CPMRoI() [1/3]

LVL1::CPMRoI::CPMRoI ( )

Definition at line 31 of file CPMRoI.cxx.

◆ CPMRoI() [2/3]

LVL1::CPMRoI::CPMRoI ( uint32_t roiWord)

Definition at line 35 of file CPMRoI.cxx.

36{
37}
uint32_t roiWord() const
Return packed RoI word.

◆ CPMRoI() [3/3]

LVL1::CPMRoI::CPMRoI ( int crate,
int cpm,
int chip,
int location,
int hits,
int error )

Definition at line 39 of file CPMRoI.cxx.

40{
49}
int crate() const
Return crate number (0-1)
int hits() const
Return hit thresholds map.
int location() const
Return location (RoI local coords) (0-7)
int cpm() const
Return CPM number (1-14)
int chip() const
Return CP chip number (0-7)
int error() const
Return error flags (bit 0 Saturation, bit 1 Parity)

◆ ~CPMRoI()

LVL1::CPMRoI::~CPMRoI ( )

Definition at line 51 of file CPMRoI.cxx.

52{
53}

Member Function Documentation

◆ chip()

int LVL1::CPMRoI::chip ( ) const
inline

Return CP chip number (0-7)

Definition at line 91 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h.

92{
93 return (m_roiWord >> s_chipBit) & s_chipMask;
94}

◆ cpm()

int LVL1::CPMRoI::cpm ( ) const
inline

Return CPM number (1-14)

Definition at line 86 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h.

87{
88 return (m_roiWord >> s_cpmBit) & s_cpmMask;
89}

◆ crate()

int LVL1::CPMRoI::crate ( ) const
inline

Return crate number (0-1)

Definition at line 81 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h.

82{
83 return (m_roiWord >> s_crateBit) & s_crateMask;
84}

◆ error()

int LVL1::CPMRoI::error ( ) const
inline

Return error flags (bit 0 Saturation, bit 1 Parity)

Definition at line 106 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h.

107{
108 return (parity() << 1) | saturation();
109}
int parity() const
Return parity error flag (0/1)
int saturation() const
Return saturation flag (0/1)

◆ hits()

int LVL1::CPMRoI::hits ( ) const
inline

Return hit thresholds map.

Definition at line 101 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h.

102{
103 return (m_roiWord >> s_hitsBit) & s_hitsMask;
104}

◆ location()

int LVL1::CPMRoI::location ( ) const
inline

Return location (RoI local coords) (0-7)

Definition at line 96 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h.

97{
99}

◆ parity()

int LVL1::CPMRoI::parity ( ) const
inlineprivate

Return parity error flag (0/1)

Definition at line 116 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h.

117{
118 return (m_roiWord >> s_parityBit) & s_parityMask;
119}

◆ roiWord()

uint32_t LVL1::CPMRoI::roiWord ( ) const
inline

Return packed RoI word.

Definition at line 111 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h.

112{
113 return m_roiWord;
114}

◆ saturation()

int LVL1::CPMRoI::saturation ( ) const
inlineprivate

Return saturation flag (0/1)

Definition at line 121 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h.

122{
124}

◆ setRoiWord()

bool LVL1::CPMRoI::setRoiWord ( uint32_t roiWord)

Set RoI word with ID check.

Definition at line 57 of file CPMRoI.cxx.

58{
59 int wordId = (roiWord >> s_wordIdBit) & s_wordIdMask;
60 bool valid = (wordId == s_wordIdVal);
61 if (valid) m_roiWord = roiWord;
62 return valid;
63}
list valid
Definition calibdata.py:44

Member Data Documentation

◆ m_roiWord

uint32_t LVL1::CPMRoI::m_roiWord
private

RoI word.

Definition at line 77 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h.

◆ s_chipBit

const int LVL1::CPMRoI::s_chipBit = 21
staticprivate

◆ s_chipMask

const int LVL1::CPMRoI::s_chipMask = 0x7
staticprivate

◆ s_cpmBit

const int LVL1::CPMRoI::s_cpmBit = 24
staticprivate

◆ s_cpmMask

const int LVL1::CPMRoI::s_cpmMask = 0xf
staticprivate

◆ s_crateBit

const int LVL1::CPMRoI::s_crateBit = 28
staticprivate

◆ s_crateMask

const int LVL1::CPMRoI::s_crateMask = 0x3
staticprivate

◆ s_hitsBit

const int LVL1::CPMRoI::s_hitsBit = 0
staticprivate

◆ s_hitsMask

const int LVL1::CPMRoI::s_hitsMask = 0xffff
staticprivate

◆ s_locationBit

const int LVL1::CPMRoI::s_locationBit = 18
staticprivate

◆ s_locationMask

const int LVL1::CPMRoI::s_locationMask = 0x7
staticprivate

◆ s_parityBit

const int LVL1::CPMRoI::s_parityBit = 17
staticprivate

◆ s_parityMask

const int LVL1::CPMRoI::s_parityMask = 0x1
staticprivate

◆ s_saturationBit

const int LVL1::CPMRoI::s_saturationBit = 16
staticprivate

◆ s_saturationMask

const int LVL1::CPMRoI::s_saturationMask = 0x1
staticprivate

◆ s_wordIdBit

const int LVL1::CPMRoI::s_wordIdBit = 30
staticprivate

◆ s_wordIdMask

const int LVL1::CPMRoI::s_wordIdMask = 0x3
staticprivate

◆ s_wordIdVal

const int LVL1::CPMRoI::s_wordIdVal = 0x0
staticprivate

RoI word ID.

Definition at line 51 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h.


The documentation for this class was generated from the following files: