CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Classes | Public Member Functions | Static Public Attributes | Private Attributes
GEMAMC13 Class Reference

#include <GEMAMC13.h>

Classes

union  AMC13Header
 
union  AMC13Trailer
 
union  AMCHeader
 
union  CDFHeader
 
union  CDFTrailer
 

Public Member Functions

void addAMCheader (uint64_t word)
 
void addAMCheader (uint32_t AMC_size, uint8_t Blk_No, uint8_t AMC_No, uint16_t BoardID)
 
void addAMCpayload (const GEMAMC &a)
 
uint16_t bunchCrossing () const
 
void clearAMCpayloads ()
 
uint32_t crc () const
 
uint8_t evtStatus () const
 
uint32_t fragmentLength () const
 
 GEMAMC13 ()
 
uint64_t getAMC13Header () const
 
uint64_t getAMC13Trailer () const
 
const std::vector< uint64_t > * getAMCheaders () const
 
const std::vector< GEMAMC > * getAMCpayloads () const
 
uint32_t getAMCsize (int i) const
 
uint64_t getCDFHeader () const
 
uint64_t getCDFTrailer () const
 
uint32_t lv1Id () const
 
uint8_t nAMC () const
 
uint32_t orbitNumber () const
 
void setAMC13Header (uint64_t word)
 
void setAMC13Header (uint8_t CalTyp, uint8_t nAMC, uint32_t OrN)
 
void setAMC13Trailer (uint64_t word)
 
void setAMC13Trailer (uint8_t Blk_NoT, uint8_t LV1_idT, uint16_t BX_idT)
 
void setCDFHeader (uint64_t word)
 
void setCDFHeader (uint8_t Evt_ty, uint32_t LV1_id, uint16_t BX_id, uint16_t Source_id)
 
void setCDFTrailer (uint64_t word)
 
void setCDFTrailer (uint32_t EvtLength)
 
uint16_t sourceId () const
 
uint8_t ttsBits () const
 
 ~GEMAMC13 ()
 

Static Public Attributes

static const int lastBC = 3564
 

Private Attributes

uint64_t amc13h_
 
uint64_t amc13t_
 
std::vector< uint64_t > amcHeaders_
 
std::vector< GEMAMCamcs_
 
uint64_t cdfh_
 
uint64_t cdft_
 

Detailed Description

Definition at line 6 of file GEMAMC13.h.

Constructor & Destructor Documentation

◆ GEMAMC13()

GEMAMC13::GEMAMC13 ( )
inline

Definition at line 69 of file GEMAMC13.h.

69 : cdfh_(0), amc13h_(0), amc13t_(0), cdft_(0) {}
uint64_t cdft_
Definition: GEMAMC13.h:118
uint64_t amc13t_
Definition: GEMAMC13.h:117
uint64_t cdfh_
Definition: GEMAMC13.h:115
uint64_t amc13h_
Definition: GEMAMC13.h:116

◆ ~GEMAMC13()

GEMAMC13::~GEMAMC13 ( )
inline

Definition at line 70 of file GEMAMC13.h.

References amcHeaders_, and amcs_.

70  {
71  amcHeaders_.clear();
72  amcs_.clear();
73  }
std::vector< GEMAMC > amcs_
Definition: GEMAMC13.h:123
std::vector< uint64_t > amcHeaders_
Definition: GEMAMC13.h:121

Member Function Documentation

◆ addAMCheader() [1/2]

void GEMAMC13::addAMCheader ( uint64_t  word)

Definition at line 39 of file GEMAMC13.cc.

References amcHeaders_.

39 { amcHeaders_.push_back(word); }
uint64_t word
std::vector< uint64_t > amcHeaders_
Definition: GEMAMC13.h:121

◆ addAMCheader() [2/2]

void GEMAMC13::addAMCheader ( uint32_t  AMC_size,
uint8_t  Blk_No,
uint8_t  AMC_No,
uint16_t  BoardID 
)

