CMS 3D CMS Logo

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

#include <GEMAMC.h>

Classes

union  AMCheader1
 
union  AMCheader2
 
union  AMCTrailer
 
union  EventHeader
 
union  EventTrailer
 

Public Member Functions

void addGEB (GEMOptoHybrid g)
 Adds GEB data to vector. More...
 
uint8_t amcNum () const
 
uint8_t backPressure () const
 
uint8_t bc0locked () const
 
uint16_t boardId () const
 
uint32_t buffState () const
 
uint16_t bunchCrossing () const
 
void clearGEBs ()
 Clear a vector of GEB data. More...
 
uint32_t crc () const
 
uint8_t daqClockLocked () const
 
uint8_t daqReady () const
 
uint32_t dataLength () const
 
uint8_t davCnt () const
 
uint32_t davList () const
 
uint8_t formatVer () const
 
const std::vector
< GEMOptoHybrid > * 
gebs () const
 Returns a vector of GEB data. More...
 
 GEMAMC ()
 
uint64_t getAMCheader1 () const
 
uint64_t getAMCheader2 () const
 
uint64_t getAMCTrailer () const
 
uint64_t getGEMeventHeader () const
 
uint64_t getGEMeventTrailer () const
 
uint32_t linkTo () const
 
uint32_t lv1Id () const
 
uint8_t lv1Idt () const
 
uint8_t mmcmLocked () const
 
uint8_t oosGlib () const
 
uint16_t orbitNumber () const
 
uint8_t param1 () const
 
uint8_t param2 () const
 
uint8_t param3 () const
 
uint8_t runType () const
 
void setAMCheader1 (uint64_t word)
 
void setAMCheader1 (uint32_t dataLength, uint16_t bxID, uint32_t l1AID, uint8_t AMCnum)
 
void setAMCheader2 (uint64_t word)
 
void setAMCheader2 (uint16_t boardID, uint16_t orbitNum, uint8_t runType)
 
void setAMCTrailer (uint64_t word)
 
void setGEMeventHeader (uint64_t word)
 
void setGEMeventHeader (uint8_t davCnt, uint32_t davList)
 
void setGEMeventTrailer (uint64_t word)
 
int status ()
 
uint16_t ttsState () const
 
 ~GEMAMC ()
 

Private Attributes

uint64_t amch1_
 
uint64_t amch2_
 
uint64_t amct_
 
uint64_t eh_
 
uint64_t et_
 
std::vector< GEMOptoHybridgebd_
 Vector of GEB data. More...
 

Detailed Description

Definition at line 6 of file GEMAMC.h.

Constructor & Destructor Documentation

GEMAMC::GEMAMC ( )
inline

Definition at line 67 of file GEMAMC.h.

67 : amch1_(0), amch2_(0), amct_(0), eh_(0), et_(0){};
uint64_t amch2_
Definition: GEMAMC.h:128
uint64_t amct_
Definition: GEMAMC.h:129
uint64_t et_
Definition: GEMAMC.h:131
uint64_t amch1_
Definition: GEMAMC.h:127
uint64_t eh_
Definition: GEMAMC.h:130
GEMAMC::~GEMAMC ( )
inline

Definition at line 68 of file GEMAMC.h.

References gebd_.

68 { gebd_.clear(); }
std::vector< GEMOptoHybrid > gebd_
Vector of GEB data.
Definition: GEMAMC.h:133

Member Function Documentation

void GEMAMC::addGEB ( GEMOptoHybrid  g)
inline

Adds GEB data to vector.

Definition at line 120 of file GEMAMC.h.

References gebd_.

120 { gebd_.push_back(g); }
std::vector< GEMOptoHybrid > gebd_
Vector of GEB data.
Definition: GEMAMC.h:133
uint8_t GEMAMC::amcNum ( ) const
inline

Definition at line 93 of file GEMAMC.h.

References amch1_.

Referenced by GEMAMCStatus::GEMAMCStatus().

93 { return AMCheader1{amch1_}.AMCnum; }
uint64_t amch1_
Definition: GEMAMC.h:127
uint8_t GEMAMC::backPressure ( ) const
inline

Definition at line 115 of file GEMAMC.h.

References et_.

Referenced by GEMAMCStatus::GEMAMCStatus().

