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