18 if(payload.size() != 12) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload size in 'AMC Data Header' is different than expected"; }
21 if(
GetHexBits(payload[0], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[0] has more than 16 bits in 'AMC Data Header'"; }
22 if(
GetHexBits(payload[1], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[1] has more than 16 bits in 'AMC Data Header'"; }
23 if(
GetHexBits(payload[2], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[2] has more than 16 bits in 'AMC Data Header'"; }
24 if(
GetHexBits(payload[3], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[3] has more than 16 bits in 'AMC Data Header'"; }
25 if(
GetHexBits(payload[4], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[4] has more than 16 bits in 'AMC Data Header'"; }
26 if(
GetHexBits(payload[5], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[5] has more than 16 bits in 'AMC Data Header'"; }
27 if(
GetHexBits(payload[6], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[6] has more than 16 bits in 'AMC Data Header'"; }
28 if(
GetHexBits(payload[7], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[7] has more than 16 bits in 'AMC Data Header'"; }
29 if(
GetHexBits(payload[8], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[8] has more than 16 bits in 'AMC Data Header'"; }
30 if(
GetHexBits(payload[9], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[9] has more than 16 bits in 'AMC Data Header'"; }
31 if(
GetHexBits(payload[10], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[10] has more than 16 bits in 'AMC Data Header'"; }
32 if(
GetHexBits(payload[11], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[11] has more than 16 bits in 'AMC Data Header'"; }
34 uint16_t HD1a = payload[0];
35 uint16_t HD1b = payload[1];
36 uint16_t HD1c = payload[2];
37 uint16_t HD1d = payload[3];
38 uint16_t HD2a = payload[4];
39 uint16_t HD2b = payload[5];
40 uint16_t HD2c = payload[6];
41 uint16_t HD2d = payload[7];
42 uint16_t HD3a = payload[8];
43 uint16_t HD3b = payload[9];
44 uint16_t HD3c = payload[10];
45 uint16_t HD3d = payload[11];
48 if(
GetHexBits(HD1a, 12, 15) != 9) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD1a are incorrect"; }
49 if(
GetHexBits(HD1b, 12, 15) != 9) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD1b are incorrect"; }
50 if(
GetHexBits(HD1c, 12, 15) != 9) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD1c are incorrect"; }
51 if(
GetHexBits(HD1c, 0, 11) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD1c are incorrect"; }
52 if(
GetHexBits(HD1d, 12, 15) != 9) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD1d are incorrect"; }
53 if(
GetHexBits(HD2a, 12, 15) != 10) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD2a are incorrect"; }
54 if(
GetHexBits(HD2a, 0, 11) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD2a are incorrect"; }
55 if(
GetHexBits(HD2b, 12, 15) != 10) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD2b are incorrect"; }
56 if(
GetHexBits(HD2c, 12, 15) != 10) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD2c are incorrect"; }
57 if(
GetHexBits(HD2c, 11, 11) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD2c are incorrect"; }
58 if(
GetHexBits(HD2d, 12, 15) != 10) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD2d are incorrect"; }
59 if(
GetHexBits(HD3a, 9, 14) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD3a are incorrect"; }
60 if(
GetHexBits(HD3a, 15, 15) != 1) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD3a are incorrect"; }
61 if(
GetHexBits(HD3b, 11, 15) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD3b are incorrect"; }
62 if(
GetHexBits(HD3c, 11, 15) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD3c are incorrect"; }
63 if(
GetHexBits(HD3d, 11, 15) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD3d are incorrect"; }
86 uint16_t HD1a = payload[0];
87 uint16_t HD1b = payload[1];
89 uint16_t HD1d = payload[3];
91 uint16_t HD2b = payload[5];
92 uint16_t HD2c = payload[6];
93 uint16_t HD2d = payload[7];
94 uint16_t HD3a = payload[8];
95 uint16_t HD3b = payload[9];
96 uint16_t HD3c = payload[10];
97 uint16_t HD3d = payload[11];
105 res->push_back(EMTFDaqOut_);
106 int iOut = res->size() - 1;
112 if ( (res->at(iOut)).HasAMC13Header() ==
true )
113 { (res->at(iOut)).add_format_error();
edm::LogError(
"L1T|EMTF") <<
"Why is there already an AMC13Header object?";
goto write_AMC13; }
133 (res->at(iOut)).set_AMC13Header(AMC13Header_);
139 if ( (res->at(iOut)).HasMTF7Header() ==
true )
140 { (res->at(iOut)).add_format_error();
edm::LogError(
"L1T|EMTF") <<
"Why is there already an MTF7Header object?";
goto write_MTF7; }
154 (res->at(iOut)).set_MTF7Header(MTF7Header_);
160 if ( (res->at(iOut)).HasEventHeader() ==
true )
161 { (res->at(iOut)).add_format_error();
edm::LogError(
"L1T|EMTF") <<
"Why is there already an EventHeader object?";
goto write_Event; }
189 (res->at(iOut)).set_EventHeader(EventHeader_);
std::vector< uint32_t > payload() const
std::vector< EMTFDaqOut > EMTFDaqOutCollection
#define DEFINE_L1T_UNPACKER(type)
uint16_t GetHexBits(uint16_t word, uint16_t lowBit, uint16_t highBit)
void amc(const amc::Header &h)