CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes | Private Attributes
gem::GEBdata Class Reference

#include <GEBdata.h>

Public Member Functions

void addVFAT (VFATdata v)
 Adds VFAT data to the vector. More...
 
uint16_t errorC () const
 Returns thirteen flags in GEM Chamber Header. More...
 
 GEBdata ()
 
uint64_t getChamberHeader () const
 
uint64_t getChamberTrailer () const
 
uint8_t getGEBflag (int c) const
 Returns one of thirteen flags from GEM chamber header. More...
 
std::vector< uint8_t > getGEBflag () const
 
uint8_t inFu () const
 Returns InFIFO underflow flag. More...
 
uint8_t inputID () const
 Returns GLIB input ID. More...
 
uint16_t ohCRC () const
 Returns OH CRC. More...
 
void setChamberHeader (uint64_t word)
 Reads the word for the GEM Chamber Header. Puts the thirteen flags in a vector. More...
 
void setChamberTrailer (uint64_t word)
 Reads the word for GEM Chamber Trailer. More...
 
void setInputID (uint8_t n)
 Sets GLIB input ID. More...
 
void setVwh (uint16_t n)
 Sets VFAT word count (size of VFAT payload) More...
 
uint8_t stuckd () const
 Returns Stuck data flag. More...
 
const std::vector< VFATdata > * vFATs () const
 Returns the vector of FVAT data. More...
 
uint16_t vwh () const
 Returns VFAT word count (size of VFAT payload) More...
 
uint16_t vwt () const
 Returns VFAT word count. More...
 
uint32_t zeroSup () const
 Returns Zero Suppression flags. More...
 
 ~GEBdata ()
 

Static Public Attributes

static const int sizeGebID = 5
 

Private Attributes

uint16_t m_ErrorC
 Thirteen Flags, only one bit each. More...
 
std::vector< uint8_t > m_GEBflags
 Vector for thirteen flags in GEM Chamber Header. More...
 
