13 event.getByToken(static_cast<const CaloTokens*>(toks)->getEtSumToken(), etSums);
15 std::vector<uint32_t>
load;
17 for (
int i = etSums->getFirstBX();
i <= etSums->getLastBX(); ++
i) {
20 uint16_t objectMissingEt=0;
21 uint16_t objectMissingEtPhi=0;
25 for (
auto j = etSums->begin(
i); j != etSums->end(
i) && n < 4; ++j, ++
n) {
27 flagMissingEt=j->hwQual() & 0x1;
28 objectMissingEt=
std::min(j->hwPt(), 0xFFF)|(flagMissingEt<<12);
29 objectMissingEtPhi=
std::min(j->hwPhi(), 0x7F);
33 uint32_t word0= (objectMissingEt & 0xFFFF);
34 uint32_t word1= (objectMissingEtPhi & 0xFFFF);
37 word1 |= ((
i == 0) << 15);
40 load.push_back(word0);
41 load.push_back(word1);
44 return {
Block(95, load)};
Blocks pack(const edm::Event &, const PackerTokens *) override
std::vector< Block > Blocks
#define DEFINE_L1T_PACKER(type)