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 ohBC () const
 Returns Optohybrid BC. More...
 
uint16_t ohCRC () const
 Returns OH CRC. More...
 
uint32_t ohEC () const
 Returns Optohybrid EC. 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...
 
uint16_t zeroSupWordsCnt () const
 Returns Zero suppression words counter. 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_OHBC
 OH BC, bits [31:20]. More...
 
uint16_t m_OHCRC
 OH CRC:16. More...
 
uint32_t m_OHEC
 OH EC, bits [19:0]. 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...
 
uint16_t m_ZeroSupWordsCnt
 Zero suppressed words counter. 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:105

Member Function Documentation

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

Adds VFAT data to the vector.

Definition at line 98 of file GEBdata.h.

References m_vfatd.

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

Returns thirteen flags in GEM Chamber Header.

Definition at line 88 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_ZeroSupWordsCnt.

33  {
34  return
35  (static_cast<uint64_t>(m_ZeroSupWordsCnt & 0x0fff) << 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:114
unsigned long long uint64_t
Definition: Time.h:15
uint16_t m_ErrorC
Thirteen Flags, only one bit each.
Definition: GEBdata.h:124
uint16_t m_Vwh
VFAT word count:12 0000:4.
Definition: GEBdata.h:117
uint16_t m_ZeroSupWordsCnt
Zero suppressed words counter.
Definition: GEBdata.h:111
uint64_t gem::GEBdata::getChamberTrailer ( ) const
inline

Definition at line 71 of file GEBdata.h.

References m_InFu, m_OHBC, m_OHCRC, m_OHEC, m_Stuckd, and m_Vwt.

72  {
73  return
74  (static_cast<uint64_t>(m_OHCRC) << 48) |
75  (static_cast<uint64_t>(m_Vwt & 0x0fff) << 36) |
76  (static_cast<uint64_t>(m_InFu & 0x0f) << 35) |
77  (static_cast<uint64_t>(m_Stuckd & 0x01) << 34) |
78  (static_cast<uint64_t>(m_OHBC & 0x0fff) << 20) |
79  (static_cast<uint64_t>(m_OHEC & 0x000fffff));
80  }
uint8_t m_InFu
(7 0&#39;s):7 InFIFO underflow:1
Definition: GEBdata.h:136
uint8_t m_Stuckd
(7 0&#39;s):7 Stuck data:1
Definition: GEBdata.h:139
uint16_t m_OHCRC
OH CRC:16.
Definition: GEBdata.h:130
unsigned long long uint64_t
Definition: Time.h:15
uint16_t m_OHBC
OH BC, bits [31:20].
Definition: GEBdata.h:141
uint32_t m_OHEC
OH EC, bits [19:0].
Definition: GEBdata.h:143
uint16_t m_Vwt
0000:4 VFAT word count:12
Definition: GEBdata.h:133
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:106
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:106
uint8_t gem::GEBdata::inFu ( ) const
inline

Returns InFIFO underflow flag.

Definition at line 92 of file GEBdata.h.

References m_InFu.

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

Returns GLIB input ID.

Definition at line 86 of file GEBdata.h.

References m_InputID.

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

Returns Optohybrid BC.

Definition at line 94 of file GEBdata.h.

References m_OHBC.

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

Returns OH CRC.

Definition at line 90 of file GEBdata.h.

References m_OHCRC.

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

Returns Optohybrid EC.

Definition at line 95 of file GEBdata.h.

References m_OHEC.

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 suppressed words counter

<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_ZeroSupWordsCnt.

22  {
23  m_ZeroSupWordsCnt = 0x0fff & (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:114
std::vector< uint8_t > m_GEBflags
Vector for thirteen flags in GEM Chamber Header.
Definition: GEBdata.h:106
uint16_t m_ErrorC
Thirteen Flags, only one bit each.
Definition: GEBdata.h:124
uint16_t m_Vwh
VFAT word count:12 0000:4.
Definition: GEBdata.h:117
uint16_t m_ZeroSupWordsCnt
Zero suppressed words counter.
Definition: GEBdata.h:111
void gem::GEBdata::setChamberTrailer ( uint64_t  word)
inline

Reads the word for GEM Chamber Trailer.

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

<OH CRC

<VFAT word count

<InFIFO underflow

<Stuck data

OH BC

OH EC

Definition at line 62 of file GEBdata.h.

References m_InFu, m_OHBC, m_OHCRC, m_OHEC, 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  m_OHBC = 0x0fff & (word >> 20);
69  m_OHEC = 0x000fffff & (word);
70  }
uint8_t m_InFu
(7 0&#39;s):7 InFIFO underflow:1
Definition: GEBdata.h:136
uint8_t m_Stuckd
(7 0&#39;s):7 Stuck data:1
Definition: GEBdata.h:139
uint16_t m_OHCRC
OH CRC:16.
Definition: GEBdata.h:130
uint16_t m_OHBC
OH BC, bits [31:20].
Definition: GEBdata.h:141
uint32_t m_OHEC
OH EC, bits [19:0].
Definition: GEBdata.h:143
uint16_t m_Vwt
0000:4 VFAT word count:12
Definition: GEBdata.h:133
void gem::GEBdata::setInputID ( uint8_t  n)
inline

Sets GLIB input ID.

Definition at line 83 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 82 of file GEBdata.h.

References m_Vwh, and gen::n.

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

Returns Stuck data flag.

Definition at line 93 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 100 of file GEBdata.h.

References m_vfatd.

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

Returns VFAT word count (size of VFAT payload)

Definition at line 87 of file GEBdata.h.

References m_Vwh.

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

Returns VFAT word count.

Definition at line 91 of file GEBdata.h.

References m_Vwt.

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

Returns Zero suppression words counter.

Definition at line 85 of file GEBdata.h.

References m_ZeroSupWordsCnt.

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 124 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 106 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 136 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 114 of file GEBdata.h.

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

uint16_t gem::GEBdata::m_OHBC
private

OH BC, bits [31:20].

Definition at line 141 of file GEBdata.h.

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

uint16_t gem::GEBdata::m_OHCRC
private

OH CRC:16.

CRC of OH data (currently not available)

Definition at line 130 of file GEBdata.h.

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

uint32_t gem::GEBdata::m_OHEC
private

OH EC, bits [19:0].

Definition at line 143 of file GEBdata.h.

Referenced by getChamberTrailer(), ohEC(), 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 139 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 105 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 117 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 133 of file GEBdata.h.

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

uint16_t gem::GEBdata::m_ZeroSupWordsCnt
private

Zero suppressed words counter.

Definition at line 111 of file GEBdata.h.

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

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

Definition at line 102 of file GEBdata.h.