CMS 3D CMS Logo

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
 
uint8_t l1aF () const
 
uint8_t l1aNF () const
 
uint32_t linkTo () const
 
uint32_t lv1Id () const
 
uint8_t lv1Idt () const
 
uint8_t mmcmLocked () const
 
uint8_t oosGlib () const
 
uint32_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)
 
uint8_t softSlot () const
 
uint16_t softSrcId () const
 
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::GEMAMC ( )
inline

Definition at line 96 of file GEMAMC.h.

96 : amch1_(0), amch2_(0), amct_(0), eh_(0), et_(0){};
uint64_t amch2_
Definition: GEMAMC.h:186
uint64_t amct_
Definition: GEMAMC.h:187
uint64_t et_
Definition: GEMAMC.h:189
uint64_t amch1_
Definition: GEMAMC.h:185
uint64_t eh_
Definition: GEMAMC.h:188

◆ ~GEMAMC()

GEMAMC::~GEMAMC ( )
inline

Definition at line 97 of file GEMAMC.h.

References gebd_.

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

Member Function Documentation

◆ addGEB()

void GEMAMC::addGEB ( GEMOptoHybrid  g)
inline

Adds GEB data to vector.

Definition at line 178 of file GEMAMC.h.

References g, and gebd_.

178 { gebd_.push_back(g); }
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
std::vector< GEMOptoHybrid > gebd_
Vector of GEB data.
Definition: GEMAMC.h:191

◆ amcNum()

uint8_t GEMAMC::amcNum ( ) const
inline

Definition at line 123 of file GEMAMC.h.

References amch1_.

123 { return AMCheader1{amch1_}.AMCnum; }
uint64_t amch1_
Definition: GEMAMC.h:185

◆ backPressure()

uint8_t GEMAMC::backPressure ( ) const
inline

Definition at line 166 of file GEMAMC.h.

References et_.

166 { return EventTrailer{et_}.BP; }
uint64_t et_
Definition: GEMAMC.h:189

◆ bc0locked()

uint8_t GEMAMC::bc0locked ( ) const
inline

Definition at line 162 of file GEMAMC.h.

References et_.

162 { return EventTrailer{et_}.BCL; }
uint64_t et_
Definition: GEMAMC.h:189

◆ boardId()

uint16_t GEMAMC::boardId ( ) const
inline

Definition at line 125 of file GEMAMC.h.

References amch2_.

125 { return AMCheader2{amch2_}.boardID; }
uint64_t amch2_
Definition: GEMAMC.h:186

◆ buffState()

uint32_t GEMAMC::buffState ( ) const
inline

Definition at line 159 of file GEMAMC.h.

References eh_.

159 { return EventHeader{eh_}.buffState; }
uint64_t eh_
Definition: GEMAMC.h:188

◆ bunchCrossing()

uint16_t GEMAMC::bunchCrossing ( ) const
inline

Definition at line 121 of file GEMAMC.h.

References amch1_.

121 { return AMCheader1{amch1_}.bxID; }
uint64_t amch1_
Definition: GEMAMC.h:185

◆ clearGEBs()

void GEMAMC::clearGEBs ( )
inline

Clear a vector of GEB data.

Definition at line 182 of file GEMAMC.h.

References gebd_.

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

◆ crc()

uint32_t GEMAMC::crc ( ) const
inline

Definition at line 155 of file GEMAMC.h.

References amct_.

155 { return AMCTrailer{amct_}.crc; }
uint64_t amct_
Definition: GEMAMC.h:187

◆ daqClockLocked()

uint8_t GEMAMC::daqClockLocked ( ) const
inline

Definition at line 164 of file GEMAMC.h.

References et_.

164 { return EventTrailer{et_}.CL; }
uint64_t et_
Definition: GEMAMC.h:189

◆ daqReady()

uint8_t GEMAMC::daqReady ( ) const
inline

Definition at line 163 of file GEMAMC.h.

References et_.

163 { return EventTrailer{et_}.DR; }
uint64_t et_
Definition: GEMAMC.h:189

◆ dataLength()

uint32_t GEMAMC::dataLength ( ) const
inline

Definition at line 120 of file GEMAMC.h.

References amct_.

Referenced by setAMCheader1().

120 { return AMCTrailer{amct_}.dataLength; }
uint64_t amct_
Definition: GEMAMC.h:187

◆ davCnt()

uint8_t GEMAMC::davCnt ( ) const
inline

Definition at line 158 of file GEMAMC.h.

References eh_.

Referenced by setGEMeventHeader().

158 { return EventHeader{eh_}.davCnt; }
uint64_t eh_
Definition: GEMAMC.h:188

◆ davList()

uint32_t GEMAMC::davList ( ) const
inline

Definition at line 160 of file GEMAMC.h.

References eh_.

Referenced by setGEMeventHeader().

160 { return EventHeader{eh_}.davList; }
uint64_t eh_
Definition: GEMAMC.h:188

◆ formatVer()