Definition at line 41 of file GEMAMC13.cc.

References amcHeaders_.

41  {
42  // AMC Header word
43  // 55 - 32 | 27 - 20 | 19 - 16 | 15 - 0 |
44  // AMC_size | Blk_No | AMC_No | BoardID |
45  uint64_t word = (static_cast<uint64_t>(AMC_size & 0x00ffffff) << 32) | (static_cast<uint64_t>(Blk_No & 0xff) << 20) |
46  (static_cast<uint64_t>(AMC_No & 0x0f) << 16) | (static_cast<uint64_t>(BoardID & 0xffff));
47  amcHeaders_.push_back(word);
48 }
uint64_t word
unsigned long long uint64_t
Definition: Time.h:13
std::vector< uint64_t > amcHeaders_
Definition: GEMAMC13.h:121

◆ addAMCpayload()

void GEMAMC13::addAMCpayload ( const GEMAMC a)
inline

Definition at line 109 of file GEMAMC13.h.

References a, and amcs_.

109 { amcs_.push_back(a); }
std::vector< GEMAMC > amcs_
Definition: GEMAMC13.h:123
double a
Definition: hdecay.h:119

◆ bunchCrossing()

uint16_t GEMAMC13::bunchCrossing ( ) const
inline

Definition at line 94 of file GEMAMC13.h.

References cdfh_.

94 { return CDFHeader{cdfh_}.bxId; }
uint64_t cdfh_
Definition: GEMAMC13.h:115

◆ clearAMCpayloads()

void GEMAMC13::clearAMCpayloads ( )
inline

Definition at line 110 of file GEMAMC13.h.

References amcs_.

110 { amcs_.clear(); }
std::vector< GEMAMC > amcs_
Definition: GEMAMC13.h:123

◆ crc()

uint32_t GEMAMC13::crc ( ) const
inline

Definition at line 106 of file GEMAMC13.h.

References amc13t_.

106 { return AMC13Trailer{amc13t_}.crc32; }
uint64_t amc13t_
Definition: GEMAMC13.h:117

◆ evtStatus()

uint8_t GEMAMC13::evtStatus ( ) const
inline

Definition at line 91 of file GEMAMC13.h.

References cdft_.

91 { return CDFTrailer{cdft_}.evtStat; }
uint64_t cdft_
Definition: GEMAMC13.h:118

◆ fragmentLength()

uint32_t GEMAMC13::fragmentLength ( ) const
inline

Definition at line 90 of file GEMAMC13.h.

References cdft_.

90 { return CDFTrailer{cdft_}.evtLength; }
uint64_t cdft_
Definition: GEMAMC13.h:118

◆ getAMC13Header()

uint64_t GEMAMC13::getAMC13Header ( ) const
inline

Definition at line 81 of file GEMAMC13.h.

References amc13h_.

81 { return amc13h_; }
uint64_t amc13h_
Definition: GEMAMC13.h:116

◆ getAMC13Trailer()

uint64_t GEMAMC13::getAMC13Trailer ( ) const
inline

Definition at line 85 of file GEMAMC13.h.

References amc13t_.

85 { return amc13t_; }
uint64_t amc13t_
Definition: GEMAMC13.h:117

◆ getAMCheaders()

const std::vector<uint64_t>* GEMAMC13::getAMCheaders ( ) const
inline

Definition at line 101 of file GEMAMC13.h.

References amcHeaders_.

101 { return &amcHeaders_; }
std::vector< uint64_t > amcHeaders_
Definition: GEMAMC13.h:121

◆ getAMCpayloads()

const std::vector<GEMAMC>* GEMAMC13::getAMCpayloads ( ) const
inline

Definition at line 108 of file GEMAMC13.h.

References amcs_.

108 { return &amcs_; }
std::vector< GEMAMC > amcs_
Definition: GEMAMC13.h:123

◆ getAMCsize()

uint32_t GEMAMC13::getAMCsize ( int  i) const
inline

