Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-20 02:14:42

0001 #include <cstdint>
0002 #include "DataFormats/GEMDigi/interface/GEMAMC.h"
0003 #include <iostream>
0004 
0005 void GEMAMC::setAMCheader1(uint32_t dataLength, uint16_t bxID, uint32_t l1AID, uint8_t AMCnum) {
0006   AMCheader1 u{0};
0007   u.dataLength = dataLength;
0008   u.bxID = bxID;
0009   u.l1AID = l1AID;
0010   u.AMCnum = AMCnum;
0011   amch1_ = u.word;
0012 
0013   AMCTrailer ut{0};
0014   ut.dataLength = dataLength;
0015   ut.l1AID = l1AID;
0016   amct_ = ut.word;
0017 }
0018 
0019 void GEMAMC::setAMCheader2(uint16_t boardID, uint16_t orbitNum, uint8_t runType) {
0020   AMCheader2 u{0};
0021   u.boardID = boardID;
0022   u.orbitNum = orbitNum;
0023   u.runType = runType;
0024   amch2_ = u.word;
0025 }
0026 
0027 void GEMAMC::setGEMeventHeader(uint8_t davCnt, uint32_t davList) {
0028   EventHeader u{0};
0029   u.davCnt = davCnt;
0030   u.davList = davList;
0031   eh_ = u.word;
0032 
0033   EventTrailer ut{0};
0034   ut.BCL = 1;
0035   ut.DR = 1;
0036   ut.CL = 1;
0037   ut.ML = 1;
0038   et_ = ut.word;
0039 }