uint8_t GEMAMC::formatVer ( ) const
inline

Definition at line 152 of file GEMAMC.h.

References amch2_.

Referenced by orbitNumber(), param1(), param2(), param3(), and runType().

152 { return AMCheader2{amch2_}.formatVer; }
uint64_t amch2_
Definition: GEMAMC.h:186

◆ gebs()

const std::vector<GEMOptoHybrid>* GEMAMC::gebs ( ) const
inline

Returns a vector of GEB data.

Definition at line 180 of file GEMAMC.h.

References gebd_.

180 { return &gebd_; }
std::vector< GEMOptoHybrid > gebd_
Vector of GEB data.
Definition: GEMAMC.h:191

◆ getAMCheader1()

uint64_t GEMAMC::getAMCheader1 ( ) const
inline

Definition at line 103 of file GEMAMC.h.

References amch1_.

103 { return amch1_; }
uint64_t amch1_
Definition: GEMAMC.h:185

◆ getAMCheader2()

uint64_t GEMAMC::getAMCheader2 ( ) const
inline

Definition at line 107 of file GEMAMC.h.

References amch2_.

107 { return amch2_; }
uint64_t amch2_
Definition: GEMAMC.h:186

◆ getAMCTrailer()

uint64_t GEMAMC::getAMCTrailer ( ) const
inline

Definition at line 110 of file GEMAMC.h.

References amct_.

110 { return amct_; }
uint64_t amct_
Definition: GEMAMC.h:187

◆ getGEMeventHeader()

uint64_t GEMAMC::getGEMeventHeader ( ) const
inline

Definition at line 114 of file GEMAMC.h.

References eh_.

114 { return eh_; }
uint64_t eh_
Definition: GEMAMC.h:188

◆ getGEMeventTrailer()

uint64_t GEMAMC::getGEMeventTrailer ( ) const
inline

Definition at line 117 of file GEMAMC.h.

References et_.

117 { return et_; }
uint64_t et_
Definition: GEMAMC.h:189

◆ l1aF()

uint8_t GEMAMC::l1aF ( ) const
inline

Definition at line 175 of file GEMAMC.h.

References et_.

175 { return EventTrailer{et_}.L1aF; }
uint64_t et_
Definition: GEMAMC.h:189

◆ l1aNF()

uint8_t GEMAMC::l1aNF ( ) const
inline

Definition at line 174 of file GEMAMC.h.

References et_.

174 { return EventTrailer{et_}.L1aNF; }
uint64_t et_
Definition: GEMAMC.h:189

◆ linkTo()

uint32_t GEMAMC::linkTo ( ) const
inline

Definition at line 168 of file GEMAMC.h.

References et_.

168 { return EventTrailer{et_}.linkTo; }
uint64_t et_
Definition: GEMAMC.h:189

◆ lv1Id()

uint32_t GEMAMC::lv1Id ( ) const
inline

Definition at line 122 of file GEMAMC.h.

References amch1_.

122 { return AMCheader1{amch1_}.l1AID; }
uint64_t amch1_
Definition: GEMAMC.h:185

◆ lv1Idt()

uint8_t GEMAMC::lv1Idt ( ) const
inline

Definition at line 154 of file GEMAMC.h.

References amct_.

154 { return AMCTrailer{amct_}.l1AID; }
uint64_t amct_
Definition: GEMAMC.h:187

◆ mmcmLocked()

uint8_t GEMAMC::mmcmLocked ( ) const
inline

Definition at line 165 of file GEMAMC.h.

References et_.

165 { return EventTrailer{et_}.ML; }
uint64_t et_
Definition: GEMAMC.h:189

◆ oosGlib()

uint8_t GEMAMC::oosGlib ( ) const
inline

Definition at line 167 of file GEMAMC.h.

References et_.

167 { return EventTrailer{et_}.oosGlib; }
uint64_t et_
Definition: GEMAMC.h:189

◆ orbitNumber()

uint32_t GEMAMC::orbitNumber ( ) const
inline

Definition at line 126 of file GEMAMC.h.

References amch2_, and formatVer().

126  {
127  if (formatVer() == 0)
128  return AMCheader2{amch2_}.orbitNum;
129  return AMCheader2{amch2_}.orbitNumV302;
130  }
uint64_t amch2_
Definition: GEMAMC.h:186
uint8_t formatVer() const
Definition: GEMAMC.h:152

◆ param1()

uint8_t GEMAMC::param1 ( ) const
inline

Definition at line 141 of file GEMAMC.h.

References amch2_, et_, and formatVer().

141  {
142  if (formatVer() == 0)
143  return AMCheader2{amch2_}.param1;
144  return EventTrailer{et_}.param1;
145  }
uint64_t amch2_
Definition: GEMAMC.h:186
uint64_t et_
Definition: GEMAMC.h:189
uint8_t formatVer() const
Definition: GEMAMC.h:152

◆ param2()

uint8_t GEMAMC::param2 ( ) const
inline