115 { return EventTrailer{et_}.BP; }
uint64_t et_
Definition: GEMAMC.h:131
uint8_t GEMAMC::bc0locked ( ) const
inline

Definition at line 111 of file GEMAMC.h.

References et_.

Referenced by GEMAMCStatus::GEMAMCStatus().

111 { return EventTrailer{et_}.BCL; }
uint64_t et_
Definition: GEMAMC.h:131
uint16_t GEMAMC::boardId ( ) const
inline

Definition at line 95 of file GEMAMC.h.

References amch2_.

95 { return AMCheader2{amch2_}.boardID; }
uint64_t amch2_
Definition: GEMAMC.h:128
uint32_t GEMAMC::buffState ( ) const
inline

Definition at line 108 of file GEMAMC.h.

References eh_.

108 { return EventHeader{eh_}.buffState; }
uint64_t eh_
Definition: GEMAMC.h:130
uint16_t GEMAMC::bunchCrossing ( ) const
inline

Definition at line 91 of file GEMAMC.h.

References amch1_.

Referenced by GEMAMCStatus::GEMAMCStatus(), and GEMVFATStatus::GEMVFATStatus().

91 { return AMCheader1{amch1_}.bxID; }
uint64_t amch1_
Definition: GEMAMC.h:127
void GEMAMC::clearGEBs ( )
inline

Clear a vector of GEB data.

Definition at line 124 of file GEMAMC.h.

References gebd_.

124 { gebd_.clear(); }
std::vector< GEMOptoHybrid > gebd_
Vector of GEB data.
Definition: GEMAMC.h:133
uint32_t GEMAMC::crc ( ) const
inline

Definition at line 104 of file GEMAMC.h.

References amct_.

104 { return AMCTrailer{amct_}.crc; }
uint64_t amct_
Definition: GEMAMC.h:129
uint8_t GEMAMC::daqClockLocked ( ) const
inline

Definition at line 113 of file GEMAMC.h.

References et_.

Referenced by GEMAMCStatus::GEMAMCStatus().

113 { return EventTrailer{et_}.CL; }
uint64_t et_
Definition: GEMAMC.h:131
uint8_t GEMAMC::daqReady ( ) const
inline

Definition at line 112 of file GEMAMC.h.

References et_.

Referenced by GEMAMCStatus::GEMAMCStatus().

112 { return EventTrailer{et_}.DR; }
uint64_t et_
Definition: GEMAMC.h:131
uint32_t GEMAMC::dataLength ( ) const
inline

Definition at line 90 of file GEMAMC.h.

References amct_.

Referenced by setAMCheader1().

90 { return AMCTrailer{amct_}.dataLength; }
uint64_t amct_
Definition: GEMAMC.h:129
uint8_t GEMAMC::davCnt ( ) const
inline

Definition at line 107 of file GEMAMC.h.

References eh_.

Referenced by setGEMeventHeader().

107 { return EventHeader{eh_}.davCnt; }
uint64_t eh_
Definition: GEMAMC.h:130
uint32_t GEMAMC::davList ( ) const
inline

Definition at line 109 of file GEMAMC.h.

References eh_.

Referenced by setGEMeventHeader().

109 { return EventHeader{eh_}.davList; }
uint64_t eh_
Definition: GEMAMC.h:130
uint8_t GEMAMC::formatVer ( ) const
inline

Definition at line 101 of file GEMAMC.h.

References amch2_.

101 { return AMCheader2{amch2_}.formatVer; }
uint64_t amch2_
Definition: GEMAMC.h:128
const std::vector<GEMOptoHybrid>* GEMAMC::gebs ( ) const
inline

Returns a vector of GEB data.

Definition at line 122 of file GEMAMC.h.

References gebd_.

122 { return &gebd_; }
std::vector< GEMOptoHybrid > gebd_
Vector of GEB data.
Definition: GEMAMC.h:133
uint64_t GEMAMC::getAMCheader1 ( ) const
inline

Definition at line 74 of file GEMAMC.h.

References amch1_.

74 { return amch1_; }
uint64_t amch1_
Definition: GEMAMC.h:127
uint64_t GEMAMC::getAMCheader2 ( ) const
inline

Definition at line 78 of file GEMAMC.h.

References amch2_.

