CMS 3D CMS Logo

AMCdata.cc
Go to the documentation of this file.
1 #include <cstdint>
3 
4 using namespace gem;
5 
6 void AMCdata::setAMCheader1(uint32_t dataLength, uint16_t bxID, uint32_t l1AID, uint8_t AMCnum) {
7  AMCheader1 u{0};
9  u.bxID = bxID;
10  u.l1AID = l1AID;
11  u.AMCnum = AMCnum;
12  amch1_ = u.word;
13 
14  AMCTrailer ut{0};
16  ut.l1AIDT = l1AID;
17  amct_ = ut.word;
18 }
19 
20 void AMCdata::setAMCheader2(uint16_t boardID, uint16_t orbitNum, uint8_t runType) {
21  AMCheader2 u{0};
22  u.boardID = boardID;
23  u.orbitNum = orbitNum;
24  u.runType = runType;
25  amch2_ = u.word;
26 }
27 
28 void AMCdata::setGEMeventHeader(uint8_t davCnt, uint32_t davList) {
29  EventHeader u{0};
30  u.davCnt = davCnt;
31  u.davList = davList;
32  eh_ = u.word;
33 
34  EventTrailer ut{0};
35  ut.BCL = 1;
36  ut.DR = 1;
37  ut.CL = 1;
38  ut.ML = 1;
39  et_ = ut.word;
40 }
uint16_t orbitNum() const
Definition: AMCdata.h:95
uint32_t dataLength() const
Definition: AMCdata.h:89
uint64_t amch2_
Definition: AMCdata.h:122
uint64_t dataLength
Definition: AMCdata.h:33
Definition: AMC13Event.h:6
uint64_t et_
Definition: AMCdata.h:125
uint64_t amct_
Definition: AMCdata.h:123
uint8_t runType() const
Definition: AMCdata.h:99
void setAMCheader1(uint64_t word)
Definition: AMCdata.h:71
void setGEMeventHeader(uint64_t word)
Definition: AMCdata.h:82
uint64_t eh_
Definition: AMCdata.h:124
uint64_t amch1_
Definition: AMCdata.h:121
uint64_t dataLength
Definition: AMCdata.h:11
uint32_t davList() const
Definition: AMCdata.h:105
uint8_t davCnt() const
Definition: AMCdata.h:103
uint64_t davCnt
Definition: AMCdata.h:46
uint64_t BCL
Definition: AMCdata.h:54
uint64_t boardID
Definition: AMCdata.h:21
void setAMCheader2(uint64_t word)
Definition: AMCdata.h:75