uint8_t m_InFu
 (7 0's):7 InFIFO underflow:1 More...
 
uint8_t m_InputID
 Input ID:5 000:3. More...
 
uint16_t m_OHCRC
 OH CRC:16. More...
 
uint8_t m_Stuckd
 (7 0's):7 Stuck data:1 More...
 
std::vector< VFATdatam_vfatd
 Vector of VFAT data. More...
 
uint16_t m_Vwh
 VFAT word count:12 0000:4. More...
 
uint16_t m_Vwt
 0000:4 VFAT word count:12 More...
 
uint32_t m_ZeroSup
 Zero Suppression Flags:24 (8 zeroes):8. More...
 

Detailed Description

Definition at line 10 of file GEBdata.h.

Constructor & Destructor Documentation

gem::GEBdata::GEBdata ( )
inline

Definition at line 13 of file GEBdata.h.

13 {};
gem::GEBdata::~GEBdata ( )
inline

Definition at line 14 of file GEBdata.h.

References m_vfatd.

14 {m_vfatd.clear();}
std::vector< VFATdata > m_vfatd
Vector of VFAT data.
Definition: GEBdata.h:99

Member Function Documentation

void gem::GEBdata::addVFAT ( VFATdata  v)
inline

Adds VFAT data to the vector.

Definition at line 92 of file GEBdata.h.

References m_vfatd.

92 {m_vfatd.push_back(v);}
std::vector< VFATdata > m_vfatd
Vector of VFAT data.
Definition: GEBdata.h:99
uint16_t gem::GEBdata::errorC ( ) const
inline

Returns thirteen flags in GEM Chamber Header.

Definition at line 84 of file GEBdata.h.

References m_ErrorC.

uint64_t gem::GEBdata::getChamberHeader ( ) const
inline

Definition at line 32 of file GEBdata.h.

References m_ErrorC, m_InputID, m_Vwh, and m_ZeroSup.

33  {
34  return
35  (static_cast<uint64_t>(m_ZeroSup & 0x00ffffff) << 40) |
36  (static_cast<uint64_t>(m_InputID & 0b00011111) << 35) |
37  (static_cast<uint64_t>(m_Vwh & 0x0fff) << 23) |
38  (static_cast<uint64_t>(m_ErrorC & 0b0001111111111111));
39  }
uint8_t m_InputID
Input ID:5 000:3.
Definition: GEBdata.h:109
uint32_t m_ZeroSup
Zero Suppression Flags:24 (8 zeroes):8.
Definition: GEBdata.h:106
unsigned long long uint64_t
Definition: Time.h:15
uint16_t m_ErrorC
Thirteen Flags, only one bit each.
Definition: GEBdata.h:119
uint16_t m_Vwh
VFAT word count:12 0000:4.
Definition: GEBdata.h:112
uint64_t gem::GEBdata::getChamberTrailer ( ) const
inline

Definition at line 69 of file GEBdata.h.

References m_InFu, m_OHCRC, m_Stuckd, and m_Vwt.

70  {
71  return
72  (static_cast<uint64_t>(m_OHCRC) << 48) |
73  (static_cast<uint64_t>(m_Vwt & 0x0fff) << 36) |
74  (static_cast<uint64_t>(m_InFu & 0x0f) << 35) |
75  (static_cast<uint64_t>(m_Stuckd & 0x01) << 34);
76  }
uint8_t m_InFu
(7 0&#39;s):7 InFIFO underflow:1
Definition: GEBdata.h:131
uint8_t m_Stuckd
(7 0&#39;s):7 Stuck data:1
Definition: GEBdata.h:134
uint16_t m_OHCRC
OH CRC:16.
Definition: GEBdata.h:125
unsigned long long uint64_t
Definition: Time.h:15
uint16_t m_Vwt
0000:4 VFAT word count:12
Definition: GEBdata.h:128
uint8_t gem::GEBdata::getGEBflag ( int  c) const
inline

Returns one of thirteen flags from GEM chamber header.

Argument must be between 0 and 12. The flags corresponding to a given argument are shown. 12->EvtFIFO full 11->InFIFO full 10->L1AFIFO full 9->Even size overflow 8->EvtFIFO near full 5->InFIFO near full 6->L1AFIFO near full 5->Event size warn 4->No VFAT marker 3->OOS GLIB VFAT 2->OOS GLIB OH 1->BX mismatch GLIB VFAT 0->BX mismatch GLIB OH

Definition at line 49 of file GEBdata.h.

References m_GEBflags.

50  {
51  return m_GEBflags.at(c);
52  }
std::vector< uint8_t > m_GEBflags
Vector for thirteen flags in GEM Chamber Header.
Definition: GEBdata.h:100
std::vector<uint8_t> gem::GEBdata::getGEBflag ( ) const
inline

Definition at line 53 of file GEBdata.h.

References m_GEBflags.

54  {
55  return m_GEBflags;
56  }
std::vector< uint8_t > m_GEBflags
Vector for thirteen flags in GEM Chamber Header.
Definition: GEBdata.h:100
uint8_t gem::GEBdata::inFu ( ) const
inline

Returns InFIFO underflow flag.

Definition at line 88 of file GEBdata.h.

References m_InFu.

uint8_t gem::GEBdata::inputID ( ) const
inline

Returns GLIB input ID.

Definition at line 82 of file GEBdata.h.

References m_InputID.

uint16_t gem::GEBdata::ohCRC ( ) const
inline

Returns OH CRC.

Definition at line 86 of file GEBdata.h.

References m_OHCRC.

void gem::GEBdata::setChamberHeader ( uint64_t  word)
inline

Reads the word for the GEM Chamber Header. Puts the thirteen flags in a vector.

Fills the Zero Suppression, GLIB Input ID, VFAT word count, and Thirteen Flags.

<Zero Suppression

<GLIB Input ID

<VFAT word count

<Thirteen Flags

Definition at line 21 of file GEBdata.h.

References mps_fire::i, m_ErrorC, m_GEBflags, m_InputID, m_Vwh, and m_ZeroSup.

22  {
23  m_ZeroSup = 0x00ffffff & (word >> 40);
24  m_InputID = 0b00011111 & (word >> 35);
25  m_Vwh = 0x0fff & (word >> 23);
26  m_ErrorC = 0b0001111111111111 & (word);
27  for(int i=0; i<13; ++i)
28  {
29  m_GEBflags.push_back(0x01 & (m_ErrorC >> i));
30  }
31  }
uint8_t m_InputID
Input ID:5 000:3.
Definition: GEBdata.h:109
std::vector< uint8_t > m_GEBflags
Vector for thirteen flags in GEM Chamber Header.
Definition: GEBdata.h:100
uint32_t m_ZeroSup
Zero Suppression Flags:24 (8 zeroes):8.
Definition: GEBdata.h:106
uint16_t m_ErrorC
Thirteen Flags, only one bit each.
Definition: GEBdata.h:119
uint16_t m_Vwh
VFAT word count:12 0000:4.
Definition: GEBdata.h:112
void gem::GEBdata::setChamberTrailer ( uint64_t  word)
inline

Reads the word for GEM Chamber Trailer.

Fills the OH CRC, VFAT word count, InFIFO underflow, and Stuck data.

<OH CRC

<VFAT word count

<InFIFO underflow

<Stuck data

Definition at line 62 of file GEBdata.h.

References m_InFu, m_OHCRC, m_Stuckd, and m_Vwt.

63  {
64  m_OHCRC = word >> 48;
65  m_Vwt = 0x0fff & (word >> 36);
66  m_InFu = 0x0f & (word >> 35);
67  m_Stuckd = 0x01 & (word >> 34);
68  }
uint8_t m_InFu
(7 0&#39;s):7 InFIFO underflow:1
Definition: GEBdata.h:131
uint8_t m_Stuckd
(7 0&#39;s):7 Stuck data:1
Definition: GEBdata.h:134
uint16_t m_OHCRC
OH CRC:16.
Definition: GEBdata.h:125
uint16_t m_Vwt
0000:4 VFAT word count:12
Definition: GEBdata.h:128
void gem::GEBdata::setInputID ( uint8_t  n)
inline

Sets GLIB input ID.

Definition at line 79 of file GEBdata.h.

References m_InputID, and gen::n.

void gem::GEBdata::setVwh ( uint16_t  n)
inline

Sets VFAT word count (size of VFAT payload)

Definition at line 78 of file GEBdata.h.

References m_Vwh, and gen::n.

uint8_t gem::GEBdata::stuckd ( ) const
inline

Returns Stuck data flag.

Definition at line 89 of file GEBdata.h.

References m_Stuckd.

const std::vector<VFATdata>* gem::GEBdata::vFATs ( ) const
inline

Returns the vector of FVAT data.

Definition at line 94 of file GEBdata.h.

References m_vfatd.

94 {return &m_vfatd;}
std::vector< VFATdata > m_vfatd
Vector of VFAT data.
Definition: GEBdata.h:99
uint16_t gem::GEBdata::vwh ( ) const
inline

Returns VFAT word count (size of VFAT payload)

Definition at line 83 of file GEBdata.h.

References m_Vwh.

uint16_t gem::GEBdata::vwt ( ) const
inline

Returns VFAT word count.

Definition at line 87 of file GEBdata.h.

References m_Vwt.

uint32_t gem::GEBdata::zeroSup ( ) const
inline

Returns Zero Suppression flags.

Definition at line 81 of file GEBdata.h.

References m_ZeroSup.

Member Data Documentation

uint16_t gem::GEBdata::m_ErrorC
private

Thirteen Flags, only one bit each.

000:3 EvtFIFO full:1 InFIFO full:1 L1AFIFO full:1 Even size overflow:1 EvtFIFO near full:1 InFIFO near full:1 L1AFIFO near full:1 Event size warn:1 No VFAT marker:1 OOS GLIB VFAT:1 OOS GLIB OH:1 BX mismatch GLIB VFAT:1 BX mismatch GLIB OH:1

Definition at line 119 of file GEBdata.h.

Referenced by errorC(), getChamberHeader(), and setChamberHeader().

std::vector<uint8_t> gem::GEBdata::m_GEBflags
private

Vector for thirteen flags in GEM Chamber Header.

Definition at line 100 of file GEBdata.h.

Referenced by getGEBflag(), and setChamberHeader().

uint8_t gem::GEBdata::m_InFu
private

(7 0's):7 InFIFO underflow:1

Input status (critical): Input FIFO underflow occured while sending this event

Definition at line 131 of file GEBdata.h.

Referenced by getChamberTrailer(), inFu(), and setChamberTrailer().

uint8_t gem::GEBdata::m_InputID
private

Input ID:5 000:3.

GLIB input ID (starting at 0)

Definition at line 109 of file GEBdata.h.

Referenced by getChamberHeader(), inputID(), setChamberHeader(), and setInputID().

uint16_t gem::GEBdata::m_OHCRC
private

OH CRC:16.

CRC of OH data (currently not available)

Definition at line 125 of file GEBdata.h.

Referenced by getChamberTrailer(), ohCRC(), and setChamberTrailer().

uint8_t gem::GEBdata::m_Stuckd
private

(7 0's):7 Stuck data:1

Input status (warning): Data in InFIFO or EvtFIFO when L1A FIFO was empty. Only resets with resync or reset

Definition at line 134 of file GEBdata.h.

Referenced by getChamberTrailer(), setChamberTrailer(), and stuckd().

std::vector<VFATdata> gem::GEBdata::m_vfatd
private

Vector of VFAT data.

Definition at line 99 of file GEBdata.h.

Referenced by addVFAT(), vFATs(), and ~GEBdata().

uint16_t gem::GEBdata::m_Vwh
private

VFAT word count:12 0000:4.

Size of VFAT payload in 64 bit words

Definition at line 112 of file GEBdata.h.

Referenced by getChamberHeader(), setChamberHeader(), setVwh(), and vwh().

uint16_t gem::GEBdata::m_Vwt
private

0000:4 VFAT word count:12

Same as in header. This one actually counts the number of valid words that were sent to AMC13; the one in header is what we expected to send to AMC13

Definition at line 128 of file GEBdata.h.

Referenced by getChamberTrailer(), setChamberTrailer(), and vwt().

uint32_t gem::GEBdata::m_ZeroSup
private

Zero Suppression Flags:24 (8 zeroes):8.

Bitmask indicating if certain VFAT blocks have been zero suppressed

Definition at line 106 of file GEBdata.h.

Referenced by getChamberHeader(), setChamberHeader(), and zeroSup().

const int gem::GEBdata::sizeGebID = 5
static

Definition at line 96 of file GEBdata.h.