78 { return amch2_; }
uint64_t amch2_
Definition: GEMAMC.h:128
uint64_t GEMAMC::getAMCTrailer ( ) const
inline

Definition at line 81 of file GEMAMC.h.

References amct_.

81 { return amct_; }
uint64_t amct_
Definition: GEMAMC.h:129
uint64_t GEMAMC::getGEMeventHeader ( ) const
inline

Definition at line 85 of file GEMAMC.h.

References eh_.

85 { return eh_; }
uint64_t eh_
Definition: GEMAMC.h:130
uint64_t GEMAMC::getGEMeventTrailer ( ) const
inline

Definition at line 88 of file GEMAMC.h.

References et_.

88 { return et_; }
uint64_t et_
Definition: GEMAMC.h:131
uint32_t GEMAMC::linkTo ( ) const
inline

Definition at line 117 of file GEMAMC.h.

References et_.

117 { return EventTrailer{et_}.linkTo; }
uint64_t et_
Definition: GEMAMC.h:131
uint32_t GEMAMC::lv1Id ( ) const
inline

Definition at line 92 of file GEMAMC.h.

References amch1_.

Referenced by GEMAMCStatus::GEMAMCStatus().

92 { return AMCheader1{amch1_}.l1AID; }
uint64_t amch1_
Definition: GEMAMC.h:127
uint8_t GEMAMC::lv1Idt ( ) const
inline

Definition at line 103 of file GEMAMC.h.

References amct_.

Referenced by GEMVFATStatus::GEMVFATStatus().

103 { return AMCTrailer{amct_}.l1AID; }
uint64_t amct_
Definition: GEMAMC.h:129
uint8_t GEMAMC::mmcmLocked ( ) const
inline

Definition at line 114 of file GEMAMC.h.

References et_.

Referenced by GEMAMCStatus::GEMAMCStatus().

114 { return EventTrailer{et_}.ML; }
uint64_t et_
Definition: GEMAMC.h:131
uint8_t GEMAMC::oosGlib ( ) const
inline

Definition at line 116 of file GEMAMC.h.

References et_.

116 { return EventTrailer{et_}.oosGlib; }
uint64_t et_
Definition: GEMAMC.h:131
uint16_t GEMAMC::orbitNumber ( ) const
inline

Definition at line 96 of file GEMAMC.h.

References amch2_.

Referenced by GEMAMCStatus::GEMAMCStatus().

96 { return AMCheader2{amch2_}.orbitNum; }
uint64_t amch2_
Definition: GEMAMC.h:128
uint8_t GEMAMC::param1 ( ) const
inline

Definition at line 99 of file GEMAMC.h.

References amch2_.

99 { return AMCheader2{amch2_}.param1; }
uint64_t amch2_
Definition: GEMAMC.h:128
uint8_t GEMAMC::param2 ( ) const
inline

Definition at line 98 of file GEMAMC.h.

References amch2_.

98 { return AMCheader2{amch2_}.param2; }
uint64_t amch2_
Definition: GEMAMC.h:128
uint8_t GEMAMC::param3 ( ) const
inline

Definition at line 97 of file GEMAMC.h.

References amch2_.

97 { return AMCheader2{amch2_}.param3; }
uint64_t amch2_
Definition: GEMAMC.h:128
uint8_t GEMAMC::runType ( ) const
inline

Definition at line 100 of file GEMAMC.h.

References amch2_.

Referenced by GEMAMCStatus::GEMAMCStatus(), and setAMCheader2().

100 { return AMCheader2{amch2_}.runType; }
uint64_t amch2_
Definition: GEMAMC.h:128
void GEMAMC::setAMCheader1 ( uint64_t  word)
inline

Definition at line 72 of file GEMAMC.h.

References amch1_.

72 { amch1_ = word; }
uint64_t amch1_
Definition: GEMAMC.h:127
uint64_t word
void GEMAMC::setAMCheader1 ( uint32_t  dataLength,
uint16_t  bxID,
uint32_t  l1AID,
uint8_t  AMCnum 
)

Definition at line 5 of file GEMAMC.cc.

References amch1_, amct_, GEMAMC::AMCheader1::dataLength, GEMAMC::AMCTrailer::dataLength, and dataLength().