Definition at line 102 of file GEMAMC13.h.

References amcHeaders_, and mps_fire::i.

102 { return AMCHeader{amcHeaders_.at(i)}.amcSize; }
std::vector< uint64_t > amcHeaders_
Definition: GEMAMC13.h:121

◆ getCDFHeader()

uint64_t GEMAMC13::getCDFHeader ( ) const
inline

Definition at line 77 of file GEMAMC13.h.

References cdfh_.

77 { return cdfh_; }
uint64_t cdfh_
Definition: GEMAMC13.h:115

◆ getCDFTrailer()

uint64_t GEMAMC13::getCDFTrailer ( ) const
inline

Definition at line 89 of file GEMAMC13.h.

References cdft_.

89 { return cdft_; }
uint64_t cdft_
Definition: GEMAMC13.h:118

◆ lv1Id()

uint32_t GEMAMC13::lv1Id ( ) const
inline

Definition at line 95 of file GEMAMC13.h.

References cdfh_.

95 { return CDFHeader{cdfh_}.lv1Id; }
uint64_t cdfh_
Definition: GEMAMC13.h:115

◆ nAMC()

uint8_t GEMAMC13::nAMC ( ) const
inline

Definition at line 99 of file GEMAMC13.h.

References amc13h_.

Referenced by setAMC13Header().

99 { return AMC13Header{amc13h_}.nAMC; }
uint64_t amc13h_
Definition: GEMAMC13.h:116

◆ orbitNumber()

uint32_t GEMAMC13::orbitNumber ( ) const
inline

Definition at line 98 of file GEMAMC13.h.

References amc13h_.

98 { return AMC13Header{amc13h_}.orbitN; }
uint64_t amc13h_
Definition: GEMAMC13.h:116

◆ setAMC13Header() [1/2]

void GEMAMC13::setAMC13Header ( uint64_t  word)
inline

Definition at line 79 of file GEMAMC13.h.

References amc13h_.

79 { amc13h_ = word; }
uint64_t word
uint64_t amc13h_
Definition: GEMAMC13.h:116

◆ setAMC13Header() [2/2]

void GEMAMC13::setAMC13Header ( uint8_t  CalTyp,
uint8_t  nAMC,
uint32_t  OrN 
)

Definition at line 14 of file GEMAMC13.cc.

References amc13h_, GEMAMC13::AMC13Header::cb0, and nAMC().

14  {
15  AMC13Header u{0};
16  u.cb0 = 0x0;
17  u.calType = CalTyp;
18  u.nAMC = nAMC;
19  u.orbitN = OrN;
20  amc13h_ = u.word;
21 }
uint8_t nAMC() const
Definition: GEMAMC13.h:99
uint64_t amc13h_
Definition: GEMAMC13.h:116

◆ setAMC13Trailer() [1/2]

void GEMAMC13::setAMC13Trailer ( uint64_t  word)
inline

Definition at line 83 of file GEMAMC13.h.

References amc13t_.

83 { amc13t_ = word; }
uint64_t word
uint64_t amc13t_
Definition: GEMAMC13.h:117

◆ setAMC13Trailer() [2/2]

void GEMAMC13::setAMC13Trailer ( uint8_t  Blk_NoT,
uint8_t  LV1_idT,
uint16_t  BX_idT 
)

Definition at line 23 of file GEMAMC13.cc.

References amc13t_, and GEMAMC13::AMC13Trailer::blkN.

23  {
24  AMC13Trailer u{0};
25  u.blkN = Blk_NoT;
26  u.lv1IdT = LV1_idT;
27  u.bxIdT = BX_idT;
28  amc13t_ = u.word;
29 }
uint64_t amc13t_
Definition: GEMAMC13.h:117

◆ setCDFHeader() [1/2]

void GEMAMC13::setCDFHeader ( uint64_t  word)
inline

Definition at line 75 of file GEMAMC13.h.

References cdfh_.

75 { cdfh_ = word; }
uint64_t word
uint64_t cdfh_
Definition: GEMAMC13.h:115