Definition at line 136 of file GEMAMC.h.

References amch2_, et_, and formatVer().

136  {
137  if (formatVer() == 0)
138  return AMCheader2{amch2_}.param2;
139  return EventTrailer{et_}.param2;
140  }
uint64_t amch2_
Definition: GEMAMC.h:186
uint64_t et_
Definition: GEMAMC.h:189
uint8_t formatVer() const
Definition: GEMAMC.h:152

◆ param3()

uint8_t GEMAMC::param3 ( ) const
inline

Definition at line 131 of file GEMAMC.h.

References amch2_, et_, and formatVer().

131  {
132  if (formatVer() == 0)
133  return AMCheader2{amch2_}.param3;
134  return EventTrailer{et_}.param3;
135  }
uint64_t amch2_
Definition: GEMAMC.h:186
uint64_t et_
Definition: GEMAMC.h:189
uint8_t formatVer() const
Definition: GEMAMC.h:152

◆ runType()

uint8_t GEMAMC::runType ( ) const
inline

Definition at line 146 of file GEMAMC.h.

References amch2_, et_, and formatVer().

Referenced by setAMCheader2().

146  {
147  if (formatVer() == 0)
148  return AMCheader2{amch2_}.runType;
149  return EventTrailer{et_}.runType;
150  }
uint64_t amch2_
Definition: GEMAMC.h:186
uint64_t et_
Definition: GEMAMC.h:189
uint8_t formatVer() const
Definition: GEMAMC.h:152

◆ setAMCheader1() [1/2]

void GEMAMC::setAMCheader1 ( uint64_t  word)
inline

Definition at line 101 of file GEMAMC.h.

References amch1_.

101 { amch1_ = word; }
uint64_t amch1_
Definition: GEMAMC.h:185
uint64_t word

◆ setAMCheader1() [2/2]

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:187
uint64_t amch1_
Definition: GEMAMC.h:185
uint32_t dataLength() const
Definition: GEMAMC.h:120

◆ setAMCheader2() [1/2]

void GEMAMC::setAMCheader2 ( uint64_t  word)
inline

Definition at line 105 of file GEMAMC.h.

References amch2_.

105 { amch2_ = word; }
uint64_t amch2_
Definition: GEMAMC.h:186
uint64_t word

◆ setAMCheader2() [2/2]

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:186
uint8_t runType() const
Definition: GEMAMC.h:146

◆ setAMCTrailer()

void GEMAMC::setAMCTrailer ( uint64_t  word)
inline

Definition at line 109 of file GEMAMC.h.

References amct_.

109 { amct_ = word; }
uint64_t amct_
Definition: GEMAMC.h:187
uint64_t word

◆ setGEMeventHeader() [1/2]

void GEMAMC::setGEMeventHeader ( uint64_t  word)
inline

Definition at line 112 of file GEMAMC.h.

References eh_.

112 { eh_ = word; }
uint64_t word
uint64_t eh_
Definition: GEMAMC.h:188

◆ setGEMeventHeader() [2/2]

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:189
uint32_t davList() const
Definition: GEMAMC.h:160
uint64_t eh_
Definition: GEMAMC.h:188
uint8_t davCnt() const
Definition: GEMAMC.h:158

◆ setGEMeventTrailer()

void GEMAMC::setGEMeventTrailer ( uint64_t  word)
inline

Definition at line 116 of file GEMAMC.h.

References et_.

116 { et_ = word; }
uint64_t et_
Definition: GEMAMC.h:189
uint64_t word

◆ softSlot()

uint8_t GEMAMC::softSlot ( ) const
inline

Definition at line 172 of file GEMAMC.h.

References amch2_.

172 { return AMCheader2{amch2_}.softSlot; }
uint64_t amch2_
Definition: GEMAMC.h:186

◆ softSrcId()

uint16_t GEMAMC::softSrcId ( ) const
inline

Definition at line 171 of file GEMAMC.h.

References amch2_.

171 { return AMCheader2{amch2_}.softSrcId; }
uint64_t amch2_
Definition: GEMAMC.h:186

◆ status()

int GEMAMC::status ( )

◆ ttsState()

uint16_t GEMAMC::ttsState ( ) const
inline

Definition at line 157 of file GEMAMC.h.

References eh_.

157 { return EventHeader{eh_}.ttsState; }
uint64_t eh_
Definition: GEMAMC.h:188

Member Data Documentation

◆ amch1_

uint64_t GEMAMC::amch1_
private

Definition at line 185 of file GEMAMC.h.

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

◆ amch2_

uint64_t GEMAMC::amch2_
private

◆ amct_

uint64_t GEMAMC::amct_
private

Definition at line 187 of file GEMAMC.h.

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

◆ eh_

uint64_t GEMAMC::eh_
private

Definition at line 188 of file GEMAMC.h.

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

◆ et_

uint64_t GEMAMC::et_
private

◆ gebd_

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

Vector of GEB data.

Definition at line 191 of file GEMAMC.h.

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