5  {
6  AMCheader1 u{0};
7  u.dataLength = dataLength;
8  u.bxID = bxID;
9  u.l1AID = l1AID;
10  u.AMCnum = AMCnum;
11  amch1_ = u.word;
12 
13  AMCTrailer ut{0};
14  ut.dataLength = dataLength;
15  ut.l1AID = l1AID;
16  amct_ = ut.word;
17 }
uint64_t amct_
Definition: GEMAMC.h:129
uint64_t amch1_
Definition: GEMAMC.h:127
uint32_t dataLength() const
Definition: GEMAMC.h:90
void GEMAMC::setAMCheader2 ( uint64_t  word)
inline

Definition at line 76 of file GEMAMC.h.

References amch2_.

76 { amch2_ = word; }
uint64_t amch2_
Definition: GEMAMC.h:128
uint64_t word
void GEMAMC::setAMCheader2 ( uint16_t  boardID,
uint16_t  orbitNum,
uint8_t  runType 
)

Definition at line 19 of file GEMAMC.cc.

References amch2_, GEMAMC::AMCheader2::boardID, and runType().

19  {
20  AMCheader2 u{0};
21  u.boardID = boardID;
22  u.orbitNum = orbitNum;
23  u.runType = runType;
24  amch2_ = u.word;
25 }
uint64_t amch2_
Definition: GEMAMC.h:128
uint8_t runType() const
Definition: GEMAMC.h:100
void GEMAMC::setAMCTrailer ( uint64_t  word)
inline

Definition at line 80 of file GEMAMC.h.

References amct_.

80 { amct_ = word; }
uint64_t amct_
Definition: GEMAMC.h:129
uint64_t word
void GEMAMC::setGEMeventHeader ( uint64_t  word)
inline

Definition at line 83 of file GEMAMC.h.

References eh_.

83 { eh_ = word; }
uint64_t word
uint64_t eh_
Definition: GEMAMC.h:130
void GEMAMC::setGEMeventHeader ( uint8_t  davCnt,
uint32_t  davList 
)

Definition at line 27 of file GEMAMC.cc.

References GEMAMC::EventTrailer::BCL, GEMAMC::EventHeader::davCnt, davCnt(), davList(), eh_, and et_.

27  {
28  EventHeader u{0};
29  u.davCnt = davCnt;
30  u.davList = davList;
31  eh_ = u.word;
32 
33  EventTrailer ut{0};
34  ut.BCL = 1;
35  ut.DR = 1;
36  ut.CL = 1;
37  ut.ML = 1;
38  et_ = ut.word;
39 }
uint64_t et_
Definition: GEMAMC.h:131
uint32_t davList() const
Definition: GEMAMC.h:109
uint64_t eh_
Definition: GEMAMC.h:130
uint8_t davCnt() const
Definition: GEMAMC.h:107
void GEMAMC::setGEMeventTrailer ( uint64_t  word)
inline

Definition at line 87 of file GEMAMC.h.

References et_.

87 { et_ = word; }
uint64_t et_
Definition: GEMAMC.h:131
uint64_t word
int GEMAMC::status ( )
uint16_t GEMAMC::ttsState ( ) const
inline

Definition at line 106 of file GEMAMC.h.

References eh_.

106 { return EventHeader{eh_}.ttsState; }
uint64_t eh_
Definition: GEMAMC.h:130

Member Data Documentation

uint64_t GEMAMC::amch1_
private

Definition at line 127 of file GEMAMC.h.

Referenced by amcNum(), bunchCrossing(), getAMCheader1(), lv1Id(), and setAMCheader1().

uint64_t GEMAMC::amch2_
private
uint64_t GEMAMC::amct_
private

Definition at line 129 of file GEMAMC.h.

Referenced by crc(), dataLength(), getAMCTrailer(), lv1Idt(), setAMCheader1(), and setAMCTrailer().

uint64_t GEMAMC::eh_
private

Definition at line 130 of file GEMAMC.h.

Referenced by buffState(), davCnt(), davList(), getGEMeventHeader(), setGEMeventHeader(), and ttsState().

uint64_t GEMAMC::et_
private
std::vector<GEMOptoHybrid> GEMAMC::gebd_
private

Vector of GEB data.

Definition at line 133 of file GEMAMC.h.

Referenced by addGEB(), clearGEBs(), gebs(), and ~GEMAMC().