◆ setCDFHeader() [2/2]

void GEMAMC13::setCDFHeader ( uint8_t  Evt_ty,
uint32_t  LV1_id,
uint16_t  BX_id,
uint16_t  Source_id 
)

Definition at line 4 of file GEMAMC13.cc.

References GEMAMC13::CDFHeader::cb5, and cdfh_.

4  {
5  CDFHeader u{0};
6  u.cb5 = 0x5;
7  u.eventType = Evt_ty;
8  u.lv1Id = LV1_id;
9  u.bxId = BX_id;
10  u.sourceId = Source_id;
11  cdfh_ = u.word;
12 }
uint64_t cdfh_
Definition: GEMAMC13.h:115

◆ setCDFTrailer() [1/2]

void GEMAMC13::setCDFTrailer ( uint64_t  word)
inline

Definition at line 87 of file GEMAMC13.h.

References cdft_.

87 { cdft_ = word; }
uint64_t cdft_
Definition: GEMAMC13.h:118
uint64_t word

◆ setCDFTrailer() [2/2]

void GEMAMC13::setCDFTrailer ( uint32_t  EvtLength)

Definition at line 31 of file GEMAMC13.cc.

References GEMAMC13::CDFTrailer::cbA, cdfh_, and cdft_.

31  {
32  CDFTrailer u{0};
33  u.cbA = 0xA;
34  u.eventType = CDFHeader{cdfh_}.eventType;
35  u.evtLength = EvtLength;
36  cdft_ = u.word;
37 }
uint64_t cdft_
Definition: GEMAMC13.h:118
uint64_t cdfh_
Definition: GEMAMC13.h:115

◆ sourceId()

uint16_t GEMAMC13::sourceId ( ) const
inline

Definition at line 96 of file GEMAMC13.h.

References cdfh_.

96 { return CDFHeader{cdfh_}.sourceId; }
uint64_t cdfh_
Definition: GEMAMC13.h:115

◆ ttsBits()

uint8_t GEMAMC13::ttsBits ( ) const
inline

Definition at line 92 of file GEMAMC13.h.

References cdft_.

92 { return CDFTrailer{cdft_}.tts; }
uint64_t cdft_
Definition: GEMAMC13.h:118

Member Data Documentation

◆ amc13h_

uint64_t GEMAMC13::amc13h_
private

Definition at line 116 of file GEMAMC13.h.

Referenced by getAMC13Header(), nAMC(), orbitNumber(), and setAMC13Header().

◆ amc13t_

uint64_t GEMAMC13::amc13t_
private

Definition at line 117 of file GEMAMC13.h.

Referenced by crc(), getAMC13Trailer(), and setAMC13Trailer().

◆ amcHeaders_

std::vector<uint64_t> GEMAMC13::amcHeaders_
private

Definition at line 121 of file GEMAMC13.h.

Referenced by addAMCheader(), getAMCheaders(), getAMCsize(), and ~GEMAMC13().

◆ amcs_

std::vector<GEMAMC> GEMAMC13::amcs_
private

Definition at line 123 of file GEMAMC13.h.

Referenced by addAMCpayload(), clearAMCpayloads(), getAMCpayloads(), and ~GEMAMC13().

◆ cdfh_

uint64_t GEMAMC13::cdfh_
private

Definition at line 115 of file GEMAMC13.h.

Referenced by bunchCrossing(), getCDFHeader(), lv1Id(), setCDFHeader(), setCDFTrailer(), and sourceId().

◆ cdft_

uint64_t GEMAMC13::cdft_
private

Definition at line 118 of file GEMAMC13.h.

Referenced by evtStatus(), fragmentLength(), getCDFTrailer(), setCDFTrailer(), and ttsBits().

◆ lastBC

const int GEMAMC13::lastBC = 3564
static

Definition at line 112 of file GEMAMC13.h.

Referenced by GEMAMCStatus::GEMAMCStatus().