CMS 3D CMS Logo

GEMAMC.cc
Go to the documentation of this file.
1 #include <cstdint>
3 #include <iostream>
4 
5 void GEMAMC::setAMCheader1(uint32_t dataLength, uint16_t bxID, uint32_t l1AID, uint8_t AMCnum) {
6  AMCheader1 u{0};
8  u.bxID = bxID;
9  u.l1AID = l1AID;
10  u.AMCnum = AMCnum;
11  amch1_ = u.word;
12 
13  AMCTrailer ut{0};
15  ut.l1AID = l1AID;
16  amct_ = ut.word;
17 }
18 
19 void GEMAMC::setAMCheader2(uint16_t boardID, uint16_t orbitNum, uint8_t runType) {
20  AMCheader2 u{0};
21  u.boardID = boardID;
22  u.orbitNum = orbitNum;
23  u.runType = runType;
24  amch2_ = u.word;
25 }
26 
27 void GEMAMC::setGEMeventHeader(uint8_t davCnt, uint32_t davList) {
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 }
void setAMCheader1(uint64_t word)
Definition: GEMAMC.h:101
uint64_t amch2_
Definition: GEMAMC.h:186
void setAMCheader2(uint64_t word)
Definition: GEMAMC.h:105
uint64_t BCL
Definition: GEMAMC.h:65
uint64_t amct_
Definition: GEMAMC.h:187
uint64_t dataLength
Definition: GEMAMC.h:42
uint64_t dataLength
Definition: GEMAMC.h:11
uint64_t et_
Definition: GEMAMC.h:189
uint64_t amch1_
Definition: GEMAMC.h:185
uint32_t davList() const
Definition: GEMAMC.h:160
uint64_t eh_
Definition: GEMAMC.h:188
uint8_t davCnt() const
Definition: GEMAMC.h:158
uint32_t dataLength() const
Definition: GEMAMC.h:120
uint64_t davCnt
Definition: GEMAMC.h:56
void setGEMeventHeader(uint64_t word)
Definition: GEMAMC.h:112
uint8_t runType() const
Definition: GEMAMC.h:146
uint64_t boardID
Definition: GEMAMC.h:22