38 if(payload.size() != 12) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload size in 'AMC Data Header' is different than expected"; }
41 if(
GetHexBits(payload[0], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[0] has more than 16 bits in 'AMC Data Header'"; }
42 if(
GetHexBits(payload[1], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[1] has more than 16 bits in 'AMC Data Header'"; }
43 if(
GetHexBits(payload[2], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[2] has more than 16 bits in 'AMC Data Header'"; }
44 if(
GetHexBits(payload[3], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[3] has more than 16 bits in 'AMC Data Header'"; }
45 if(
GetHexBits(payload[4], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[4] has more than 16 bits in 'AMC Data Header'"; }
46 if(
GetHexBits(payload[5], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[5] has more than 16 bits in 'AMC Data Header'"; }
47 if(
GetHexBits(payload[6], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[6] has more than 16 bits in 'AMC Data Header'"; }
48 if(
GetHexBits(payload[7], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[7] has more than 16 bits in 'AMC Data Header'"; }
49 if(
GetHexBits(payload[8], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[8] has more than 16 bits in 'AMC Data Header'"; }
50 if(
GetHexBits(payload[9], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[9] has more than 16 bits in 'AMC Data Header'"; }
51 if(
GetHexBits(payload[10], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[10] has more than 16 bits in 'AMC Data Header'"; }
52 if(
GetHexBits(payload[11], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[11] has more than 16 bits in 'AMC Data Header'"; }
54 uint16_t HD1a = payload[0];
55 uint16_t HD1b = payload[1];
56 uint16_t HD1c = payload[2];
57 uint16_t HD1d = payload[3];
58 uint16_t HD2a = payload[4];
59 uint16_t HD2b = payload[5];
60 uint16_t HD2c = payload[6];
61 uint16_t HD2d = payload[7];
62 uint16_t HD3a = payload[8];
63 uint16_t HD3b = payload[9];
64 uint16_t HD3c = payload[10];
65 uint16_t HD3d = payload[11];
68 if(
GetHexBits(HD1a, 12, 15) != 9) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD1a are incorrect"; }
69 if(
GetHexBits(HD1b, 12, 15) != 9) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD1b are incorrect"; }
70 if(
GetHexBits(HD1c, 12, 15) != 9) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD1c are incorrect"; }
71 if(
GetHexBits(HD1c, 0, 11) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD1c are incorrect"; }
72 if(
GetHexBits(HD1d, 12, 15) != 9) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD1d are incorrect"; }
73 if(
GetHexBits(HD2a, 12, 15) != 10) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD2a are incorrect"; }
74 if(
GetHexBits(HD2a, 0, 11) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD2a are incorrect"; }
75 if(
GetHexBits(HD2b, 12, 15) != 10) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD2b are incorrect"; }
76 if(
GetHexBits(HD2c, 12, 15) != 10) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD2c are incorrect"; }
77 if(
GetHexBits(HD2c, 11, 11) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD2c are incorrect"; }
78 if(
GetHexBits(HD2d, 12, 15) != 10) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD2d are incorrect"; }
79 if(
GetHexBits(HD3a, 9, 14) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD3a are incorrect"; }
80 if(
GetHexBits(HD3a, 15, 15) != 1) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD3a are incorrect"; }
81 if(
GetHexBits(HD3b, 11, 15) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD3b are incorrect"; }
82 if(
GetHexBits(HD3c, 11, 15) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD3c are incorrect"; }
83 if(
GetHexBits(HD3d, 11, 15) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in HD3d are incorrect"; }
104 uint16_t HD1a = payload[0];
105 uint16_t HD1b = payload[1];
107 uint16_t HD1d = payload[3];
109 uint16_t HD2b = payload[5];
110 uint16_t HD2c = payload[6];
111 uint16_t HD2d = payload[7];
112 uint16_t HD3a = payload[8];
113 uint16_t HD3b = payload[9];
114 uint16_t HD3c = payload[10];
115 uint16_t HD3d = payload[11];
123 res->push_back(EMTFOutput_);
124 int iOut = res->size() - 1;
130 if ( (res->at(iOut)).HasAMC13Header() ==
true )
131 { (res->at(iOut)).add_format_error();
edm::LogError(
"L1T|EMTF") <<
"Why is there already an AMC13Header object?";
goto write_AMC13; }
151 (res->at(iOut)).set_AMC13Header(AMC13Header_);
157 if ( (res->at(iOut)).HasMTF7Header() ==
true )
158 { (res->at(iOut)).add_format_error();
edm::LogError(
"L1T|EMTF") <<
"Why is there already an MTF7Header object?";
goto write_MTF7; }
172 (res->at(iOut)).set_MTF7Header(MTF7Header_);
178 if ( (res->at(iOut)).HasEventHeader() ==
true )
179 { (res->at(iOut)).add_format_error();
edm::LogError(
"L1T|EMTF") <<
"Why is there already an EventHeader object?";
goto write_Event; }
207 (res->at(iOut)).set_EventHeader(EventHeader_);
std::vector< uint32_t > payload() const
#define DEFINE_L1T_UNPACKER(type)
std::vector< EMTFOutput > EMTFOutputCollection
uint16_t GetHexBits(uint16_t word, uint16_t lowBit, uint16_t highBit)
void amc(const amc::Header &h)