18 if(payload.size() != 8) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload size in 'AMC Data Trailer' 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 Trailer'"; }
22 if(
GetHexBits(payload[1], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[1] has more than 16 bits in 'AMC Data Trailer'"; }
23 if(
GetHexBits(payload[2], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[2] has more than 16 bits in 'AMC Data Trailer'"; }
24 if(
GetHexBits(payload[3], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[3] has more than 16 bits in 'AMC Data Trailer'"; }
25 if(
GetHexBits(payload[3], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[3] has more than 16 bits in 'AMC Data Trailer'"; }
26 if(
GetHexBits(payload[3], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[3] has more than 16 bits in 'AMC Data Trailer'"; }
27 if(
GetHexBits(payload[3], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[3] has more than 16 bits in 'AMC Data Trailer'"; }
28 if(
GetHexBits(payload[3], 16, 31) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Payload[3] has more than 16 bits in 'AMC Data Trailer'"; }
31 uint16_t TR1a = payload[0];
32 uint16_t TR1b = payload[1];
33 uint16_t TR1c = payload[2];
34 uint16_t TR1d = payload[3];
35 uint16_t TR2a = payload[4];
36 uint16_t TR2b = payload[5];
37 uint16_t TR2c = payload[6];
38 uint16_t TR2d = payload[7];
41 if(
GetHexBits(TR1a, 12, 15) != 15) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in TR1a are incorrect"; }
42 if(
GetHexBits(TR1b, 12, 15) != 15) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in TR1b are incorrect"; }
43 if(
GetHexBits(TR1b, 0, 3) != 15) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in TR1b are incorrect"; }
44 if(
GetHexBits(TR1b, 4, 6) != 7) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in TR1b are incorrect"; }
45 if(
GetHexBits(TR1c, 9, 11) != 0) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in TR1c are incorrect"; }
48 if(
GetHexBits(TR1d, 12, 15) != 15) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in TR1d are incorrect"; }
51 if(
GetHexBits(TR2a, 12, 15) != 14) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in TR2a are incorrect"; }
52 if(
GetHexBits(TR2b, 12, 15) != 14) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in TR2b are incorrect"; }
53 if(
GetHexBits(TR2c, 12, 15) != 14) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in TR2c are incorrect"; }
54 if(
GetHexBits(TR2d, 12, 15) != 14) { errors += 1;
edm::LogError(
"L1T|EMTF") <<
"Format identifier bits in TR2d are incorrect"; }
77 uint16_t TR1a = payload[0];
78 uint16_t TR1b = payload[1];
79 uint16_t TR1c = payload[2];
80 uint16_t TR1d = payload[3];
81 uint16_t TR2a = payload[4];
82 uint16_t TR2b = payload[5];
83 uint16_t TR2c = payload[6];
84 uint16_t TR2d = payload[7];
90 int iOut = res->size() - 1;
96 if ( (res->at(iOut)).HasEventTrailer() ==
true )
97 { (res->at(iOut)).add_format_error();
edm::LogError(
"L1T|EMTF") <<
"Why is there already an EventTrailer object?";
goto write_Event; }
126 (res->at(iOut)).set_EventTrailer(EventTrailer_);
132 if ( (res->at(iOut)).HasMTF7Trailer() ==
true )
133 { (res->at(iOut)).add_format_error();
edm::LogError(
"L1T|EMTF") <<
"Why is there already an MTF7Trailer object?";
goto write_MTF7; }
143 (res->at(iOut)).set_MTF7Trailer(MTF7Trailer_);
149 if ( (res->at(iOut)).HasAMC13Trailer() ==
true )
150 { (res->at(iOut)).add_format_error();
edm::LogError(
"L1T|EMTF") <<
"Why is there already an AMC13Trailer object?";
goto write_AMC13; }
167 (res->at(iOut)).set_AMC13Trailer(AMC13Trailer_);
void set_spcsr_scc(int bits)
void set_ddcsr_lf(int bits)
std::vector< uint32_t > payload() const
virtual int checkFormat(const Block &block)
std::vector< EMTFDaqOut > EMTFDaqOutCollection
int Format_Errors() const
virtual bool unpack(const Block &block, UnpackerCollections *coll) override
void set_sp_ladr(int bits)
void set_sp_padr(int bits)
#define DEFINE_L1T_UNPACKER(type)
uint16_t GetHexBits(uint16_t word, uint16_t lowBit, uint16_t highBit)
void set_sp_ersv(int bits)